apricoteatsgorilla 0.5.12 → 0.5.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,17 +6,15 @@ for working with SOAP services.
6
6
 
7
7
  == Install
8
8
 
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:
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.241 (the latest JRuby-compatible version)
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
@@ -35,7 +35,7 @@ begin
35
35
  "--inline-source"
36
36
  ]
37
37
 
38
- spec.add_runtime_dependency("hpricot", "0.8.2")
38
+ spec.add_runtime_dependency("hpricot", "0.8.241")
39
39
  spec.add_development_dependency("rspec", ">= 1.2.8")
40
40
  end
41
41
  rescue LoadError
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.12
1
+ 0.5.13
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{apricoteatsgorilla}
8
- s.version = "0.5.12"
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-13}
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.2"])
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.2"])
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.2"])
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
@@ -1,3 +1,3 @@
1
- %w(apricoteatsgorilla xml_node wsse).each do |file|
2
- require File.join(File.dirname(__FILE__), "apricoteatsgorilla", file)
3
- end
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 root.nil? || (root.respond_to?(:size) && root.size == 0)
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.12
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-13 00:00:00 +01:00
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.2
23
+ version: 0.8.241
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec