From f73a0280c96f76b1b19200990ab07adc732dbb92 Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Mon, 24 Apr 2017 19:28:08 -0300 Subject: Extract rate limit URL to a constant --- lib/github/rate_limit.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'lib/github') diff --git a/lib/github/rate_limit.rb b/lib/github/rate_limit.rb index 38beb617173..ab2b9c707d8 100644 --- a/lib/github/rate_limit.rb +++ b/lib/github/rate_limit.rb @@ -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 -- cgit v1.2.1