From 611f3ad2683a1103ef3c2af244a10ac9f3ae6734 Mon Sep 17 00:00:00 2001
From: Timothy Andrew <mail@timothyandrew.net>
Date: Wed, 20 Apr 2016 11:14:08 +0530
Subject: [PATCH] Fix rubocop complaints.

---
 lib/api/helpers/authentication.rb |  2 +-
 lib/api/helpers/core.rb           | 20 ++++++++++----------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/lib/api/helpers/authentication.rb b/lib/api/helpers/authentication.rb
index 666bf3ffa16..4109c97ed04 100644
--- a/lib/api/helpers/authentication.rb
+++ b/lib/api/helpers/authentication.rb
@@ -50,4 +50,4 @@ module API
       end
     end
   end
-end
\ No newline at end of file
+end
diff --git a/lib/api/helpers/core.rb b/lib/api/helpers/core.rb
index c37064d49ab..05cda8b84be 100644
--- a/lib/api/helpers/core.rb
+++ b/lib/api/helpers/core.rb
@@ -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
-- 
GitLab