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
ad17617d
Commit
ad17617d
authored
Aug 10, 2016
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes proposed during review
parent
ae21774c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
lib/gitlab_keys.rb
lib/gitlab_keys.rb
+1
-1
spec/gitlab_keys_spec.rb
spec/gitlab_keys_spec.rb
+2
-2
No files found.
lib/gitlab_keys.rb
View file @
ad17617d
...
...
@@ -9,7 +9,7 @@ class GitlabKeys
attr_accessor
:auth_file
,
:key
def
self
.
command
(
key_id
)
raise
KeyError
.
new
(
"Invalid key_id:
#{
key_id
.
inspect
}
"
)
unless
/\A[a-z0-9-]+\z/
.
match
(
key_id
)
raise
KeyError
.
new
(
"Invalid key_id:
#{
key_id
.
inspect
}
"
)
unless
/\A[a-z0-9-]+\z/
=~
key_id
"
#{
ROOT_PATH
}
/bin/gitlab-shell
#{
key_id
}
"
end
...
...
spec/gitlab_keys_spec.rb
View file @
ad17617d
...
...
@@ -14,7 +14,7 @@ describe GitlabKeys do
end
it
'raises KeyError on invalid input'
do
expect
{
described_class
.
command
(
"
\n
ssh-rsa AAA"
)
}.
to
raise_error
(
GitlabKey
s
::
KeyError
)
expect
{
described_class
.
command
(
"
\n
ssh-rsa AAA"
)
}.
to
raise_error
(
described_clas
s
::
KeyError
)
end
end
...
...
@@ -29,7 +29,7 @@ describe GitlabKeys do
end
it
'raises KeyError on invalid input'
do
expect
{
described_class
.
key_line
(
'key-741'
,
"ssh-rsa AAA
\n
ssh-rsa AAA"
)
}.
to
raise_error
(
GitlabKey
s
::
KeyError
)
expect
{
described_class
.
key_line
(
'key-741'
,
"ssh-rsa AAA
\n
ssh-rsa AAA"
)
}.
to
raise_error
(
described_clas
s
::
KeyError
)
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