jekyll-spree-client 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll/spree_client.rb +7 -7
- 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: f7a67bab159ca15a9bdb21c85f14da4c5f401d91c04a9da7c8317d4e5bb4a15d
|
4
|
+
data.tar.gz: 74eff3966ee98fd1baae257b5dfb243064ffe509c834173a3ffce34664f514fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 658045e9a4e79977df68d0945520c6a2d150a52e1574ae86c3dc71fcd842f45967672b202c784f2aa12826ce3bd512f8b04b505bfd1d402cc798e968e3b0a37d
|
7
|
+
data.tar.gz: 7120d85321bff77a6ec69e39abd52801436de8daca45b9b9be19b64824c50c5912d8d2988ba81436dd94a6d8575f1ed6675de34310cec72ed1b89bdb442d5230
|
data/lib/jekyll/spree_client.rb
CHANGED
@@ -152,13 +152,13 @@ module Jekyll
|
|
152
152
|
def update(product, variant)
|
153
153
|
# XXX: The API replies with stringified numbers so we convert them
|
154
154
|
# back to the type we're using locally.
|
155
|
-
|
156
|
-
case product.data[k]
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
end
|
155
|
+
variant.slice(*variant_fields).each do |k, v|
|
156
|
+
product.data[k] = case product.data[k]
|
157
|
+
when Integer then v.to_i
|
158
|
+
when Float then v.to_f
|
159
|
+
else v
|
160
|
+
end
|
161
|
+
end
|
162
162
|
|
163
163
|
product.data['in_stock'] = variant['in_stock']
|
164
164
|
product.data['variant_id'] = variant['id']
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- f
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree-api-client
|