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

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

@tjarratt

Description

@tjarratt

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions