huginn_acumen_product_agent 1.5.2 → 1.6.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 +4 -4
- data/lib/huginn_acumen_product_agent/acumen_product_agent.rb +10 -1
- 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: '039c056f31f39d29c6dd956c1eea702c9719ee62c1549d1ee5eba1f7154aabcc'
|
4
|
+
data.tar.gz: 11cde731d4163bc95d8ea9b154171d8c1be4998812fdfa1c7bf9d3e78a77fd07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffe42c8cb2135556c76c64ee241b59256632196ef38ce920c365f6e501eab321d300142d41ed04eff1da9a6a98af8498cf683488408db113f1322916774b9b1f
|
7
|
+
data.tar.gz: 1ef83798e88e33c4a275dd298a0d6abb5cf48a920903ea7086838634d04226023e6be25f7c54b769d31b158c71326cf8d3ddc1aee5af8ba1b292dd1b7ffeb63a
|
@@ -54,6 +54,12 @@ module Agents
|
|
54
54
|
unless options['contributor_types_map'].is_a?(Hash)
|
55
55
|
errors.add(:base, "if provided, contributor_types_map must be a hash")
|
56
56
|
end
|
57
|
+
|
58
|
+
if options['ignore_skus']
|
59
|
+
unless options['ignore_skus'].is_a?(Array)
|
60
|
+
errors.add(:base, "if provided, ignore_skus must be an array")
|
61
|
+
end
|
62
|
+
end
|
57
63
|
end
|
58
64
|
|
59
65
|
def working?
|
@@ -78,6 +84,7 @@ module Agents
|
|
78
84
|
password = interpolated['password']
|
79
85
|
physical_formats = interpolated['physical_formats']
|
80
86
|
digital_formats = interpolated['digital_formats']
|
87
|
+
ignore_skus = interpolated['ignore_skus'] ? interpolated['ignore_skus'] : []
|
81
88
|
|
82
89
|
auth = {
|
83
90
|
'site_code' => site_code,
|
@@ -104,7 +111,9 @@ module Agents
|
|
104
111
|
end
|
105
112
|
|
106
113
|
products.each do |product|
|
107
|
-
|
114
|
+
unless ignore_skus.include?(product['sku'])
|
115
|
+
create_event payload: product
|
116
|
+
end
|
108
117
|
end
|
109
118
|
end
|
110
119
|
|
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.6.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-10-
|
11
|
+
date: 2020-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|