davidsons 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9bf429f746003d6265c0b884318f237f1ed19bc1667008112531e56d66adb9a8
4
- data.tar.gz: bf631b8a5f09378731ce6473e1a0beb8fb5b1e9e0d3de7f49e8f0692a0330e11
3
+ metadata.gz: 914036ba6b5750a904124c069afd486e1ff4d38ff0a29328d93f012f8d3f0068
4
+ data.tar.gz: 5c57655ba02a193e651319d14cb4f0da7e3898dfff958c900218a3a400aea3f8
5
5
  SHA512:
6
- metadata.gz: b04b1a42bc0bf21365523d7fad7552e021c0ae91214d8c3e842a81b70c2172c3d12a13195e6dc969f78fe36625a91de454cf08ea770cf2fba13d436c47d9d318
7
- data.tar.gz: f4d7a8f6050ecb28ab0c1c0b9ee115ddf047bbea44732c30c0a532f8cc26dc9f5e2d29f1762d99e1b507f4ab3ea452288070c38027130cf9941256a6f9e02feb
6
+ metadata.gz: dbe533e923bc65689cd552207e4a1dcbd8e7217001d7bacddfbe5b619ca84639ef5b257d66aead601d1c04ae83b6084c14c91d0f5a15e40161c81c914c52e3aa
7
+ data.tar.gz: a67c8daafc227e823331cc91f2cb32c76226b63f8c5481b6101c98c56abc184fa5fe43764460c65baafa35fcf08fb880d60ef9b689a4dd4cbbe931bc8a326c22
@@ -18,6 +18,8 @@ module Davidsons
18
18
  def all(&block)
19
19
  tempfile = get_file(CATALOG_FILENAME)
20
20
 
21
+ # TODO: account for Sale Price and MSP (minimum price)
22
+
21
23
  SmarterCSV.process(tempfile.open, {
22
24
  chunk_size: CHUNK_SIZE,
23
25
  convert_values_to_numeric: false,
@@ -27,7 +29,7 @@ module Davidsons
27
29
  item_description: :name,
28
30
  upc_code: :upc,
29
31
  manufacturer: :brand,
30
- msp: :msrp,
32
+ retail_price: :msrp,
31
33
  dealer_price: :price,
32
34
  gun_type: :category,
33
35
  }
@@ -1,8 +1,8 @@
1
1
  module Davidsons
2
2
  class Inventory < Base
3
3
 
4
- INVENTORY_FILENAME = "davidsons_quantity.csv"
5
- CHUNK_SIZE = 100
4
+ INVENTORY_FILENAME = "davidsons_quantity.csv"
5
+ CHUNK_SIZE = 100
6
6
 
7
7
  def initialize(options = {})
8
8
  requires!(options, :username, :password)
@@ -32,9 +32,7 @@ module Davidsons
32
32
  chunk_size: CHUNK_SIZE,
33
33
  convert_values_to_numeric: false,
34
34
  force_utf8: true,
35
- key_mapping: {
36
- item_number: :item_identifier
37
- }
35
+ key_mapping: { item_number: :item_identifier }
38
36
  }) do |chunk|
39
37
  chunk.each do |item|
40
38
  item.except!(:upc_code)
@@ -1,3 +1,3 @@
1
1
  module Davidsons
2
- VERSION = '1.0.3'.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: davidsons
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Knight
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-20 00:00:00.000000000 Z
11
+ date: 2018-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon