One way of doing it would be to the code below in a file called
put_file.rb:
Capistrano::Configuration.instance(:must_exist).load do
# A saner put replacement that doesn't read the whole file into
memory...
def put_file(path, remote_path, options = {})
execute_on_servers(options) do |servers|
servers.each do |server|
logger.info "uploading #{File.basename(path)} to #{server}"
sftp = sessions[server].sftp
sftp.connect unless sftp.state == :open
sftp.put_file path, remote_path
logger.debug "done uploading #{File.basename(path)} to
#{server}"
end
end
end
end
...then in your capfile ...
require 'put_file'
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---