ocean-rails 3.5.1 → 3.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ocean/api.rb +3 -1
- data/lib/ocean/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 195596beb3c2e277dbbb62f5c03d9dc0ece243ff
|
4
|
+
data.tar.gz: a8408d92783ede7f1ed14a72ea0dbb5786d18f36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7aa31ceab000b88c62f671e1a56ad1c3fb5280e9b8526f124d7de68667ad7b404094a6556c6921272e39340e91cbd0da74d939bac7851a95846252bf860a2925
|
7
|
+
data.tar.gz: ed19424f8890bbf34eeb9a0b8adaf62df7f78f7c2286ef9c8a6c59076d9cba00eeb4d05a1385b6f3ee5a9abcf8e9c1f9697fa2c8a9aa6708700d7e5b83ffa993
|
data/lib/ocean/api.rb
CHANGED
@@ -163,13 +163,15 @@ class Api
|
|
163
163
|
x_api_token: headers['X-API-Token'],
|
164
164
|
reauthentication: true,
|
165
165
|
ssl_verifypeer: true, ssl_verifyhost: 2,
|
166
|
-
retries: 0, backoff_time: 1, backoff_rate: 0.9, backoff_max: 30
|
166
|
+
retries: 0, backoff_time: 1, backoff_rate: 0.9, backoff_max: 30,
|
167
|
+
x_metadata: Thread.current[:metadata])
|
167
168
|
# Set up the request
|
168
169
|
headers['Accept'] = "application/json"
|
169
170
|
headers['Content-Type'] = "application/json" if [:post, :put].include?(http_method)
|
170
171
|
headers['User-Agent'] = "Ocean"
|
171
172
|
x_api_token = Api.authenticate(*Api.decode_credentials(credentials)) if x_api_token.blank? && credentials.present?
|
172
173
|
headers['X-API-Token'] = x_api_token if x_api_token.present?
|
174
|
+
headers['X-Metadata'] = x_metadata if x_metadata.present?
|
173
175
|
|
174
176
|
response = nil
|
175
177
|
tries_done = 0
|
data/lib/ocean/version.rb
CHANGED