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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7dde4939a6f527acdc57c3cca3b489046521b4f9220e369d76424da6a34e18e5
4
- data.tar.gz: dce7f773ea6ff04bf58a98816d6d7f1624e56148c722ee694488c06a10cd84a9
3
+ metadata.gz: '039c056f31f39d29c6dd956c1eea702c9719ee62c1549d1ee5eba1f7154aabcc'
4
+ data.tar.gz: 11cde731d4163bc95d8ea9b154171d8c1be4998812fdfa1c7bf9d3e78a77fd07
5
5
  SHA512:
6
- metadata.gz: b665673955979aebd6a03fae4f240a40eb4ae4623103ee208bbcaf5ed5b220cc5619584bb0531b5cf8981c5cf2aa304907ab53bbcc402507689d38cb3064137b
7
- data.tar.gz: 76435c4a56a302ff36d193ca3e8cb1c42a6ab862e2536b1e31f9b3272826ef25f929450f369f59c5cb66becd189501754b7045e78e32782c8a5bdefe9a4dacba
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
- create_event payload: product
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.5.2
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-01 00:00:00.000000000 Z
11
+ date: 2020-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler