shopify_api_retry 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
  SHA256:
3
- metadata.gz: 6fc6421fa29a2afa3ac5bd59992763760b4162b7260bfb0412c627e3d555107f
4
- data.tar.gz: 36faa3c81f9970c0afabfbbed9e171121730c78de5104a73bbf904db36fb1ddb
3
+ metadata.gz: f6fa48159d2bd071e31e86baf44caa8c15050a0667b7ae8644883421f1187292
4
+ data.tar.gz: c87b2749f3ba8c6a94b210a393833622efcfa2c27e5afdda8b3c593632fc516a
5
5
  SHA512:
6
- metadata.gz: 9a893cd88ad10b59ee8c75263729215fbd88ce6cea0fe31b53209450c15d7e401aad5bbc99acd7584be0e015a3e5f0910318cd4e56911bebfb6560a9988660bb
7
- data.tar.gz: cac5e9bd541bcca0452bd4fa80473194612e690d23a0d00432c74cd34386669b6b156c03748a6e42d06655c4af5fbd51d3c6b47893fc73cb70d6e215150b2152
6
+ metadata.gz: d246a7623ae0a810c1f1051f5887f65b16e08a80c69e4574c7d72cd4286cb29d04b40d3211fdcec0b517a6f3c9ebfd3d428092ee98d80353d9a3ee713d84dd89
7
+ data.tar.gz: 649b825c24075f79e1fba6daee7f7952c5f8a42bfed29eae1cfd1a576cbcf49de8bc325498aa3d5bd210615259104a96505059b31f913a70b93ce46f531c49ca
data/Changes ADDED
@@ -0,0 +1,14 @@
1
+ --------------------
2
+ 2021-03-11 v0.1.2
3
+ --------------------
4
+ * Check proper base class for ActiveResource error handling
5
+
6
+ --------------------
7
+ 2021-03-09 v0.1.1
8
+ --------------------
9
+ * Fix typo in deprication warning
10
+
11
+ --------------------
12
+ 2021-01-31 v0.1.0
13
+ --------------------
14
+ * Support for retrying user-defined errors
@@ -3,7 +3,7 @@
3
3
  require "shopify_api"
4
4
 
5
5
  module ShopifyAPIRetry
6
- VERSION = "0.1.1"
6
+ VERSION = "0.1.2"
7
7
 
8
8
  HTTP_RETRY_AFTER = "Retry-After"
9
9
  HTTP_RETRY_STATUS = "429"
@@ -78,7 +78,7 @@ module ShopifyAPIRetry
78
78
  result = yield
79
79
  rescue => e
80
80
  handler = attempts[e.class.name]
81
- raise if handler.nil? && (!e.is_a?(ActiveResource::ClientError) || !e.response.respond_to?(:code))
81
+ raise if handler.nil? && (!e.is_a?(ActiveResource::ConnectionError) || !e.response.respond_to?(:code))
82
82
 
83
83
  handler ||= attempts[e.response.code] || attempts["#{e.response.code[0]}XX"]
84
84
  handler[:wait] ||= e.response[HTTP_RETRY_AFTER] || config.default_wait if e.response.code == HTTP_RETRY_STATUS
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "shopify_api_retry"
3
- spec.version = "0.1.1"
3
+ spec.version = "0.1.2"
4
4
  spec.authors = ["Skye Shaw"]
5
5
  spec.email = ["skye.shaw@gmail.com"]
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopify_api_retry
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
  - Skye Shaw
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-09 00:00:00.000000000 Z
11
+ date: 2021-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: shopify_api
@@ -77,6 +77,7 @@ files:
77
77
  - ".github/workflows/ci.yml"
78
78
  - ".gitignore"
79
79
  - ".travis.yml"
80
+ - Changes
80
81
  - Gemfile
81
82
  - LICENSE.txt
82
83
  - README.md