Extract rate limit URL to a constant

parent c7935dcf
...@@ -2,6 +2,7 @@ module Github ...@@ -2,6 +2,7 @@ module Github
class RateLimit class RateLimit
SAFE_REMAINING_REQUESTS = 100 SAFE_REMAINING_REQUESTS = 100
SAFE_RESET_TIME = 500 SAFE_RESET_TIME = 500
RATE_LIMIT_URL = '/rate_limit'.freeze
attr_reader :connection attr_reader :connection
...@@ -25,12 +26,8 @@ module Github ...@@ -25,12 +26,8 @@ module Github
private private
def rate_limit_url
'/rate_limit'
end
def response def response
connection.get(rate_limit_url) connection.get(RATE_LIMIT_URL)
end end
def body def body
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment