summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-02 18:44:28 -0800
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-02 18:44:28 -0800
commitb93ea982d41e82b247c3e89cec1622dbb517cfdb (patch)
tree4f377ff24d4ba3549206c39e35f38bce9fa4896b
parent76524ecf621048dce84465df57785749b0a53968 (diff)
downloadgitlab-shell-b93ea982d41e82b247c3e89cec1622dbb517cfdb.tar.gz
Enable rubocop rule
-rw-r--r--.rubocop.yml2
-rw-r--r--lib/gitlab_custom_hook.rb4
-rw-r--r--lib/gitlab_post_receive.rb2
3 files changed, 4 insertions, 4 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index 7864385..ef9bca4 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -877,7 +877,7 @@ Lint/ParenthesesAsGroupedExpression:
Checks for method calls with a space before the opening
parenthesis.
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
- Enabled: false
+ Enabled: true
Lint/RequireParentheses:
Description: >-
diff --git a/lib/gitlab_custom_hook.rb b/lib/gitlab_custom_hook.rb
index 5533aa8..a099e79 100644
--- a/lib/gitlab_custom_hook.rb
+++ b/lib/gitlab_custom_hook.rb
@@ -33,7 +33,7 @@ class GitlabCustomHook
# we combine both stdout and stderr as we don't know what stream
# will be used by the custom hook
- Open3.popen2e (hook) do |stdin, stdout_stderr, wait_thr|
+ Open3.popen2e(hook) do |stdin, stdout_stderr, wait_thr|
exit_status = true
stdin.sync = true
@@ -43,7 +43,7 @@ class GitlabCustomHook
begin
# inject all the changes as stdin to the hook
changes.lines do |line|
- stdin.puts (line)
+ stdin.puts(line)
end
rescue Errno::EPIPE
end
diff --git a/lib/gitlab_post_receive.rb b/lib/gitlab_post_receive.rb
index f7ff153..52dd965 100644
--- a/lib/gitlab_post_receive.rb
+++ b/lib/gitlab_post_receive.rb
@@ -62,7 +62,7 @@ class GitlabPostReceive
# Center the line by calculating the left padding measured in characters.
line_padding = [(total_width - line.length) / 2, 0].max
- puts (" " * line_padding) + line
+ puts(" " * line_padding) + line
end
puts