summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-06-05 19:08:56 +0000
committerRobert Speicher <robert@gitlab.com>2016-06-05 19:08:56 +0000
commitcc0ea13d21de6adb1ac361024ee88d383b267cc7 (patch)
treee2d6457e95231f6fd76d866d343659cb60c7eff5 /lib
parent90a3c947a712845770dc9fe2266b727092e717cb (diff)
parent080997d87edcafd7afd3c3aa01da441e87493fdd (diff)
downloadgitlab-ce-cc0ea13d21de6adb1ac361024ee88d383b267cc7.tar.gz
Merge branch 'rubocop/enable-ambiguous-operator-rubocop-lint' into 'master'
Enable Lint/AmbiguousOperator rubocop cop Enforce using parentheses if ambiguous operators are detected, like `header *some_method` or `array.select &:even?`. See #17478 See merge request !4454
Diffstat (limited to 'lib')
-rw-r--r--lib/api/repositories.rb6
-rw-r--r--lib/gitlab/key_fingerprint.rb6
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/api/repositories.rb b/lib/api/repositories.rb
index 62161aadb9a..9cb14e95ebc 100644
--- a/lib/api/repositories.rb
+++ b/lib/api/repositories.rb
@@ -57,7 +57,7 @@ module API
not_found! "File" unless blob
content_type 'text/plain'
- header *Gitlab::Workhorse.send_git_blob(repo, blob)
+ header(*Gitlab::Workhorse.send_git_blob(repo, blob))
end
# Get a raw blob contents by blob sha
@@ -83,7 +83,7 @@ module API
env['api.format'] = :txt
content_type blob.mime_type
- header *Gitlab::Workhorse.send_git_blob(repo, blob)
+ header(*Gitlab::Workhorse.send_git_blob(repo, blob))
end
# Get a an archive of the repository
@@ -98,7 +98,7 @@ module API
authorize! :download_code, user_project
begin
- header *Gitlab::Workhorse.send_git_archive(user_project, params[:sha], params[:format])
+ header(*Gitlab::Workhorse.send_git_archive(user_project, params[:sha], params[:format]))
rescue
not_found!('File')
end
diff --git a/lib/gitlab/key_fingerprint.rb b/lib/gitlab/key_fingerprint.rb
index baf52ff750d..8684b4636ea 100644
--- a/lib/gitlab/key_fingerprint.rb
+++ b/lib/gitlab/key_fingerprint.rb
@@ -17,9 +17,9 @@ module Gitlab
file.rewind
cmd = []
- cmd.push *%W(ssh-keygen)
- cmd.push *%W(-E md5) if explicit_fingerprint_algorithm?
- cmd.push *%W(-lf #{file.path})
+ cmd.push('ssh-keygen')
+ cmd.push('-E', 'md5') if explicit_fingerprint_algorithm?
+ cmd.push('-lf', file.path)
cmd_output, cmd_status = popen(cmd, '/tmp')
end