ocean-rails 6.1.6 → 6.1.7
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 +7 -7
- 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: a68d0d48e09ae7bee67dc8099da9ed592b095b94
|
4
|
+
data.tar.gz: 7aff7c2a33add1f11ab9da72ff4047d884d1bfe1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d888abd3a67b2fc421e722908ebcb6350754649aa846a143f59c074e77b32dce1ba37db487ca0551b36a417a573bc48026967d9d571acbb1867322b3a7eba039
|
7
|
+
data.tar.gz: acda4d43fb7242703781fb9f742e3ca0d98f8f010611e616901234040885b5300dc13fc3fb644c3bd9cb8f7023719365785661e191ae722c18a3bcbf56b186e0
|
data/lib/ocean/api.rb
CHANGED
@@ -394,7 +394,7 @@ class Api
|
|
394
394
|
when 403
|
395
395
|
# Does not authenticate. Don't repeat the request.
|
396
396
|
nil
|
397
|
-
when 500
|
397
|
+
when 500
|
398
398
|
# Error. Don't repeat.
|
399
399
|
nil
|
400
400
|
else
|
@@ -533,8 +533,8 @@ class Api
|
|
533
533
|
# A URL not starting with a / will be internalized.
|
534
534
|
#
|
535
535
|
def self.async_job_body(href=nil, method=:get, body: {},
|
536
|
-
credentials:
|
537
|
-
|
536
|
+
credentials: nil,
|
537
|
+
token: nil,
|
538
538
|
steps: nil,
|
539
539
|
default_step_time: nil,
|
540
540
|
default_poison_limit: nil,
|
@@ -554,8 +554,8 @@ class Api
|
|
554
554
|
steps ||= []
|
555
555
|
end
|
556
556
|
h['steps'] = steps
|
557
|
-
h['credentials'] = credentials
|
558
|
-
|
557
|
+
h['credentials'] = credentials || Api.credentials
|
558
|
+
h['token'] = token || Api.service_token
|
559
559
|
h['default_step_time'] = default_step_time if default_step_time
|
560
560
|
h['default_poison_limit'] = default_poison_limit if default_poison_limit
|
561
561
|
h['max_seconds_in_queue'] = max_seconds_in_queue if max_seconds_in_queue
|
@@ -582,7 +582,7 @@ class Api
|
|
582
582
|
def self.run_async_job(href=nil, method=nil, job: nil, **keywords, &block)
|
583
583
|
job ||= async_job_body(href, method, **keywords)
|
584
584
|
Api.request "/v1/async_jobs", :post,
|
585
|
-
body: job.to_json, x_api_token:
|
585
|
+
body: job.to_json, x_api_token: Api.service_token
|
586
586
|
rescue TimeoutError, NoResponseError => e
|
587
587
|
raise e unless block
|
588
588
|
block.call e
|
@@ -603,7 +603,7 @@ class Api
|
|
603
603
|
area: area,
|
604
604
|
name: name,
|
605
605
|
description: description
|
606
|
-
}
|
606
|
+
}#.to_json
|
607
607
|
end
|
608
608
|
|
609
609
|
|
data/lib/ocean/version.rb
CHANGED