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
6ec6fa78
Commit
6ec6fa78
authored
Mar 25, 2013
by
Akzhan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not fall on discover deployment keys. Closes #25
parent
f0eb8017
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 @
6ec6fa78
...
@@ -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 @
6ec6fa78
...
@@ -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