ridley 1.3.1 → 1.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
  SHA1:
3
- metadata.gz: 12238b218882f651e98130c984371e19718130c9
4
- data.tar.gz: a4c23d1276e08d7c2ffaa712f4520d75e88b2c5a
3
+ metadata.gz: 13f69167901c68dc582d14374797fd9ac05a8243
4
+ data.tar.gz: dfe453c2a5f1fdf348f434f857c66ac073240dbd
5
5
  SHA512:
6
- metadata.gz: c4c44d05cd85d33218960192dc3071a83392415a20be96ed4e59d086a63b182c358e0acb69515c06aedabdf9ff58a843b3c87b69f3dddad7eca718a6f175a359
7
- data.tar.gz: 9375cd35216860793a56df9eef360508c4497d2d806458c549c36318bf425c591619c70a72df29a5679fffbd3b9075c55c1e6b6b9072cef360b63af1966ebfda
6
+ metadata.gz: 25db0db3e5d24c670389579f8247614339560eb3d783d808ee57a04b5719fe69a6876f1ca19307f8d23008782bf982fb197499ba43a70576e5b347dc3ae1d2ec
7
+ data.tar.gz: 634da3bea16715f07e06f21a01f00e937e34efb4c09f2f991dfb7e6957e4ec1f0498c67ae645d6e9cc5cf7802a45215d8534e8fbf7d86fb7a0768bd6f8e0d1d3
data/lib/ridley/errors.rb CHANGED
@@ -46,7 +46,9 @@ module Ridley
46
46
  class BootstrapError < RidleyError; end
47
47
  class ClientKeyFileNotFound < BootstrapError; end
48
48
  class EncryptedDataBagSecretNotFound < BootstrapError; end
49
- class HostConnectionError < BootstrapError; end
49
+
50
+ class HostConnectionError < RidleyError; end
51
+ class DNSResolvError < HostConnectionError; end
50
52
 
51
53
  class RemoteCommandError < RidleyError; end
52
54
  class RemoteScriptError < RemoteCommandError; end
@@ -185,7 +185,6 @@ module Ridley
185
185
  end
186
186
  end
187
187
 
188
-
189
188
  private
190
189
 
191
190
  def execute(method, host, *args)
@@ -194,6 +193,8 @@ module Ridley
194
193
  connector_for(host, options).send(method, host, *args, options)
195
194
  rescue Errors::HostConnectionError => ex
196
195
  abort(ex)
196
+ rescue Resolv::ResolvError => ex
197
+ abort Errors::DNSResolvError.new(ex)
197
198
  end
198
199
 
199
200
  # Checks to see if the given port is open for TCP connections
@@ -68,13 +68,15 @@ module Ridley
68
68
  response.exit_code = output[:exitcode]
69
69
  }
70
70
  rescue ::WinRM::WinRMHTTPTransportError => ex
71
- response.exit_code = -1
71
+ response.exit_code = :transport_error
72
72
  response.stderr = ex.message
73
73
  end
74
74
 
75
75
  case response.exit_code
76
76
  when 0
77
77
  log.info "Successfully ran WinRM command on: '#{host}' as: '#{user}'"
78
+ when :transport_error
79
+ log.info "A transport error occured while attempting to run a WinRM command on: '#{host}' as: '#{user}'"
78
80
  else
79
81
  log.info "Successfully ran WinRM command on: '#{host}' as: '#{user}', but it failed"
80
82
  end
@@ -103,6 +103,8 @@ module Ridley
103
103
  # @return [HostConnector::Response]
104
104
  def chef_run(host)
105
105
  host_commander.chef_client(host, ssh: ssh, winrm: winrm)
106
+ rescue Errors::HostConnectionError => ex
107
+ abort(ex)
106
108
  end
107
109
 
108
110
  # Puts a secret on the host using the best worker available for
@@ -1,3 +1,3 @@
1
1
  module Ridley
2
- VERSION = "1.3.1"
2
+ VERSION = "1.3.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ridley
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie Winsor
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-03 00:00:00.000000000 Z
12
+ date: 2013-07-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: addressable