apricoteatsgorilla 0.5.12 → 0.5.13
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.
- data/README.rdoc +4 -6
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/apricoteatsgorilla.gemspec +5 -5
- data/lib/apricoteatsgorilla.rb +3 -3
- data/lib/apricoteatsgorilla/apricoteatsgorilla.rb +6 -1
- metadata +3 -3
data/README.rdoc
CHANGED
|
@@ -6,17 +6,15 @@ for working with SOAP services.
|
|
|
6
6
|
|
|
7
7
|
== Install
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
The gem for Apricot eats Gorilla is in the {gemcutter}[http://gemcutter.org] repository.
|
|
10
|
+
Please follow the steps on their website to set up your rubygems installation.
|
|
11
|
+
Afterwards you can install the gem like this:
|
|
12
12
|
|
|
13
13
|
$ gem install apricoteatsgorilla
|
|
14
14
|
|
|
15
15
|
== Dependencies
|
|
16
16
|
|
|
17
|
-
hpricot 0.8.
|
|
18
|
-
|
|
19
|
-
Also available at: {GitHub Downloads}[http://github.com/rubiii/apricoteatsgorilla/downloads]
|
|
17
|
+
hpricot 0.8.2 (JRuby-compatible version)
|
|
20
18
|
|
|
21
19
|
== Translate an XML String into a Ruby Hash
|
|
22
20
|
|
data/Rakefile
CHANGED
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.5.
|
|
1
|
+
0.5.13
|
data/apricoteatsgorilla.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{apricoteatsgorilla}
|
|
8
|
-
s.version = "0.5.
|
|
8
|
+
s.version = "0.5.13"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Daniel Harrington"]
|
|
12
|
-
s.date = %q{2009-11-
|
|
12
|
+
s.date = %q{2009-11-23}
|
|
13
13
|
s.description = %q{SOAP communication helper}
|
|
14
14
|
s.email = %q{me@rubiii.com}
|
|
15
15
|
s.extra_rdoc_files = [
|
|
@@ -53,14 +53,14 @@ Gem::Specification.new do |s|
|
|
|
53
53
|
s.specification_version = 3
|
|
54
54
|
|
|
55
55
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
|
56
|
-
s.add_runtime_dependency(%q<hpricot>, ["= 0.8.
|
|
56
|
+
s.add_runtime_dependency(%q<hpricot>, ["= 0.8.241"])
|
|
57
57
|
s.add_development_dependency(%q<rspec>, [">= 1.2.8"])
|
|
58
58
|
else
|
|
59
|
-
s.add_dependency(%q<hpricot>, ["= 0.8.
|
|
59
|
+
s.add_dependency(%q<hpricot>, ["= 0.8.241"])
|
|
60
60
|
s.add_dependency(%q<rspec>, [">= 1.2.8"])
|
|
61
61
|
end
|
|
62
62
|
else
|
|
63
|
-
s.add_dependency(%q<hpricot>, ["= 0.8.
|
|
63
|
+
s.add_dependency(%q<hpricot>, ["= 0.8.241"])
|
|
64
64
|
s.add_dependency(%q<rspec>, [">= 1.2.8"])
|
|
65
65
|
end
|
|
66
66
|
end
|
data/lib/apricoteatsgorilla.rb
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
require "apricoteatsgorilla/apricoteatsgorilla"
|
|
2
|
+
require "apricoteatsgorilla/xml_node"
|
|
3
|
+
require "apricoteatsgorilla/wsse"
|
|
@@ -91,7 +91,7 @@ class ApricotEatsGorilla
|
|
|
91
91
|
doc = Hpricot.XML remove_whitespace(xml)
|
|
92
92
|
root = root_node ? doc.search(root_node) : doc.root
|
|
93
93
|
|
|
94
|
-
return nil if
|
|
94
|
+
return nil if empty_root_node? root
|
|
95
95
|
if !root.respond_to? :each
|
|
96
96
|
xml_node_to_hash(root)
|
|
97
97
|
elsif root.size == 1
|
|
@@ -211,6 +211,11 @@ class ApricotEatsGorilla
|
|
|
211
211
|
end
|
|
212
212
|
end
|
|
213
213
|
|
|
214
|
+
# Returns whether a given +root+ node is empty.
|
|
215
|
+
def empty_root_node?(root)
|
|
216
|
+
!root || (root.respond_to?(:size) && root.size == 0)
|
|
217
|
+
end
|
|
218
|
+
|
|
214
219
|
# Translates a single XML root node to a Ruby Hash.
|
|
215
220
|
def single_xml_root_node_to_hash(root)
|
|
216
221
|
if root.first.children.nil?
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: apricoteatsgorilla
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.13
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Harrington
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-11-
|
|
12
|
+
date: 2009-11-23 00:00:00 +01:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
@@ -20,7 +20,7 @@ dependencies:
|
|
|
20
20
|
requirements:
|
|
21
21
|
- - "="
|
|
22
22
|
- !ruby/object:Gem::Version
|
|
23
|
-
version: 0.8.
|
|
23
|
+
version: 0.8.241
|
|
24
24
|
version:
|
|
25
25
|
- !ruby/object:Gem::Dependency
|
|
26
26
|
name: rspec
|