bill_hicks 1.1.7 → 1.1.8
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 +3 -5
- data/lib/bill_hicks/inventory.rb +3 -5
- data/lib/bill_hicks/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d223ee8495088ec9a7171c101b5053cfa86255b7
|
4
|
+
data.tar.gz: 735df7a9adbd24cb1d3fe4dd9855faf4f50c0a60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9d7c172fa467e8acd7e2788e365286e5a60424f1c3f43c23cc4461a8c4d853fd0892972de89a9287a77fa14135454a4d7d63bc81566d53fac5444f6ebafd64f
|
7
|
+
data.tar.gz: 47c100424aaaf2ba0a8eaa2682b75cacd85d42a557eb09ae28c5fdf0a9a15cd357d969126ea34cca1b9719351a4dd0978dc5c62a4e9f26901112e1da2669ef69
|
data/lib/bill_hicks/catalog.rb
CHANGED
@@ -30,11 +30,9 @@ module BillHicks
|
|
30
30
|
new(options).all
|
31
31
|
end
|
32
32
|
|
33
|
-
def self.process_as_chunks(size = 15, options = {})
|
33
|
+
def self.process_as_chunks(size = 15, options = {}, &block)
|
34
34
|
requires!(options, :username, :password)
|
35
|
-
new(options).process_as_chunks(size)
|
36
|
-
yield(chunk)
|
37
|
-
end
|
35
|
+
new(options).process_as_chunks(size, &block)
|
38
36
|
end
|
39
37
|
|
40
38
|
# Returns an array of hashes with the catalog item details.
|
@@ -65,7 +63,7 @@ module BillHicks
|
|
65
63
|
# Streams csv and chunks it
|
66
64
|
#
|
67
65
|
# @size integer The number of items in each chunk
|
68
|
-
def process_as_chunks(size)
|
66
|
+
def process_as_chunks(size, &block)
|
69
67
|
connect(@options) do |ftp|
|
70
68
|
temp_csv_file = Tempfile.new
|
71
69
|
|
data/lib/bill_hicks/inventory.rb
CHANGED
@@ -20,11 +20,9 @@ module BillHicks
|
|
20
20
|
new(options).all
|
21
21
|
end
|
22
22
|
|
23
|
-
def self.process_as_chunks(size = 15, options = {})
|
23
|
+
def self.process_as_chunks(size = 15, options = {}, &block)
|
24
24
|
requires!(options, :username, :password)
|
25
|
-
new(options).process_as_chunks(size)
|
26
|
-
yield(chunk)
|
27
|
-
end
|
25
|
+
new(options).process_as_chunks(size, &block)
|
28
26
|
end
|
29
27
|
|
30
28
|
# Returns an array of hashes with the inventory item details.
|
@@ -51,7 +49,7 @@ module BillHicks
|
|
51
49
|
# Streams csv and chunks it
|
52
50
|
#
|
53
51
|
# @size integer The number of items in each chunk
|
54
|
-
def process_as_chunks(size)
|
52
|
+
def process_as_chunks(size, &block)
|
55
53
|
connect(@options) do |ftp|
|
56
54
|
temp_csv_file = Tempfile.new
|
57
55
|
|
data/lib/bill_hicks/version.rb
CHANGED
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.1.
|
4
|
+
version: 1.1.8
|
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-
|
11
|
+
date: 2017-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: smarter_csv
|