jekyll-spree-client 0.1.15 → 0.1.16
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/README.md +2 -1
- data/lib/jekyll-spree-client.rb +1 -1
- data/lib/jekyll/spree_client.rb +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4fae6ac8495376030f27da4d790f5935e0f20c2ada484eced1a266c98704ec82
|
4
|
+
data.tar.gz: 144cbab5df09cab4c48c1a0d2c16ee2f0a9c593e273750af346d143f9526ad24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ede792ab10edef6455c9a32f7eb42f5ad6dadc4e4c9ab59ebf06c141073177aec0264a6a236da51099108f66e1893ae1c9e5a51b36aeb97efc7357a92ec80176
|
7
|
+
data.tar.gz: 40b3025ef2c89824713d338cc9d9151a7c765803c90e3c16c3bf8430304e62cf63a5d7a71a547f3705786e3ac5a65808c5ba88adc01a0a0c48a40f799f12e9c1
|
data/README.md
CHANGED
@@ -43,6 +43,7 @@ spree:
|
|
43
43
|
sku_field: sku
|
44
44
|
api_url: http://localhost:3000
|
45
45
|
shipping_category_id: 1
|
46
|
+
store: https://your.store
|
46
47
|
```
|
47
48
|
|
48
49
|
You can get the API key on your user profile. Pass it as the
|
@@ -52,7 +53,7 @@ You can get the API key on your user profile. Pass it as the
|
|
52
53
|
SPREE_API_KEY="some random value generated by spree" bundle exec jekyll build
|
53
54
|
```
|
54
55
|
|
55
|
-
Since v0.1.4 you can pass the
|
56
|
+
Since v0.1.4 you can pass the API URL too, and it'll take precedence
|
56
57
|
over `_config.yml`:
|
57
58
|
|
58
59
|
```bash
|
data/lib/jekyll-spree-client.rb
CHANGED
@@ -22,7 +22,7 @@ Jekyll::Hooks.register :site, :post_read do |site|
|
|
22
22
|
end
|
23
23
|
|
24
24
|
config = site.config['spree']&.transform_keys(&:to_sym) || {}
|
25
|
-
config.merge!(site: site, api_key: ENV['SPREE_API_KEY'], spree_url: ENV['SPREE_URL'])
|
25
|
+
config.merge!(site: site, api_key: ENV['SPREE_API_KEY'], spree_url: ENV['SPREE_URL'], store: site.config['url'])
|
26
26
|
|
27
27
|
client = Jekyll::SpreeClient.new **config
|
28
28
|
|
data/lib/jekyll/spree_client.rb
CHANGED
@@ -5,7 +5,7 @@ require 'spree_client'
|
|
5
5
|
|
6
6
|
#
|
7
7
|
module Jekyll
|
8
|
-
SpreeClient = Struct.new :site, :sku_field, :api_key, :spree_url, :shipping_category_id, keyword_init: true do
|
8
|
+
SpreeClient = Struct.new :site, :sku_field, :api_key, :spree_url, :shipping_category_id, :store, keyword_init: true do
|
9
9
|
# Products are posts with the SKU field
|
10
10
|
#
|
11
11
|
# @return [Array] Jekyll::Document
|
@@ -54,7 +54,7 @@ module Jekyll
|
|
54
54
|
#
|
55
55
|
# @return [SpreeClient::API::V1]
|
56
56
|
def spree
|
57
|
-
@spree ||= ::SpreeClient::API::V1.new **to_h.slice(:api_key, :spree_url)
|
57
|
+
@spree ||= ::SpreeClient::API::V1.new **to_h.slice(:api_key, :spree_url, :store)
|
58
58
|
end
|
59
59
|
|
60
60
|
# Localization with jekyll-locales
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-spree-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- f
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-07-
|
11
|
+
date: 2021-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree-api-client
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.2.3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 0.2.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: fast_blank
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|