soap_adapters 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6c96d60694be86688e4a945c9e61c54e104eb629
4
- data.tar.gz: acc171b1065992da4f525c3d3b45b3d5b4cfbecc
3
+ metadata.gz: 534f74d353fac6b0d638fe5e03cbb5730c35f693
4
+ data.tar.gz: 093d25f5ea4b1a6e705042e4bf214c923cac536c
5
5
  SHA512:
6
- metadata.gz: 2041851e908051b684b3a0a9cefd7a6b9828cf531104fa58c13e4b549550151bd2a111406f12fff38ddf1afb5391cb2540c67e3ce12504f6e8e98d74eef21327
7
- data.tar.gz: f465a9b87b687c9e4306e43b4fb5883a89b5c31d31cdd4f0e2e0896d86f165ab8e94733054a72f1ca9212be29c917f81e19b0393cb97217b8f25711f727a9f58
6
+ metadata.gz: eaa20d318e9a230968c120ee90f3dbf559a75e0e986383d9d000cab6c0683d4b51c84fed61ffddc7f9b7c509946a5a386edef6f817583a8688f31e9a169160bc
7
+ data.tar.gz: 2661df4ba1a95bae17ec993b1d334de0fe931dac43f7324fa8a7b93f771cc49afac46948b7be05e3a66c5e1929bb419f4230abbcae7f9fe0848d17f5b42618ed
@@ -1,3 +1,7 @@
1
+ # v0.1.0
2
+
3
+ - Adds support for open and read timeouts
4
+
1
5
  # v0.0.2
2
6
 
3
7
  - Fix bug where `:ssl_version` is a string when it should be a symbol
data/README.md CHANGED
@@ -28,7 +28,9 @@ adapter = SoapAdapters::Savon.new(
28
28
  wsdl: "https://myservice.com?WSDL",
29
29
  logger: MyLogger.new,
30
30
  log: false,
31
- ssl_version: :TLSv1, # optional; defaults to :TLSv1
31
+ ssl_version: :TLSv1, # optional; defaults to :TLSv1,
32
+ open_timeout: 30,
33
+ read_timeout: 10
32
34
  )
33
35
 
34
36
  response = adapter.call(:make_reservation, message: {username: "abc"})
@@ -2,13 +2,15 @@ module SoapAdapters
2
2
  class Savon
3
3
 
4
4
  include Virtus.model
5
- CLIENT_ATTRS = %i[wsdl logger log ssl_version]
5
+ CLIENT_ATTRS = %i[wsdl logger log ssl_version open_timeout read_timeout]
6
6
 
7
7
  attribute :wsdl, String
8
8
  attribute :logger
9
9
  attribute :log, Boolean, default: true
10
10
  attribute :ssl_version, Symbol, default: :TLSv1
11
11
  attribute :last_request, String
12
+ attribute :open_timeout, Integer
13
+ attribute :read_timeout, Integer
12
14
 
13
15
  def ssl_version
14
16
  @ssl_version || :TLSv1
@@ -1,3 +1,3 @@
1
1
  module SoapAdapters
2
- VERSION = "0.0.2"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -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 = ["G5", "Ramon Tayag"]
10
- spec.email = ["ramon.tayag@gmail.com", "lateam@getg5.com"]
9
+ spec.authors = ["G5", "Ramon Tayag", "Michael Mitchell"]
10
+ spec.email = ["ramon.tayag@gmail.com", "michael.mitchell@gmail.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 = ""
@@ -61,6 +61,21 @@ describe SoapAdapters::Savon do
61
61
  expect(r.to_s).to eq "response_xml"
62
62
  expect(r.xml).to eq "response_xml"
63
63
  end
64
+
65
+ it "sets the open_timeout and read_timeout if declared" do
66
+ allow(::Savon).to receive(:client).with(
67
+ wsdl: "wsdl",
68
+ log: false,
69
+ ssl_version: :TLSv1,
70
+ open_timeout: 30,
71
+ read_timeout: 10
72
+ ).and_return(client)
73
+ adapter = described_class.new(wsdl: "wsdl", log: false, open_timeout: 30, read_timeout: 10)
74
+ r = adapter.call(*client_args)
75
+ expect(adapter.last_request).to eq "request_xml"
76
+ expect(r.to_s).to eq "response_xml"
77
+ expect(r.xml).to eq "response_xml"
78
+ end
64
79
  end
65
80
 
66
81
  end
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soap_adapters
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - G5
8
8
  - Ramon Tayag
9
+ - Michael Mitchell
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2015-03-10 00:00:00.000000000 Z
13
+ date: 2016-10-31 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: virtus
@@ -98,7 +99,7 @@ dependencies:
98
99
  description: Common interface to soap clients
99
100
  email:
100
101
  - ramon.tayag@gmail.com
101
- - lateam@getg5.com
102
+ - michael.mitchell@gmail.com
102
103
  executables: []
103
104
  extensions: []
104
105
  extra_rdoc_files: []
@@ -136,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
137
  version: '0'
137
138
  requirements: []
138
139
  rubyforge_project:
139
- rubygems_version: 2.4.3
140
+ rubygems_version: 2.5.1
140
141
  signing_key:
141
142
  specification_version: 4
142
143
  summary: Common interface to soap clients