lucid_shopify 0.24.0 → 0.25.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb8b3ecd73fd9e12fc148790485c15bdace31de28a5dd168ea51141daa4279f1
4
- data.tar.gz: b918ec9c86e12b7e6381ffa1c82539c24b2280146ebe9556d28e89a6bf2f4705
3
+ metadata.gz: 0bf829bae7c8435a0181bd954f5a11210fea30f705d3adcc484704e40e6118e6
4
+ data.tar.gz: a53c213e7779beb6a50630c0bc9ce99f7943055323db7630921b61f3520555cc
5
5
  SHA512:
6
- metadata.gz: c97f7ba46b6f9fa0ea82ec1453cc869eb0dd384cf1cbe1e65128d95bf3ea89e0b8d7cc2a04d8184d6a003c372e8b7b2426193873c81dd43df39c47bd67c8a2c2
7
- data.tar.gz: de2fba1da82f397bf9e68bdbaf65a182790d8a72858a93aa9dd21cc58ee00779399ec66e4f9738b71c5b7255cf397d3b63b77bbfe9a1a848edeaadb361d5b1b3
6
+ metadata.gz: be2041d1b295ba5d7b2ea6993346531da36feb23e980213e63c00b867b9ba0638dc5c78b559c0eec94556a14b3b9e929752e3975cb4fe847e6a382fc5abfbd36
7
+ data.tar.gz: 92b92f13afe6880a69cd665d2f77a05a702e0d63ccdc5193932e9fa8028832f853d43ee5052942e37f779d4ea89b055a6558a903da1c3b1b2e5f61db7e0fdea9
@@ -49,11 +49,6 @@ module LucidShopify
49
49
 
50
50
  JSON.parse(data)
51
51
  end
52
- # private def parse_data(data)
53
- # JSON.parse(data)
54
- # rescue JSON::ParserError
55
- # {}
56
- # end
57
52
 
58
53
  #
59
54
  # @return [Boolean]
@@ -92,5 +87,22 @@ module LucidShopify
92
87
  def failure?
93
88
  !success?
94
89
  end
90
+
91
+ #
92
+ # @return [Boolean]
93
+ #
94
+ def errors?
95
+ data_hash.has_key?('errors')
96
+ end
97
+
98
+ #
99
+ # A string rather than an object is returned by Shopify in the case of,
100
+ # e.g., 'Not found'.
101
+ #
102
+ # @return [Hash, String]
103
+ #
104
+ def errors
105
+ data_hash['errors']
106
+ end
95
107
  end
96
108
  end
@@ -15,7 +15,7 @@ module LucidShopify
15
15
  # @param data [String] the signed request data
16
16
  # @param hmac [String] the signature
17
17
  #
18
- # @return [Result]
18
+ # @raise [Error] if signature is invalid
19
19
  #
20
20
  def call(data, hmac)
21
21
  digest = OpenSSL::Digest::SHA256.new
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LucidShopify
4
- VERSION = '0.24.0'
4
+ VERSION = '0.25.0'
5
5
  end
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.24.0
4
+ version: 0.25.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: 2019-05-07 00:00:00.000000000 Z
11
+ date: 2019-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv