• David Martin's avatar
    Added list-keys command and spec · 89d8af46
    David Martin authored
    Removed puts and tidied up regex
    
    Address the hound
    
    Address the hound, again
    
    Use single quotes
    
    Add back travis.yml file
    
    Remove travis.yml, only keep on fh-master
    
    Use single quotes
    
    Use single quotes
    89d8af46
gitlab-keys 561 Bytes
#!/usr/bin/env ruby

require_relative '../lib/gitlab_init'

#
# GitLab Keys shell. Add/remove keys from ~/.ssh/authorized_keys
#
# Ex.
#   /bin/gitlab-keys add-key key-782 "ssh-rsa AAAAx321..."
#
#   printf "key-782\tssh-rsa AAAAx321...\n" | /bin/gitlab-keys batch-add-keys
#
#   /bin/gitlab-keys rm-key key-23 "ssh-rsa AAAAx321..."
#
#   /bin/gitlab-keys list-keys
#   
#   /bin/gitlab-keys clear
#

require File.join(ROOT_PATH, 'lib', 'gitlab_keys')

# Return non-zero if command execution was not successful
if GitlabKeys.new.exec
  exit 0
else
  exit 1
end