ocean-rails 6.1.9 → 6.2.0
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/lib/ocean/api.rb +5 -2
- data/lib/ocean/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a17bdb2d6c018961164c484b1e24303ebb9c7ce4
|
4
|
+
data.tar.gz: 6df358f9d7c6c54eb3cca885f08f8507ac12e32c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
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.
|
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-
|
11
|
+
date: 2016-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|