class Git::Flock::Flocker
Attributes
orgname[R]
token[R]
Public Class Methods
new(options)
click to toggle source
# File lib/git/flock.rb, line 15 def initialize(options) @orgname = options[:orgname] || fail_args @token = options[:token] || fail_args end
Public Instance Methods
fail_args()
click to toggle source
# File lib/git/flock.rb, line 33 def fail_args puts 'usage: git-flock org-name api-key' exit end
flockem()
click to toggle source
# File lib/git/flock.rb, line 22 def flockem JSON.load(repos).each { |repo| `git clone #{repo['ssh_url']}` } rescue Exception => e puts e.message fail_args end
repos()
click to toggle source
# File lib/git/flock.rb, line 29 def repos `curl -u #{token}:x-oauth-basic -s https://api.github.com/orgs/#{orgname}/repos` end