rye 0.9.6 → 0.9.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,15 @@
1
1
  RYE, CHANGES
2
2
 
3
+ #### 0.9.7 (2012-07-06) #############################
4
+
5
+ * FIXED: STDERR output was printing to STDOUT in one case (Thanks rrepen)
6
+ * FIXED: Pass options from Set to Box
7
+ * ADDED: Feature/raise auth failure if publickey only [Dan Richert]
8
+
9
+
3
10
  #### 0.9.6 (2012-05-10) #############################
4
11
 
5
- * Added: Feature/capture parallel set exceptions [Dan Richert]
12
+ * ADDED: Feature/capture parallel set exceptions [Dan Richert]
6
13
 
7
14
  #### 0.9.5 (2012-01-05) #############################
8
15
 
data/lib/rye.rb CHANGED
@@ -43,7 +43,7 @@ require 'esc'
43
43
  module Rye
44
44
  extend self
45
45
 
46
- VERSION = "0.9.6".freeze unless defined?(VERSION)
46
+ VERSION = "0.9.7".freeze unless defined?(VERSION)
47
47
 
48
48
  @@sysinfo = nil
49
49
  @@agent_env = Hash.new # holds ssh-agent env vars
@@ -677,10 +677,16 @@ module Rye
677
677
  rescue Net::SSH::AuthenticationFailed => ex
678
678
  print "\a" if retried == 0 && @rye_info # Ring the bell once
679
679
  retried += 1
680
- if STDIN.tty? && retried <= 3
680
+
681
+ @rye_opts[:auth_methods] ||= []
682
+
683
+ # Raise Net::SSH::AuthenticationFailed if publickey is the
684
+ # only auth method
685
+ if @rye_opts[:auth_methods] == ["publickey"]
686
+ raise Net::SSH::AuthenticationFailed
687
+ elsif STDIN.tty? && retried <= 3
681
688
  STDERR.puts "Passwordless login failed for #{@rye_user}"
682
689
  @rye_opts[:password] = highline.ask("Password: ") { |q| q.echo = '' }.strip
683
- @rye_opts[:auth_methods] ||= []
684
690
  @rye_opts[:auth_methods].push *['keyboard-interactive', 'password']
685
691
  retry
686
692
  else
@@ -1091,7 +1097,7 @@ module Rye
1091
1097
  end
1092
1098
  channel.on_process {
1093
1099
  channel[:handler] = :on_process
1094
- print channel[:stderr].read if channel[:stderr].available > 0
1100
+ STDERR.print channel[:stderr].read if channel[:stderr].available > 0
1095
1101
  begin
1096
1102
  send("state_#{channel[:state]}", channel) unless channel[:state].nil?
1097
1103
  rescue Interrupt
@@ -41,9 +41,9 @@ module Rye
41
41
 
42
42
  @parallel = @opts.delete(:parallel) # Rye::Box doesn't have :parallel
43
43
 
44
- @safe = @opts.delete(:safe)
45
- @debug = @opts.delete(:debug)
46
- @error = @opts.delete(:error)
44
+ @safe = @opts[:safe]
45
+ @debug = @opts[:debug]
46
+ @error = @opts[:error]
47
47
 
48
48
  @opts[:keys] = [@opts[:keys]].flatten.compact
49
49
 
@@ -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.9.6"
4
+ s.version = "0.9.7"
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.9.6
4
+ version: 0.9.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-10 00:00:00.000000000 Z
12
+ date: 2012-07-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: annoy
@@ -134,7 +134,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
134
134
  version: '0'
135
135
  segments:
136
136
  - 0
137
- hash: 614630044624283309
137
+ hash: -1540559610647947478
138
138
  required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  none: false
140
140
  requirements:
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  version: '0'
144
144
  segments:
145
145
  - 0
146
- hash: 614630044624283309
146
+ hash: -1540559610647947478
147
147
  requirements: []
148
148
  rubyforge_project: rye
149
149
  rubygems_version: 1.8.22