nori 2.0.3 → 2.0.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.
@@ -1,3 +1,7 @@
1
+ # 2.0.4 (2013-02-26)
2
+
3
+ * Fix: [#37](https://github.com/savonrb/nori/issues/37) special characters
4
+ problem on Ruby 1.9.3-p392.
1
5
 
2
6
  # 2.0.3 (2013-01-10)
3
7
 
data/README.md CHANGED
@@ -56,7 +56,7 @@ Nori lets you specify a custom formula to convert XML tags to Hash keys.
56
56
  Let me give you an example:
57
57
 
58
58
  ``` ruby
59
- parser = Nori.new(:convert_tags_to => lambda { |tag| tag.snake_case.to_sym })
59
+ parser = Nori.new(:convert_tags_to => lambda { |tag| tag.snakecase.to_sym })
60
60
 
61
61
  xml = '<userResponse><accountStatus>active</accountStatus></userResponse>'
62
62
  parser.parse(xml) # => { :user_response => { :account_status => "active" }
@@ -1,5 +1,5 @@
1
1
  class Nori
2
2
 
3
- VERSION = "2.0.3"
3
+ VERSION = "2.0.4"
4
4
 
5
5
  end
@@ -1,4 +1,5 @@
1
1
  require "rexml/text"
2
+ require "rexml/document"
2
3
  require "date"
3
4
  require "time"
4
5
  require "yaml"
@@ -7,6 +7,11 @@ describe Nori do
7
7
 
8
8
  let(:parser) { parser }
9
9
 
10
+ it "should work with unnormalized characters" do
11
+ xml = '<root>&amp;</root>'
12
+ parse(xml).should == { 'root' => "&" }
13
+ end
14
+
10
15
  it "should transform a simple tag with content" do
11
16
  xml = "<tag>This is the contents</tag>"
12
17
  parse(xml).should == { 'tag' => 'This is the contents' }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nori
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-01-10 00:00:00.000000000 Z
14
+ date: 2013-02-26 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rake
@@ -109,7 +109,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
109
109
  version: '0'
110
110
  segments:
111
111
  - 0
112
- hash: 3728758796378487229
112
+ hash: 1629927021843471619
113
113
  required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  none: false
115
115
  requirements:
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  version: '0'
119
119
  segments:
120
120
  - 0
121
- hash: 3728758796378487229
121
+ hash: 1629927021843471619
122
122
  requirements: []
123
123
  rubyforge_project: nori
124
124
  rubygems_version: 1.8.24