savon 2.15.0 → 2.16.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -3
- data/README.md +11 -6
- data/lib/savon/builder.rb +6 -14
- data/lib/savon/response.rb +5 -0
- data/lib/savon/soap_fault.rb +5 -4
- data/lib/savon/version.rb +1 -1
- metadata +23 -12
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 31b29512f6e1e259e34f95ef7cc0d38dd9ac8911d0b1307ca05bf69736985cbb
|
|
4
|
+
data.tar.gz: 3ae386e5a8ade343d99e7dc10d644499cf5315fc51d058a8e3f7cb103ad25872
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e18a7a8ee40adfab9ab7e316abce340251ef30ad93dd50348640488a282aa5a462d16b46fd987414747c4efe76a04b68ec3e0e50d95de77ac331c4a630549182
|
|
7
|
+
data.tar.gz: 686fc36d67eb071a75ce201d16ec4ba3be443c23c48db90f87ee3bece8d76f05f81768acbc182fa32ffbf1623d022d9ca3b23871aa68c8b86c6ca6bd82df049a
|
data/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
# Savon changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
4
|
-
|
|
3
|
+
## 2.16.0 (2026-05-18)
|
|
4
|
+
|
|
5
|
+
**Restore compatibility**
|
|
6
|
+
|
|
7
|
+
If you stayed on 2.12.1 because a later version broke something, this release is for you. The fixes below target the most commonly reported upgrade blockers. Existing code should work without modification.
|
|
8
|
+
|
|
9
|
+
* Fix: Restore `Savon::Response#hash` removed in 2.14.0 (#985). Callers on 2.12.1 that use `response.hash` get the soap body back instead of Ruby's integer object id. A deprecation warning is emitted on each call. Use `#full_hash` going forward.
|
|
10
|
+
* Fix: Require wasabi >= 5.1.0 (#1015, #1016). Wasabi 4.x used message names as soap body element names and SOAPAction header values instead of operation names (savonrb/wasabi#122), causing servers to return a fault or reject the action for operations whose message name carried an `In` suffix.
|
|
11
|
+
* Fix: Stop dumping all WSDL namespaces into every soap envelope (#1014, #942). 2.13.0 injected every namespace from the entire WSDL document into each request, including structural ones that have no place in a request body. Strict servers reject envelopes with unexpected or duplicate declarations.
|
|
12
|
+
* Fix: Raise a proper `SOAPFault` instead of a raw exception when `soap:Fault` contains invalid encoding (#923).
|
|
13
|
+
* Fix: `SOAPFault.present?` was ignoring its `xml` argument and always operating on the instance's own body.
|
|
14
|
+
* Change: Added Ruby 3.4 (#1024) and Ruby 4.0 (#1039) to the CI test matrix.
|
|
15
|
+
|
|
16
|
+
## 2.15.1 (2024-07-08)
|
|
17
|
+
|
|
18
|
+
* Ruby 3.0+ is required in the gemspec.
|
|
19
|
+
* Require httpi 4.x - older versions rely on `Rack::Utils::HeaderHash` which is removed in Rack 3.0.
|
|
5
20
|
|
|
6
21
|
## 2.15.0 (2024-02-10)
|
|
7
22
|
|
|
8
23
|
* Drop support for ruby 2.7 and below. Added Ruby 3.2 and 3.3 to test matrix.
|
|
24
|
+
* Allows wasabi v5.x, which now supports faraday
|
|
9
25
|
|
|
10
26
|
## 2.14.0 (2022-12-16)
|
|
11
27
|
|
|
@@ -16,6 +32,7 @@
|
|
|
16
32
|
## 2.13.1 (2022-09-04)
|
|
17
33
|
|
|
18
34
|
* Fix: [#977](https://github.com/savonrb/savon/pull/977) Prevent "xmlns:xmlns" namespace but allow "xmlns" namespace.
|
|
35
|
+
* Change: Require Ruby 2.7.0+ in the gemspec. [0e0d695f](https://github.com/savonrb/savon/commit/0e0d695f463b719fa0fef0f58a0404b1228957f0)
|
|
19
36
|
|
|
20
37
|
## 2.13.0 (2022-08-03)
|
|
21
38
|
|
|
@@ -535,7 +552,7 @@ Combined release ticket: [#481](https://github.com/savonrb/savon/issues/481)
|
|
|
535
552
|
|
|
536
553
|
* `Hash#map_soap_response` and some of its helpers are moved to [Nori v1.0.0](http://rubygems.org/gems/nori/versions/1.0.0).
|
|
537
554
|
Along with replacing core extensions with a proper implementation, Nori now contains a number of methods
|
|
538
|
-
for [configuring its default behavior](https://github.com/savonrb/nori/blob/
|
|
555
|
+
for [configuring its default behavior](https://github.com/savonrb/nori/blob/main/CHANGELOG.md):
|
|
539
556
|
|
|
540
557
|
* The option whether to strip namespaces was moved to Nori.strip_namespaces
|
|
541
558
|
* You can disable "advanced typecasting" for SOAP response values
|
data/README.md
CHANGED
|
@@ -3,17 +3,16 @@
|
|
|
3
3
|
Heavy metal SOAP client
|
|
4
4
|
|
|
5
5
|
[Documentation](https://www.rubydoc.info/gems/savon/) | [Support](https://stackoverflow.com/questions/tagged/savon) |
|
|
6
|
-
[Mailing list](https://groups.google.com/forum/#!forum/savonrb)
|
|
6
|
+
[Mailing list](https://groups.google.com/forum/#!forum/savonrb)
|
|
7
7
|
|
|
8
8
|
[](https://github.com/savonrb/savon/actions/workflows/ci.yml)
|
|
9
9
|
[](http://badge.fury.io/rb/savon)
|
|
10
|
-
[](https://codeclimate.com/github/savonrb/savon)
|
|
11
10
|
[](https://coveralls.io/r/savonrb/savon)
|
|
12
11
|
|
|
13
12
|
|
|
14
|
-
##
|
|
13
|
+
## Installation
|
|
15
14
|
|
|
16
|
-
Savon
|
|
15
|
+
Savon is available through [Rubygems](http://rubygems.org/gems/savon) and can be installed via:
|
|
17
16
|
|
|
18
17
|
```
|
|
19
18
|
$ gem install savon
|
|
@@ -22,7 +21,7 @@ $ gem install savon
|
|
|
22
21
|
or add it to your Gemfile like this:
|
|
23
22
|
|
|
24
23
|
```
|
|
25
|
-
gem 'savon', '~> 2.
|
|
24
|
+
gem 'savon', '~> 2.15.0'
|
|
26
25
|
```
|
|
27
26
|
|
|
28
27
|
## Usage example
|
|
@@ -54,12 +53,18 @@ For more examples, you should check out the
|
|
|
54
53
|
|
|
55
54
|
## Ruby version support
|
|
56
55
|
|
|
57
|
-
|
|
56
|
+
Every savon release is tested with contemporary supported versions of ruby. Historical compatibility information:
|
|
57
|
+
|
|
58
|
+
* `main` - same support as Ruby
|
|
59
|
+
* 2.15.x - MRI 3.0, 3.1, 3.2, 3.3
|
|
60
|
+
* 2.13.x, 2.14.x - MRI 2.7, 3.0, 3.1
|
|
58
61
|
* 2.12.x - MRI 2.2, 2.3, 2.4, 2.5
|
|
59
62
|
* 2.11.x - MRI 2.0, 2.1, 2.2, and 2.3
|
|
60
63
|
|
|
61
64
|
If you are running MRI 1.8.7, try a 2.6.x release.
|
|
62
65
|
|
|
66
|
+
Most changes are not backported to older versions of savon, or unsupported ruby versions.
|
|
67
|
+
|
|
63
68
|
## Running tests
|
|
64
69
|
|
|
65
70
|
```bash
|
data/lib/savon/builder.rb
CHANGED
|
@@ -95,9 +95,13 @@ module Savon
|
|
|
95
95
|
@internal_namespace_count ||= 0
|
|
96
96
|
|
|
97
97
|
unless identifier = namespace_by_uri(uri)
|
|
98
|
-
|
|
98
|
+
wsdl_identifier = @wsdl.document? ? @wsdl.parser.namespaces.key(uri) : nil
|
|
99
|
+
# The prefix may already be taken by the target namespace or a user-supplied
|
|
100
|
+
# :namespaces override - fall back to ins0, ins1... rather than overwriting it.
|
|
101
|
+
wsdl_identifier = nil if wsdl_identifier && namespaces.key?("xmlns:#{wsdl_identifier}")
|
|
102
|
+
identifier = wsdl_identifier || "ins#{@internal_namespace_count}"
|
|
99
103
|
namespaces["xmlns:#{identifier}"] = uri
|
|
100
|
-
@internal_namespace_count += 1
|
|
104
|
+
@internal_namespace_count += 1 unless wsdl_identifier
|
|
101
105
|
end
|
|
102
106
|
|
|
103
107
|
[path, identifier]
|
|
@@ -119,18 +123,6 @@ module Savon
|
|
|
119
123
|
namespaces["xmlns#{env_namespace && env_namespace != "" ? ":#{env_namespace}" : ''}"] =
|
|
120
124
|
SOAP_NAMESPACE[@globals[:soap_version]]
|
|
121
125
|
|
|
122
|
-
if @wsdl&.document
|
|
123
|
-
@wsdl.parser.namespaces.each do |identifier, path|
|
|
124
|
-
next if identifier == 'xmlns' # Do not include xmlns namespace as this causes issues for some servers (https://github.com/savonrb/savon/issues/986)
|
|
125
|
-
|
|
126
|
-
prefixed_identifier = "xmlns:#{identifier}"
|
|
127
|
-
|
|
128
|
-
next if namespaces.key?(prefixed_identifier)
|
|
129
|
-
|
|
130
|
-
namespaces[prefixed_identifier] = path
|
|
131
|
-
end
|
|
132
|
-
end
|
|
133
|
-
|
|
134
126
|
namespaces
|
|
135
127
|
end
|
|
136
128
|
end
|
data/lib/savon/response.rb
CHANGED
|
@@ -54,6 +54,11 @@ module Savon
|
|
|
54
54
|
result.kind_of?(Array) ? result.compact : [result].compact
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
+
def hash
|
|
58
|
+
warn "Savon::Response#hash is deprecated and will be removed in version 3 - use #full_hash instead", uplevel: 1
|
|
59
|
+
full_hash
|
|
60
|
+
end
|
|
61
|
+
|
|
57
62
|
def full_hash
|
|
58
63
|
@full_hash ||= nori.parse(xml)
|
|
59
64
|
end
|
data/lib/savon/soap_fault.rb
CHANGED
|
@@ -3,10 +3,11 @@ module Savon
|
|
|
3
3
|
class SOAPFault < Error
|
|
4
4
|
|
|
5
5
|
def self.present?(http, xml = nil)
|
|
6
|
-
xml
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
body = xml || http.body
|
|
7
|
+
body = body.scrub('') unless body.valid_encoding?
|
|
8
|
+
fault_node = body.include?("Fault>")
|
|
9
|
+
soap1_fault = body.match(/faultcode\/?\>/) && body.match(/faultstring\/?\>/)
|
|
10
|
+
soap2_fault = body.include?("Code>") && body.include?("Reason>")
|
|
10
11
|
|
|
11
12
|
fault_node && (soap1_fault || soap2_fault)
|
|
12
13
|
end
|
data/lib/savon/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: savon
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.16.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Harrington
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: nori
|
|
@@ -30,7 +29,7 @@ dependencies:
|
|
|
30
29
|
requirements:
|
|
31
30
|
- - ">="
|
|
32
31
|
- !ruby/object:Gem::Version
|
|
33
|
-
version:
|
|
32
|
+
version: '4'
|
|
34
33
|
- - "<"
|
|
35
34
|
- !ruby/object:Gem::Version
|
|
36
35
|
version: '5'
|
|
@@ -40,7 +39,7 @@ dependencies:
|
|
|
40
39
|
requirements:
|
|
41
40
|
- - ">="
|
|
42
41
|
- !ruby/object:Gem::Version
|
|
43
|
-
version:
|
|
42
|
+
version: '4'
|
|
44
43
|
- - "<"
|
|
45
44
|
- !ruby/object:Gem::Version
|
|
46
45
|
version: '5'
|
|
@@ -50,7 +49,7 @@ dependencies:
|
|
|
50
49
|
requirements:
|
|
51
50
|
- - ">="
|
|
52
51
|
- !ruby/object:Gem::Version
|
|
53
|
-
version:
|
|
52
|
+
version: 5.1.0
|
|
54
53
|
- - "<"
|
|
55
54
|
- !ruby/object:Gem::Version
|
|
56
55
|
version: '6'
|
|
@@ -60,7 +59,7 @@ dependencies:
|
|
|
60
59
|
requirements:
|
|
61
60
|
- - ">="
|
|
62
61
|
- !ruby/object:Gem::Version
|
|
63
|
-
version:
|
|
62
|
+
version: 5.1.0
|
|
64
63
|
- - "<"
|
|
65
64
|
- !ruby/object:Gem::Version
|
|
66
65
|
version: '6'
|
|
@@ -168,6 +167,20 @@ dependencies:
|
|
|
168
167
|
- - "<"
|
|
169
168
|
- !ruby/object:Gem::Version
|
|
170
169
|
version: '7'
|
|
170
|
+
- !ruby/object:Gem::Dependency
|
|
171
|
+
name: ostruct
|
|
172
|
+
requirement: !ruby/object:Gem::Requirement
|
|
173
|
+
requirements:
|
|
174
|
+
- - "~>"
|
|
175
|
+
- !ruby/object:Gem::Version
|
|
176
|
+
version: '0.6'
|
|
177
|
+
type: :development
|
|
178
|
+
prerelease: false
|
|
179
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
180
|
+
requirements:
|
|
181
|
+
- - "~>"
|
|
182
|
+
- !ruby/object:Gem::Version
|
|
183
|
+
version: '0.6'
|
|
171
184
|
- !ruby/object:Gem::Dependency
|
|
172
185
|
name: byebug
|
|
173
186
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -269,12 +282,11 @@ files:
|
|
|
269
282
|
- lib/savon/soap_fault.rb
|
|
270
283
|
- lib/savon/string_utils.rb
|
|
271
284
|
- lib/savon/version.rb
|
|
272
|
-
homepage:
|
|
285
|
+
homepage: https://savonrb.com
|
|
273
286
|
licenses:
|
|
274
287
|
- MIT
|
|
275
288
|
metadata:
|
|
276
289
|
rubygems_mfa_required: 'true'
|
|
277
|
-
post_install_message:
|
|
278
290
|
rdoc_options: []
|
|
279
291
|
require_paths:
|
|
280
292
|
- lib
|
|
@@ -282,15 +294,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
282
294
|
requirements:
|
|
283
295
|
- - ">="
|
|
284
296
|
- !ruby/object:Gem::Version
|
|
285
|
-
version:
|
|
297
|
+
version: 3.0.0
|
|
286
298
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
287
299
|
requirements:
|
|
288
300
|
- - ">="
|
|
289
301
|
- !ruby/object:Gem::Version
|
|
290
302
|
version: '0'
|
|
291
303
|
requirements: []
|
|
292
|
-
rubygems_version: 3.
|
|
293
|
-
signing_key:
|
|
304
|
+
rubygems_version: 3.6.9
|
|
294
305
|
specification_version: 4
|
|
295
306
|
summary: Heavy metal SOAP client
|
|
296
307
|
test_files: []
|