diff options
Diffstat (limited to 'lib/github/client.rb')
-rw-r--r-- | lib/github/client.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/github/client.rb b/lib/github/client.rb index 2511523bf6a..07cf264e8d7 100644 --- a/lib/github/client.rb +++ b/lib/github/client.rb @@ -4,10 +4,8 @@ module Github def initialize(token) @connection = Faraday.new(url: 'https://api.github.com') do |faraday| - faraday.adapter :net_http_persistent - faraday.response :json, content_type: /\bjson$/ faraday.authorization 'token', token - faraday.response :logger + faraday.adapter :net_http end end @@ -15,7 +13,8 @@ module Github rate_limit = RateLimit.new(connection) sleep rate_limit.reset_in if rate_limit.exceed? - Github::Response.new(connection.get(url, query)) + response = connection.get(url, query) + Github::Response.new(response.headers, response.body, response.status) end end end |