manageiq-api-client 0.3.1 → 0.3.2

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: 50deacbf04bb1011a36552fe87b330679ead5c049171284b58185cab76eb3b91
4
- data.tar.gz: 34538f3981ceb4559ae60da6bd7970d8d0e8a62fb61928b7cafe5d91716a256f
3
+ metadata.gz: b81e35239ac5453ad0baf61f8818b8cbe8278297fdb309ec0a54acea03209b11
4
+ data.tar.gz: e636fa3ed03a4003b04810fda2475a67f27620f15a8fcc3db5bdd3a8be9631c9
5
5
  SHA512:
6
- metadata.gz: ac7e70a1f2cb256b63a88ef008f9209e29de360262ed36e655121c11d2efd58ce2fc4e351bb8889724405650f38e0c7345f093c6455532b0afa3602370957196
7
- data.tar.gz: 7e78e7028b71d80f4acf116aed2a3996a4106d1eed3bc7ca5288ab617d3f24152258b4ed8a0805a4a9bf246bc8ad01416b77ee8854bf4dc357cbf65b8d0ed067
6
+ metadata.gz: b8d2c425f6b56dcd908f114f520774911a52078b453b3b7b4dc908cff0b47695c3ab597143dec6937316071cdca977f817412ab7b40d34917f295c4a5ad3d2bb
7
+ data.tar.gz: 43b17b91db796a1e77787fa749f911eade4afa9f538a1ab78b7c0ad32310f4708610f20fbad4743acbcd760887b5c60dd03d3680be45433dba249c4d6e55133b
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.3.2] - 2018-11-08
10
+
11
+ ### Fixed
12
+ - Raise a ResourceNotFound error when response is a 404 [[#84](https://github.com/ManageIQ/manageiq-api-client/pull/84)]
13
+
9
14
  ## [0.3.1] - 2018-08-06
10
15
 
11
16
  ### Fixed
@@ -39,8 +44,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
39
44
  - Add CHANGELOG.md
40
45
  - Update README with simple instructions reflecting the query interface.
41
46
 
42
- [Unreleased]: https://github.com/ManageIQ/manageiq-api-client/compare/v0.3.1...HEAD
43
- [0.3.0]: https://github.com/ManageIQ/manageiq-api-client/compare/v0.3.0...v0.3.1
47
+ [Unreleased]: https://github.com/ManageIQ/manageiq-api-client/compare/v0.3.2...HEAD
48
+ [0.3.2]: https://github.com/ManageIQ/manageiq-api-client/compare/v0.3.1...v0.3.2
49
+ [0.3.1]: https://github.com/ManageIQ/manageiq-api-client/compare/v0.3.0...v0.3.1
44
50
  [0.3.0]: https://github.com/ManageIQ/manageiq-api-client/compare/v0.2.0...v0.3.0
45
51
  [0.2.0]: https://github.com/ManageIQ/manageiq-api-client/compare/v0.1.1...v0.2.0
46
52
  [0.1.1]: https://github.com/ManageIQ/manageiq-api-client/compare/v0.1.0...v0.1.1
@@ -103,7 +103,10 @@ module ManageIQ
103
103
  end
104
104
 
105
105
  def check_response
106
- if response.status >= 400
106
+ if response.status == 404
107
+ message = json_response.fetch_path("error", "message") || json_response["error"]
108
+ raise ManageIQ::API::Client::ResourceNotFound, message
109
+ elsif response.status >= 400
107
110
  @error = ManageIQ::API::Client::Error.new(response.status, json_response)
108
111
  raise @error.message
109
112
  end
@@ -1,7 +1,7 @@
1
1
  module ManageIQ
2
2
  module API
3
3
  class Client
4
- VERSION = "0.3.1".freeze
4
+ VERSION = "0.3.2".freeze
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: manageiq-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alberto Bellotti
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-08-06 00:00:00.000000000 Z
12
+ date: 2018-11-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler