rye 0.8.13 → 0.8.14
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 +6 -2
- data/bin/rye +12 -14
- data/lib/rye.rb +1 -1
- data/lib/rye/box.rb +5 -3
- data/rye.gemspec +1 -1
- metadata +2 -2
data/CHANGES.txt
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
RYE, CHANGES
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
#### 0.8.14 (2010-02-25) #############################
|
|
4
|
+
|
|
5
|
+
* FIXED: rye authorize command now logs in to grab the actual homedir.
|
|
6
|
+
* CHANGED: Support user@host syntax for rye authorize command
|
|
7
|
+
|
|
4
8
|
|
|
5
9
|
#### 0.8.13 (2010-02-12) #############################
|
|
6
10
|
|
|
7
|
-
* CHANGE: Remove hanna dependency
|
|
11
|
+
* CHANGE: Remove hanna dependency [Diego Elio 'Flameeyes' Pettenò]
|
|
8
12
|
|
|
9
13
|
#### 0.8.12 (2010-01-16) #############################
|
|
10
14
|
|
data/bin/rye
CHANGED
|
@@ -51,24 +51,22 @@ command :ssh do |obj|
|
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
about "Add your public keys to one or more remote machines"
|
|
54
|
-
usage "rye authorize [
|
|
55
|
-
option :u, :user, String, "Username"
|
|
54
|
+
usage "rye authorize [username@]host"
|
|
56
55
|
argv :hostname
|
|
57
56
|
command :authorize do |obj|
|
|
58
57
|
raise "You must specify a host" unless obj.argv.hostname
|
|
59
|
-
user = Rye.sysinfo.user
|
|
60
|
-
|
|
61
|
-
opts = { :debug => nil, :auth_methods => %w(publickey hostbased) }
|
|
62
|
-
opts[:user] = obj.option.user if obj.option.user
|
|
63
|
-
opts[:user] ||= user
|
|
64
|
-
|
|
65
58
|
obj.argv.each do |hostname|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
59
|
+
if hostname.index('@')
|
|
60
|
+
user, host = *hostname.split('@')
|
|
61
|
+
else
|
|
62
|
+
user, host = user = Rye.sysinfo.user, hostname
|
|
63
|
+
end
|
|
64
|
+
opts = { :debug => nil, :user => user, :auth_methods => %w(publickey hostbased) }
|
|
65
|
+
puts "Authorizing #{user}@#{host}"
|
|
66
|
+
rbox = Rye::Box.new(host, opts)
|
|
67
|
+
rbox.authorize_keys_remote
|
|
68
|
+
puts "Added public keys for: ", Rye.keys
|
|
69
|
+
puts "Now try: " << "ssh #{user}@#{host}"
|
|
72
70
|
end
|
|
73
71
|
|
|
74
72
|
end
|
data/lib/rye.rb
CHANGED
data/lib/rye/box.rb
CHANGED
|
@@ -362,7 +362,8 @@ module Rye
|
|
|
362
362
|
elsif ostmp == "windows"
|
|
363
363
|
user_defaults['HOME'] = 'C:/Documents and Settings'
|
|
364
364
|
else
|
|
365
|
-
raw = self.quietly { useradd(:D) } rescue [
|
|
365
|
+
raw = self.quietly { useradd(:D) } rescue []
|
|
366
|
+
raw = ["HOME=/home"] if raw.nil? || raw.empty?
|
|
366
367
|
raw.each do |nv|
|
|
367
368
|
n, v = nv.scan(/\A([\w_-]+?)=(.+)\z/).flatten
|
|
368
369
|
user_defaults[n] = v
|
|
@@ -390,7 +391,8 @@ module Rye
|
|
|
390
391
|
|
|
391
392
|
# The homedir path is important b/c this is where we're going to
|
|
392
393
|
# look for the .ssh directory. That's where auth love is stored.
|
|
393
|
-
homedir = self.
|
|
394
|
+
homedir = self.quietly { pwd }.first
|
|
395
|
+
homedir ||= self.guess_user_home(this_user)
|
|
394
396
|
|
|
395
397
|
unless self.file_exists?(homedir)
|
|
396
398
|
rap.add_exit_code(1)
|
|
@@ -401,7 +403,7 @@ module Rye
|
|
|
401
403
|
# Let's go into the user's home directory that we now know exists.
|
|
402
404
|
self.cd homedir
|
|
403
405
|
|
|
404
|
-
files = ['.ssh/authorized_keys', '.ssh/authorized_keys2']
|
|
406
|
+
files = ['.ssh/authorized_keys', '.ssh/authorized_keys2', '.ssh/identity']
|
|
405
407
|
files.each do |akey_path|
|
|
406
408
|
if self.file_exists?(akey_path)
|
|
407
409
|
# TODO: Make Rye::Cmd.incremental_backup
|
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.8.
|
|
4
|
+
s.version = "0.8.14"
|
|
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.8.
|
|
4
|
+
version: 0.8.14
|
|
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: 2010-02-
|
|
12
|
+
date: 2010-02-25 00:00:00 -05:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|