- Feature: #69 Add option to convert empty tags to a value other than nil.
- Formally drop support for ruby 1.8.7. Installing Nori from rubygems for that version should no longer attempt to install versions that will not work.
-
Change: Dropped support for ruby 1.8, rubinius and ree
-
Feature: Added
:convert_attributes
feature similar to:convert_tags_to
-
Feature: Added
:convert_dashes_to_underscore
option
-
Change:
Nori#find
now ignores namespace prefixes in Hash keys it is searching through. -
Fix: Limited Nokogiri to < 1.6, because v1.6 dropped support for Ruby 1.8.
- Feature: #42 adds the
:delete_namespace_attributes
option to remove namespace attributes likexmlns:*
orxsi:*
.
- Feature: Added
Nori.hash_key
andNori#find
to work with Hash keys generated by Nori. Original issue: savonrb/savon#393
- Fix: #37 special characters problem on Ruby 1.9.3-p392.
- Fix for remote code execution bug. For more in-depth information, read about the recent Rails hotfix. Please make sure to upgrade now!
- Yanked because of a problem with XML that starts with an instruction tag.
- Yanked because of a problem with XML that starts with an instruction tag.
Please make sure to read the updated README for how to use the new version.
-
Change: Nori now defaults to use the Nokogiri parser.
-
Refactoring: Changed the
Nori
module to a class. This might cause problems if you included theNori
module somewhere in your application. This use case was removed for overall simplicity. -
Refactoring: Changed the interface to remove any global state. The global configuration is gone and replaced with simple options to be passed to
Nori.new
.parser = Nori.new(strip_namespaces: true) parser.parse(xml)
-
Refactoring: Removed the
Nori::Parser
module methods. After refactoring the rest, there was only a single method left for this module and that was moved toNori
. -
Fix: #16 strip XML passed to Nori.
- Fix: #37 special characters problem on Ruby 1.9.3-p392.
- Fix for remote code execution bug. For more in-depth information, read about the recent Rails hotfix. Please make sure to upgrade now!
- Fix: Merged pull request 21 to fix an issue with date/time/datetime regexes not matching positive time zone offsets and datetime strings with seconds.
- Fix: Reverted
Object#xml_attributes
feature which is planned for version 2.0.
- Fix: Merged pull request 17 for improved xs:time/xs:date/xs:dateTime regular expression matchers.
-
Improvement: Merged pull request 9 to allow multiple configurations of Nori.
-
Fix: Merged pull request 10 to handle date/time parsing errors. Fixes a couple of similar error reports.
- Fix: When specifying a custom formula to convert tags, XML attributes were ignored. Now, a formula is applied to both XML tags and attributes.
- Fix: Make sure to always load both StringWithAttributes and StringIOFile to prevent NameError's.
-
Notice: As of v1.0.0, Nori will follow Semantic Versioning.
-
Feature: Added somewhat advanced typecasting:
What this means:
- "true" and "false" are converted to TrueClass and FalseClass
- Strings matching an xs:time, xs:date and xs:dateTime are converted to Time, Date and DateTime objects.
You can disable this feature via:
Nori.advanced_typecasting = false
-
Feature: Added an option to strip the namespaces from every tag. This feature might raise problems and is therefore disabled by default.
Nori.strip_namespaces = true
-
Feature: Added an option to specify a custom formula to convert tags. Here's an example:
Nori.configure do |config| config.convert_tags_to { |tag| tag.snake_case.to_sym } end xml = '<userResponse><accountStatus>active</accountStatus></userResponse>' parse(xml).should ## { :user_response => { :account_status => "active" }
- Fix: backported fixes from v1.0.1
- Fix: Use extended core classes StringWithAttributes and StringIOFile instead of creating singletons to prevent serialization problems.
- Fix: namespaced xs:nil values should be nil objects.
-
Fix: Changed XML attributes converted to Hash keys to be prefixed with an @-sign. This avoids problems with attributes and child nodes having the same name.
<multiRef id="id1"> <approved xsi:type="xsd:boolean">true</approved> <id xsi:type="xsd:long">76737</id> </multiRef>
is now translated to:
{ "multiRef" => { "@id" => "id1", "id" => "76737", "approved" => "true" } }
-
Removed JSON from the original Crack basis
-
Fixed a problem with Object#blank?
-
Added swappable parsers
-
Added a Nokogiri parser with you can switch to via:
Nori.parser = :nokogiri
- 1 minor patch
- Added patch from @purp for ISO 8601 date/time format
- 1 minor patch
- Added Crack::VERSION constant - http://weblog.rubyonrails.org/2009/9/1/gem-packaging-best-practices
- 1 minor patch
- Strings that begin with dates shouldn't be parsed as such (sandro)
- 1 minor patch
- Parsing a text node with attributes stores them in the attributes method (tamalw)
- 2 minor patches
- Correct unnormalization of attribute values (der-flo)
- Fix error in parsing YAML in the case where a hash value ends with backslashes, and there are subsequent values in the hash (deadprogrammer)
- 1 minor patch
- Parsing empty or blank xml now returns empty hash instead of raising error.
- Initial release.