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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jekyll/spree_client.rb +7 -7
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec972940eca59000e0a3ba7bd764b84531c872e39044f85f2e2a4c4ec61c9ca8
4
- data.tar.gz: 3be5a5a3d475b392974c667a2c9b15bad9293e63115b425c7b4f300afd8d1eeb
3
+ metadata.gz: f7a67bab159ca15a9bdb21c85f14da4c5f401d91c04a9da7c8317d4e5bb4a15d
4
+ data.tar.gz: 74eff3966ee98fd1baae257b5dfb243064ffe509c834173a3ffce34664f514fe
5
5
  SHA512:
6
- metadata.gz: e02ca9264d8a137c65f5b3e0de3d97171a5432ffe5cab698e8249192ffeb50989993869e6fa9527e042630bb48ed8268f2a3b043158a7e0708483624c4e992ac
7
- data.tar.gz: d4da262c648e4006926073e86cd884783a746091784cf96f5544611c428c9657611398ad9f1f6c56e9063ef5b12e3c301647c37f0e10a434884ac334d774859d
6
+ metadata.gz: 658045e9a4e79977df68d0945520c6a2d150a52e1574ae86c3dc71fcd842f45967672b202c784f2aa12826ce3bd512f8b04b505bfd1d402cc798e968e3b0a37d
7
+ data.tar.gz: 7120d85321bff77a6ec69e39abd52801436de8daca45b9b9be19b64824c50c5912d8d2988ba81436dd94a6d8575f1ed6675de34310cec72ed1b89bdb442d5230
@@ -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
- product.data.merge! variant.slice(*variant_fields).map do |k, v|
156
- 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.to_h
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.6
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-30 00:00:00.000000000 Z
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