sportsmans-supply 1.0.0.pre.pre → 1.0.4

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: 14cb932f540318ae3a4406f2b310c298c63c092f62be52dd31a5296ddbc058b2
4
- data.tar.gz: f89621f47f5018f2c1b16e0ff0a50fd276c5afebc5f548bc03c67ee9d7bedf07
3
+ metadata.gz: bebb75ee4fd1d82821c5107e5833bc47ba0d1ee757be24c796fae5bc137193e4
4
+ data.tar.gz: 1b091ccc6952d4a4247d29e3cfe52da377c3dd3bed716a4d22d6cfa836e05358
5
5
  SHA512:
6
- metadata.gz: fadcebdc50392fdd0686eec56b50d7a969f74d0aa32bd0a43a07ca50e07db932bee172c1d83aa344bf5822596108e55ad51259a28e97d90223b7656ecb668999
7
- data.tar.gz: bbb4bd2ce0a8ec806a4354004cb219ab7a3563830aaac170537e9575b3e0ffbd33f0a797af3dec06b32fce4397e6b14c4ea9ef48fabf7110c8a1226001bb7a8f
6
+ metadata.gz: 65c89c6c2002fa889c3b3722de4fc53e7dfa43c359db6205ce29f8782669eb4c2b689c016fa0f0c336782b623894e2b4d6f8d1a6f6916036e44fc898258264f8
7
+ data.tar.gz: 24eadb121c55954cd2820639216dec923eaded7ff2fd3ab63900d0bd4d6897ebacdb2c197ec6a5e58082cd0aaf331cc6f884fe2e708d3a25279723c861f5bb70
@@ -27,7 +27,7 @@ module SportsmansSupply
27
27
  end
28
28
 
29
29
  inventory_data[row[@headers.index('sku')]] = {
30
- price: row[@headers.index('rapid retail price')],
30
+ price: row[@headers.index('rapid retail price')].to_f,
31
31
  quantity: row[@headers.index('qty')].to_i
32
32
  }
33
33
  end
@@ -52,8 +52,8 @@ module SportsmansSupply
52
52
  name: description,
53
53
  quantity: inventory_datum[:quantity],
54
54
  price: inventory_datum[:price],
55
- map_price: row[@headers.index('map')],
56
- msrp: row[@headers.index('msrp')],
55
+ map_price: row[@headers.index('map')].to_f,
56
+ msrp: row[@headers.index('msrp')].to_f,
57
57
  brand: row[@headers.index('manufacturer')],
58
58
  item_identifier: sku,
59
59
  category: row[@headers.index('category')],
@@ -27,7 +27,7 @@ module SportsmansSupply
27
27
  inventory_data << {
28
28
  item_identifier: row[@headers.index('sku')],
29
29
  quantity: row[@headers.index('qty')].to_i,
30
- price: row[@headers.index('rapid retail price')].strip,
30
+ price: row[@headers.index('rapid retail price')].to_f,
31
31
  }
32
32
  end
33
33
 
@@ -12,9 +12,11 @@ module SportsmansSupply
12
12
  end
13
13
 
14
14
  def all
15
- invoice_filename = connect(@options) { |ftp| ftp.nlst('/invoices/invoices*.csv').last }.split('/').last
16
- invoice_file = get_file(invoice_filename, 'invoices')
15
+ invoice_filename = connect(@options) { |ftp| ftp.nlst('/invoices/invoices*.csv').last }&.split('/')&.last
16
+
17
+ return [] if invoice_filename.nil?
17
18
 
19
+ invoice_file = get_file(invoice_filename, 'invoices')
18
20
  invoice_data = []
19
21
 
20
22
  File.open(invoice_file).each_with_index do |row, i|
@@ -12,9 +12,11 @@ module SportsmansSupply
12
12
  end
13
13
 
14
14
  def all
15
- tracking_filename = connect(@options) { |ftp| ftp.nlst('/shipping/tracking*.csv').last }.split('/').last
16
- tracking_file = get_file(tracking_filename, 'shipping')
15
+ tracking_filename = connect(@options) { |ftp| ftp.nlst('/shipping/tracking*.csv').last }&.split('/')&.last
16
+
17
+ return [] if tracking_filename.nil?
17
18
 
19
+ tracking_file = get_file(tracking_filename, 'shipping')
18
20
  tracking_data = []
19
21
 
20
22
  File.open(tracking_file).each_with_index do |row, i|
@@ -1,3 +1,3 @@
1
1
  module SportsmansSupply
2
- VERSION = '1.0.0-pre'.freeze
2
+ VERSION = '1.0.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sportsmans-supply
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.pre
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeffrey Dill
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-12 00:00:00.000000000 Z
11
+ date: 2022-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -104,9 +104,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
104
104
  version: '0'
105
105
  required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  requirements:
107
- - - ">"
107
+ - - ">="
108
108
  - !ruby/object:Gem::Version
109
- version: 1.3.1
109
+ version: '0'
110
110
  requirements: []
111
111
  rubygems_version: 3.0.9
112
112
  signing_key: