Sha256: 81e2d64e0c0cccc7255d4f1407f6a0ea26506fd453f03d69c990d8f95793ba89

Contents?: true

Size: 522 Bytes

Versions: 7

Compression:

Stored size: 522 Bytes

Contents

module SavonHelper
  private

  def savon_response(body)
    globals = {
      namespace_identifier: :ns1,
      env_namespace: 'SOAP-ENV',

      # https://github.com/savonrb/savon/blob/v2.11.1/lib/savon/options.rb#L75-L94
      strip_namespaces:         true,
      convert_response_tags_to: lambda { |tag| tag.snakecase.to_sym},
      convert_attributes_to:    lambda { |k,v| [k,v] },
    }
    httpi = HTTPI::Response.new(200, {}, body)
    Savon::Response.new(httpi, globals, {advanced_typecasting: false})
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
embulk-input-marketo-0.5.6 test/savon_helper.rb
embulk-input-marketo-0.5.5 test/savon_helper.rb
embulk-input-marketo-0.5.4 test/savon_helper.rb
embulk-input-marketo-0.5.3 test/savon_helper.rb
embulk-input-marketo-0.5.2 test/savon_helper.rb
embulk-input-marketo-0.5.1 test/savon_helper.rb
embulk-input-marketo-0.5.0 test/savon_helper.rb