rye 0.8.16 → 0.8.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/CHANGES.txt +7 -0
  2. data/lib/rye.rb +1 -1
  3. data/lib/rye/box.rb +15 -7
  4. data/rye.gemspec +1 -1
  5. metadata +1 -1
data/CHANGES.txt CHANGED
@@ -1,10 +1,17 @@
1
1
  RYE, CHANGES
2
2
 
3
+ #### 0.8.17 (2010-05-19) #############################
4
+
5
+ * FIXED: authorize_keys_remote was using incorrect home directory
6
+ * CHANGE: More descriptive output for file transfers
7
+
8
+
3
9
  #### 0.8.16 (2010-05-19) #############################
4
10
 
5
11
  * ADDED: Updated whitelist: hg, ab, siege, stella, ln, su
6
12
  * CHANGE: file transfers now print the file path to STDOUT unless in quiet mode
7
13
 
14
+
8
15
  #### 0.8.15 (2010-03-29) #############################
9
16
 
10
17
  * FIXED: "rake" was mapped to "sudo". Closes GH-8 [mjmsmith]
data/lib/rye.rb CHANGED
@@ -42,7 +42,7 @@ require 'esc'
42
42
  module Rye
43
43
  extend self
44
44
 
45
- VERSION = "0.8.16".freeze unless defined?(VERSION)
45
+ VERSION = "0.8.17".freeze unless defined?(VERSION)
46
46
 
47
47
  @@sysinfo = nil
48
48
  @@agent_env = Hash.new # holds ssh-agent env vars
data/lib/rye/box.rb CHANGED
@@ -383,17 +383,21 @@ module Rye
383
383
  # of Rye::Box in a multithreaded situation.
384
384
  #
385
385
  def authorize_keys_remote(other_user=nil)
386
- this_user = other_user || opts[:user]
386
+ if other_user.nil?
387
+ this_user = opts[:user]
388
+ homedir = self.quietly { pwd }.first
389
+ else
390
+ this_user = other_user
391
+ # The homedir path is important b/c this is where we're going to
392
+ # look for the .ssh directory. That's where auth love is stored.
393
+ homedir = self.guess_user_home(this_user)
394
+ end
395
+
387
396
  added_keys = []
388
397
  rap = Rye::Rap.new(self)
389
398
 
390
399
  prevdir = self.current_working_directory
391
400
 
392
- # The homedir path is important b/c this is where we're going to
393
- # look for the .ssh directory. That's where auth love is stored.
394
- homedir = self.quietly { pwd }.first
395
- homedir ||= self.guess_user_home(this_user)
396
-
397
401
  unless self.file_exists?(homedir)
398
402
  rap.add_exit_code(1)
399
403
  rap.add_stderr("Path does not exist: #{homedir}")
@@ -986,7 +990,11 @@ module Rye
986
990
  files.each do |file|
987
991
  debug file.to_s
988
992
  prev = ""
989
- STDOUT.puts "transfering #{file}" unless @rye_quiet
993
+ unless @rye_quiet
994
+ tmp_file = file.is_a?(StringIO) ? '<string>' : file
995
+ tmp_target = target.is_a?(StringIO) ? '<string>' : target
996
+ STDOUT.puts "[#{direction}] #{tmp_file} #{tmp_target}"
997
+ end
990
998
  transfers << scp.send(direction, file, target, :recursive => recursive) do |ch, n, s, t|
991
999
  line = "%-50s %6d/%-6d bytes" % [n, s, t]
992
1000
  spaces = (prev.size > line.size) ? ' '*(prev.size - line.size) : ''
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.16"
4
+ s.version = "0.8.17"
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.16
4
+ version: 0.8.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delano Mandelbaum