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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bbdde3945e490c2bd160986679bf9f3b6f1faa63
4
- data.tar.gz: 676ff87240c53187f8b463cee69193b72cdece46
3
+ metadata.gz: fad5e2c7901bddbfb68ab13e7dbaf4014c3cd2bc
4
+ data.tar.gz: 3946ae62f8a6b1744b42d813c1aa3441d1ff115f
5
5
  SHA512:
6
- metadata.gz: 5105cff72fa289832bdcfe5f5564d751d283deed22cfcee1ecb148318027f7414a5b8aeff60848bf3fe519518545e8f40d9f0820f4c94f9e16fa79ac4bde018a
7
- data.tar.gz: b3006cf69775cb4ff969caa3731f6cbe2614c46f91d97683c0a1f3e770a7ffbf58c634db2ad46584bc8f9faa682c969d960cf1424574fdb42bf2ca3d7ac1d803
6
+ metadata.gz: fbdac012e2b20bbe02152297ab2772c13cf8cb4dfa820522f9254f67305846a0dac8ff0fb0b43de4a58ec8d7136f37a4e2775e078aa9d228ce7e0a1cc00b321e
7
+ data.tar.gz: fd4c34c3d53ed4327bb9edc816be1f70d1ba19d0f2460d37c7078bf4947d87a6146ce44aabaad9195ba0c2e98241d115223d7b4d8ca5d0a06d4a76ed919116c1
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module Lipseys
2
- VERSION = "2.0.9".freeze
2
+ VERSION = "2.1.0".freeze
3
3
  end
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.9
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-02-19 00:00:00.000000000 Z
11
+ date: 2018-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri