huginn_acumen_product_agent 1.2.2 → 1.3.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66d5a4f9cc1e03ceb98d0ade524482571770bc455f303b35a10ae8d6f64611d5
|
4
|
+
data.tar.gz: ece29b484441dacd6a51b891dfbb4ab25a9fde1a28b0b1864302563e9e084703
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc8a70be138bf5ab4fe2be007ed2280bd2599784f2170b071d6933987dc348e323fc9c14529c96d5dc0f11bc3c66977c518e64576b15bf89c2f17bab730ddc82
|
7
|
+
data.tar.gz: 707344746b37b2fe801d639a1489d29d56ea8bbf69f8ce50ee5b31545163864d9872045f191c99b158233de63715d3d4d35c19d5418581cb51f59a53afd4201f
|
@@ -293,9 +293,11 @@ module AcumenProductQueryConcern
|
|
293
293
|
variant['depth'] = quantitative_value(
|
294
294
|
marketing['thickness'], marketing['dimensions_unit_measure']
|
295
295
|
)
|
296
|
-
variant['weight']
|
297
|
-
|
298
|
-
|
296
|
+
if variant['weight']['value'] == '0'
|
297
|
+
variant['weight'] = quantitative_value(
|
298
|
+
marketing['weight'], marketing['weight_unit_measure']
|
299
|
+
)
|
300
|
+
end
|
299
301
|
end
|
300
302
|
end
|
301
303
|
|
@@ -382,19 +384,19 @@ module AcumenProductQueryConcern
|
|
382
384
|
next
|
383
385
|
else
|
384
386
|
physical_formats.each do |val|
|
385
|
-
match = product['model'].select { |v| v[
|
387
|
+
match = product['model'].select { |v| v['acumenAttributes']['category'] == val }
|
386
388
|
|
387
|
-
if match
|
388
|
-
match['isDefault'] = true
|
389
|
+
if match && match.length > 0
|
390
|
+
match[0]['isDefault'] = true
|
389
391
|
break
|
390
392
|
end
|
391
393
|
end
|
392
394
|
|
393
395
|
digital_formats.each do |val|
|
394
|
-
match = product['model'].select { |v| v[
|
396
|
+
match = product['model'].select { |v| v['acumenAttributes']['category'] == val }
|
395
397
|
|
396
|
-
if match
|
397
|
-
match['isDefault'] = true
|
398
|
+
if match && match.length > 0
|
399
|
+
match[0]['isDefault'] = true
|
398
400
|
break
|
399
401
|
end
|
400
402
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: huginn_acumen_product_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jacob Spizziri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|