sportsmans-supply 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sportsmans-supply/invoice.rb +1 -1
- data/lib/sportsmans-supply/shipping.rb +4 -2
- data/lib/sportsmans-supply/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bebb75ee4fd1d82821c5107e5833bc47ba0d1ee757be24c796fae5bc137193e4
|
4
|
+
data.tar.gz: 1b091ccc6952d4a4247d29e3cfe52da377c3dd3bed716a4d22d6cfa836e05358
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65c89c6c2002fa889c3b3722de4fc53e7dfa43c359db6205ce29f8782669eb4c2b689c016fa0f0c336782b623894e2b4d6f8d1a6f6916036e44fc898258264f8
|
7
|
+
data.tar.gz: 24eadb121c55954cd2820639216dec923eaded7ff2fd3ab63900d0bd4d6897ebacdb2c197ec6a5e58082cd0aaf331cc6f884fe2e708d3a25279723c861f5bb70
|
@@ -14,7 +14,7 @@ module SportsmansSupply
|
|
14
14
|
def all
|
15
15
|
invoice_filename = connect(@options) { |ftp| ftp.nlst('/invoices/invoices*.csv').last }&.split('/')&.last
|
16
16
|
|
17
|
-
return
|
17
|
+
return [] if invoice_filename.nil?
|
18
18
|
|
19
19
|
invoice_file = get_file(invoice_filename, 'invoices')
|
20
20
|
invoice_data = []
|
@@ -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 }
|
16
|
-
|
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|
|