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
07e79989
Commit
07e79989
authored
Jun 28, 2017
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reuse `Gitlab::ShellAdapter`
parent
9756deec
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
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
No files found.
lib/gitlab/background_migration/update_authorized_keys_file_since.rb
View file @
07e79989
module
Gitlab
module
BackgroundMigration
class
UpdateAuthorizedKeysFileSince
include
Gitlab
::
ShellAdapter
class
Key
<
ActiveRecord
::
Base
self
.
table_name
=
'keys'
...
...
@@ -34,10 +36,6 @@ module Gitlab
end
end
end
def
gitlab_shell
@gitlab_shell
||=
Gitlab
::
Shell
.
new
end
end
end
end
spec/lib/gitlab/background_migration/update_authorized_keys_file_since_spec.rb
View file @
07e79989
...
...
@@ -28,7 +28,7 @@ describe Gitlab::BackgroundMigration::UpdateAuthorizedKeysFileSince do
end
it
'calls remove_keys_not_found_in_db on Gitlab::Shell'
do
expect
(
background_migration
.
gitlab_s
hell
).
to
receive
(
:remove_keys_not_found_in_db
)
expect
_any_instance_of
(
Gitlab
::
S
hell
).
to
receive
(
:remove_keys_not_found_in_db
)
subject
end
end
...
...
@@ -67,7 +67,7 @@ describe Gitlab::BackgroundMigration::UpdateAuthorizedKeysFileSince do
describe
'#remove_keys_not_found_in_db'
do
it
'calls remove_keys_not_found_in_db on Gitlab::Shell'
do
expect
(
background_migration
.
gitlab_s
hell
).
to
receive
(
:remove_keys_not_found_in_db
)
expect
_any_instance_of
(
Gitlab
::
S
hell
).
to
receive
(
:remove_keys_not_found_in_db
)
background_migration
.
remove_keys_not_found_in_db
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