ocean-rails 3.8.3 → 3.8.4

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: b8016bcce74120528096b71766f7756e0f02b5c6
4
- data.tar.gz: e6c5b28ce615e5a0b5e479f73d21663359a9f672
3
+ metadata.gz: 38d84dfad509e2adcf4e7fd45e96521ece3c2a43
4
+ data.tar.gz: acc6f3f985fcc089587f77283877144a01f98fd7
5
5
  SHA512:
6
- metadata.gz: 5c63d4c52002d236081bc816a8fe8e57283ac6c2a4ab2f1ec5ddf59448c08ae5918161b54ef0066540fd25436c68b469f8c9c746378469dc8f85fbb1272b6544
7
- data.tar.gz: b91f6a5a283e7970e481e39cd02a21a512021c6c5acd38edc1cc5d0e2bca0ea952a8579e1a1458c7695d9dfad318887e65ef0c740ac7325a48513e9dcf2f4c22
6
+ metadata.gz: f25b2e7f2e80212f0e94bded0caa88d915ca9539bb9d2fdae9c0f7cc4710f47bfbe963a1c6bdbc985c6df625c16d2a79414635f118adb1eec6db5a6b3935d761
7
+ data.tar.gz: 32c800b13506c94da5b3633d11654b8462b0dffa1676a150a5cbf68c496f39e9cba0f58079fdba10694f9d18cd154bb84f99108571163657887610dc3399f986
data/lib/ocean/api.rb CHANGED
@@ -160,8 +160,8 @@ class Api
160
160
  # 30, etc. To disable waiting between retries entirely, set +backoff_time+ to zero.
161
161
  #
162
162
  def self.request(url, http_method, args: nil, headers: {}, body: nil,
163
- credentials: nil, #Api.credentials,
164
- x_api_token: headers['X-API-Token'],# || Api.service_token,
163
+ credentials: nil,
164
+ x_api_token: headers['X-API-Token'],
165
165
  reauthentication: true,
166
166
  ssl_verifypeer: true, ssl_verifyhost: 2,
167
167
  retries: 0, backoff_time: 1, backoff_rate: 0.9, backoff_max: 30,
@@ -549,4 +549,14 @@ class Api
549
549
  h
550
550
  end
551
551
 
552
+ #
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
555
+ # credentials and token, specified as keywords +:credentials+ and +:token+.
556
+ #
557
+ def self.run_async_job(*args)
558
+ Api.request "#{INTERNAL_OCEAN_API_URL}/v1/async_jobs", :post,
559
+ body: async_job_body(*args).to_json, x_api_token: Api.service_token
560
+ end
561
+
552
562
  end
data/lib/ocean/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ocean
2
- VERSION = "3.8.3"
2
+ VERSION = "3.8.4"
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.3
4
+ version: 3.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Bengtson