|
Class SshFilePublisher |
|
Publish a list of files to an existing remote directory.
| Methods |
| Public Class methods |
| new(host, remote_dir, local_dir, *files) |
Create a publisher using the give host information.
# File lib/rake/contrib/publisher.rb, line 62
62: def initialize(host, remote_dir, local_dir, *files)
63: @host = host
64: @remote_dir = remote_dir
65: @local_dir = local_dir
66: @files = files
67: end
| Public Instance methods |
| upload() |
Upload the local directory to the remote directory.
# File lib/rake/contrib/publisher.rb, line 70
70: def upload
71: @files.each do |fn|
72: run %{scp -q #{@local_dir}/#{fn} #{@host}:#{@remote_dir}}
73: end
74: end