bill_hicks 4.0.0 → 5.0.0

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: 945f056addae566f3a420381231701f1a46af088
4
- data.tar.gz: f1ecd4b082c1c75e4094f9eb28052905afa0afd1
3
+ metadata.gz: 4a0adad51c040c6c79ae2d1d1fd1e451f8ed2e2d
4
+ data.tar.gz: 81d4b0b2a31aaab8df088868a3c320079a5fb927
5
5
  SHA512:
6
- metadata.gz: 7f9d389ac08f36b262e4c2d9df438977cfb1224784e7574916bc8ba0eeed71b30e17938a4c036bb25edc15ab493f909eaf4280b9a0be2e12e297b148724f9109
7
- data.tar.gz: 2b88bd1e0796056326dfcac5814e6d916490298ddc696a88735b16d581a695fa710578f77aa8b5504f76b3e1ece2c9dc9b5e765deb511bb3191752af0668d72f
6
+ metadata.gz: 1f0b4505fc706b579c86d6338211b2250aec8e762e12b34ac7defd89eca0655e58c64c705c0543aa3bc3b4f50708c39f08368ee2207bc516bc17851106e5af40
7
+ data.tar.gz: 5d008cfc2bfb98d424e7b1c75feea036e85ba107217737ce5ddb57fdadd6104deeb113499f29c799b48b1303728b221b4ba19122e31473abb1faf8326d16adf8
@@ -21,17 +21,18 @@ module BillHicks
21
21
  new(options).get_quantity_file
22
22
  end
23
23
 
24
- def self.quantity(options = {}, &block)
24
+ def self.quantity(options = {})
25
25
  requires!(options, :username, :password)
26
- new(options).all &block
26
+ new(options).all
27
27
  end
28
28
 
29
- def self.all(options = {}, &block)
29
+ def self.all(options = {})
30
30
  requires!(options, :username, :password)
31
- new(options).all &block
31
+ new(options).all
32
32
  end
33
33
 
34
- def all(&block)
34
+ def all
35
+ items = []
35
36
  quantity_tempfile = get_file(INVENTORY_FILENAME)
36
37
 
37
38
  SmarterCSV.process(quantity_tempfile, {
@@ -44,13 +45,14 @@ module BillHicks
44
45
  }
45
46
  }) do |chunk|
46
47
  chunk.each do |item|
47
- yield item
48
+ items << item
48
49
  end
49
50
  end
50
51
 
51
52
  quantity_tempfile.close
52
53
  quantity_tempfile.unlink
53
- true
54
+
55
+ items
54
56
  end
55
57
 
56
58
  def get_quantity_file
@@ -1,3 +1,3 @@
1
1
  module BillHicks
2
- VERSION = '4.0.0'.freeze
2
+ VERSION = '5.0.0'.freeze
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: 4.0.0
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dale Campbell
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-02 00:00:00.000000000 Z
11
+ date: 2019-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: smarter_csv
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  version: '0'
131
131
  requirements: []
132
132
  rubyforge_project:
133
- rubygems_version: 2.6.12
133
+ rubygems_version: 2.6.14
134
134
  signing_key:
135
135
  specification_version: 4
136
136
  summary: Ruby library for Bill Hicks ERP system