savon 2.17.4 → 3.0.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
metadata CHANGED
@@ -1,166 +1,183 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: savon
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.17.4
4
+ version: 3.0.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Harrington
8
+ autorequire:
8
9
  bindir: bin
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2024-07-15 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
- name: akami
14
+ name: nori
14
15
  requirement: !ruby/object:Gem::Requirement
15
16
  requirements:
16
17
  - - "~>"
17
18
  - !ruby/object:Gem::Version
18
- version: '1.2'
19
+ version: '2.4'
19
20
  type: :runtime
20
21
  prerelease: false
21
22
  version_requirements: !ruby/object:Gem::Requirement
22
23
  requirements:
23
24
  - - "~>"
24
25
  - !ruby/object:Gem::Version
25
- version: '1.2'
26
+ version: '2.4'
26
27
  - !ruby/object:Gem::Dependency
27
- name: builder
28
+ name: faraday
28
29
  requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
- - - ">="
31
+ - - "~>"
31
32
  - !ruby/object:Gem::Version
32
- version: 2.1.2
33
+ version: '2.8'
33
34
  type: :runtime
34
35
  prerelease: false
35
36
  version_requirements: !ruby/object:Gem::Requirement
36
37
  requirements:
37
- - - ">="
38
+ - - "~>"
38
39
  - !ruby/object:Gem::Version
39
- version: 2.1.2
40
+ version: '2.8'
40
41
  - !ruby/object:Gem::Dependency
41
- name: gyoku
42
+ name: faraday-gzip
42
43
  requirement: !ruby/object:Gem::Requirement
43
44
  requirements:
44
45
  - - "~>"
45
46
  - !ruby/object:Gem::Version
46
- version: '1.2'
47
+ version: '2.0'
47
48
  type: :runtime
48
49
  prerelease: false
49
50
  version_requirements: !ruby/object:Gem::Requirement
50
51
  requirements:
51
52
  - - "~>"
52
53
  - !ruby/object:Gem::Version
53
- version: '1.2'
54
+ version: '2.0'
54
55
  - !ruby/object:Gem::Dependency
55
- name: httpi
56
+ name: faraday-follow_redirects
56
57
  requirement: !ruby/object:Gem::Requirement
57
58
  requirements:
58
- - - ">="
59
+ - - "~>"
59
60
  - !ruby/object:Gem::Version
60
- version: '4'
61
- - - "<"
61
+ version: '0.3'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.3'
69
+ - !ruby/object:Gem::Dependency
70
+ name: wasabi
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">"
62
74
  - !ruby/object:Gem::Version
63
75
  version: '5'
64
76
  type: :runtime
65
77
  prerelease: false
66
78
  version_requirements: !ruby/object:Gem::Requirement
67
79
  requirements:
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- version: '4'
71
- - - "<"
80
+ - - ">"
72
81
  - !ruby/object:Gem::Version
73
82
  version: '5'
74
83
  - !ruby/object:Gem::Dependency
75
- name: mail
84
+ name: akami
76
85
  requirement: !ruby/object:Gem::Requirement
77
86
  requirements:
78
87
  - - "~>"
79
88
  - !ruby/object:Gem::Version
80
- version: '2.5'
89
+ version: '1.2'
81
90
  type: :runtime
82
91
  prerelease: false
83
92
  version_requirements: !ruby/object:Gem::Requirement
84
93
  requirements:
85
94
  - - "~>"
86
95
  - !ruby/object:Gem::Version
87
- version: '2.5'
96
+ version: '1.2'
88
97
  - !ruby/object:Gem::Dependency
89
- name: nokogiri
98
+ name: gyoku
90
99
  requirement: !ruby/object:Gem::Requirement
91
100
  requirements:
92
- - - ">="
101
+ - - "~>"
93
102
  - !ruby/object:Gem::Version
94
- version: 1.8.1
103
+ version: '1.2'
95
104
  type: :runtime
96
105
  prerelease: false
97
106
  version_requirements: !ruby/object:Gem::Requirement
98
107
  requirements:
99
- - - ">="
108
+ - - "~>"
100
109
  - !ruby/object:Gem::Version
101
- version: 1.8.1
110
+ version: '1.2'
102
111
  - !ruby/object:Gem::Dependency
