Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
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
1
Merge Requests
1
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-ce
Commits
080997d8
Commit
080997d8
authored
Jun 03, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable Lint/AmbiguousOperator rubocop cop
See #17478
parent
ae5f17ae
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
.rubocop.yml
.rubocop.yml
+1
-1
app/models/project_services/irker_service.rb
app/models/project_services/irker_service.rb
+1
-1
lib/api/repositories.rb
lib/api/repositories.rb
+3
-3
lib/gitlab/key_fingerprint.rb
lib/gitlab/key_fingerprint.rb
+3
-3
No files found.
.rubocop.yml
View file @
080997d8
...
@@ -771,7 +771,7 @@ Metrics/PerceivedComplexity:
...
@@ -771,7 +771,7 @@ Metrics/PerceivedComplexity:
# Checks for ambiguous operators in the first argument of a method invocation
# Checks for ambiguous operators in the first argument of a method invocation
# without parentheses.
# without parentheses.
Lint/AmbiguousOperator
:
Lint/AmbiguousOperator
:
Enabled
:
fals
e
Enabled
:
tru
e
# Checks for ambiguous regexp literals in the first argument of a method
# Checks for ambiguous regexp literals in the first argument of a method
# invocation without parentheses.
# invocation without parentheses.
...
...
app/models/project_services/irker_service.rb
View file @
080997d8
...
@@ -83,7 +83,7 @@ class IrkerService < Service
...
@@ -83,7 +83,7 @@ class IrkerService < Service
self
.
channels
=
recipients
.
split
(
/\s+/
).
map
do
|
recipient
|
self
.
channels
=
recipients
.
split
(
/\s+/
).
map
do
|
recipient
|
format_channel
(
recipient
)
format_channel
(
recipient
)
end
end
channels
.
reject!
&
:nil?
channels
.
reject!
(
&
:nil?
)
end
end
def
format_channel
(
recipient
)
def
format_channel
(
recipient
)
...
...
lib/api/repositories.rb
View file @
080997d8
...
@@ -57,7 +57,7 @@ module API
...
@@ -57,7 +57,7 @@ module API
not_found!
"File"
unless
blob
not_found!
"File"
unless
blob
content_type
'text/plain'
content_type
'text/plain'
header
*
Gitlab
::
Workhorse
.
send_git_blob
(
repo
,
blob
)
header
(
*
Gitlab
::
Workhorse
.
send_git_blob
(
repo
,
blob
)
)
end
end
# Get a raw blob contents by blob sha
# Get a raw blob contents by blob sha
...
@@ -83,7 +83,7 @@ module API
...
@@ -83,7 +83,7 @@ module API
env
[
'api.format'
]
=
:txt
env
[
'api.format'
]
=
:txt
content_type
blob
.
mime_type
content_type
blob
.
mime_type
header
*
Gitlab
::
Workhorse
.
send_git_blob
(
repo
,
blob
)
header
(
*
Gitlab
::
Workhorse
.
send_git_blob
(
repo
,
blob
)
)
end
end
# Get a an archive of the repository
# Get a an archive of the repository
...
@@ -98,7 +98,7 @@ module API
...
@@ -98,7 +98,7 @@ module API
authorize!
:download_code
,
user_project
authorize!
:download_code
,
user_project
begin
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
rescue
not_found!
(
'File'
)
not_found!
(
'File'
)
end
end
...
...
lib/gitlab/key_fingerprint.rb
View file @
080997d8
...
@@ -17,9 +17,9 @@ module Gitlab
...
@@ -17,9 +17,9 @@ module Gitlab
file
.
rewind
file
.
rewind
cmd
=
[]
cmd
=
[]
cmd
.
push
*
%W(ssh-keygen
)
cmd
.
push
(
'ssh-keygen'
)
cmd
.
push
*
%W(-E md5
)
if
explicit_fingerprint_algorithm?
cmd
.
push
(
'-E'
,
'md5'
)
if
explicit_fingerprint_algorithm?
cmd
.
push
*
%W(-lf
#{
file
.
path
}
)
cmd
.
push
(
'-lf'
,
file
.
path
)
cmd_output
,
cmd_status
=
popen
(
cmd
,
'/tmp'
)
cmd_output
,
cmd_status
=
popen
(
cmd
,
'/tmp'
)
end
end
...
...
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