oso-cloud 1.4.0 → 1.4.1

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
  SHA256:
3
- metadata.gz: 7cd2119868a2abbe622d6407dc78aa07ee13065145d32b566645f607de594259
4
- data.tar.gz: 7d39612599e9ae9cab250d3a954c9b510a07c2f14f0975ed746198fbbd655489
3
+ metadata.gz: 4f65c9e4cafbbd08a93b4c772310d2741bd3a8a7f9f9fe90c15bf06e4f98f3c5
4
+ data.tar.gz: 0fed4dce1b4043811202203fae204454b086327f6204f88ada6ec9d57710e914
5
5
  SHA512:
6
- metadata.gz: e568154a43523df7260a16123328fccf4176dedf982fcb5938b551973f26059a7df73781a0d5950fb699e4310ce3381941aa041833befacef9f8793a07034c7a
7
- data.tar.gz: eeffb701a6bbc5cceaf0934f0f5660a2d232d2951eb4ae54bb36ee43c837fe59a68d719fad86dc63cb45e885366bd20bfdeab15ba7f538f3d30d2cb780f630bb
6
+ metadata.gz: 59a1e5af09cbcf16f6bcb01b951ad75ff0e80351c94e27968c82f95ecdf308aac98a70b7d6f6e98287a4e6eae9b76276497f47267c8c3c195fcfa80f41843494
7
+ data.tar.gz: 42d8ac7a9a9366c6e338e86ce27cd8249615b7c268e8c5abda237719e489fc09ffa71743a2c69828a660f27aa67fdde2514eb34206c5c03e502209b4951caf76
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- oso-cloud (1.4.0)
4
+ oso-cloud (1.4.1)
5
5
  faraday (~> 2.5.2)
6
6
  faraday-net_http_persistent (~> 2.0)
7
7
  faraday-retry (~> 2.0.0)
data/lib/oso/api.rb CHANGED
@@ -212,8 +212,8 @@ module OsoCloud
212
212
  # responses are processed in reverse order; this stack implies the
213
213
  # retries are attempted before an error is raised, and the json
214
214
  # parser is only applied if there are no errors
215
- faraday.response :json, parser_options: { symbolize_names: true }
216
215
  faraday.response :raise_error
216
+ faraday.response :json, parser_options: { symbolize_names: true }
217
217
  faraday.request :retry, {
218
218
  max: (options && options[:max_retries]) || 10,
219
219
  interval: 0.01,
@@ -452,10 +452,10 @@ module OsoCloud
452
452
 
453
453
  def handle_faraday_error(error)
454
454
  resp = error.response
455
- err = if resp.respond_to? :body
456
- resp.body[:message]
457
- else
455
+ err = if resp.nil? || resp[:body].nil? || resp[:body][:message].nil?
458
456
  error.message
457
+ else
458
+ resp[:body][:message]
459
459
  end
460
460
  raise ApiError.new(message: err)
461
461
  end
data/lib/oso/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module OsoCloud
2
- VERSION = '1.4.0'.freeze
2
+ VERSION = '1.4.1'.freeze
3
3
  end
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.4.0
4
+ version: 1.4.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-10-25 00:00:00.000000000 Z
11
+ date: 2023-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday