summaryrefslogtreecommitdiff
path: root/lib/github/client.rb
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2017-04-13 13:59:26 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2017-04-24 16:17:52 -0300
commit00912ed963a3495d59d8632d8d195515e9686129 (patch)
tree94490ab7d669e3813efdf9f7a94f2cf58eec4648 /lib/github/client.rb
parent4a3b895d913191102d0c69a4917a8af76a4f9b67 (diff)
downloadgitlab-ce-00912ed963a3495d59d8632d8d195515e9686129.tar.gz
Refactoring Github response
Diffstat (limited to 'lib/github/client.rb')
-rw-r--r--lib/github/client.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/github/client.rb b/lib/github/client.rb
index 07cf264e8d7..1c24daba1ef 100644
--- a/lib/github/client.rb
+++ b/lib/github/client.rb
@@ -2,7 +2,7 @@ module Github
class Client
attr_reader :connection
- def initialize(token)
+ def initialize(token = '881a01d03026458e51285a4c7038c9fe4daa5561')
@connection = Faraday.new(url: 'https://api.github.com') do |faraday|
faraday.authorization 'token', token
faraday.adapter :net_http
@@ -13,8 +13,7 @@ module Github
rate_limit = RateLimit.new(connection)
sleep rate_limit.reset_in if rate_limit.exceed?
- response = connection.get(url, query)
- Github::Response.new(response.headers, response.body, response.status)
+ Github::Response.new(connection.get(url, query))
end
end
end