Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
8db088cc
Commit
8db088cc
authored
Aug 18, 2016
by
Connor Shea
Committed by
Sean McGivern
Aug 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use global variables.
parent
0baaf490
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
app/assets/javascripts/blob_edit/blob_edit_bundle.js
app/assets/javascripts/blob_edit/blob_edit_bundle.js
+2
-2
app/assets/javascripts/snippet/snippet_bundle.js
app/assets/javascripts/snippet/snippet_bundle.js
+1
-1
features/steps/project/source/browse_files.rb
features/steps/project/source/browse_files.rb
+4
-4
No files found.
app/assets/javascripts/blob_edit/blob_edit_bundle.js
View file @
8db088cc
...
@@ -2,10 +2,10 @@
...
@@ -2,10 +2,10 @@
(
function
()
{
(
function
()
{
$
(
function
()
{
$
(
function
()
{
url
=
$
(
"
.js-edit-blob-form
"
).
data
(
"
relative-url-root
"
);
var
url
=
$
(
"
.js-edit-blob-form
"
).
data
(
"
relative-url-root
"
);
url
+=
$
(
"
.js-edit-blob-form
"
).
data
(
"
assets-prefix
"
);
url
+=
$
(
"
.js-edit-blob-form
"
).
data
(
"
assets-prefix
"
);
blob
=
new
EditBlob
(
url
,
$
(
'
.js-edit-blob-form
'
).
data
(
'
blob-language
'
));
var
blob
=
new
EditBlob
(
url
,
$
(
'
.js-edit-blob-form
'
).
data
(
'
blob-language
'
));
new
NewCommitForm
(
$
(
'
.js-edit-blob-form
'
));
new
NewCommitForm
(
$
(
'
.js-edit-blob-form
'
));
});
});
...
...
app/assets/javascripts/snippet/snippet_bundle.js
View file @
8db088cc
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
(
function
()
{
(
function
()
{
$
(
function
()
{
$
(
function
()
{
editor
=
ace
.
edit
(
"
editor
"
)
var
editor
=
ace
.
edit
(
"
editor
"
)
$
(
"
.snippet-form-holder form
"
).
on
(
'
submit
'
,
function
()
{
$
(
"
.snippet-form-holder form
"
).
on
(
'
submit
'
,
function
()
{
$
(
"
.snippet-file-content
"
).
val
(
editor
.
getValue
());
$
(
"
.snippet-file-content
"
).
val
(
editor
.
getValue
());
...
...
features/steps/project/source/browse_files.rb
View file @
8db088cc
...
@@ -44,7 +44,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
...
@@ -44,7 +44,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end
end
step
'I should see its content with new lines preserved at end of file'
do
step
'I should see its content with new lines preserved at end of file'
do
expect
(
evaluate_script
(
'
blob.editor
.getValue()'
)).
to
eq
"Sample
\n\n\n
"
expect
(
evaluate_script
(
'
ace.edit("editor")
.getValue()'
)).
to
eq
"Sample
\n\n\n
"
end
end
step
'I click link "Raw"'
do
step
'I click link "Raw"'
do
...
@@ -65,7 +65,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
...
@@ -65,7 +65,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
step
'I can edit code'
do
step
'I can edit code'
do
set_new_content
set_new_content
expect
(
evaluate_script
(
'
blob.editor
.getValue()'
)).
to
eq
new_gitignore_content
expect
(
evaluate_script
(
'
ace.edit("editor")
.getValue()'
)).
to
eq
new_gitignore_content
end
end
step
'I edit code'
do
step
'I edit code'
do
...
@@ -74,7 +74,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
...
@@ -74,7 +74,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end
end
step
'I edit code with new lines at end of file'
do
step
'I edit code with new lines at end of file'
do
execute_script
(
'
blob.editor
.setValue("Sample\n\n\n")'
)
execute_script
(
'
ace.edit("editor")
.setValue("Sample\n\n\n")'
)
end
end
step
'I fill the new file name'
do
step
'I fill the new file name'
do
...
@@ -378,7 +378,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
...
@@ -378,7 +378,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
private
private
def
set_new_content
def
set_new_content
execute_script
(
"
blob.editor
.setValue('
#{
new_gitignore_content
}
')"
)
execute_script
(
"
ace.edit('editor')
.setValue('
#{
new_gitignore_content
}
')"
)
end
end
# Content of the gitignore file on the seed repository.
# Content of the gitignore file on the seed repository.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment