rudy 0.9.8.008 → 0.9.8.009

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.txt CHANGED
@@ -12,6 +12,12 @@ Creating volume...
12
12
  (S)kip (A)bort:
13
13
 
14
14
 
15
+ #### 0.9.8.008 (2010-08-19) #######################
16
+
17
+ * ADDED: Support for Rye 0.9
18
+ * CHANGE: "rudy init" no longer authorizing SSH localhost
19
+
20
+
15
21
  #### 0.9.8.007 (2010-08-03) #######################
16
22
 
17
23
  * FIXED: Command-line arguments for routines are now passed to before and after dependencies.
data/bin/rudy CHANGED
@@ -243,10 +243,7 @@ class RudyCLI < Rudy::CLI::Base
243
243
  end
244
244
 
245
245
  user, host = Rudy.sysinfo.user, Rudy::Huxtable.global.localhost
246
-
247
- puts "Authorizing public keys for #{user}@#{host}"
248
- rbox = Rye::Box.new host
249
- rbox.authorize_keys_local
246
+
250
247
 
251
248
  rescue Rudy::AWS::SDB::NoSecretKey,
252
249
  Rudy::AWS::SDB::NoAccessKey,
@@ -64,7 +64,7 @@ module AWS; module EC2;
64
64
  opts[:id] = @option.instid if @option.instid
65
65
 
66
66
  # Options to be sent to Rye::Box
67
- rye_opts = { :user => @global.user || Rudy.sysinfo.user, :debug => nil }
67
+ rye_opts = { :user => @global.user || Rudy.sysinfo.user, :debug => nil, :info => STDOUT }
68
68
  if @@global.pkey
69
69
  raise "Cannot find file #{@@global.pkey}" unless File.exists?(@@global.pkey)
70
70
  raise InsecureKeyPermissions, @@global.pkey unless File.stat(@@global.pkey).mode == 33152
@@ -207,7 +207,7 @@ module Rudy
207
207
  end
208
208
 
209
209
  # Options to be sent to Rye::Box
210
- rye_opts = { :user => current_machine_user, :keys => [], :debug => nil }
210
+ rye_opts = { :user => current_machine_user, :keys => [], :debug => nil, :info => STDOUT }
211
211
  if File.exists? pkey
212
212
  #raise "Cannot find file #{pkey}" unless File.exists?(pkey)
213
213
  if Rudy.sysinfo.os != :windows && File.stat(pkey).mode != 33152
@@ -305,7 +305,7 @@ module Rudy
305
305
  def print_response(rap)
306
306
  # Non zero exit codes raise exceptions so
307
307
  # the erorrs have already been handled.
308
- return if rap.exit_code != 0
308
+ return if rap.exit_status != 0
309
309
 
310
310
  if @@global.parallel
311
311
  cmd, user = cmd.to_s, user.to_s
@@ -316,7 +316,7 @@ module Rudy
316
316
  end
317
317
  else
318
318
  li ' ' << rap.stdout.join("#{$/} ") if !rap.stdout.empty?
319
- colour = rap.exit_code != 0 ? :red : :normal
319
+ colour = rap.exit_status != 0 ? :red : :normal
320
320
  unless rap.stderr.empty?
321
321
  le (" STDERR " << '-'*38).color(colour).bright
322
322
  le " " << rap.stderr.join("#{$/} ").color(colour)
@@ -35,14 +35,14 @@ module Rudy; module Routines; module Handlers;
35
35
 
36
36
  private
37
37
  def print_response(rap)
38
- colour = rap.exit_code != 0 ? :red : :normal
38
+ colour = rap.exit_status != 0 ? :red : :normal
39
39
  [:stderr].each do |sumpin|
40
40
  next if rap.send(sumpin).empty?
41
41
  le
42
42
  le((" #{sumpin.to_s.upcase} " << '-'*38).color(colour).bright)
43
43
  le " " << rap.send(sumpin).join("#{$/} ").color(colour)
44
44
  end
45
- le " Exit code: #{rap.exit_code}".color(colour) if rap.exit_code != 0
45
+ le " Exit code: #{rap.exit_status}".color(colour) if rap.exit_status != 0
46
46
  end
47
47
 
48
48
  end
@@ -17,7 +17,8 @@ module Rudy::Routines::Handlers;
17
17
  :debug => false,
18
18
  :user => current_machine_user,
19
19
  :ostype => current_machine_os || :unix,
20
- :impltype => :linux
20
+ :impltype => :linux,
21
+ :info => STDOUT
21
22
  }.merge opts
22
23
 
23
24
  nickname = hostname
@@ -43,13 +44,16 @@ module Rudy::Routines::Handlers;
43
44
  end
44
45
 
45
46
  if @@global.verbose > 0 && !@@global.quiet
47
+ box.stdout_hook do |content|
48
+ li content
49
+ end
46
50
  # And this one gets called after each command method call.
47
51
  box.post_command_hook do |ret|
48
52
  print_response ret
49
53
  end
50
54
  end
51
55
 
52
- box.exception_hook(::Rye::CommandError, &rbox_exception_handler)
56
+ box.exception_hook(::Rye::Err, &rbox_exception_handler)
53
57
  box.exception_hook(Exception, &rbox_exception_handler)
54
58
 
55
59
  ## It'd better for unknown commands to be handled elsewhere
