diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab_custom_hook.rb | 4 | ||||
-rw-r--r-- | lib/gitlab_post_receive.rb | 2 |
2 files changed, 3 insertions, 3 deletions
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 |