class Rake::SshFilePublisher
Publish a list of files to an existing remote directory.
Public Class Methods
Source
# File lib/rake/contrib/sshpublisher.rb 31 def initialize(host, remote_dir, local_dir, *files) 32 @host = host 33 @remote_dir = remote_dir 34 @local_dir = local_dir 35 @files = files 36 end
Create a publisher using the give host information.
Public Instance Methods
Source
# File lib/rake/contrib/sshpublisher.rb 39 def upload 40 @files.each do |fn| 41 sh %{scp -q #{@local_dir}/#{fn} #{@host}:#{@remote_dir}} 42 end 43 end
Upload the local directory to the remote directory.