shopify_api_rate_limiter 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 205974d6fc8240b6f9a8828c290c7badf909e431
4
- data.tar.gz: a61d7e147e09153246b9d6f4a616e82c603f2b74
3
+ metadata.gz: 33a6a1a8a76f3bedb32b809f592bc15ed4f8194c
4
+ data.tar.gz: 9958de8df28406f4dcb7757c48f2d5cf55132212
5
5
  SHA512:
6
- metadata.gz: 64c4a49e1a237eabb9c39e18f2fe7ec1a7afd77880b40b35c14f715c78eb9a67a02ec4454f8b8ab5101d6702c24f03398d158d829d1b3fc07323a0f1d4126b9d
7
- data.tar.gz: e64cccceb37d63f021e79055f5240169b7b9a08e31606b5266cb69ef24a8042874ccb3d698fba5c0c91746d68f356660c968eeab70d5d77288bc0434c60181be
6
+ metadata.gz: c70f29561c5c7df1263fc9e37917d2e93efa8a9c6a83f22d5ef32398f69575819faea071b4eed11ff907d06798170fb03c8bba2ab751c262035b9a54eb621525
7
+ data.tar.gz: ed33c9e985de6fe725768d8a390ab72ba44089848be272440c094f29d87aedc48dcd82645e2f23151609912522904d3db3aff101a1471544b669528a52d287a3
@@ -10,8 +10,8 @@ module ShopifyApiRateLimiter
10
10
  end
11
11
  begin
12
12
  super
13
- rescue ActiveResource::ConnectionError => ex
14
- if ex.response.code.to_s == '429'
13
+ rescue ActiveResource::ClientError => ex
14
+ if ex&.response&.code&.to_s == '429'
15
15
  ShopifyApiRateLimiter.logger.info "Shopify returned 429 (Rate Limit Exceeded). Sleeping #{SHOPIFY_SLEEP_TIME}..."
16
16
  sleep(SHOPIFY_SLEEP_TIME)
17
17
  retry
@@ -1,3 +1,3 @@
1
1
  module ShopifyApiRateLimiter
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopify_api_rate_limiter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Buehler
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  version: '0'
76
76
  requirements: []
77
77
  rubyforge_project:
78
- rubygems_version: 2.4.8
78
+ rubygems_version: 2.6.8
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Rate limits API requests to the Shopify API.