Sha256: d07c1b5fe158773d5edb76fd97480e7644e228e515abc0618481fa9224cbe8dc

Contents?: true

Size: 520 Bytes

Versions: 1

Compression:

Stored size: 520 Bytes

Contents

module AnythingHub
  extend self

  class Github
    def initialize(login, oauth_token)
      @login = login
      @oauth_token = oauth_token
    end

    def client
      @client ||= Octokit::Client.new :login => @login, :oauth_token => @oauth_token, :auto_traversal => true
    end

    def method_missing(action, *args)
      if client.respond_to?(action.to_s)
        client.send(action, *args)
      else
        super
      end
    end
  end

  def github
    @github ||= Github.new(config.login, token)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
anything-hub-0.0.1 lib/anything-hub/github.rb