get_response 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d7f7e3027c93e34d83b9558aa6f13acc2bc3cadf
4
- data.tar.gz: 162eb858863593b8be888aa0c81c4980eaaf8d6f
3
+ metadata.gz: 44f40bf79e4ecab2d22df43cac6babc8d776e480
4
+ data.tar.gz: 120c30a12db2b3730e49b33831ac118813978ea9
5
5
  SHA512:
6
- metadata.gz: f97083f2f3f3aeee8de56acbd25487889878cc56015c26524ee3b5a9ab231955fe2ffc38685c7ede1722021ca37a67b576c4c5d748637646b1375fb9ca9c24ef
7
- data.tar.gz: 1b9648c77ee5192c01f03f1dc7f1c4876212a963eb15e16bd8629385606046fede62aabded0e66337417b064c4e5fe3a4e66bac11e22db351fb976e516dc370f
6
+ metadata.gz: 3356d1097ebc3570e88368316d096c8cd4a7c1fb28ff2b7d00f95e27a09eda97c01d1f847df0862b9c786c3654afe388bf3fc5658ef0abb8e26268f7c1bd606a
7
+ data.tar.gz: 9cd2fba778966650b422b0c3b24ce3132dc0f444a3b61eb42c51aac212c302737a87b283cadaac51287fa91d954749a5ce87175363754de781ca878a3402c271
@@ -13,5 +13,13 @@ module GetResponse
13
13
  def success?
14
14
  [200, 201, 202].include? @response.status
15
15
  end
16
+
17
+ def rate_limitted?
18
+ @response.status == 429
19
+ end
20
+
21
+ def rate_limit_reset_time
22
+ @response.headers['x-ratelimit-reset']&.to_i
23
+ end
16
24
  end
17
25
  end
@@ -1,3 +1,3 @@
1
1
  module GetResponse
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: get_response
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Faizal Zakaria
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-28 00:00:00.000000000 Z
11
+ date: 2017-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler