soap-object 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/ChangeLog +4 -0
- data/lib/soap-object.rb +2 -1
- data/lib/soap-object/class_methods.rb +15 -1
- data/lib/soap-object/version.rb +1 -1
- data/spec/lib/soap_object_spec.rb +20 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDIwMTlmZDU5ODgxODQwYjQxZjBiODJjYTRhZDQ1NTY0NGM0ZjFkMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzMwMWY4Zjk4MmZlMTA5NGVmNDUyNWFkNWJlMzJlZDM3MmQ3NDI5Mw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZjQxMDkzODA0MjdjNWUzNDIwZWQ2Nzk2Nzc2MzYzNjU5NzFkZjY3NGMxYWU4
|
10
|
+
MzJlOWQ2NzkxYzI2OTlhMThjOTgwYzJhNDU1OTI3NWE1YWQ5NjQ3NmEwMWRl
|
11
|
+
N2UwYmMyY2I4NGFlMTA3NjY4YmYwNjU3MDU4NTM0NjUwNTJjMjk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZWU0MTQ5YWRkYjFmYjk1YmMxY2M5MjFjNDFlMDQ3MWEzMWQwMjNhMWYyOGNk
|
14
|
+
NjI3NmRlMDc5MDZjMmI2MDE0ZjZjYmU2ZDQzZWRhZWE4Nzc2MGZjYjUzOTll
|
15
|
+
M2ZiZmFiYzY2NjQxMjZkODkwOWUwNWFhNTgzMzA4NzM3ZDJiN2M=
|
data/ChangeLog
CHANGED
data/lib/soap-object.rb
CHANGED
@@ -118,7 +118,8 @@ module SoapObject
|
|
118
118
|
:with_encoding,
|
119
119
|
:with_basic_auth,
|
120
120
|
:with_digest_auth,
|
121
|
-
:with_log_level
|
121
|
+
:with_log_level,
|
122
|
+
:with_ssl_verification].each do |sym|
|
122
123
|
properties = properties.merge(self.send sym) if self.respond_to? sym
|
123
124
|
end
|
124
125
|
properties
|
@@ -6,7 +6,7 @@ module SoapObject
|
|
6
6
|
# Sets the url for the wsdl. It can be a path to a local file or
|
7
7
|
# a url to a remote server containing the file.
|
8
8
|
#
|
9
|
-
# @param [
|
9
|
+
# @param [String] either the local path to or the remote url to
|
10
10
|
# the wsdl to use for all requests.
|
11
11
|
#
|
12
12
|
def wsdl(url)
|
@@ -107,5 +107,19 @@ module SoapObject
|
|
107
107
|
{log: true, log_level: level}
|
108
108
|
end
|
109
109
|
end
|
110
|
+
|
111
|
+
#
|
112
|
+
# Enable/Disable SSL verification when calling services over HTTPS (Default is true)
|
113
|
+
#
|
114
|
+
# @param [Boolean] valid values are true, false
|
115
|
+
#
|
116
|
+
def ssl_verification(enable)
|
117
|
+
unless enable
|
118
|
+
define_method(:with_ssl_verification) do
|
119
|
+
{ssl_verify_mode: :none}
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
110
124
|
end
|
111
125
|
end
|
data/lib/soap-object/version.rb
CHANGED
@@ -12,12 +12,18 @@ class TestServiceWithWsdl
|
|
12
12
|
basic_auth 'steve', 'secret'
|
13
13
|
digest_auth 'digest', 'auth'
|
14
14
|
log_level :error
|
15
|
+
ssl_verification false
|
15
16
|
end
|
16
17
|
|
17
|
-
class
|
18
|
+
class TestSoapObjectWithoutClientProperties
|
18
19
|
include SoapObject
|
19
20
|
end
|
20
21
|
|
22
|
+
class TestSoapObjectWithExplicitSslVerification
|
23
|
+
include SoapObject
|
24
|
+
ssl_verification true
|
25
|
+
end
|
26
|
+
|
21
27
|
class TestWorld
|
22
28
|
include SoapObject::Factory
|
23
29
|
end
|
@@ -68,7 +74,7 @@ describe SoapObject do
|
|
68
74
|
end
|
69
75
|
|
70
76
|
it "should disable logging when no logging level set" do
|
71
|
-
expect(
|
77
|
+
expect(TestSoapObjectWithoutClientProperties.new.send(:client_properties)[:log]).to eq(false)
|
72
78
|
end
|
73
79
|
|
74
80
|
it "should enable logging when logging level set" do
|
@@ -79,6 +85,18 @@ describe SoapObject do
|
|
79
85
|
expect(subject.send(:client_properties)[:log_level]).to eq(:error)
|
80
86
|
end
|
81
87
|
|
88
|
+
it "should enable SSL verification by default" do
|
89
|
+
expect(TestSoapObjectWithoutClientProperties.new.send(:client_properties)[:ssl_verify_mode]).to be_nil
|
90
|
+
end
|
91
|
+
|
92
|
+
it "should allow one to disable SSL verification" do
|
93
|
+
expect(subject.send(:client_properties)[:ssl_verify_mode]).to eq(:none)
|
94
|
+
end
|
95
|
+
|
96
|
+
it "should allow one to explicitly enable SSL verification" do
|
97
|
+
expect(TestSoapObjectWithExplicitSslVerification.new.send(:client_properties)[:ssl_verify_mode]).to be_nil
|
98
|
+
end
|
99
|
+
|
82
100
|
end
|
83
101
|
|
84
102
|
context "when using the factory to create to service" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soap-object
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeffrey S. Morgan
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-03-
|
12
|
+
date: 2015-03-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: savon
|