delano-rye 0.5.0 → 0.5.1
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 -1
- data/README.rdoc +1 -1
- data/bin/rye +5 -1
- data/bin/try +1 -1
- data/lib/rye.rb +3 -3
- data/lib/rye/box.rb +1 -1
- data/lib/rye/cmd.rb +1 -0
- data/lib/rye/set.rb +3 -1
- data/rye.gemspec +1 -1
- metadata +1 -1
data/CHANGES.txt
CHANGED
@@ -4,6 +4,11 @@ TODO
|
|
4
4
|
|
5
5
|
* Fingerprints: ssh-keygen -l -f id_rsa_repos.pub
|
6
6
|
|
7
|
+
|
8
|
+
#### 0.5.2 (2009-04-20) #############################
|
9
|
+
|
10
|
+
* FIXED: authorize-local command attempted to connect via SSH before authorizing.
|
11
|
+
|
7
12
|
#### 0.5.0 (2009-04-18) #############################
|
8
13
|
|
9
14
|
* ADDED: Rye::Box.switch_user
|
@@ -11,7 +16,7 @@ TODO
|
|
11
16
|
* ADDED: Rye::Box.authorize_keys_local and "rye authorize-local
|
12
17
|
* FIXED: Bug in connect which prevented key-based logins for reconnections
|
13
18
|
* FIXED: Method errors in JRuby
|
14
|
-
|
19
|
+
* FIXED: Bug in Rye::Set.add_boxes pushing nils into the list of boxes
|
15
20
|
|
16
21
|
#### 0.4.3 (2009-04-14) #############################
|
17
22
|
|
data/README.rdoc
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Safely run SSH commands on a bunch of machines at the same time (from Ruby).
|
4
4
|
|
5
|
-
Rye is similar to Rush[http://rush.heroku.com] but everything happens over SSH (no HTTP daemon) and the default settings are less powerful (for safety). For example, file globs are disabled so unless otherwise specified, you can't do this: <tt>rbox.rm('-rf', '/etc/**/*')</tt>.
|
5
|
+
Rye is similar to Rush[http://rush.heroku.com] but everything happens over SSH (no HTTP daemon) and the default settings are less powerful (for safety). For example, file globs and the "rm" command are disabled so unless otherwise specified, you can't do this: <tt>rbox.rm('-rf', '/etc/**/*')</tt>.
|
6
6
|
|
7
7
|
See the examples below (which are taken from bin/try).
|
8
8
|
|
data/bin/rye
CHANGED
@@ -19,6 +19,10 @@ require 'rye'
|
|
19
19
|
include Drydock
|
20
20
|
|
21
21
|
global :p, :path, String, "A directory containing SSH private keys or the path to a private key"
|
22
|
+
global :V, :version, "Display version number" do
|
23
|
+
puts "Rye version: #{Rye::VERSION}"
|
24
|
+
exit 0
|
25
|
+
end
|
22
26
|
|
23
27
|
before do |obj|
|
24
28
|
# Load private keys if specified
|
@@ -57,7 +61,7 @@ desc "Add your public keys to your current account on this machine"
|
|
57
61
|
command :authorize_local do |obj|
|
58
62
|
user = Rye.sysinfo.user
|
59
63
|
puts "Authorizing #{user}@localhost"
|
60
|
-
rbox = Rye::Box.new('localhost')
|
64
|
+
rbox = Rye::Box.new('localhost')
|
61
65
|
puts "Added public keys for: ", rbox.authorize_keys_local
|
62
66
|
puts "Now try: " << "ssh #{user}@localhost"
|
63
67
|
|
data/bin/try
CHANGED
@@ -110,7 +110,7 @@ rbox = Rye::Box.new
|
|
110
110
|
p rbox
|
111
111
|
|
112
112
|
rset.add_keys('/private/key/path') # For passwordless logins
|
113
|
-
rset.add_boxes(rbox, '
|
113
|
+
rset.add_boxes(rbox, '127.0.0.1') # Add boxes as hostnames or objects
|
114
114
|
|
115
115
|
# Calling methods on Rye::Set objects is very similar to calling them on
|
116
116
|
# Rye::Box objects. In fact, it's identical:
|
data/lib/rye.rb
CHANGED
@@ -18,9 +18,9 @@ require 'sys'
|
|
18
18
|
#
|
19
19
|
# Rye is similar to Rush[http://rush.heroku.com] but everything
|
20
20
|
# happens over SSH (no HTTP daemon) and the default settings are
|
21
|
-
# less dangerous (for safety). For example, file globs
|
22
|
-
# disabled so unless otherwise specified, you
|
23
|
-
# <tt>rbox.rm('/etc/**/*')</tt>.
|
21
|
+
# less dangerous (for safety). For example, file globs and the
|
22
|
+
# "rm" command are disabled so unless otherwise specified, you
|
23
|
+
# can't do this: <tt>rbox.rm('/etc/**/*')</tt>.
|
24
24
|
#
|
25
25
|
# However, you can do this:
|
26
26
|
#
|
data/lib/rye/box.rb
CHANGED
@@ -384,7 +384,7 @@ module Rye
|
|
384
384
|
# preview_command and returns: [cmd, args]
|
385
385
|
def prep_args(*args)
|
386
386
|
args = args.flatten.compact
|
387
|
-
args = args.first.split(/\s+/) if args.size == 1
|
387
|
+
args = args.first.to_s.split(/\s+/) if args.size == 1
|
388
388
|
cmd = args.shift
|
389
389
|
|
390
390
|
# Symbols to switches. :l -> -l, :help -> --help
|
data/lib/rye/cmd.rb
CHANGED
@@ -58,6 +58,7 @@ module Rye;
|
|
58
58
|
def umount(*args); cmd("umount", args); end
|
59
59
|
def uptime(*args); cmd("uptime", args); end
|
60
60
|
def python(*args); cmd('python', args); end
|
61
|
+
def history(*args); cmd('history', args); end
|
61
62
|
def printenv(*args); cmd('printenv', args); end
|
62
63
|
def hostname(*args); cmd('hostname', args); end
|
63
64
|
|
data/lib/rye/set.rb
CHANGED
@@ -48,7 +48,9 @@ module Rye
|
|
48
48
|
def add_box(*boxes)
|
49
49
|
boxes = boxes.flatten.compact
|
50
50
|
@boxes += boxes.collect do |box|
|
51
|
-
box.is_a?(
|
51
|
+
b = box.is_a?(String) ? Rye::Box.new(box, @opts) : box
|
52
|
+
b.add_keys(@keys)
|
53
|
+
b
|
52
54
|
end
|
53
55
|
self
|
54
56
|
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.
|
4
|
+
s.version = "0.5.1"
|
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"
|