class SshFilePublisher
Publish a list of files to an existing remote directory.
Public Class Methods
Source
# File lib/rake/contrib/publisher.rb 56 def initialize(host, remote_dir, local_dir, *files) 57 @host = host 58 @remote_dir = remote_dir 59 @local_dir = local_dir 60 @files = files 61 end
Create a publisher using the give host information.
Public Instance Methods
Source
# File lib/rake/contrib/publisher.rb 64 def upload 65 @files.each do |fn| 66 run %{scp -q #{@local_dir}/#{fn} #{@host}:#{@remote_dir}} 67 end 68 end
Upload the local directory to the remote directory.