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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
611f3ad2
Commit
611f3ad2
authored
Apr 20, 2016
by
Timothy Andrew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rubocop complaints.
parent
abd8ecca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
lib/api/helpers/authentication.rb
lib/api/helpers/authentication.rb
+1
-1
lib/api/helpers/core.rb
lib/api/helpers/core.rb
+10
-10
No files found.
lib/api/helpers/authentication.rb
View file @
611f3ad2
...
@@ -50,4 +50,4 @@ module API
...
@@ -50,4 +50,4 @@ module API
end
end
end
end
end
end
end
end
\ No newline at end of file
lib/api/helpers/core.rb
View file @
611f3ad2
...
@@ -132,7 +132,7 @@ module API
...
@@ -132,7 +132,7 @@ module API
if
params
[
:labels
].
present?
if
params
[
:labels
].
present?
params
[
:labels
].
split
(
','
).
each
do
|
label_name
|
params
[
:labels
].
split
(
','
).
each
do
|
label_name
|
label
=
user_project
.
labels
.
create_with
(
label
=
user_project
.
labels
.
create_with
(
color:
Label
::
DEFAULT_COLOR
).
find_or_initialize_by
(
color:
Label
::
DEFAULT_COLOR
).
find_or_initialize_by
(
title:
label_name
.
strip
)
title:
label_name
.
strip
)
if
label
.
invalid?
if
label
.
invalid?
...
@@ -274,9 +274,9 @@ module API
...
@@ -274,9 +274,9 @@ module API
bad_request!
(
'Bad file path'
)
unless
file_path
.
start_with?
(
uploads_path
)
bad_request!
(
'Bad file path'
)
unless
file_path
.
start_with?
(
uploads_path
)
UploadedFile
.
new
(
UploadedFile
.
new
(
file_path
,
file_path
,
params
[
"
#{
field
}
.name"
],
params
[
"
#{
field
}
.name"
],
params
[
"
#{
field
}
.type"
]
||
'application/octet-stream'
,
params
[
"
#{
field
}
.type"
]
||
'application/octet-stream'
,
)
)
end
end
...
@@ -288,11 +288,11 @@ module API
...
@@ -288,11 +288,11 @@ module API
# Support download acceleration
# Support download acceleration
case
headers
[
'X-Sendfile-Type'
]
case
headers
[
'X-Sendfile-Type'
]
when
'X-Sendfile'
when
'X-Sendfile'
header
[
'X-Sendfile'
]
=
path
header
[
'X-Sendfile'
]
=
path
body
body
else
else
file
FileStreamer
.
new
(
path
)
file
FileStreamer
.
new
(
path
)
end
end
end
end
...
@@ -348,4 +348,4 @@ module API
...
@@ -348,4 +348,4 @@ module API
end
end
end
end
end
end
end
end
\ No newline at end of file
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