ocean-rails 6.1.9 → 6.2.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: 2aa07f06993d7d5bcca97664b436fa599df63372
4
- data.tar.gz: d5bb586729852f34de19f3e8ab413280c9e3ce98
3
+ metadata.gz: a17bdb2d6c018961164c484b1e24303ebb9c7ce4
4
+ data.tar.gz: 6df358f9d7c6c54eb3cca885f08f8507ac12e32c
5
5
  SHA512:
6
- metadata.gz: 285f47af63e281cfb1bb809989db96ffa6c5f9e5b118e6cda6459a1db8a122d7a1d00ebd04861f05b2f311823705201e98e2a6c8195b2df396f0872a44e20b35
7
- data.tar.gz: 970fa7e163299998cdbac8bae04b0a920183925ddf5f899bad7a2224075ab6b164889dde88b5afc8dda98279233fe093c0513d5d74e8163e6cd26fc821ab408f
6
+ metadata.gz: 03acbd2140abffa3c359d74a6b4bdf11483a22a0a071b6c6ea3b0b0a953361a9f5e769ab952a2ae2e52ebe2a0cc735851606201c00d6765bcf4b6c4c1d3134bc
7
+ data.tar.gz: 8093e29eafd8532e1b4e89e1f60acae858922f4dd1b81114b33206fb9ed2a3b5059495ac82ef8b7aae5bee1fcd797a9d00d74c152b902c6923c6de7760b8c48d
data/lib/ocean/api.rb CHANGED
@@ -143,7 +143,7 @@ class Api
143
143
  #
144
144
  # Api.request is designed to be the lowest common denominator for making any kind of
145
145
  # HTTP request, except parallel requests which will have a similar method (to which BAN
146
- # and PURGE requests to Varnish is a special case).
146
+ # and PURGE requests to Varnish constitute a special case).
147
147
  #
148
148
  # In its present form it assumes the request is a JSON one. Eventually, keyword args will
149
149
  # provide abstract control of content type.
@@ -158,6 +158,7 @@ class Api
158
158
  # +reauthentication+ (true by default), controls whether 400 and 419 will trigger reauth.
159
159
  # +ssl_verifypeer+ (true by default), controls SSL peer verification.
160
160
  # +ssl_verifyhost+ (2 by default), controls SSL host verification.
161
+ # +timeout+ sets the timeout of the request. It defaults to 0, meaning no timeout.
161
162
  #
162
163
  # Automatic retries for GET requests are available:
163
164
  #
@@ -183,6 +184,7 @@ class Api
183
184
  ssl_verifypeer: true, ssl_verifyhost: 2,
184
185
  retries: 0, backoff_time: 1, backoff_rate: 0.9, backoff_max: 30,
185
186
  x_metadata: Thread.current[:metadata],
187
+ timeout: 0,
186
188
  &postprocessor)
187
189
  # Set up the request
188
190
  headers['Accept'] = "application/json"
@@ -211,7 +213,8 @@ class Api
211
213
  params: args,
212
214
  body: body,
213
215
  ssl_verifypeer: ssl_verifypeer,
214
- ssl_verifyhost: ssl_verifyhost)
216
+ ssl_verifyhost: ssl_verifyhost,
217
+ timeout: timeout)
215
218
  # Define a callback to process the response and do retries
216
219
  request.on_complete do |typhoeus_response|
217
220
  response = Response.new typhoeus_response
data/lib/ocean/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ocean
2
- VERSION = "6.1.9"
2
+ VERSION = "6.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ocean-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.9
4
+ version: 6.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Bengtson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-16 00:00:00.000000000 Z
11
+ date: 2016-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus