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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-shell
Commits
02c7da2e
Commit
02c7da2e
authored
Mar 25, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #26 from regru/do_not_fall_on_deploy_keys
Do not fall on discover deployment keys. Closes #25
parents
30185044
6ec6fa78
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
lib/gitlab_net.rb
lib/gitlab_net.rb
+1
-1
lib/gitlab_shell.rb
lib/gitlab_shell.rb
+1
-1
No files found.
lib/gitlab_net.rb
View file @
02c7da2e
...
@@ -22,7 +22,7 @@ class GitlabNet
...
@@ -22,7 +22,7 @@ class GitlabNet
def
discover
(
key
)
def
discover
(
key
)
key_id
=
key
.
gsub
(
"key-"
,
""
)
key_id
=
key
.
gsub
(
"key-"
,
""
)
resp
=
get
(
"
#{
host
}
/discover?key_id=
#{
key_id
}
"
)
resp
=
get
(
"
#{
host
}
/discover?key_id=
#{
key_id
}
"
)
JSON
.
parse
(
resp
.
body
)
JSON
.
parse
(
resp
.
body
)
rescue
nil
end
end
def
check
def
check
...
...
lib/gitlab_shell.rb
View file @
02c7da2e
...
@@ -26,7 +26,7 @@ class GitlabShell
...
@@ -26,7 +26,7 @@ class GitlabShell
end
end
else
else
user
=
api
.
discover
(
@key_id
)
user
=
api
.
discover
(
@key_id
)
puts
"Welcome to GitLab,
#{
user
[
'name'
]
}
!"
puts
"Welcome to GitLab,
#{
user
&&
user
[
'name'
]
||
'Anonymous'
}
!"
end
end
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