sports_south 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 +4 -4
- data/lib/sports_south/inventory.rb +12 -7
- data/lib/sports_south/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19a10bec089537426870e1faf6373b1ad2268fbde29ed5fc912bc21ce5b3526e
|
4
|
+
data.tar.gz: 7a356aa8a0a28ebbc59bc68e2b995ffc2ee3d0d4db32ae4df154c02c7dfb05e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f81d5e2a1a8fb16fb7a9bca7a47711ffd3c042ac17ad57aae3b24c6278a718bacb818077716ac09a827baa9d039612b0c8922e9937eacbe1886834cb211e2231
|
7
|
+
data.tar.gz: 87d8a4dcd81a38b415d6d45ce17491aa0c30fcd382a523e0ef0ed978ff1771735d90b3ec9c3c7c89a9ca911a5b957cd6fe7ed75c765f06af71788ce7c7fac3db
|
@@ -19,7 +19,7 @@ module SportsSouth
|
|
19
19
|
new(options).get_quantity_file
|
20
20
|
end
|
21
21
|
|
22
|
-
def self.all(options = {}
|
22
|
+
def self.all(options = {})
|
23
23
|
requires!(options, :username, :password)
|
24
24
|
|
25
25
|
if options[:last_updated].present?
|
@@ -30,7 +30,7 @@ module SportsSouth
|
|
30
30
|
|
31
31
|
options[:last_item] ||= '-1'
|
32
32
|
|
33
|
-
new(options).all
|
33
|
+
new(options).all
|
34
34
|
end
|
35
35
|
|
36
36
|
def self.get(item_identifier, options = {})
|
@@ -38,7 +38,7 @@ module SportsSouth
|
|
38
38
|
new(options).get(item_identifier)
|
39
39
|
end
|
40
40
|
|
41
|
-
def all
|
41
|
+
def all
|
42
42
|
http, request = get_http_and_request(API_URL, '/IncrementalOnhandUpdate')
|
43
43
|
|
44
44
|
request.set_form_data(form_params = form_params(@options).merge({
|
@@ -46,7 +46,9 @@ module SportsSouth
|
|
46
46
|
LastItem: @options[:last_item].to_s
|
47
47
|
}))
|
48
48
|
|
49
|
+
items = []
|
49
50
|
tempfile = download_to_tempfile(http, request)
|
51
|
+
|
50
52
|
tempfile.rewind
|
51
53
|
|
52
54
|
Nokogiri::XML::Reader.from_io(tempfile).each do |reader|
|
@@ -55,12 +57,15 @@ module SportsSouth
|
|
55
57
|
|
56
58
|
node = Nokogiri::XML.parse(reader.outer_xml)
|
57
59
|
|
58
|
-
|
60
|
+
_map_hash = map_hash(node.css(ITEM_NODE_NAME))
|
61
|
+
|
62
|
+
items << _map_hash unless _map_hash.nil?
|
59
63
|
end
|
60
64
|
|
61
65
|
tempfile.close
|
62
66
|
tempfile.unlink
|
63
|
-
|
67
|
+
|
68
|
+
items
|
64
69
|
end
|
65
70
|
|
66
71
|
def get_quantity_file
|
@@ -83,7 +88,7 @@ module SportsSouth
|
|
83
88
|
tempfile.path
|
84
89
|
end
|
85
90
|
|
86
|
-
def self.quantity(options = {}
|
91
|
+
def self.quantity(options = {})
|
87
92
|
requires!(options, :username, :password)
|
88
93
|
|
89
94
|
if options[:last_updated].present?
|
@@ -94,7 +99,7 @@ module SportsSouth
|
|
94
99
|
|
95
100
|
options[:last_item] ||= '-1'
|
96
101
|
|
97
|
-
new(options).all
|
102
|
+
new(options).all
|
98
103
|
end
|
99
104
|
|
100
105
|
def get(item_identifier)
|
data/lib/sports_south/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sports_south
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
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-
|
11
|
+
date: 2019-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|