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
Boxiang Sun
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
end
end
end
end
\ No newline at end of file
end
lib/api/helpers/core.rb
View file @
611f3ad2
...
...
@@ -132,7 +132,7 @@ module API
if
params
[
:labels
].
present?
params
[
:labels
].
split
(
','
).
each
do
|
label_name
|
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
)
if
label
.
invalid?
...
...
@@ -274,9 +274,9 @@ module API
bad_request!
(
'Bad file path'
)
unless
file_path
.
start_with?
(
uploads_path
)
UploadedFile
.
new
(
file_path
,
params
[
"
#{
field
}
.name"
],
params
[
"
#{
field
}
.type"
]
||
'application/octet-stream'
,
file_path
,
params
[
"
#{
field
}
.name"
],
params
[
"
#{
field
}
.type"
]
||
'application/octet-stream'
,
)
end
...
...
@@ -288,11 +288,11 @@ module API
# Support download acceleration
case
headers
[
'X-Sendfile-Type'
]
when
'X-Sendfile'
header
[
'X-Sendfile'
]
=
path
body
else
file
FileStreamer
.
new
(
path
)
when
'X-Sendfile'
header
[
'X-Sendfile'
]
=
path
body
else
file
FileStreamer
.
new
(
path
)
end
end
...
...
@@ -348,4 +348,4 @@ module API
end
end
end
end
\ No newline at end of file
end
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