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 58 58: def initialize(host, remote_dir, local_dir, *files) 59: @host = host 60: @remote_dir = remote_dir 61: @local_dir = local_dir 62: @files = files 63: end
Public Instance methods |
upload() |
Upload the local directory to the remote directory.
# File lib/rake/contrib/publisher.rb, line 66 66: def upload 67: @files.each do |fn| 68: run %{scp -q #{@local_dir}/#{fn} #{@host}:#{@remote_dir}} 69: end 70: end