rye 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/CHANGES.txt +8 -1
  2. data/lib/rye/box.rb +10 -2
  3. data/rye.gemspec +1 -1
  4. metadata +1 -1
@@ -5,7 +5,14 @@ TODO
5
5
  * Fingerprints: ssh-keygen -l -f id_rsa_repos.pub
6
6
 
7
7
 
8
- #### 0.5.2 (2009-04-20) #############################
8
+ #### 0.5.3 (2009-04-20) #############################
9
+
10
+ * FIXED: Rye::Box.connect raises exceptions instead of exits
11
+ * ADDED: Rye::Box.connect now rescues HostKeyMismatch exceptions and
12
+ prompts for a response.
13
+
14
+
15
+ #### 0.5.2 (2009-04-19) #############################
9
16
 
10
17
  * FIXED: authorize-local command attempted to connect via SSH before authorizing.
11
18
 
@@ -143,6 +143,15 @@ module Rye
143
143
 
144
144
  begin
145
145
  @ssh = Net::SSH.start(@host, @opts[:user], @opts || {})
146
+ rescue Net::SSH::HostKeyMismatch => ex
147
+ STDERR.puts ex.message
148
+ STDERR.puts "NOTE: EC2 instances generate new SSH keys on first boot."
149
+ if highline.ask("Continue? ").match(/y|yes/i)
150
+ @opts[:paranoid] = false
151
+ retry
152
+ else
153
+ raise Net::SSH::HostKeyMismatch
154
+ end
146
155
  rescue Net::SSH::AuthenticationFailed => ex
147
156
  retried += 1
148
157
  if STDIN.tty? && retried <= 3
@@ -151,8 +160,7 @@ module Rye
151
160
  @opts[:auth_methods] << 'password'
152
161
  retry
153
162
  else
154
- STDERR.puts "Authentication failed."
155
- exit 0
163
+ raise Net::SSH::AuthenticationFailed
156
164
  end
157
165
  end
158
166
 
@@ -1,7 +1,7 @@
1
1
  @spec = Gem::Specification.new do |s|
2
2
  s.name = "rye"
3
3
  s.rubyforge_project = "rye"
4
- s.version = "0.5.2"
4
+ s.version = "0.5.3"
5
5
  s.summary = "Rye: Safely run SSH commands on a bunch of machines at the same time (from Ruby)."
6
6
  s.description = s.summary
7
7
  s.author = "Delano Mandelbaum"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rye
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delano Mandelbaum