Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

use default user instead of assuming root

  • Loading branch information...
commit 376e78ab4fb6a28be210ea3002a39f65765e2b04 1 parent 8f40380
@delano delano authored
View
4 CHANGES.txt
@@ -12,6 +12,10 @@ Creating volume...
(S)kip (A)bort:
+#### 0.9.8.013 (2010-09-02) #######################
+
+* ADDED: use default user instead of assuming root
+
#### 0.9.8.012 (2010-09-02) #######################
* ADDED: rudy-sdb objects --destroy
View
2  lib/rudy.rb
@@ -44,7 +44,7 @@ module VERSION #:nodoc:
MAJOR = 0.freeze
MINOR = 9.freeze
TINY = 8.freeze
- PATCH = '012'.freeze
+ PATCH = '013'.freeze
end
def self.to_s; [MAJOR, MINOR, TINY, PATCH].join('.'); end
def self.to_f; self.to_s.to_f; end
View
6 lib/rudy/huxtable.rb
@@ -81,6 +81,9 @@ def config_dirname
base_dir
end
+ def default_user
+ @@config.defaults.user || 'root'
+ end
# Returns the name of the current keypair for the given user.
# If there's a private key path in the config this will return
@@ -89,12 +92,13 @@ def config_dirname
# name: <tt>key-ZONE-ENV-ROLE-USER</tt>. Or if this the user is
# root: <tt>key-ZONE-ENV-ROLE</tt>
def user_keypairname(user=nil)
+ p default_user
user ||= current_machine_user
path = defined_keypairpath user
if path
Huxtable.keypair_path_to_name(path)
else
- n = (user.to_s == 'root') ? '' : "-#{user}"
+ n = (user.to_s == default_user) ? '' : "-#{user}"
"key-%s-%s%s" % [@@global.zone, current_machine_group, n]
end
end
View
2  rudy.gemspec
@@ -1,7 +1,7 @@
@spec = Gem::Specification.new do |s|
s.name = "rudy"
s.rubyforge_project = 'rudy'
- s.version = "0.9.8.012"
+ s.version = "0.9.8.013"
s.summary = "Rudy: Not your grandparents' EC2 deployment tool."
s.description = s.summary
s.author = "Delano Mandelbaum"
Please sign in to comment.
Something went wrong with that request. Please try again.