oso-cloud 1.3.0.dev.0 → 1.3.0.dev.1
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/Gemfile.lock +1 -1
- data/lib/oso/api.rb +17 -8
- data/lib/oso/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea1469d68034a213af21a5a0300d2b1b1c7df2d00a3a2518f0a5e48fc0b5756b
|
4
|
+
data.tar.gz: 9491bc2e2bc622296b16a473c0996fdb89a67eb2242f046637ccba173a9e9fb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4baf074d8e2a237287699be969ad02959f5ba1c626cc582c0542931c198cc3c7728b5aa2ec5fa1d323a1368a027d7734fea5c07490247df81f16153c4192cdc4
|
7
|
+
data.tar.gz: '083f190963c58855ac7c5514a07f4547edb2d4b01cb01ac1ef2e11594375401d1b5481a23811134ac484242b8a257a1897e57c36da59241da4a2e95e6fc4d694'
|
data/Gemfile.lock
CHANGED
data/lib/oso/api.rb
CHANGED
@@ -392,20 +392,29 @@ module OsoCloud
|
|
392
392
|
end
|
393
393
|
|
394
394
|
def POST_BATCH(path, params, body_array, isMutation)
|
395
|
-
responses = []
|
396
395
|
@connection.in_parallel do
|
397
|
-
body_array.
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
396
|
+
@responses = body_array.map do |body|
|
397
|
+
@connection.post("api#{path}") do |req|
|
398
|
+
req.params = params unless params.nil?
|
399
|
+
req.body = OsoCloud::Helpers.to_hash(body) unless body.nil?
|
400
|
+
req.headers = headers
|
401
|
+
end
|
402
402
|
end
|
403
403
|
end
|
404
|
+
|
405
|
+
connection_failed = @responses.find { |r| r.env.custom_members[:typhoeus_connection_failed] }
|
406
|
+
if connection_failed
|
407
|
+
raise Faraday::ConnectionFailed, connection_failed.env.custom_members[:typhoeus_return_message]
|
408
|
+
end
|
409
|
+
|
410
|
+
timed_out = @responses.find { |r| r.env.custom_members[:typhoeus_timed_out] }
|
411
|
+
if timed_out
|
412
|
+
raise Faraday::TimeoutError, timed_out.env.custom_members[:typhoeus_return_message]
|
404
413
|
end
|
405
414
|
if isMutation
|
406
|
-
@last_offset = responses[-1].headers[:OsoOffset]
|
415
|
+
@last_offset = @responses[-1].headers[:OsoOffset]
|
407
416
|
end
|
408
|
-
responses
|
417
|
+
@responses
|
409
418
|
rescue Faraday::Error => e
|
410
419
|
handle_faraday_error e
|
411
420
|
end
|
data/lib/oso/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oso-cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.0.dev.
|
4
|
+
version: 1.3.0.dev.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oso Security, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|