ocean-rails 3.8.6 → 3.8.7

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: b7907bef448ff63fa20f0c141985564936a49a3b
4
- data.tar.gz: 59a58a48cb77d5fd15d860f96a0a8979c7af2173
3
+ metadata.gz: 085329923ad4d93fec3b49858f18bd7e6c0e9c8f
4
+ data.tar.gz: 18b7e9eaf95bd64386ba5cbd16da678af9bb12a6
5
5
  SHA512:
6
- metadata.gz: c12d6d7a12a8a46e81095eec81accd9321a4dd81b821ff3b9ab190c01f540f6c46d180c0171459f7cb3eb060b9bd741d46c5cd792209271f854e36df422f0869
7
- data.tar.gz: d42e5f2400021d23a0a63dd8a493372a28eb1ac98a6c2ddd88ce29055e926e18c077e9c76440a081dde7ac370849f2558a5f83cf3c9c19dfd373bac2e38cf5ab
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; the job carries its own
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
@@ -1,3 +1,3 @@
1
1
  module Ocean
2
- VERSION = "3.8.6"
2
+ VERSION = "3.8.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ocean-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.6
4
+ version: 3.8.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Bengtson