multi_xml 0.1.3 → 0.1.4

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.

Potentially problematic release.


This version of multi_xml might be problematic. Click here for more details.

@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- multi_xml (0.1.3)
4
+ multi_xml (0.1.4)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -10,16 +10,16 @@ GEM
10
10
  libxml-ruby (1.1.4)
11
11
  nokogiri (1.4.3.1)
12
12
  rake (0.8.7)
13
- rspec (2.0.0)
14
- rspec-core (= 2.0.0)
15
- rspec-expectations (= 2.0.0)
16
- rspec-mocks (= 2.0.0)
17
- rspec-core (2.0.0)
18
- rspec-expectations (2.0.0)
13
+ rspec (2.0.1)
14
+ rspec-core (~> 2.0.1)
15
+ rspec-expectations (~> 2.0.1)
16
+ rspec-mocks (~> 2.0.1)
17
+ rspec-core (2.0.1)
18
+ rspec-expectations (2.0.1)
19
19
  diff-lcs (>= 1.1.2)
20
- rspec-mocks (2.0.0)
21
- rspec-core (= 2.0.0)
22
- rspec-expectations (= 2.0.0)
20
+ rspec-mocks (2.0.1)
21
+ rspec-core (~> 2.0.1)
22
+ rspec-expectations (~> 2.0.1)
23
23
 
24
24
  PLATFORMS
25
25
  ruby
@@ -13,7 +13,7 @@ module MultiXml
13
13
  ['libxml', :libxml],
14
14
  ['nokogiri', :nokogiri],
15
15
  ['rexml/document', :rexml]
16
- ]
16
+ ] unless defined?(REQUIREMENT_MAP)
17
17
 
18
18
  CONTENT_ROOT = '__content__'.freeze unless defined?(CONTENT_ROOT)
19
19
 
@@ -93,8 +93,8 @@ module MultiXml
93
93
  xml.strip!
94
94
  begin
95
95
  hash = typecast_xml_value(undasherize_keys(parser.parse(xml))) || {}
96
- rescue StandardError => exception
97
- raise ParseError, exception.inspect
96
+ rescue parser.parse_error => error
97
+ raise ParseError, error.to_s, error.backtrace
98
98
  end
99
99
  hash = symbolize_keys(hash) if options[:symbolize_keys]
100
100
  hash
@@ -5,6 +5,7 @@ module MultiXml
5
5
  # Use LibXML to parse XML.
6
6
  module Libxml #:nodoc:
7
7
  extend self
8
+ def parse_error; ::LibXML::XML::Error; end
8
9
 
9
10
  # Parse an XML Document string or IO into a simple hash using libxml.
10
11
  # xml::
@@ -5,6 +5,7 @@ module MultiXml
5
5
  # Use Nokogiri to parse XML.
6
6
  module Nokogiri #:nodoc:
7
7
  extend self
8
+ def parse_error; ::Nokogiri::XML::SyntaxError; end
8
9
 
9
10
  # Parse an XML Document string or IO into a simple hash using libxml / nokogiri.
10
11
  # xml::
@@ -5,6 +5,7 @@ module MultiXml
5
5
  # Use REXML to parse XML.
6
6
  module Rexml #:nodoc:
7
7
  extend self
8
+ def parse_error; ::REXML::ParseException; end
8
9
 
9
10
  CONTENT_ROOT = '__content__'.freeze unless defined?(CONTENT_ROOT)
10
11
 
@@ -1,3 +1,3 @@
1
1
  module MultiXml
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multi_xml
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
9
+ - 4
10
+ version: 0.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Erik Michaels-Ober
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-18 00:00:00 -07:00
18
+ date: 2010-10-20 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency