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 +4 -4
- data/Changes +14 -0
- data/lib/shopify_api_retry.rb +2 -2
- data/shopify_api_retry.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6fa48159d2bd071e31e86baf44caa8c15050a0667b7ae8644883421f1187292
|
4
|
+
data.tar.gz: c87b2749f3ba8c6a94b210a393833622efcfa2c27e5afdda8b3c593632fc516a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/shopify_api_retry.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
require "shopify_api"
|
4
4
|
|
5
5
|
module ShopifyAPIRetry
|
6
|
-
VERSION = "0.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::
|
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
|
data/shopify_api_retry.gemspec
CHANGED
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.
|
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-
|
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
|