@@ -121,7 +125,7 @@ module Rudy::Routines::Handlers;
121
125
  def print_response(rap)
122
126
  # Non zero exit codes raise exceptions so
123
127
  # the erorrs have already been handled.
124
- return if rap.exit_code != 0
128
+ return if rap.exit_status != 0
125
129
 
126
130
  if @@global.parallel
127
131
  cmd, user = cmd.to_s, user.to_s
@@ -131,8 +135,7 @@ module Rudy::Routines::Handlers;
131
135
  le "#{rap.box.nickname}: " << rap.stderr.join("#{rap.box.nickname}: ")
132
136
  end
133
137
  else
134
- li ' ' << rap.stdout.join("#{$/} ") if !rap.stdout.empty?
135
- colour = rap.exit_code != 0 ? :red : :normal
138
+ colour = rap.exit_status != 0 ? :red : :normal
136
139
  unless rap.stderr.empty?
137
140
  le (" STDERR " << '-'*38).color(colour).bright
138
141
  le " " << rap.stderr.join("#{$/} ").color(colour)
@@ -145,14 +148,13 @@ module Rudy::Routines::Handlers;
145
148
  Proc.new do |ex, cmd, user, host, nickname|
146
149
  print_exception(user, host, cmd, nickname, ex)
147
150
  unless @@global.parallel
148
- choice = Annoy.get_user_input('(S)kip (R)etry (F)orce (A)bort: ', nil, 3600) || ''
151
+ choice = Annoy.get_user_input('(S)kip (R)etry (I)nteractive (A)bort: ', nil, 3600) || ''
149
152
  if choice.match(/\AS/i)
150
153
  :skip
151
154
  elsif choice.match(/\AR/i)
152
155
  :retry # Tells Rye::Box#run_command to retry
153
- elsif choice.match(/\AF/i)
154
- @@global.force = true
155
- :retry
156
+ elsif choice.match(/\AI/i)
157
+ :interactive
156
158
  else
157
159
  exit 12
158
160
  end
@@ -162,7 +164,7 @@ module Rudy::Routines::Handlers;
162
164
 
163
165
  def print_exception(user, host, cmd, nickname, ex)
164
166
  prefix = @@global.parallel ? "#{nickname}: #{cmd}: " : ""
165
- if ex.is_a?(::Rye::CommandError)
167
+ if ex.is_a?(::Rye::Err)
166
168
  le prefix << ex.message.color(:red)
167
169
  else
168
170
  le prefix << "#{ex.class}: #{ex.message}".color(:red)
@@ -68,7 +68,7 @@ module Rudy; module Routines; module Handlers;
68
68
  ### EXECUTE THE COMMANDS BLOCK
69
69
  begin
70
70
  robj.batch(argv, &proc)
71
- rescue Rye::CommandError => ex
71
+ rescue Rye::Err => ex
72
72
  # No need to bubble exception up when in parallel mode
73
73
  raise ex unless Rye::Set == robj
74
74
  ensure
data/lib/rudy.rb CHANGED
@@ -44,7 +44,7 @@ module Rudy
44
44
  MAJOR = 0.freeze
45
45
  MINOR = 9.freeze
46
46
  TINY = 8.freeze
47
- PATCH = '008'.freeze
47
+ PATCH = '009'.freeze
48
48
  end
49
49
  def self.to_s; [MAJOR, MINOR, TINY, PATCH].join('.'); end
50
50
  def self.to_f; self.to_s.to_f; end
data/rudy.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  @spec = Gem::Specification.new do |s|
2
2
  s.name = "rudy"
3
3
  s.rubyforge_project = 'rudy'
4
- s.version = "0.9.8.008"
4
+ s.version = "0.9.8.009"
5
5
  s.summary = "Rudy: Not your grandparents' EC2 deployment tool."
6
6
  s.description = s.summary
7
7
  s.author = "Delano Mandelbaum"
@@ -16,7 +16,7 @@
16
16
 
17
17
  s.executables = %w[rudy rudy-ec2 rudy-sdb rudy-s3]
18
18
 
19
- s.add_dependency 'rye', '>= 0.8.19'
19
+ s.add_dependency 'rye', '>= 0.9.0'
20
20
  s.add_dependency 'storable', '>= 0.7.1'
21
21
  s.add_dependency 'attic', '>= 0.5.2'
22
22
  s.add_dependency 'annoy', '>= 0.5.6'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rudy
3
3
  version: !ruby/object:Gem::Version
4
- hash: 55
4
+ hash: 53
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
9
  - 8
10
- - 8
11
- version: 0.9.8.008
10
+ - 9
11
+ version: 0.9.8.009
12
12
  platform: ruby
13
13
  authors:
14
14
  - Delano Mandelbaum
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-08-03 00:00:00 -04:00
19
+ date: 2010-08-19 00:00:00 -04:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -27,12 +27,12 @@ dependencies:
27
27
  requirements:
28
28
  - - ">="
29
29
  - !ruby/object:Gem::Version
30
- hash: 25
30
+ hash: 59
31
31
  segments:
32
32
  - 0
33
- - 8
34
- - 19
35
- version: 0.8.19
33
+ - 9
34
+ - 0
35
+ version: 0.9.0
36
36
  type: :runtime
37
37
  version_requirements: *id001
38
38
  - !ruby/object:Gem::Dependency