mge_wholesale 3.1.1 → 4.0.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/mge_wholesale/catalog.rb +9 -4
- data/lib/mge_wholesale/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: 5ff10676a183df44ace9f712798596b17f4d0ac0
|
|
4
|
+
data.tar.gz: ad247cbe93c76c1a356593e5423f03552f5f5e5b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e5399f365fff38fc2810755a454f5aeb2ef3996ef8ad2e7bf2467b22673aa089f2277cf296cf97b628194f50085e00b0d2eeb7c606de76ba5ca3bf63bcfa79bd
|
|
7
|
+
data.tar.gz: aca0ddd331b5133e08013c32161717de5c6a9da358f43a5a01fdf2f718ef7c557202431618e1875c2cdd6dce5bc6a12adf23f4b62767a16589a2c45af7ec871d
|
|
@@ -44,23 +44,28 @@ module MgeWholesale
|
|
|
44
44
|
@options = options
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
-
def self.all(options = {}
|
|
47
|
+
def self.all(options = {})
|
|
48
48
|
requires!(options, :username, :password)
|
|
49
|
-
new(options).all
|
|
49
|
+
new(options).all
|
|
50
50
|
end
|
|
51
51
|
|
|
52
|
-
def all
|
|
52
|
+
def all
|
|
53
53
|
tempfile = get_file(CATALOG_FILENAME)
|
|
54
|
+
items = []
|
|
54
55
|
|
|
55
56
|
Nokogiri::XML::Reader.from_io(tempfile).each do |node|
|
|
56
57
|
next unless node.node_type == Nokogiri::XML::Reader::TYPE_ELEMENT
|
|
57
58
|
next unless node.name == ITEM_NODE_NAME
|
|
58
59
|
|
|
59
|
-
|
|
60
|
+
_map_hash = map_hash(Nokogiri::XML::DocumentFragment.parse(node.inner_xml))
|
|
61
|
+
|
|
62
|
+
items << _map_hash unless _map_hash.nil?
|
|
60
63
|
end
|
|
61
64
|
|
|
62
65
|
tempfile.close
|
|
63
66
|
tempfile.unlink
|
|
67
|
+
|
|
68
|
+
items
|
|
64
69
|
end
|
|
65
70
|
|
|
66
71
|
protected
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mge_wholesale
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 4.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ken Ebling
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-08-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: nokogiri
|