103
- name: nori
112
+ name: builder
104
113
  requirement: !ruby/object:Gem::Requirement
105
114
  requirements:
106
- - - "~>"
115
+ - - ">="
107
116
  - !ruby/object:Gem::Version
108
- version: '2.7'
117
+ version: 2.1.2
109
118
  type: :runtime
110
119
  prerelease: false
111
120
  version_requirements: !ruby/object:Gem::Requirement
112
121
  requirements:
113
- - - "~>"
122
+ - - ">="
114
123
  - !ruby/object:Gem::Version
115
- version: '2.7'
124
+ version: 2.1.2
116
125
  - !ruby/object:Gem::Dependency
117
- name: wasabi
126
+ name: nokogiri
118
127
  requirement: !ruby/object:Gem::Requirement
119
128
  requirements:
120
129
  - - ">="
121
130
  - !ruby/object:Gem::Version
122
- version: 5.1.0
123
- - - "<"
124
- - !ruby/object:Gem::Version
125
- version: '6'
131
+ version: 1.8.1
126
132
  type: :runtime
127
133
  prerelease: false
128
134
  version_requirements: !ruby/object:Gem::Requirement
129
135
  requirements:
130
136
  - - ">="
131
137
  - !ruby/object:Gem::Version
132
- version: 5.1.0
133
- - - "<"
134
- - !ruby/object:Gem::Version
135
- version: '6'
138
+ version: 1.8.1
136
139
  - !ruby/object:Gem::Dependency
137
- name: ostruct
140
+ name: mail
138
141
  requirement: !ruby/object:Gem::Requirement
139
142
  requirements:
140
143
  - - "~>"
141
144
  - !ruby/object:Gem::Version
142
- version: '0.6'
143
- type: :development
145
+ version: '2.5'
146
+ type: :runtime
144
147
  prerelease: false
145
148
  version_requirements: !ruby/object:Gem::Requirement
146
149
  requirements:
147
150
  - - "~>"
148
151
  - !ruby/object:Gem::Version
149
- version: '0.6'
152
+ version: '2.5'
150
153
  - !ruby/object:Gem::Dependency
151
- name: puma
154
+ name: faraday-net_http_persistent
152
155
  requirement: !ruby/object:Gem::Requirement
153
156
  requirements:
154
157
  - - "~>"
155
158
  - !ruby/object:Gem::Version
156
- version: 8.0.2
159
+ version: '2.1'
157
160
  type: :development
158
161
  prerelease: false
159
162
  version_requirements: !ruby/object:Gem::Requirement
160
163
  requirements:
161
164
  - - "~>"
162
165
  - !ruby/object:Gem::Version
163
- version: 8.0.2
166
+ version: '2.1'
167
+ - !ruby/object:Gem::Dependency
168
+ name: rubyntlm
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0.6'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0.6'
164
181
  - !ruby/object:Gem::Dependency
165
182
  name: rack
166
183
  requirement: !ruby/object:Gem::Requirement
@@ -176,7 +193,27 @@ dependencies:
176
193
  - !ruby/object:Gem::Version
177
194
  version: '4'
178
195
  - !ruby/object:Gem::Dependency
179
- name: byebug
196
+ name: puma
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: 4.3.8
202
+ - - "<"
203
+ - !ruby/object:Gem::Version
204
+ version: '7'
205
+ type: :development
206
+ prerelease: false
207
+ version_requirements: !ruby/object:Gem::Requirement
208
+ requirements:
209
+ - - ">="
210
+ - !ruby/object:Gem::Version
211
+ version: 4.3.8
212
+ - - "<"
213
+ - !ruby/object:Gem::Version
214
+ version: '7'
215
+ - !ruby/object:Gem::Dependency
216
+ name: httpclient
180
217
  requirement: !ruby/object:Gem::Requirement
181
218
  requirements:
182
219
  - - ">="
@@ -190,33 +227,33 @@ dependencies:
190
227
  - !ruby/object:Gem::Version
191
228
  version: '0'
192
229
  - !ruby/object:Gem::Dependency
193
- name: json
230
+ name: mutex_m
194
231
  requirement: !ruby/object:Gem::Requirement
