gds-api-adapters 24.3.0 → 24.4.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: 82534ab64fb0ed91583434029e987473da8b7acf
4
- data.tar.gz: d3ca040c9c252488d5fd931a082a3c2922a4374b
3
+ metadata.gz: 917b62c21c23af44bb7bd701631407f93ad3e528
4
+ data.tar.gz: 5cfcbf49f3381b24011fbaddc4809c173267436e
5
5
  SHA512:
6
- metadata.gz: fbe2b79cb8fa19b0e9aa2d9d54ac74a3789ec60083b9ecf4cf92be469818aad6e66e604473d7c4f95779329afdc5e77e5b306b043723a2807a04cb710cb30cad
7
- data.tar.gz: 8962b8bca9a05a374a656ebfaa22fe972b3112ea160492da556789c2d88004b7ea98142009fed3b893812a2b84e99cd5c43595a015d1422b748dda1e8f09597d
6
+ metadata.gz: d6febf466943aca5a5ccec8a099d88956d8bbbbfede4f527986ddfe4e8484799200bc99d06861c39fef999ffb367b450889ace42be7e0cc84788f4cac9f08a30
7
+ data.tar.gz: 59a64bbbe9fee9466c90b61760d09ef560159e398e7380e4902c17b56b4838ea06f78763ecde700ae2f28cdd12a0cdcc8e9c5ec213406a3cea561ac2a11e20c5
@@ -171,7 +171,8 @@ module GdsApi
171
171
  # parameters with timeouts included
172
172
  def with_timeout(method_params)
173
173
  method_params.merge(
174
- timeout: options[:timeout] || DEFAULT_TIMEOUT_IN_SECONDS
174
+ timeout: options[:timeout] || DEFAULT_TIMEOUT_IN_SECONDS,
175
+ open_timeout: options[:timeout] || DEFAULT_TIMEOUT_IN_SECONDS,
175
176
  )
176
177
  end
177
178
 
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = '24.3.0'
2
+ VERSION = '24.4.0'
3
3
  end
@@ -33,6 +33,15 @@ class JsonClientTest < MiniTest::Spec
33
33
  end
34
34
  end
35
35
 
36
+ def test_long_connections_timeout
37
+ url = "http://www.example.com/timeout.json"
38
+ exception = defined?(Net::OpenTimeout) ? Net::OpenTimeout : TimeoutError
39
+ stub_request(:get, url).to_raise(exception)
40
+ assert_raises GdsApi::TimedOutException do
41
+ @client.get_json(url)
42
+ end
43
+ end
44
+
36
45
  def test_get_should_raise_endpoint_not_found_if_connection_refused
37
46
  url = "http://some.endpoint/some.json"
38
47
  stub_request(:get, url).to_raise(Errno::ECONNREFUSED)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gds-api-adapters
3
3
  version: !ruby/object:Gem::Version
4
- version: 24.3.0
4
+ version: 24.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Stewart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-08 00:00:00.000000000 Z
11
+ date: 2015-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: plek