savon 2.15.1 → 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 +12 -2
- data/README.md +1 -2
- 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 +20 -9
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,7 +1,17 @@
|
|
|
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.
|
|
5
15
|
|
|
6
16
|
## 2.15.1 (2024-07-08)
|
|
7
17
|
|
data/README.md
CHANGED
|
@@ -3,11 +3,10 @@
|
|
|
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
|
|
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
|
|
@@ -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
|
|
@@ -289,8 +301,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
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: []
|