oso-cloud 1.4.0.dev.3 → 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: 19949c28883d1f93bb356398c58d7bf7eff4846c518f4555fe7aa9ac58d5bda6
4
- data.tar.gz: 7191bcd23b76ee1bf649de8121275f8bb893c34272fe78fa732a10e97bbaba39
3
+ metadata.gz: 4f65c9e4cafbbd08a93b4c772310d2741bd3a8a7f9f9fe90c15bf06e4f98f3c5
4
+ data.tar.gz: 0fed4dce1b4043811202203fae204454b086327f6204f88ada6ec9d57710e914
5
5
  SHA512:
6
- metadata.gz: 521880120751ab6bc7f22403b5b182b5e43d1c00ccfca4f53aba279b471ebe858ac0cc36d4ac95a7c3ffb2a8e6405764ae60989e617c56377028dd45a3349fb9
7
- data.tar.gz: 07e1aafd27d027a5f3d20ed095df62b5cd8f27fa39b50d6d340a87f6bab305e6138ac0d11bc48e41963ef6b4ec592119769a04d08877f7d7fa20f61ab14c358d
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.dev.2)
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,11 +452,10 @@ module OsoCloud
452
452
 
453
453
  def handle_faraday_error(error)
454
454
  resp = error.response
455
- puts resp[:body]
456
- err = if resp.respond_to? :body
457
- resp.body[:message]
458
- else
455
+ err = if resp.nil? || resp[:body].nil? || resp[:body][:message].nil?
459
456
  error.message
457
+ else
458
+ resp[:body][:message]
460
459
  end
461
460
  raise ApiError.new(message: err)
462
461
  end
data/lib/oso/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module OsoCloud
2
- VERSION = '1.4.0.dev.3'.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.dev.3
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oso Security, Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-23 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
@@ -66,7 +66,7 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '5.15'
69
- description:
69
+ description:
70
70
  email:
71
71
  - support@osohq.com
72
72
  executables: []
@@ -91,7 +91,7 @@ homepage: https://www.osohq.com/
91
91
  licenses:
92
92
  - Apache-2.0
93
93
  metadata: {}
94
- post_install_message:
94
+ post_install_message:
95
95
  rdoc_options: []
96
96
  require_paths:
97
97
  - lib
@@ -102,12 +102,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
102
102
  version: 3.0.0
103
103
  required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  requirements:
105
- - - ">"
105
+ - - ">="
106
106
  - !ruby/object:Gem::Version
107
- version: 1.3.1
107
+ version: '0'
108
108
  requirements: []
109
109
  rubygems_version: 3.2.33
110
- signing_key:
110
+ signing_key:
111
111
  specification_version: 4
112
112
  summary: Oso Cloud Ruby client
113
113
  test_files: []