orion_wholesale 1.1.5 → 1.1.6

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: cf2c460fd7c8bb0f320f3b5beb12181c2d74594578bda11137c06f0d65cd00e9
4
- data.tar.gz: f5fb4cb1393044ce0ebe0244e204add347a2d4a6a5ae74bf093c51e9ce288c64
3
+ metadata.gz: 654e0b15c410119a5b34d9b20563582549019409a73d373de554b8296c305846
4
+ data.tar.gz: 14e629cece79977bd524e72dd1e07f9c264424ff6f7b10a4285017da5a0ada4a
5
5
  SHA512:
6
- metadata.gz: 6668f60ea9c9ccfd988aa5e659f65ed03527e03b09efbcd85445984488b84cf8e6ea20689373d99ca3d7985d5354abb59ae6c60321a1d1d03deb2f50a31a9d6b
7
- data.tar.gz: b4e6a99279ca506225e7f76bd6137613492054264dd1e622147e05beaa587f8cfb8477e9304233c325a3ab6f197ce019f29c1f6fd668278ecdb9ba4f65dd685c
6
+ metadata.gz: c145cc4d11770977f43e3423bc96a1f50c31c456bda71b4760077b9f927bebf0a3dc9838e270c69cb61f71edb5cf4fe064e05d14bf80b3140fc45b6c398ff5d6
7
+ data.tar.gz: 8053a6ce9b788c76d237e16ee98a3347888077a7d5c0d77efc664d51c7c50d6c0fdd4d72066eb2bf6ce09b9e7205835aaf12481b1cb361f3664c56d28445f059
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- orion_wholesale (1.1.5)
4
+ orion_wholesale (1.1.6)
5
5
  activesupport (>= 5, < 7)
6
6
  net-sftp
7
7
 
@@ -23,29 +23,29 @@ module OrionWholesale
23
23
  next
24
24
  end
25
25
 
26
- if row[@headers.index('Category1')].strip == 'Guns'
26
+ if row[@headers.index('Category1')].try(:strip) == 'Guns'
27
27
  # Guns
28
- case row[@headers.index('Category2')].strip
28
+ case row[@headers.index('Category2')].try(:strip)
29
29
  when 'Long Guns'
30
- @category = row[@headers.index('Category3')].strip
31
- @subcategory = row[@headers.index("Category4\n")].strip
30
+ @category = row[@headers.index('Category3')].try(:strip)
31
+ @subcategory = row[@headers.index("Category4")].try(:strip)
32
32
  when 'Handguns'
33
- @category = row[@headers.index('Category2')].strip
34
- @subcategory = row[@headers.index("Category3")].strip
33
+ @category = row[@headers.index('Category2')].try(:strip)
34
+ @subcategory = row[@headers.index("Category3")].try(:strip)
35
35
  end
36
36
  else
37
37
  # Everything else
38
- @category = row[@headers.index('Category1')].strip
39
- @subcategory = row[@headers.index('Category2')].strip
38
+ @category = row[@headers.index('Category1')].try(:strip)
39
+ @subcategory = row[@headers.index('Category2')].try(:strip)
40
40
  end
41
41
 
42
42
  item = {
43
- mfg_number: row[@headers.index('Item ID')].strip,
44
- upc: row[@headers.index('Bar Code')].strip,
45
- name: row[@headers.index('Description')].strip,
43
+ mfg_number: row[@headers.index('Item ID')].try(:strip),
44
+ upc: row[@headers.index('Bar Code')].try(:strip),
45
+ name: row[@headers.index('Description')].try(:strip),
46
46
  quantity: row[@headers.index('Qty available')].to_i,
47
- price: row[@headers.index('Price')].strip,
48
- brand: row[@headers.index('Brand')].strip,
47
+ price: row[@headers.index('Price')].try(:strip),
48
+ brand: row[@headers.index('Brand')].try(:strip),
49
49
  category: @category,
50
50
  subcategory: @subcategory,
51
51
  }
@@ -1,3 +1,3 @@
1
1
  module OrionWholesale
2
- VERSION = '1.1.5'.freeze
2
+ VERSION = '1.1.6'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orion_wholesale
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Beninate
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-22 00:00:00.000000000 Z
11
+ date: 2020-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport