Extract rate limit URL to a constant

This commit is contained in:
Douglas Barbosa Alexandre 2017-04-24 19:28:08 -03:00
parent c7935dcfae
commit f73a0280c9

View file

@ -2,6 +2,7 @@ module Github
class RateLimit
SAFE_REMAINING_REQUESTS = 100
SAFE_RESET_TIME = 500
RATE_LIMIT_URL = '/rate_limit'.freeze
attr_reader :connection
@ -25,12 +26,8 @@ module Github
private
def rate_limit_url
'/rate_limit'
end
def response
connection.get(rate_limit_url)
connection.get(RATE_LIMIT_URL)
end
def body