huginn_bigcommerce_product_agent 1.8.0 → 1.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 401d12c4fd8a1bd918e0e0b4d6a20eca3467e7ce288130025c500e7f3a7e7d9c
4
- data.tar.gz: 501ebd2b48cc23f68671c407ddefdf69d12b666eb608f37d4f149e81eeaecf6d
3
+ metadata.gz: 8bbd3a133d224fea3726d9b0f8b86803957e919e225e983be8ac3a1c7c027312
4
+ data.tar.gz: 202e2165d11044d4f44e722aa39e61224b819b344304e73e3c9e888c0a20153a
5
5
  SHA512:
6
- metadata.gz: fb699b59217b6c4ee28b5691ffa1f08bd8298e7aa96bdaed61060097e506bb170d189a386b61871bfb761c5eb6c103e9451aa13ced6330843808774e9fd00997
7
- data.tar.gz: a368c30a438e9c20659a7b819e4cdf691f2f790436ecd588bb6742b65fefa6453ee42a3f8eb4aab0aaf924d6bfd7f002053b60cd946f27b7da13fc11f1470748
6
+ metadata.gz: 87204345ec8502a89ac61b5de9bf21f8daf8ab34b3b22cb2563e6a55b90da6239e2dc92d096caf4e9b8e08b2591286ac3f4b8b36a6ba07efecafdbafdf3d93bb
7
+ data.tar.gz: abe689235f182acf5c2eb977d9179af9b7431a1537435093a140e54e16b1981bb901fa02ec2bdc8e3469c96fab3d314474f63714caa835d878edcb375223f781
@@ -15,10 +15,9 @@ module BigcommerceProductAgent
15
15
  begin
16
16
  response = client.put(uri, payload.to_json)
17
17
  return response.body['data']
18
- rescue Faraday::Error::ClientError => e
19
- puts e.inspect
20
- raise e
21
- end
18
+ rescue Faraday::Error::ClientError => e
19
+ raise e, "\n#{e.message}\nFailed to upsert variant with payload = #{payload.to_json}\n", e.backtrace
20
+ end
22
21
  end
23
22
 
24
23
  def get_by_skus(skus, include = %w[custom_fields modifiers])
@@ -152,6 +152,7 @@ module Agents
152
152
  # Ignatius Press -- some products have the same name and must be disambiguated.
153
153
  # ...by adding a list of the product types (hardback, paperback, etc.) to their names
154
154
  if boolify(options['should_disambiguate'])
155
+ product['page_title'] = product['name']
155
156
  product['name'] += " |~ " + product['model'].map { |m|
156
157
  m['additionalProperty'].find { |p|
157
158
  p['propertyID'] == 'option'
@@ -46,6 +46,7 @@ module BigcommerceProductAgent
46
46
  preorder_release_date: product['releaseDate'] && product['releaseDate'].to_datetime ? product['releaseDate'].to_datetime.strftime("%FT%T%:z") : nil,
47
47
  preorder_message: self.get_availability(product) == 'preorder' ? product['availability'] : '',
48
48
  is_preorder_only: self.get_availability(product) == 'preorder' ? true : false,
49
+ page_title: product['page_title'] || '',
49
50
  }
50
51
  result[:upc] = product['gtin12'] if product['gtin12']
51
52
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: huginn_bigcommerce_product_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.9.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-07-14 00:00:00.000000000 Z
11
+ date: 2020-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler