bill_hicks 1.2.3 → 1.2.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
  SHA1:
3
- metadata.gz: b1f2de358de247611a4fbcef9844651a397df2d7
4
- data.tar.gz: 1014ed50fb2e1341f57a83ab025c43fcd09487fc
3
+ metadata.gz: d576d59a7255cc36e5c5f191c3008f019447a0a7
4
+ data.tar.gz: de1ea3509600b34de25bee0d26e3767af9b2d880
5
5
  SHA512:
6
- metadata.gz: b90343320fe30d33a2e7ea432948badf9e5aa52305ea371a4d012847a579e0ac2499bc59ae484480ef7dd73599ebb27aaae0ee7df463e9ffd74027bd05894278
7
- data.tar.gz: 70d776884ed1631fc1ff5305bd99856227ef4ce2ac3afa3959954b8427fc0ea48287785e72a980cc82441e0f497080643f10fc11b8dae35cba56dbf04979d8b9
6
+ metadata.gz: 27072dfd0a92e2e7ba2653261b3d6a25ec17f1778c594c4e5a45b82cedb8c0e4e9973f702c6687d582b825ddb328a4dfc9534fd294b46c26bfaa9892c37e4986
7
+ data.tar.gz: b7279e8a9c67fad9d748d20f63e2bea2614470707ae1c27c26d58ad535266a43225a32989b496689c021414bc887e88ae61afad154bfbcb607a915a3dd3b1c25
@@ -67,12 +67,12 @@ module BillHicks
67
67
  # @size integer The number of items in each chunk
68
68
  def process_as_chunks(size, &block)
69
69
  connect(@options) do |ftp|
70
- temp_csv_file = Tempfile.new
70
+ tempfile = Tempfile.new
71
71
 
72
72
  ftp.chdir(BillHicks.config.top_level_dir)
73
- ftp.getbinaryfile(CATALOG_FILENAME, temp_csv_file.path)
73
+ ftp.getbinaryfile(CATALOG_FILENAME, tempfile.path)
74
74
 
75
- SmarterCSV.process(temp_csv_file, { :chunk_size => size, :force_utf8 => true, :convert_values_to_numeric => false }) do |chunk|
75
+ SmarterCSV.process(File.open(tempfile, "r:iso-8859-1"), { chunk_size: size, force_utf8: true, convert_values_to_numeric: false }) do |chunk|
76
76
  chunk.each do |item|
77
77
  item[:brand_name] = BillHicks::BrandConverter.convert(item[:product_name])
78
78
  end
@@ -80,7 +80,7 @@ module BillHicks
80
80
  yield(chunk)
81
81
  end
82
82
 
83
- temp_csv_file.unlink
83
+ tempfile.unlink
84
84
  end
85
85
  end
86
86
 
@@ -1,3 +1,3 @@
1
1
  module BillHicks
2
- VERSION = '1.2.3'
2
+ VERSION = '1.2.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bill_hicks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dale Campbell
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-25 00:00:00.000000000 Z
11
+ date: 2017-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: smarter_csv