| commit 32: | 7f735c3b237b |
| parent 31: | 9f38ab349db4 |
| branch: | trunk |
Hpricot and REXML bindings green under 1.9; expat MIA
Changed (Δ63 bytes):
raw changeset »
lib/rforce.rb (2 lines added, 2 lines removed)
lib/rforce/soap_response_hpricot.rb (3 lines added, 3 lines removed)
lib/rforce/soap_response_rexml.rb (1 lines added, 1 lines removed)
Up to file-list lib/rforce.rb:
| … | … | @@ -63,8 +63,8 @@ require 'facets/openhash' |
63 |
63 |
|
64 |
64 |
require 'rforce/binding' |
65 |
65 |
require 'rforce/soap_response_rexml' |
66 |
require 'rforce/soap_response_hpricot' rescue nil |
|
67 |
require 'rforce/soap_response_expat' rescue nil |
|
66 |
begin; require 'rforce/soap_response_hpricot'; rescue LoadError; end |
|
67 |
begin; require 'rforce/soap_response_expat'; rescue LoadError; end |
|
68 |
68 |
|
69 |
69 |
|
70 |
70 |
module RForce |
Up to file-list lib/rforce/soap_response_hpricot.rb:
| … | … | @@ -19,16 +19,16 @@ module RForce |
19 |
19 |
|
20 |
20 |
def self.node_to_ruby(node) |
21 |
21 |
# Convert text nodes into simple strings. |
22 |
children = |
|
22 |
children = (node.children || []).reject do |c| |
|
23 |
23 |
c.is_a?(Hpricot::Text) && c.to_s.strip.empty? |
24 |
24 |
end |
25 |
25 |
|
26 |
26 |
if node.is_a?(Hpricot::Text) |
27 |
return node.inner_text |
|
27 |
return node.inner_text.to_s |
|
28 |
28 |
end |
29 |
29 |
|
30 |
30 |
if children.first.is_a?(Hpricot::Text) |
31 |
return children.first |
|
31 |
return children.first.to_s |
|
32 |
32 |
end |
33 |
33 |
|
34 |
34 |
# Convert nodes with children into MethodHashes. |
