bill_hicks 1.1.9.pre → 1.1.9.pre2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bill_hicks/catalog.rb +2 -2
- data/lib/bill_hicks/inventory.rb +2 -2
- data/lib/bill_hicks/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de50980504242ddc3e1ab515b414599f207f91c6
|
4
|
+
data.tar.gz: a96db8764d8d57558b970143a0d7ef37a76dd98a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abdd05f09745bb346721a30356fb9b7482a42fb49926ffc7048a2bb04c70d8b7cfe6e2368b8d6904454df6a0be1c553f854770f799db1b2c13888460e566a38c
|
7
|
+
data.tar.gz: 4bf812931f7dc471ffa69c2fba1edf9ba49691338b67f3295132073966a1d611167622077ce31896a5975efea62c7f822eee325b627e3ceda2b4ab485e4ea957
|
data/lib/bill_hicks/catalog.rb
CHANGED
@@ -53,7 +53,7 @@ module BillHicks
|
|
53
53
|
# Alias the ':universal_product_code' as ':upc'.
|
54
54
|
row_hash[:upc] = row_hash[:universal_product_code]
|
55
55
|
|
56
|
-
row_hash[:
|
56
|
+
row_hash[:brand_name] = BillHicks::BrandConverter.convert(row_hash[:product_name])
|
57
57
|
|
58
58
|
catalog << row_hash
|
59
59
|
end
|
@@ -74,7 +74,7 @@ module BillHicks
|
|
74
74
|
|
75
75
|
SmarterCSV.process(temp_csv_file, { :chunk_size => size, :force_utf8 => true, :convert_values_to_numeric => false }) do |chunk|
|
76
76
|
chunk.each do |item|
|
77
|
-
item[:
|
77
|
+
item[:brand_name] = BillHicks::BrandConverter.convert(item[:product_name])
|
78
78
|
end
|
79
79
|
|
80
80
|
yield(chunk)
|
data/lib/bill_hicks/inventory.rb
CHANGED
@@ -36,7 +36,7 @@ module BillHicks
|
|
36
36
|
|
37
37
|
CSV.parse(lines, headers: :first_row) do |row|
|
38
38
|
inventory << {
|
39
|
-
|
39
|
+
brand_name: BillHicks::BrandConverter.convert(row.fetch('Product')),
|
40
40
|
product: row.fetch('Product'),
|
41
41
|
upc: row.fetch('UPC'),
|
42
42
|
quantity: (Integer(row.fetch('Qty Avail')) rescue 0)
|
@@ -59,7 +59,7 @@ module BillHicks
|
|
59
59
|
|
60
60
|
SmarterCSV.process(temp_csv_file, { :chunk_size => size, :force_utf8 => true, :convert_values_to_numeric => false, }) do |chunk|
|
61
61
|
chunk.each do |item|
|
62
|
-
item[:
|
62
|
+
item[:brand_name] = BillHicks::BrandConverter.convert(item[:product])
|
63
63
|
end
|
64
64
|
|
65
65
|
yield(chunk)
|
data/lib/bill_hicks/version.rb
CHANGED