195
232
  requirements:
196
233
  - - ">="
197
234
  - !ruby/object:Gem::Version
198
- version: 2.3.0
235
+ version: '0'
199
236
  type: :development
200
237
  prerelease: false
201
238
  version_requirements: !ruby/object:Gem::Requirement
202
239
  requirements:
203
240
  - - ">="
204
241
  - !ruby/object:Gem::Version
205
- version: 2.3.0
242
+ version: '0'
206
243
  - !ruby/object:Gem::Dependency
207
- name: mocha
244
+ name: byebug
208
245
  requirement: !ruby/object:Gem::Requirement
209
246
  requirements:
210
- - - "~>"
247
+ - - ">="
211
248
  - !ruby/object:Gem::Version
212
- version: '0.14'
249
+ version: '0'
213
250
  type: :development
214
251
  prerelease: false
215
252
  version_requirements: !ruby/object:Gem::Requirement
216
253
  requirements:
217
- - - "~>"
254
+ - - ">="
218
255
  - !ruby/object:Gem::Version
219
- version: '0.14'
256
+ version: '0'
220
257
  - !ruby/object:Gem::Dependency
221
258
  name: rake
222
259
  requirement: !ruby/object:Gem::Requirement
@@ -245,6 +282,34 @@ dependencies:
245
282
  - - "~>"
246
283
  - !ruby/object:Gem::Version
247
284
  version: '3.9'
285
+ - !ruby/object:Gem::Dependency
286
+ name: mocha
287
+ requirement: !ruby/object:Gem::Requirement
288
+ requirements:
289
+ - - "~>"
290
+ - !ruby/object:Gem::Version
291
+ version: '0.14'
292
+ type: :development
293
+ prerelease: false
294
+ version_requirements: !ruby/object:Gem::Requirement
295
+ requirements:
296
+ - - "~>"
297
+ - !ruby/object:Gem::Version
298
+ version: '0.14'
299
+ - !ruby/object:Gem::Dependency
300
+ name: json
301
+ requirement: !ruby/object:Gem::Requirement
302
+ requirements:
303
+ - - ">="
304
+ - !ruby/object:Gem::Version
305
+ version: 2.3.0
306
+ type: :development
307
+ prerelease: false
308
+ version_requirements: !ruby/object:Gem::Requirement
309
+ requirements:
310
+ - - ">="
311
+ - !ruby/object:Gem::Version
312
+ version: 2.3.0
248
313
  description: Heavy metal SOAP client
249
314
  email: me@rubiii.com
250
315
  executables: []
@@ -256,12 +321,9 @@ files:
256
321
  - README.md
257
322
  - Rakefile
258
323
  - lib/savon.rb
259
- - lib/savon/addressing.rb
260
324
  - lib/savon/block_interface.rb
261
325
  - lib/savon/builder.rb
262
326
  - lib/savon/client.rb
263
- - lib/savon/effective_options.rb
264
- - lib/savon/faraday_migration_hint.rb
265
327
  - lib/savon/header.rb
266
328
  - lib/savon/http_error.rb
267
329
  - lib/savon/log_message.rb
@@ -273,22 +335,18 @@ files:
273
335
  - lib/savon/operation.rb
274
336
  - lib/savon/options.rb
275
337
  - lib/savon/qualified_message.rb
338
+ - lib/savon/request.rb
339
+ - lib/savon/request_logger.rb
276
340
  - lib/savon/response.rb
277
341
  - lib/savon/soap_fault.rb
278
342
  - lib/savon/string_utils.rb
279
- - lib/savon/transport/faraday.rb
280
- - lib/savon/transport/httpi.rb
281
- - lib/savon/transport/logging.rb
282
- - lib/savon/transport/response.rb
283
343
  - lib/savon/version.rb
284
- homepage: https://savonrb.com
344
+ homepage: http://savonrb.com
285
345
  licenses:
286
346
  - MIT
287
347
  metadata:
288
348
  rubygems_mfa_required: 'true'
289
- source_code_uri: https://github.com/savonrb/savon
290
- changelog_uri: https://github.com/savonrb/savon/blob/main/CHANGELOG.md
291
- bug_tracker_uri: https://github.com/savonrb/savon/issues
349
+ post_install_message:
292
350
  rdoc_options: []
