summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-11-25 16:05:33 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-11-25 16:05:33 +0000
commita1f2c95f519e15926fe91afb49bd5c979c8689ee (patch)
tree829e1a517ae6e8fd079089c88fd528c7fdddf6a2 /lib
parent098e5a68fc2830543062f8f900fd460d98c52e89 (diff)
parentd7e1deb195edbce8d4557b07c9f89e612c999ff2 (diff)
downloadgitlab-shell-a1f2c95f519e15926fe91afb49bd5c979c8689ee.tar.gz
Merge branch 'gitlab_keys_return_values' of /home/git/repositories/gitlab/gitlab-shell
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab_keys.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/gitlab_keys.rb b/lib/gitlab_keys.rb
index bc00867..0098578 100644
--- a/lib/gitlab_keys.rb
+++ b/lib/gitlab_keys.rb
@@ -31,6 +31,7 @@ class GitlabKeys
$logger.info "Adding key #{@key_id} => #{@key.inspect}"
auth_line = "command=\"#{ROOT_PATH}/bin/gitlab-shell #{@key_id}\",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty #{@key}"
open(auth_file, 'a') { |file| file.puts(auth_line) }
+ true
end
def rm_key
@@ -44,9 +45,11 @@ class GitlabKeys
temp.close
FileUtils.cp(temp.path, auth_file)
end
+ true
end
def clear
open(auth_file, 'w') { |file| file.puts '# Managed by gitlab-shell' }
+ true
end
end