Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-shell
Commits
b93ea982
Commit
b93ea982
authored
Mar 02, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable rubocop rule
parent
76524ecf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
.rubocop.yml
.rubocop.yml
+1
-1
lib/gitlab_custom_hook.rb
lib/gitlab_custom_hook.rb
+2
-2
lib/gitlab_post_receive.rb
lib/gitlab_post_receive.rb
+1
-1
No files found.
.rubocop.yml
View file @
b93ea982
...
@@ -877,7 +877,7 @@ Lint/ParenthesesAsGroupedExpression:
...
@@ -877,7 +877,7 @@ Lint/ParenthesesAsGroupedExpression:
Checks for method calls with a space before the opening
Checks for method calls with a space before the opening
parenthesis.
parenthesis.
StyleGuide
:
'
https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
StyleGuide
:
'
https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
Enabled
:
fals
e
Enabled
:
tru
e
Lint/RequireParentheses
:
Lint/RequireParentheses
:
Description
:
>-
Description
:
>-
...
...
lib/gitlab_custom_hook.rb
View file @
b93ea982
...
@@ -33,7 +33,7 @@ class GitlabCustomHook
...
@@ -33,7 +33,7 @@ class GitlabCustomHook
# we combine both stdout and stderr as we don't know what stream
# we combine both stdout and stderr as we don't know what stream
# will be used by the custom hook
# 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
exit_status
=
true
stdin
.
sync
=
true
stdin
.
sync
=
true
...
@@ -43,7 +43,7 @@ class GitlabCustomHook
...
@@ -43,7 +43,7 @@ class GitlabCustomHook
begin
begin
# inject all the changes as stdin to the hook
# inject all the changes as stdin to the hook
changes
.
lines
do
|
line
|
changes
.
lines
do
|
line
|
stdin
.
puts
(
line
)
stdin
.
puts
(
line
)
end
end
rescue
Errno
::
EPIPE
rescue
Errno
::
EPIPE
end
end
...
...
lib/gitlab_post_receive.rb
View file @
b93ea982
...
@@ -62,7 +62,7 @@ class GitlabPostReceive
...
@@ -62,7 +62,7 @@ class GitlabPostReceive
# Center the line by calculating the left padding measured in characters.
# Center the line by calculating the left padding measured in characters.
line_padding
=
[(
total_width
-
line
.
length
)
/
2
,
0
].
max
line_padding
=
[(
total_width
-
line
.
length
)
/
2
,
0
].
max
puts
(
" "
*
line_padding
)
+
line
puts
(
" "
*
line_padding
)
+
line
end
end
puts
puts
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment