lucid_shopify 0.15.0 → 0.15.1
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.rb +1 -1
- data/lib/lucid_shopify/container.rb +2 -0
- data/lib/lucid_shopify/send_request.rb +8 -3
- 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: b1fa336bfc2abcc35129665ab1679ce26a214e8cc711a9f2f02cb8d12dc910ff
|
4
|
+
data.tar.gz: 59d6e27a766ef0b189e4475a658986ede24c8aaba514e5e0f8a4ac9aba859bf5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c95ec5d9ba4317494ac5d761bea90ee846b096f75dad3e15399d974966ad663bb0a924262b08053fc382c3126c26de5ebbff34d7a95bd2436cde579d566c31c9
|
7
|
+
data.tar.gz: 0dbea237b8786e642e596999c8500f6a57efa8bf9fc92aa8ca044a5c097e38ecd7c637ee8e3a8958e978f783ff52fe4b5618d96a7b5f49779030b38eff79aec6
|
data/lib/lucid_shopify.rb
CHANGED
@@ -11,6 +11,7 @@ module LucidShopify
|
|
11
11
|
autoload :CreateAllWebhooks, 'lucid_shopify/create_all_webhooks'
|
12
12
|
autoload :CreateCharge, 'lucid_shopify/create_charge'
|
13
13
|
autoload :CreateWebhook, 'lucid_shopify/create_webhook'
|
14
|
+
autoload :Credentials, 'lucid_shopify/credentials'
|
14
15
|
autoload :DeleteAllWebhooks, 'lucid_shopify/delete_all_webhooks'
|
15
16
|
autoload :DeleteRequest, 'lucid_shopify/delete_request'
|
16
17
|
autoload :DeleteWebhook, 'lucid_shopify/delete_webhook'
|
@@ -18,7 +19,6 @@ module LucidShopify
|
|
18
19
|
autoload :GetRequest, 'lucid_shopify/get_request'
|
19
20
|
autoload :PostRequest, 'lucid_shopify/post_request'
|
20
21
|
autoload :PutRequest, 'lucid_shopify/put_request'
|
21
|
-
autoload :Credentials, 'lucid_shopify/credentials'
|
22
22
|
autoload :Request, 'lucid_shopify/request'
|
23
23
|
autoload :Response, 'lucid_shopify/response'
|
24
24
|
autoload :Result, 'lucid_shopify/result'
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'dry/container'
|
4
|
+
require 'http'
|
4
5
|
|
5
6
|
require 'lucid_shopify'
|
6
7
|
|
@@ -16,6 +17,7 @@ module LucidShopify
|
|
16
17
|
Container.register(:create_webhook) { CreateWebhook.new }
|
17
18
|
Container.register(:delete_all_webhooks) { DeleteAllWebhooks.new }
|
18
19
|
Container.register(:delete_webhook) { DeleteWebhook.new }
|
20
|
+
Container.register(:http) { ::HTTP::Client.new }
|
19
21
|
Container.register(:send_request) { SendRequest.new }
|
20
22
|
Container.register(:send_throttled_request) { SendThrottledRequest.new }
|
21
23
|
Container.register(:verify_callback) { VerifyCallback.new }
|
@@ -1,7 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'http'
|
4
|
-
|
5
3
|
require 'lucid_shopify'
|
6
4
|
|
7
5
|
module LucidShopify
|
@@ -13,6 +11,13 @@ module LucidShopify
|
|
13
11
|
param :original_exception
|
14
12
|
end
|
15
13
|
|
14
|
+
#
|
15
|
+
# @param http [HTTP::Client]
|
16
|
+
#
|
17
|
+
def initialize(http: Container[:http])
|
18
|
+
@http = http
|
19
|
+
end
|
20
|
+
|
16
21
|
#
|
17
22
|
# @param request [Request]
|
18
23
|
# @param attempts [Integer] additional request attempts on client error
|
@@ -44,7 +49,7 @@ module LucidShopify
|
|
44
49
|
private def send(request)
|
45
50
|
req = request
|
46
51
|
|
47
|
-
|
52
|
+
@http.headers(req.http_headers).__send__(req.http_method, req.url, req.options)
|
48
53
|
end
|
49
54
|
|
50
55
|
#
|
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.15.
|
4
|
+
version: 0.15.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kelsey Judson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|