Module: Gh::Who

Extended by:
Who
Includes:
Gist
Included in:
Who
Defined in:
lib/gh/who.rb,
lib/gh/who/version.rb

Constant Summary collapse

VERSION =
"0.0.2"

Instance Method Summary collapse

Instance Method Details

#auth_token_fileObject



16
17
18
# File 'lib/gh/who.rb', line 16

def auth_token_file
  File.expand_path "~/.gh-who"
end

#githubObject



24
25
26
27
# File 'lib/gh/who.rb', line 24

def github
  oauth_token = File.read(auth_token_file) rescue nil
  Github.new(:oauth_token => oauth_token)
end

#members(organization) ⇒ Object



29
30
31
# File 'lib/gh/who.rb', line 29

def members(organization)
  github.organizations.members.all(organization).map(&:login)
end