savon 2.8.0 → 2.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -2
- data/README.md +1 -1
- data/lib/savon/header.rb +6 -1
- data/lib/savon/version.rb +1 -1
- data/spec/savon/message_spec.rb +43 -13
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 379ca76fcbfd623cc2e02ff387233fd764e50fdf
|
4
|
+
data.tar.gz: 2a2ff2a7c89ac4d5da0d62196388b49514bc3eeb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5a27414b2371f54d7d7ccc7c92ca360bba02bee470c6274af9491aae939229ad15e4997415818d3b2947503bcdc79c1d6c7fc3860019195ef5e85589ab1edd1
|
7
|
+
data.tar.gz: 55804add86b33a9bddac6cdf6383bc7f89025eaf4fdcee9d43ccd0aaa21295a39932b98eae75b111c86882c26e916eea8693aea1e7f7015cb22c815b8ba13374
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
data/lib/savon/header.rb
CHANGED
@@ -61,7 +61,12 @@ module Savon
|
|
61
61
|
convert_to_xml({
|
62
62
|
'wsa:Action' => @locals[:soap_action],
|
63
63
|
'wsa:To' => @globals[:endpoint],
|
64
|
-
'wsa:MessageID' => "urn:uuid:#{UUID.new.generate}"
|
64
|
+
'wsa:MessageID' => "urn:uuid:#{UUID.new.generate}",
|
65
|
+
attributes!: {
|
66
|
+
'wsa:MessageID' => {
|
67
|
+
"xmlns:wsa" => "http://schemas.xmlsoap.org/ws/2004/08/addressing"
|
68
|
+
}
|
69
|
+
}
|
65
70
|
})
|
66
71
|
end
|
67
72
|
|
data/lib/savon/version.rb
CHANGED
data/spec/savon/message_spec.rb
CHANGED
@@ -11,29 +11,59 @@ describe Savon::Message do
|
|
11
11
|
@server.stop
|
12
12
|
end
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
14
|
+
let(:client_config) {
|
15
|
+
{
|
16
|
+
:endpoint => @server.url(:repeat),
|
17
|
+
:namespace => 'http://example.com',
|
18
|
+
:log => false,
|
19
|
+
|
20
|
+
:element_form_default => :qualified,
|
21
|
+
:convert_request_keys_to => :camelcase,
|
20
22
|
|
21
|
-
|
22
|
-
|
23
|
+
:convert_response_tags_to => nil
|
24
|
+
}
|
25
|
+
}
|
23
26
|
|
24
|
-
|
25
|
-
)
|
27
|
+
let(:client) { Savon.client(client_config) }
|
26
28
|
|
27
|
-
|
29
|
+
context "with a qualified message" do
|
30
|
+
let(:message) {
|
31
|
+
{
|
28
32
|
:email_count => 3,
|
29
33
|
:user_name => 'josh',
|
30
34
|
:order! => [:user_name, :email_count]
|
31
35
|
}
|
36
|
+
}
|
32
37
|
|
38
|
+
let(:converted_keys) {
|
39
|
+
'<wsdl:UserName>josh</wsdl:UserName><wsdl:EmailCount>3</wsdl:EmailCount>'
|
40
|
+
}
|
41
|
+
it "converts request Hash keys for which there is not namespace" do
|
33
42
|
response = client.call(:something, :message => message)
|
34
|
-
|
43
|
+
expect(response.xml).to include(converted_keys)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
context 'use_wsa_headers' do
|
48
|
+
let(:client_config) { super().merge(use_wsa_headers: true) }
|
35
49
|
|
36
|
-
|
50
|
+
context 'headers' do
|
51
|
+
[ 'wsa:Action', 'wsa:To', 'wsa:MessageID' ].each do |header|
|
52
|
+
it "should include #{header} header" do
|
53
|
+
response = client.call(:something, message: {})
|
54
|
+
expect(response.xml).to include(header)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
context 'wsa:MessageID' do
|
60
|
+
let(:message_id_tag) {
|
61
|
+
'<wsa:MessageID xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">'
|
62
|
+
}
|
63
|
+
it 'should include xmlns:wsa attribute' do
|
64
|
+
response = client.call(:something, message: {})
|
65
|
+
expect(response.xml).to include(message_id_tag)
|
66
|
+
end
|
37
67
|
end
|
38
68
|
end
|
39
69
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: savon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.8.
|
4
|
+
version: 2.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Harrington
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nori
|