savon 0.8.0.beta.2 → 0.8.0.beta.3
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.
- data/CHANGELOG.md +35 -0
- data/lib/savon/client.rb +1 -1
- data/lib/savon/version.rb +1 -1
- metadata +4 -4
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,38 @@
|
|
1
|
+
## 0.8.0.beta.2 (2010-11-05)
|
2
|
+
|
3
|
+
* Added Savon.response_pattern to automatically walk deeper into the SOAP response Hash when a
|
4
|
+
pattern (specified as an Array of Regexps and Symbols) matches the response. If for example
|
5
|
+
your response always looks like ".+Response/return" as in:
|
6
|
+
|
7
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
8
|
+
<soap:Body>
|
9
|
+
<ns2:authenticateResponse xmlns:ns2="http://v1_0.ws.user.example.com">
|
10
|
+
<return>
|
11
|
+
<some>thing</some>
|
12
|
+
</return>
|
13
|
+
</ns2:authenticateResponse>
|
14
|
+
</soap:Body>
|
15
|
+
</soap:Envelope>
|
16
|
+
|
17
|
+
you could set the response pattern to:
|
18
|
+
|
19
|
+
Savon.configure do |config|
|
20
|
+
config.response_pattern = [/.+_response/, :return]
|
21
|
+
end
|
22
|
+
|
23
|
+
then instead of calling:
|
24
|
+
|
25
|
+
response.to_hash[:authenticate_response][:return] # :some => "thing"
|
26
|
+
|
27
|
+
to get the actual content, Savon::SOAP::Response#to_hash will try to apply given the pattern:
|
28
|
+
|
29
|
+
response.to_hash # :some => "thing"
|
30
|
+
|
31
|
+
Please notice, that if you don't specify a response pattern or if the pattern doesn't match the
|
32
|
+
response, Savon will behave like it always did.
|
33
|
+
|
34
|
+
* Added Savon::SOAP::Response#to_array (which also uses the response pattern).
|
35
|
+
|
1
36
|
## 0.8.0.beta.1 (2010-10-29)
|
2
37
|
|
3
38
|
* Changed Savon::Client.new to accept a block instead of multiple Hash arguments. You can access the
|
data/lib/savon/client.rb
CHANGED
@@ -101,7 +101,7 @@ module Savon
|
|
101
101
|
soap.endpoint = wsdl.endpoint
|
102
102
|
soap.namespace_identifier = options[0]
|
103
103
|
soap.namespace = wsdl.namespace
|
104
|
-
soap.body = options[2].delete :body
|
104
|
+
soap.body = options[2].delete(:body) if options[2][:body]
|
105
105
|
|
106
106
|
set_soap_action options[1]
|
107
107
|
set_soap_input *options
|
data/lib/savon/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: savon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 62196261
|
5
5
|
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 8
|
9
9
|
- 0
|
10
10
|
- beta
|
11
|
-
-
|
12
|
-
version: 0.8.0.beta.
|
11
|
+
- 3
|
12
|
+
version: 0.8.0.beta.3
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Daniel Harrington
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2010-11-
|
20
|
+
date: 2010-11-06 00:00:00 +01:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|