ansible_tower_client 0.6.0 → 0.7.0

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
  SHA1:
3
- metadata.gz: f98b1405077eafacead17dc58b4ee20535e263dd
4
- data.tar.gz: 9a1043e6af5bd81554f5c1f499b2b0a5b5bd7265
3
+ metadata.gz: e2b438274799e4bc69b5f9ce2be050c74034276a
4
+ data.tar.gz: b072f2691bad73e981d524aedb6cb99cc324a8f4
5
5
  SHA512:
6
- metadata.gz: c7ed7d56555c0b60b8590d5455eba86aa53ca65c083b3ebd331acd1c627dbe99b38f06a99782d8e9d7c7cb9b9f16cd103fca955bf3996b6cc626d6d497a3f19e
7
- data.tar.gz: 807c37a2d965f77c1f9ddbe0cec24e7c26ba2f5c53f48b9b37d4b710e1bdbc95747c59425117a62731474952c32399c1dbacd8f28ab778a96fb3a2de9f048c5e
6
+ metadata.gz: c8232e3ed966adec4df39287144cba67a5a4d05519c4ee513ea04f9f7e68c3fcf24c2bcd8a5889796d87d1d0115480e5206ac15e7593a22982b84a4089e56f35
7
+ data.tar.gz: c628f635fed2035683b8ed1fccd428544d7f939a422ae02d84e09c71d61d5e2e5e57be1b0ea6d3018cf0f23893c91172e3e2cd2cc852875a6244fe9df832af7a
data/CHANGELOG.md CHANGED
@@ -3,6 +3,11 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## [0.7.0] - 2017-02-17
7
+ ### Changed
8
+ - Rescue Faraday errors and re-brand them as AnsibleTowerClient Errors [(#71)](https://github.com/ansible/ansible_tower_client_ruby/pull/71)
9
+
10
+
6
11
  ## [0.6.0] - 2017-02-02
7
12
  ### Added
8
13
  - Refactor `#endpoint` [(#64)](https://github.com/ansible/ansible_tower_client_ruby/pull/64)
@@ -78,8 +78,10 @@ module AnsibleTowerClient
78
78
  else
79
79
  super
80
80
  end
81
- rescue Faraday::ConnectionFailed, Faraday::SSLError => err
82
- raise
81
+ rescue Faraday::ConnectionFailed => err
82
+ raise AnsibleTowerClient::ConnectionError, err
83
+ rescue Faraday::SSLError => err
84
+ raise AnsibleTowerClient::SSLError, err
83
85
  rescue Faraday::ClientError => err
84
86
  raise if err.response.nil?
85
87
  response = err.response
@@ -1,7 +1,10 @@
1
1
  module AnsibleTowerClient
2
- class Error < Exception; end
3
- class ClientError < Error; end
4
- class ConnectionError < Error; end
2
+ class Error < Exception; end
3
+ class ClientError < Error; end
5
4
  class NoMethodError < Error; end
6
- class UnlicensedFeatureError < Error; end
5
+
6
+ class ConnectionError < ClientError; end
7
+ class ResourceNotFoundError < ClientError; end
8
+ class SSLError < ClientError; end
9
+ class UnlicensedFeatureError < ClientError; end
7
10
  end
@@ -8,10 +8,10 @@ module AnsibleTowerClient
8
8
  when 402
9
9
  raise AnsibleTowerClient::UnlicensedFeatureError
10
10
  when 404
11
- raise Faraday::Error::ResourceNotFound, response_values(env)
11
+ raise AnsibleTowerClient::ResourceNotFoundError, response_values(env)
12
12
  when 407
13
13
  # mimic the behavior that we get with proxy requests with HTTPS
14
- raise Faraday::Error::ConnectionFailed, %(407 "Proxy Authentication Required ")
14
+ raise AnsibleTowerClient::ConnectionError, %(407 "Proxy Authentication Required ")
15
15
  when CLIENT_ERROR_STATUSES
16
16
  raise AnsibleTowerClient::ClientError, env.body
17
17
  end
@@ -1,3 +1,3 @@
1
1
  module AnsibleTowerClient
2
- VERSION = "0.6.0".freeze
2
+ VERSION = "0.7.0".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ansible_tower_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Dunne
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-02-02 00:00:00.000000000 Z
12
+ date: 2017-02-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport