soap_adapters 0.0.1 → 0.0.2
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 +8 -0
- data/lib/soap_adapters/savon.rb +3 -2
- data/lib/soap_adapters/version.rb +1 -1
- data/soap_adapters.gemspec +2 -2
- data/spec/lib/soap_adapters/savon_spec.rb +14 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c96d60694be86688e4a945c9e61c54e104eb629
|
4
|
+
data.tar.gz: acc171b1065992da4f525c3d3b45b3d5b4cfbecc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2041851e908051b684b3a0a9cefd7a6b9828cf531104fa58c13e4b549550151bd2a111406f12fff38ddf1afb5391cb2540c67e3ce12504f6e8e98d74eef21327
|
7
|
+
data.tar.gz: f465a9b87b687c9e4306e43b4fb5883a89b5c31d31cdd4f0e2e0896d86f165ab8e94733054a72f1ca9212be29c917f81e19b0393cb97217b8f25711f727a9f58
|
data/CHANGELOG.md
ADDED
data/lib/soap_adapters/savon.rb
CHANGED
@@ -7,7 +7,7 @@ module SoapAdapters
|
|
7
7
|
attribute :wsdl, String
|
8
8
|
attribute :logger
|
9
9
|
attribute :log, Boolean, default: true
|
10
|
-
attribute :ssl_version,
|
10
|
+
attribute :ssl_version, Symbol, default: :TLSv1
|
11
11
|
attribute :last_request, String
|
12
12
|
|
13
13
|
def ssl_version
|
@@ -24,7 +24,8 @@ module SoapAdapters
|
|
24
24
|
|
25
25
|
def client
|
26
26
|
args = CLIENT_ATTRS.reduce({}) do |hash, attr|
|
27
|
-
|
27
|
+
val = self.attributes.fetch(attr)
|
28
|
+
hash[attr] = val unless val.nil?
|
28
29
|
hash
|
29
30
|
end
|
30
31
|
::Savon.client(args)
|
data/soap_adapters.gemspec
CHANGED
@@ -6,8 +6,8 @@ require 'soap_adapters/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "soap_adapters"
|
8
8
|
spec.version = SoapAdapters::VERSION
|
9
|
-
spec.authors = ["Ramon Tayag"]
|
10
|
-
spec.email = ["
|
9
|
+
spec.authors = ["G5", "Ramon Tayag"]
|
10
|
+
spec.email = ["ramon.tayag@gmail.com", "lateam@getg5.com"]
|
11
11
|
spec.summary = %q{Common interface to soap clients}
|
12
12
|
spec.description = %q{Common interface to soap clients}
|
13
13
|
spec.homepage = ""
|
@@ -10,7 +10,7 @@ describe SoapAdapters::Savon do
|
|
10
10
|
it { is_expected.to have_attribute(:logger) }
|
11
11
|
it { is_expected.to have_attribute(:log).with_default(true) }
|
12
12
|
it do
|
13
|
-
is_expected.to have_attribute(:ssl_version,
|
13
|
+
is_expected.to have_attribute(:ssl_version, Symbol).with_default(:TLSv1)
|
14
14
|
end
|
15
15
|
it { is_expected.to have_attribute(:last_request, String) }
|
16
16
|
end
|
@@ -48,6 +48,19 @@ describe SoapAdapters::Savon do
|
|
48
48
|
expect(r.to_s).to eq "response_xml"
|
49
49
|
expect(r.xml).to eq "response_xml"
|
50
50
|
end
|
51
|
+
|
52
|
+
it "instantiates a Savon client passing only arguments that are present" do
|
53
|
+
allow(::Savon).to receive(:client).with(
|
54
|
+
wsdl: "wsdl",
|
55
|
+
log: false,
|
56
|
+
ssl_version: :TLSv1,
|
57
|
+
).and_return(client)
|
58
|
+
adapter = described_class.new(wsdl: "wsdl", log: false)
|
59
|
+
r = adapter.call(*client_args)
|
60
|
+
expect(adapter.last_request).to eq "request_xml"
|
61
|
+
expect(r.to_s).to eq "response_xml"
|
62
|
+
expect(r.xml).to eq "response_xml"
|
63
|
+
end
|
51
64
|
end
|
52
65
|
|
53
66
|
end
|
metadata
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soap_adapters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
+
- G5
|
7
8
|
- Ramon Tayag
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
@@ -96,7 +97,6 @@ dependencies:
|
|
96
97
|
version: '0'
|
97
98
|
description: Common interface to soap clients
|
98
99
|
email:
|
99
|
-
- G5
|
100
100
|
- ramon.tayag@gmail.com
|
101
101
|
- lateam@getg5.com
|
102
102
|
executables: []
|
@@ -104,6 +104,7 @@ extensions: []
|
|
104
104
|
extra_rdoc_files: []
|
105
105
|
files:
|
106
106
|
- ".gitignore"
|
107
|
+
- CHANGELOG.md
|
107
108
|
- Gemfile
|
108
109
|
- LICENSE.md
|
109
110
|
- LICENSE.txt
|