libxml-xmlrpc 0.1.4 → 0.1.5

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.
@@ -20,6 +20,6 @@ module XML
20
20
  #
21
21
 
22
22
  module XMLRPC
23
- VERSION = "0.1.4"
23
+ VERSION = "0.1.5"
24
24
  end
25
25
  end
@@ -99,7 +99,14 @@ module XML::XMLRPC
99
99
  "String is empty - libxml-ruby would normally crash your program here."
100
100
  end
101
101
 
102
- document = XML::Parser.string(@string).parse
102
+ if Object.const_defined?("LibXML")
103
+ klass = LibXML::XML
104
+ else
105
+ klass = XML
106
+ end
107
+
108
+
109
+ document = klass::Parser.string(@string).parse
103
110
  node = document.root
104
111
  case node.name
105
112
  when "methodCall"
@@ -3,6 +3,11 @@ require 'xml/libxml/xmlrpc/parser'
3
3
  require 'stringio'
4
4
 
5
5
  class TestParserGood < Test::Unit::TestCase
6
+
7
+ def setup
8
+ @libxml_class = Object.const_defined?("LibXML") ? LibXML::XML : XML
9
+ end
10
+
6
11
  def test_constructor
7
12
  assert_raise XML::XMLRPC::ParserError do
8
13
  XML::XMLRPC::Parser.new(nil)
@@ -14,7 +19,7 @@ class TestParserGood < Test::Unit::TestCase
14
19
 
15
20
  # should raise a LibXML error because there's nothing to parse
16
21
  # XXX libxml no likey empty string.
17
- assert_raise XML::Parser::ParseError do
22
+ assert_raise @libxml_class::Parser::ParseError do
18
23
  XML::XMLRPC::Parser.new("asdf")
19
24
  end
20
25
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: libxml-xmlrpc
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.4
7
- date: 2007-12-09 00:00:00 -08:00
6
+ version: 0.1.5
7
+ date: 2008-11-02 00:00:00 -07:00
8
8
  summary: Provides a alternative and faster XML-RPC layer through libxml's parsing framework
9
9
  require_paths:
10
10
  - lib
@@ -31,13 +31,13 @@ authors:
31
31
  files:
32
32
  - lib/xml
33
33
  - lib/xml/libxml
34
+ - lib/xml/libxml/xmlrpc.rb
34
35
  - lib/xml/libxml/xmlrpc
35
36
  - lib/xml/libxml/xmlrpc/builder.rb
36
- - lib/xml/libxml/xmlrpc/client.rb
37
37
  - lib/xml/libxml/xmlrpc/parser.rb
38
- - lib/xml/libxml/xmlrpc.rb
39
- - test/data
38
+ - lib/xml/libxml/xmlrpc/client.rb
40
39
  - test/test_builder.rb
40
+ - test/data
41
41
  - test/test_parser_bad.rb
42
42
  - test/test_parser_good.rb
43
43
  test_files: []