Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

SAVON 3 Use of Nori should include configurable nori options #4

Open
tjarratt opened this issue Apr 22, 2014 · 0 comments
Open

SAVON 3 Use of Nori should include configurable nori options #4

tjarratt opened this issue Apr 22, 2014 · 0 comments

Comments

@tjarratt
Copy link
Contributor

Migrated from savonrb/savon#543


Though the change log current says that your are not using Nori, you are still using it
in the response. Unfortunately for me one of the cool elements of using the response header, in the request headers (for soap services that return a changing token in the Securtiy header) is not working since you default to snake_case on the symobls returned.

Can we get :

  def self.configure
      yield self
    end


in the savon.rb file  so we can set some options:
mattr_accessor :nori_options
@@nori_options =     nori_options = {
    strip_namespaces: true,
    convert_tags_to: lambda { |tag| tag.snakecase.to_sym }
  }

I'll be happy to fork it, but I'm terrible at writing rspec.

Or if this is undesirable (because you are referencing :envelope, and :body direectly in the response Object)
is there some otherway you recommend getting header elements into camelcase?

For now, I've monkeypatched Nori to camelcase anything inside [:envelope][:header] in my app using :symbol_name.to_s.camelcase.to_sym

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant