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
56e7548b
Commit
56e7548b
authored
Jun 28, 2017
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Rubocop offenses
parent
405a75c4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
7 deletions
+5
-7
lib/gitlab/background_migration/update_authorized_keys_file_since.rb
...background_migration/update_authorized_keys_file_since.rb
+2
-4
spec/lib/gitlab/background_migration/update_authorized_keys_file_since_spec.rb
...round_migration/update_authorized_keys_file_since_spec.rb
+2
-2
spec/lib/gitlab/shell_spec.rb
spec/lib/gitlab/shell_spec.rb
+1
-1
No files found.
lib/gitlab/background_migration/update_authorized_keys_file_since.rb
View file @
56e7548b
...
...
@@ -9,6 +9,8 @@ module Gitlab
end
end
delegate
:remove_keys_not_found_in_db
,
to: :gitlab_shell
def
perform
(
cutoff_datetime
)
add_keys_since
(
cutoff_datetime
)
...
...
@@ -22,10 +24,6 @@ module Gitlab
end
end
def
remove_keys_not_found_in_db
gitlab_shell
.
remove_keys_not_found_in_db
end
# Not added to Gitlab::Shell because I don't expect this to be used again
def
batch_add_keys_in_db_starting_from
(
start_id
)
gitlab_shell
.
batch_add_keys
do
|
adder
|
...
...
spec/lib/gitlab/background_migration/update_authorized_keys_file_since_spec.rb
View file @
56e7548b
...
...
@@ -89,8 +89,8 @@ describe Gitlab::BackgroundMigration::UpdateAuthorizedKeysFileSince do
file
=
File
.
read
(
Rails
.
root
.
join
(
'tmp/tests/.ssh/authorized_keys'
))
expect
(
file
.
scan
(
/ssh-rsa/
).
count
).
to
eq
(
7
)
expect
(
file
).
to_not
include
(
Gitlab
::
Shell
.
strip_key
(
@keys
[
0
].
key
))
expect
(
file
).
to_not
include
(
Gitlab
::
Shell
.
strip_key
(
@keys
[
2
].
key
))
expect
(
file
).
not_to
include
(
Gitlab
::
Shell
.
strip_key
(
@keys
[
0
].
key
))
expect
(
file
).
not_to
include
(
Gitlab
::
Shell
.
strip_key
(
@keys
[
2
].
key
))
expect
(
file
).
to
include
(
Gitlab
::
Shell
.
strip_key
(
@keys
[
3
].
key
))
expect
(
file
).
to
include
(
Gitlab
::
Shell
.
strip_key
(
@keys
[
9
].
key
))
end
...
...
spec/lib/gitlab/shell_spec.rb
View file @
56e7548b
...
...
@@ -331,7 +331,7 @@ describe Gitlab::Shell, lib: true do
end
end
expect
(
ids
).
to
eq
(
[
"1
\n
"
,
"2
\n
"
,
"3
\n
"
,
"4
\n
"
]
)
expect
(
ids
).
to
eq
(
%W{1
\n
2
\n
3
\n
4
\n
}
)
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