Commit cd1f271 1 parent a5bdcb9 commit cd1f271 Copy full SHA for cd1f271
File tree 3 files changed +12
-21
lines changed
3 files changed +12
-21
lines changed Original file line number Diff line number Diff line change @@ -129,10 +129,6 @@ def build_connection(builder)
129
129
end
130
130
connection . headers [ "Content-Type" ] = ( ctype_headers + [ "start=\" #{ builder . multipart [ :start ] } \" " ,
131
131
"boundary=\" #{ builder . multipart [ :multipart_boundary ] } \" " ] ) . join ( "; " )
132
- # request.headers["Content-Type"] = ["multipart/related",
133
- # "type=\"#{SOAP_REQUEST_TYPE[@globals[:soap_version]]}\"",
134
- # "start=\"#{builder.multipart[:start]}\"",
135
- # "boundary=\"#{builder.multipart[:multipart_boundary]}\""].join("; ")
136
132
connection . headers [ "MIME-Version" ] = "1.0"
137
133
end
138
134
Original file line number Diff line number Diff line change @@ -495,9 +495,9 @@ def response_parser(parser)
495
495
@options [ :response_parser ] = parser
496
496
end
497
497
498
- # Instruct Nori how to convert empty tags .
499
- def empty_tag_value ( empty_tag_value )
500
- @options [ :empty_tag_value ] = empty_tag_value
498
+ # Pass already configured Nori instance .
499
+ def nori ( nori )
500
+ @options [ :nori ] = nori
501
501
end
502
502
503
503
# Instruct Savon to create a multipart response if available.
Original file line number Diff line number Diff line change @@ -142,21 +142,16 @@ def xml_namespaces
142
142
end
143
143
144
144
def nori
145
- return @nori if @nori
145
+ return @locals [ : nori] if @locals [ : nori]
146
146
147
- nori_options = {
148
- :delete_namespace_attributes => @globals [ :delete_namespace_attributes ] ,
149
- :strip_namespaces => @globals [ :strip_namespaces ] ,
150
- :convert_tags_to => @globals [ :convert_response_tags_to ] ,
151
- :convert_attributes_to => @globals [ :convert_attributes_to ] ,
152
- :advanced_typecasting => @locals [ :advanced_typecasting ] ,
153
- :parser => @locals [ :response_parser ] ,
154
- :empty_tag_value => @locals [ :empty_tag_value ]
155
- }
156
-
157
- non_nil_nori_options = nori_options . reject { |_ , value | value . nil? }
158
- @nori = Nori . new ( non_nil_nori_options )
147
+ @nori ||= Nori . new ( {
148
+ :delete_namespace_attributes => @globals [ :delete_namespace_attributes ] ,
149
+ :strip_namespaces => @globals [ :strip_namespaces ] ,
150
+ :convert_tags_to => @globals [ :convert_response_tags_to ] ,
151
+ :convert_attributes_to => @globals [ :convert_attributes_to ] ,
152
+ :advanced_typecasting => @locals [ :advanced_typecasting ] ,
153
+ :parser => @locals [ :response_parser ]
154
+ } . reject { |_ , value | value . nil? } )
159
155
end
160
-
161
156
end
162
157
end
You can’t perform that action at this time.
0 commit comments