Commit 611f3ad2 authored by Timothy Andrew's avatar Timothy Andrew

Fix rubocop complaints.

parent abd8ecca
...@@ -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
...@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment