rubiii/nori — pull request #9 by hsume2 (2012-01-17 06:08:10+00:00)
Title: Allow multiple configurations of Nori

Hi,

The way that `nori` config is global had some adverse effects on my project. We use `nori` in our test-suite to parse XML to Hash, but once we included the `savon` gem it started to break a bunch of our code due to the following snippet:

```ruby
Nori.configure do |config|
config.strip_namespaces = true
config.convert_tags_to { |tag| tag.snakecase.to_sym }
end
```

We strictly use camel-case tags because of external API dependencies, and this was causing our tests to fail. We opted out of changing our usage to snake-case (even though we should), because then we weren't mirroring our external API dependencies. Instead, we decided to allow multiple configurations of `nori`, like:

```ruby
module TestNori
extend Nori
end
```

Calls to `TestNori.configure` would then be isolated from `Nori.configure`. This seemed a much quicker solution, and may be of use to others who plan to use `nori` in various contexts. Feel free to let me know what you think, I'd be happy to make any changes to help this get into the mainline gem.