jekyll-spree-client 0.1.13 → 0.1.14
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/jekyll/spree_client.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 231ce6a54824c7e484336d5a80f90eecf82ccff491a0de8f80fcd7e81b8e0d9a
|
4
|
+
data.tar.gz: 5808e4bf0454d60ead7c62f2e2ecf8828f4417c97f4a0a5f907039dffdc73591
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17d67e2e407cba9595c4218b01dc03512f75a4b959c1917ab0d95488cf045cd6e9296e11568a2aae01ab21ddd9fbf66d4e8c276d64b202fe67cfd8e834dce2ff
|
7
|
+
data.tar.gz: 0ef761a1c5fb123635e4e1fd9f6636e5ff2b3ae7297d8ebfc4b937d1337be7d46ccb7a2bd9729ea27f8f56706b3dad3b1688669633f52afc522bab5a0eee61f5
|
data/lib/jekyll/spree_client.rb
CHANGED
@@ -181,9 +181,11 @@ module Jekyll
|
|
181
181
|
def update(product, variant)
|
182
182
|
# Sync local changes to Spree
|
183
183
|
remote_product = product.data.slice(*product_fields).transform_keys(&:to_sym)
|
184
|
+
variant_comparison = variant.slice(*product_fields).transform_keys(&:to_sym)
|
185
|
+
|
184
186
|
# Only when they haven't changed, so we don't waste time sending a
|
185
187
|
# request.
|
186
|
-
unless remote_product
|
188
|
+
unless remote_product.slice(*variant_comparison.keys) == variant_comparison
|
187
189
|
# XXX: We don't have the product ID with the variant but we have
|
188
190
|
# the slug.
|
189
191
|
remote_product[:id] = variant['slug']
|