293
351
  require_paths:
294
352
  - lib
@@ -303,7 +361,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
303
361
  - !ruby/object:Gem::Version
304
362
  version: '0'
305
363
  requirements: []
306
- rubygems_version: 3.6.9
364
+ rubygems_version: 3.5.6
365
+ signing_key:
307
366
  specification_version: 4
308
367
  summary: Heavy metal SOAP client
309
368
  test_files: []
@@ -1,60 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "gyoku"
4
- require "securerandom"
5
-
6
- module Savon
7
- # Emits the WS-Addressing message addressing properties of a request
8
- # (WS-Addressing 1.0 - Core §3.2): +wsa:Action+, +wsa:To+ and +wsa:MessageID+.
9
- #
10
- # This object owns everything Savon knows about WS-Addressing: the namespace,
11
- # whether the headers are emitted at all, and how the resolved SOAPAction and
12
- # endpoint map onto the addressing properties. It works on plain values.
13
- # {Savon::Header} resolves them via {Savon::EffectiveOptions} and constructs
14
- # this object, keeping option resolution and WSA emission separate.
15
- class Addressing
16
- # The WS-Addressing 1.0 namespace,
17
- # https://www.w3.org/TR/ws-addr-core/#namespaces.
18
- NAMESPACE = "http://www.w3.org/2005/08/addressing"
19
-
20
- # @param enabled [Object] whether the headers are emitted, any truthy value
21
- # counts (the +:use_wsa_headers+ global)
22
- # @param action [String, nil] the resolved SOAPAction, emitted as
23
- # +wsa:Action+, or +nil+ when the caller disabled it
24
- # @param to [URI, String, nil] the resolved endpoint, emitted as +wsa:To+
25
- def initialize(enabled:, action: nil, to: nil)
26
- @enabled = enabled
27
- @action = action
28
- @to = to
29
- end
30
-
31
- # @return [Boolean] whether the WS-Addressing headers are emitted
32
- def enabled?
33
- !!@enabled
34
- end
35
-
36
- # Returns the namespace declaration the enclosing Header element needs.
37
- # The +wsa+ prefix is declared once on the Header, not on each child.
38
- #
39
- # @return [Hash{String => String}] +{"xmlns:wsa" => NAMESPACE}+, or an
40
- # empty Hash when disabled
41
- def namespace_attributes
42
- enabled? ? { "xmlns:wsa" => NAMESPACE } : {}
43
- end
44
-
45
- # Renders the three addressing properties, each rendering with a freshly
46
- # generated +wsa:MessageID+. A +nil+ action or destination is emitted as
47
- # an +xsi:nil+ element rather than being dropped.
48
- #
49
- # @return [String] the header elements, or an empty String when disabled
50
- def to_xml
51
- return "" unless enabled?
52
-
53
- Gyoku.xml(
54
- "wsa:Action" => @action,
55
- "wsa:To" => @to,
56
- "wsa:MessageID" => "urn:uuid:#{SecureRandom.uuid}"
57
- )
58
- end
59
- end
60
- end
@@ -1,124 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "gyoku"
4
- require "uri"
5
-
6
- module Savon
7
- # Resolves the effective value of options whose answer combines more than
8
- # one source: the per-request options, the client options, the WSDL
9
- # document, and built-in defaults.
10
- #
11
- # {Savon::GlobalOptions} and {Savon::LocalOptions} store what the caller
12
- # said. EffectiveOptions answers what the request uses. It owns the
13
- # precedence rules and exposes one reader per resolvable option, so every
14
- # consumer of an option resolves it identically. Resolution is a pure read.
15
- # It never mutates the options or the WSDL document.
16
- class EffectiveOptions
17
- # @param operation_name [Symbol] the SOAP operation being called
18
- # @param wsdl [Wasabi::Document] the parsed WSDL, or an empty document
19
- # when the client was configured without one
20
- # @param globals [Savon::GlobalOptions] the client-level options
21
- # @param locals [Savon::LocalOptions] the per-request options
22
- def initialize(operation_name, wsdl, globals, locals)
23
- @operation_name = operation_name
24
- @wsdl = wsdl
25
- @globals = globals
26
- @locals = locals
27
- end
28
-
29
- # Resolves the SOAPAction of the request (SOAP 1.1 §6.1.1).
30
- #
31
- # An explicit local +:soap_action+ wins. A local +false+ or +nil+ disables
32
- # the action, so no SOAPAction HTTP header is sent and an enabled
33
- # +wsa:Action+ header stays empty. Without a local value the WSDL provides
34
- # the soapAction of the operation. Without a WSDL document the operation
35
- # name is converted to an XML tag as a best-effort default.
36
- #
37
- # @return [String, nil] the action, or +nil+ when explicitly disabled
38
- def soap_action
39
- return if @locals.include?(:soap_action) && !@locals[:soap_action]
40
-
41
- @locals[:soap_action] ||
42
- (@wsdl.document? && @wsdl.soap_action(@operation_name.to_sym)) ||
43
- Gyoku.xml_tag(@operation_name, key_converter: @globals[:convert_request_keys_to])
44
- end
45
-
46
- # Resolves the endpoint URL the request is sent to.
47
- #
48
- # A global +:endpoint+ wins over the service address of the WSDL. The
49
- # global +:host+ option replaces host and port of the WSDL address and
50
- # keeps scheme, path and query. The override is applied to a copy. The
51
- # WSDL document keeps its parsed address.
52
- #
53
- # @return [URI, String, nil] the endpoint as provided by the winning source
54
- def endpoint
55
- return @globals[:endpoint] if @globals[:endpoint]
56
- return @wsdl.endpoint unless @globals[:host]
57
-
58
- host_url = URI.parse(@globals[:host])
59
- url = @wsdl.endpoint.dup
60
- url.host = host_url.host
61
- url.port = host_url.port
62
- url
63
- end
64
-
65
- # Resolves the WSSE auth credentials passed to Akami. A local value takes
66
- # precedence over the global one. A local +false+ disables auth even when a
67
- # global value is set. A local +nil+ leaves the option unset and falls
68
- # through to the global value.
69
- #
70
- # @return [Array<String>, false, nil] the credentials, +false+ to disable,
71
- # or +nil+ when unset in both scopes
72
- def wsse_auth
73
- prefer_local(:wsse_auth)
74
- end
75
-
76
- # Resolves whether Akami emits a +wsu:Timestamp+ header, using the same
77
- # local-over-global rule as {#wsse_auth}. A local +false+ disables it and a
78
- # local +nil+ keeps the global value.
79
- #
80
- # @return [Boolean, nil]
81
- def wsse_timestamp
82
- prefer_local(:wsse_timestamp)
83
- end
84
-
85
- # Resolves the WSSE signature used to sign the request. This option is a
86
- # signature object or +nil+ and has no "disable" value, so any falsy local
87
- # value falls back to the global one. {Savon::Builder} and {Savon::Header}
88
- # both read it and must resolve it identically.
89
- #
90
- # @return [Akami::WSSE::Signature, nil]
91
- def wsse_signature
92
- @locals[:wsse_signature] || @globals[:wsse_signature]
93
- end
94
-
95
- # Resolves the SOAP header content. When both scopes provide a Hash the two
96
- # are merged and local keys win. Otherwise the local value is preferred and
97
- # falls back to the global one. A Hash is rendered to XML by Gyoku. A String,
98
- # or any object responding to +#to_s+, is used verbatim.
99
- #
100
- # @return [Hash, String, nil]
101
- def soap_header
102
- global = @globals[:soap_header]
103
- local = @locals[:soap_header]
104
-
105
- if global.is_a?(Hash) && local.is_a?(Hash)
106
- global.merge(local)
107
- else
108
- local || global
109
- end
110
- end
111
-
112
- private
113
-
114
- # Resolves an option where a local +false+ is meaningful and disables it.
115
- # Only a local +nil+ falls through to the global value. Contrast with
116
- # {#wsse_signature}, which treats any falsy local as unset.
117
- #
118
- # @param key [Symbol] the option name
119
- # @return [Object, nil] the local value unless it is +nil+, else the global
120
- def prefer_local(key)
121
- @locals[key].nil? ? @globals[key] : @locals[key]
122
- end
123
- end
124
- end