lucid-shopify 0.63.1 → 0.64.0
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 +4 -4
- data/lib/lucid/shopify/parse_link_header.rb +1 -1
- data/lib/lucid/shopify/response.rb +8 -2
- data/lib/lucid/shopify/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1b0b5d01a7f0169127f5cb34c55771e87790f9e15059e384874321566cb257c4
|
|
4
|
+
data.tar.gz: fac44b65de85d005f9affe1532892a2b3baaa85b066ca407ffcadfe880c3d785
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1087a99b8ad46cb6fe571a4812dfc47eb3c67cfba2dd85d4d0c9bc069913f0ff9c8e869ed8b2e9a0a172307751a156eef080e0d560d573076946a32345f90fc8
|
|
7
|
+
data.tar.gz: 929282d2d2b752515a143cd06fcb26b66b1209594be0785c1cd9cc2418476f55c7ee63f7f95d975ca8530f276e2592269ee822f5dba5c99f56ed032fcffafdcb
|
|
@@ -15,7 +15,7 @@ module Lucid
|
|
|
15
15
|
case link_header
|
|
16
16
|
# NOTE: There is a strange behaviour where it seems that if the header
|
|
17
17
|
# value exceeds a certain length, it is split into chunks. It seems that
|
|
18
|
-
# if you use {HTTP::Headers#get}, you will always get {Array<String},
|
|
18
|
+
# if you use {HTTP::Headers#get}, you will always get {Array<String>},
|
|
19
19
|
# and it is the special behaviour of {HTTP::Headers#[]} causing this.
|
|
20
20
|
#
|
|
21
21
|
# However, why is it split in the first place? Does Shopify send
|
|
@@ -29,8 +29,8 @@ module Lucid
|
|
|
29
29
|
ClientError = Class.new(Error)
|
|
30
30
|
ServerError = Class.new(Error)
|
|
31
31
|
ShopError = Class.new(Error)
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
AccessTokenError = Class.new(ClientError)
|
|
33
|
+
GraphQLClientError = Class.new(ClientError) do
|
|
34
34
|
def message
|
|
35
35
|
case
|
|
36
36
|
when response.errors?
|
|
@@ -114,6 +114,12 @@ module Lucid
|
|
|
114
114
|
# @note https://shopify.dev/concepts/about-apis/response-codes
|
|
115
115
|
def assert!
|
|
116
116
|
case status_code
|
|
117
|
+
when 401
|
|
118
|
+
if error_message?([/access token/i])
|
|
119
|
+
raise AccessTokenError.new(request, self), 'Invalid access token'
|
|
120
|
+
else
|
|
121
|
+
raise ClientError.new(request, self)
|
|
122
|
+
end
|
|
117
123
|
when 402
|
|
118
124
|
raise ShopError.new(request, self), 'Shop is frozen, awaiting payment'
|
|
119
125
|
when 403
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lucid-shopify
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.64.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kelsey Judson
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-08-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: dotenv
|