ocean-rails 3.8.6 → 3.8.7
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 +12 -2
- 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: 085329923ad4d93fec3b49858f18bd7e6c0e9c8f
|
4
|
+
data.tar.gz: 18b7e9eaf95bd64386ba5cbd16da678af9bb12a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42751d2808b5dc1ca57b8bc2134c62c78e7a339e3d990269d1e3cee03e56edc9139431688ec06591c3b3ae8db5a67ac7041dae2c10780d53b82afadec883b69d
|
7
|
+
data.tar.gz: 8eabcdd6860a3f16e0c0a1071a9a9591e3ef849335266746813247a02f99f1a9e0a5148480611ff0a994cdfba15616ad96c7d5761d21a7a0277eecd4f18ec06b
|
data/lib/ocean/api.rb
CHANGED
@@ -104,6 +104,13 @@ class Api
|
|
104
104
|
@body ||= @response.response_body.blank? ? nil : JSON.parse(@response.response_body)
|
105
105
|
end
|
106
106
|
|
107
|
+
#
|
108
|
+
# Returns the original HTTP response body as a String.
|
109
|
+
#
|
110
|
+
def raw_body
|
111
|
+
@response.response_body
|
112
|
+
end
|
113
|
+
|
107
114
|
#
|
108
115
|
# Returns true if the HTTP request was a success and status == 2xx.
|
109
116
|
#
|
@@ -550,12 +557,15 @@ class Api
|
|
550
557
|
end
|
551
558
|
|
552
559
|
#
|
553
|
-
# Takes the same args as +.async_job_body+, post an AsyncJob and returns the Response
|
554
|
-
# The AsyncJob is always created as the service ApiUser
|
560
|
+
# Takes the same args as +.async_job_body+, post an +AsyncJob+ and returns the +Response+.
|
561
|
+
# The +AsyncJob+ is always created as the service +ApiUser+; the job carries its own
|
555
562
|
# credentials and token, specified as keywords +:credentials+ and +:token+.
|
556
563
|
# If you have precomputed the job description hash, pass it using the keyword
|
557
564
|
# +:job+ as the only parameter.
|
558
565
|
#
|
566
|
+
# A block may be given. It will be called with any +TimeoutError+ or +NoResponseError+,
|
567
|
+
# which allows +Api.run_async_job+ to be used very tersely in controllers.
|
568
|
+
#
|
559
569
|
def self.run_async_job(href=nil, method=nil, job: nil, **keywords, &block)
|
560
570
|
job ||= async_job_body(href, method, **keywords)
|
561
571
|
Api.request "#{INTERNAL_OCEAN_API_URL}/v1/async_jobs", :post,
|
data/lib/ocean/version.rb
CHANGED