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
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
Jérome Perrin
gitlab-ce
Commits
efd70c18
Commit
efd70c18
authored
Jun 30, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable Style/UnneededCapitalW Rubocop cop
parent
2efee5f6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
.rubocop.yml
.rubocop.yml
+1
-1
lib/gitlab/key_fingerprint.rb
lib/gitlab/key_fingerprint.rb
+1
-1
spec/lib/gitlab/popen_spec.rb
spec/lib/gitlab/popen_spec.rb
+3
-3
No files found.
.rubocop.yml
View file @
efd70c18
...
...
@@ -681,7 +681,7 @@ Style/UnlessElse:
# Checks for %W when interpolation is not needed.
Style/UnneededCapitalW
:
Enabled
:
fals
e
Enabled
:
tru
e
# TODO: Enable UnneededInterpolation Cop.
# Checks for strings that are just an interpolated expression.
...
...
lib/gitlab/key_fingerprint.rb
View file @
efd70c18
...
...
@@ -39,7 +39,7 @@ module Gitlab
# OpenSSH 6.8 introduces a new default output format for fingerprints.
# Check the version and decide which command to use.
version_output
,
version_status
=
popen
(
%
W
(ssh -V)
)
version_output
,
version_status
=
popen
(
%
w
(ssh -V)
)
return
false
unless
version_status
.
zero?
version_matches
=
version_output
.
match
(
/OpenSSH_(?<major>\d+)\.(?<minor>\d+)/
)
...
...
spec/lib/gitlab/popen_spec.rb
View file @
efd70c18
...
...
@@ -10,7 +10,7 @@ describe 'Gitlab::Popen', lib: true, no_db: true do
context
'zero status'
do
before
do
@output
,
@status
=
@klass
.
new
.
popen
(
%
W
(ls)
,
path
)
@output
,
@status
=
@klass
.
new
.
popen
(
%
w
(ls)
,
path
)
end
it
{
expect
(
@status
).
to
be_zero
}
...
...
@@ -19,7 +19,7 @@ describe 'Gitlab::Popen', lib: true, no_db: true do
context
'non-zero status'
do
before
do
@output
,
@status
=
@klass
.
new
.
popen
(
%
W
(cat NOTHING)
,
path
)
@output
,
@status
=
@klass
.
new
.
popen
(
%
w
(cat NOTHING)
,
path
)
end
it
{
expect
(
@status
).
to
eq
(
1
)
}
...
...
@@ -34,7 +34,7 @@ describe 'Gitlab::Popen', lib: true, no_db: true do
context
'without a directory argument'
do
before
do
@output
,
@status
=
@klass
.
new
.
popen
(
%
W
(ls)
)
@output
,
@status
=
@klass
.
new
.
popen
(
%
w
(ls)
)
end
it
{
expect
(
@status
).
to
be_zero
}
...
...
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