class Gub::Github

Attributes

connection[RW]

Public Class Methods

new(opts) click to toggle source
# File lib/gub/clients/github.rb, line 8
def initialize opts
  @connection = Octokit::Client.new(opts)
end

Public Instance Methods

method_missing(meth, *args, &block) click to toggle source
# File lib/gub/clients/github.rb, line 20
def method_missing meth, *args, &block
  Gub.log.debug "Running command #{meth} with arguments #{args}"
  @connection.send(meth, *args, &block)
  rescue Octokit::Unauthorized, Octokit::NotFound
    raise Gub::Unauthorized
  rescue Faraday::Error::ConnectionFailed
    raise Gub::Disconnected
end
url() click to toggle source
# File lib/gub/clients/github.rb, line 12
def url
  'https://github.com/'
end
user() click to toggle source
# File lib/gub/clients/github.rb, line 16
def user
  @connection.user
end