ocean-rails 3.7.2 → 3.7.3
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_remote_resource.rb +12 -8
- 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: aeca7252a82ca7b563ccf1e82c01e193a416026f
|
4
|
+
data.tar.gz: a003f64cb6bab3da9f119265b4187527d58cab1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ef103871d6b82357cb2b20caa0db66fc4c19125cab4812c52b463caaf60facff9f145965f4c242db41bfc57f6d7b46adf0c88516526e6895c11950a47c5a910
|
7
|
+
data.tar.gz: 62ef3eb48d620fa2c1c8304ec52972c3fa1346376e7bec62663ac8ecfac022faa97d5fa96ce1f09574d937f51ac43e6e32b0f3c616f250fc82955370bbbe4feb
|
@@ -301,7 +301,7 @@ class Api
|
|
301
301
|
rr.send :status=, response.status
|
302
302
|
rr.send :status_message=, response.message
|
303
303
|
rr.send :headers=, response.headers
|
304
|
-
raise GetFailed unless response.success?
|
304
|
+
raise GetFailed, "#{response.status} #{response.message}" unless response.success?
|
305
305
|
begin
|
306
306
|
raw = response.body
|
307
307
|
rescue JSON::ParserError
|
@@ -344,7 +344,11 @@ class Api
|
|
344
344
|
credentials: credentials, x_api_token: token,
|
345
345
|
retries: retries, backoff_time: backoff_time, backoff_rate: backoff_rate,
|
346
346
|
backoff_max: backoff_max
|
347
|
-
|
347
|
+
self.response = response
|
348
|
+
self.status = response.status
|
349
|
+
self.status_message = response.message
|
350
|
+
self.headers = response.headers
|
351
|
+
raise PutFailed, "#{response.status} #{response.message}" unless response.success?
|
348
352
|
begin
|
349
353
|
self.raw = response.body
|
350
354
|
rescue JSON::ParserError
|
@@ -354,10 +358,6 @@ class Api
|
|
354
358
|
return if resource_type && type != resource_type
|
355
359
|
self.resource = resource
|
356
360
|
self.resource_type = type
|
357
|
-
self.response = response
|
358
|
-
self.status = response.status
|
359
|
-
self.status_message = response.message
|
360
|
-
self.headers = response.headers
|
361
361
|
self.present = true
|
362
362
|
end
|
363
363
|
|
@@ -368,7 +368,11 @@ class Api
|
|
368
368
|
credentials: credentials, x_api_token: token,
|
369
369
|
retries: retries, backoff_time: backoff_time, backoff_rate: backoff_rate,
|
370
370
|
backoff_max: backoff_max
|
371
|
-
|
371
|
+
self.response = response
|
372
|
+
self.status = response.status
|
373
|
+
self.status_message = response.message
|
374
|
+
self.headers = response.headers
|
375
|
+
raise PostFailed, "#{response.status} #{response.message}" unless response.success?
|
372
376
|
begin
|
373
377
|
raw = response.body
|
374
378
|
rescue JSON::ParserError
|
@@ -391,7 +395,7 @@ class Api
|
|
391
395
|
self.status = response.status
|
392
396
|
self.status_message = response.message
|
393
397
|
self.headers = response.headers
|
394
|
-
raise DeleteFailed unless response.success?
|
398
|
+
raise DeleteFailed, "#{response.status} #{response.message}" unless response.success?
|
395
399
|
end
|
396
400
|
|
397
401
|
end
|
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: 3.7.
|
4
|
+
version: 3.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Bengtson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|