lipseys 2.0.9 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/lipseys/inventory.rb +18 -0
- data/lib/lipseys/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: fad5e2c7901bddbfb68ab13e7dbaf4014c3cd2bc
|
4
|
+
data.tar.gz: 3946ae62f8a6b1744b42d813c1aa3441d1ff115f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbdac012e2b20bbe02152297ab2772c13cf8cb4dfa820522f9254f67305846a0dac8ff0fb0b43de4a58ec8d7136f37a4e2775e078aa9d228ce7e0a1cc00b321e
|
7
|
+
data.tar.gz: fd4c34c3d53ed4327bb9edc816be1f70d1ba19d0f2460d37c7078bf4947d87a6146ce44aabaad9195ba0c2e98241d115223d7b4d8ca5d0a06d4a76ed919116c1
|
data/lib/lipseys/inventory.rb
CHANGED
@@ -13,6 +13,10 @@ module Lipseys
|
|
13
13
|
new(options).all(chunk_size, &block)
|
14
14
|
end
|
15
15
|
|
16
|
+
def self.get_quantity_file(options = {})
|
17
|
+
new(options).get_quantity_file
|
18
|
+
end
|
19
|
+
|
16
20
|
def self.quantity(chunk_size = 100, options = {}, &block)
|
17
21
|
new(options).all(chunk_size, &block)
|
18
22
|
end
|
@@ -56,6 +60,20 @@ module Lipseys
|
|
56
60
|
tempfile.unlink
|
57
61
|
end
|
58
62
|
|
63
|
+
def get_quantity_file
|
64
|
+
quantity_tempfile = stream_to_tempfile(API_URL, @options)
|
65
|
+
tempfile = Tempfile.new
|
66
|
+
|
67
|
+
Lipseys::Parser.parse(quantity_tempfile, 'Item') do |node|
|
68
|
+
tempfile.puts("#{content_for(node, 'ItemNo')},#{content_for(node, 'QtyOnHand')}")
|
69
|
+
end
|
70
|
+
|
71
|
+
quantity_tempfile.unlink
|
72
|
+
tempfile.close
|
73
|
+
|
74
|
+
tempfile.path
|
75
|
+
end
|
76
|
+
|
59
77
|
def quantity(size, &block)
|
60
78
|
chunker = Lipseys::Chunker.new(size)
|
61
79
|
tempfile = stream_to_tempfile(API_URL, @options)
|
data/lib/lipseys/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lipseys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.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: 2018-
|
11
|
+
date: 2018-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|