diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2017-04-24 19:28:08 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2017-04-24 19:28:08 -0300 |
commit | f73a0280c96f76b1b19200990ab07adc732dbb92 (patch) | |
tree | 38de1186dcdb34fee32c6d2631e049407ca31c31 /lib/github | |
parent | c7935dcfaec18f4628101268b13b9509b6b412ba (diff) | |
download | gitlab-ce-f73a0280c96f76b1b19200990ab07adc732dbb92.tar.gz |
Extract rate limit URL to a constant
Diffstat (limited to 'lib/github')
-rw-r--r-- | lib/github/rate_limit.rb | 7 |
1 files changed, 2 insertions, 5 deletions
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 |