rye 0.5.3 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGES.txt CHANGED
@@ -5,6 +5,14 @@ TODO
5
5
  * Fingerprints: ssh-keygen -l -f id_rsa_repos.pub
6
6
 
7
7
 
8
+ #### 0.5.4 (2009-04-22) #############################
9
+
10
+ * FIXED: Sys is now returning environment paths and home path in JRuby.
11
+ * ADDED: Better Interrupt handling
12
+ * ADDED: Rings terminal bell when asks to Continue after HostKey error.
13
+ * CHANGE: Removed require 'rubygems'
14
+
15
+
8
16
  #### 0.5.3 (2009-04-20) #############################
9
17
 
10
18
  * FIXED: Rye::Box.connect raises exceptions instead of exits
data/bin/rye CHANGED
@@ -10,7 +10,6 @@
10
10
 
11
11
  $:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
12
12
 
13
- require 'rubygems'
14
13
  require 'stringio'
15
14
  require 'yaml'
16
15
  require 'drydock'
@@ -116,7 +115,17 @@ debug :off
116
115
  # will run after Rye shuts down the ssh-agent.
117
116
  begin
118
117
  Drydock.run!(ARGV, STDIN) if Drydock.run? && !Drydock.has_run?
118
+ rescue Drydock::ArgError, Drydock::OptError=> ex
119
+ STDERR.puts ex.message
120
+ STDERR.puts ex.usage
121
+ rescue Rudy::Error => ex
122
+ STDERR.puts ex.message
119
123
  rescue => ex
120
124
  STDERR.puts "ERROR (#{ex.class.to_s}): #{ex.message}"
121
125
  STDERR.puts ex.backtrace if Drydock.debug?
126
+ rescue Interrupt
127
+ puts "#{$/}Exiting... "
128
+ exit 1
129
+ rescue SystemExit
130
+ # Don't balk
122
131
  end
data/bin/try CHANGED
@@ -10,7 +10,6 @@
10
10
 
11
11
  $:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
12
12
 
13
- require 'rubygems'
14
13
  require 'stringio'
15
14
  require 'yaml'
16
15
  require 'rye'
data/lib/rye.rb CHANGED
@@ -2,6 +2,7 @@
2
2
  require 'rubygems' unless defined? Gem
3
3
 
4
4
  require 'tempfile'
5
+ require 'logger'
5
6
  require 'net/ssh'
6
7
  require 'net/scp'
7
8
  require 'thread'
@@ -26,7 +27,7 @@ require 'sys'
26
27
  #
27
28
  # rset = Rye::Set.new("dev-machines")
28
29
  # rset.add_boxes('host1', 'host2', 'host3', 'host4')
29
- # rset.ps('aux').grep
30
+ # rset.ps('aux')
30
31
  #
31
32
  # * See +bin/try+ for a bunch of working examples.
32
33
  # * See Rye::Box#initialize for info about disabling safe-mode.
@@ -291,6 +292,7 @@ module Rye
291
292
  rescue => ex
292
293
  STDERR.puts "Error initializing the SSH Agent (is OpenSSL installed?):"
293
294
  STDERR.puts ex.message
295
+ STDERR.puts ex.backtrace
294
296
  exit 1
295
297
  end
296
298
 
data/lib/rye/box.rb CHANGED
@@ -146,7 +146,8 @@ module Rye
146
146
  rescue Net::SSH::HostKeyMismatch => ex
147
147
  STDERR.puts ex.message
148
148
  STDERR.puts "NOTE: EC2 instances generate new SSH keys on first boot."
149
- if highline.ask("Continue? ").match(/y|yes/i)
149
+ print "\a" # Ring the bell
150
+ if highline.ask("Continue? ").strip.match(/\Ay|yes|sure|ya\z/i)
150
151
  @opts[:paranoid] = false
151
152
  retry
152
153
  else
data/lib/sys.rb CHANGED
@@ -7,7 +7,7 @@ require 'socket'
7
7
  # specifically lib/platform.rb.
8
8
  class SystemInfo #:nodoc:all
9
9
  unless defined?(IMPLEMENTATIONS)
10
- VERSION = 4.freeze
10
+ VERSION = 5.freeze
11
11
  IMPLEMENTATIONS = [
12
12
 
13
13
  # These are for JRuby, System.getproperty('os.name').
@@ -121,7 +121,7 @@ class SystemInfo #:nodoc:all
121
121
  end
122
122
 
123
123
  end
124
-
124
+
125
125
  [os, impl, arch]
126
126
  end
127
127
 
@@ -244,8 +244,11 @@ class SystemInfo #:nodoc:all
244
244
  def paths
245
245
  if @os == :unix
246
246
  (ENV['PATH'] || '').split(':')
247
- elsif
248
- (ENV['PATH'] || '').split(';') # Note tested!
247
+ elsif @os == :win32
248
+ (ENV['PATH'] || '').split(';') # Not tested!
249
+ elsif @os == :java
250
+ delim = @impl == :windows ? ';' : ':'
251
+ (ENV['PATH'] || '').split(delim)
249
252
  else
250
253
  raise "paths not implemented for: #{@os}"
251
254
  end
@@ -260,6 +263,12 @@ class SystemInfo #:nodoc:all
260
263
  File.expand_path(ENV['HOME'])
261
264
  elsif @os == :win32
262
265
  File.expand_path(ENV['USERPROFILE'])
266
+ elsif @os == :java
267
+ if @impl == :windows
268
+ File.expand_path(ENV['USERPROFILE'])
269
+ else
270
+ File.expand_path(ENV['HOME'])
271
+ end
263
272
  else
264
273
  raise "paths not implemented for: #{@os}"
265
274
  end
data/rye.gemspec CHANGED
@@ -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.3"
4
+ s.version = "0.5.4"
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.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delano Mandelbaum
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-20 00:00:00 -04:00
12
+ date: 2009-04-22 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency