Class Rake::SshFilePublisher
In: lib/rake/contrib/sshpublisher.rb
Parent: Object

Publish a list of files to an existing remote directory.

Methods

new   upload  

Public Class methods

Create a publisher using the give host information.

[Source]

    # File lib/rake/contrib/sshpublisher.rb, line 33
33:     def initialize(host, remote_dir, local_dir, *files)
34:       @host = host
35:       @remote_dir = remote_dir
36:       @local_dir = local_dir
37:       @files = files
38:     end

Public Instance methods

Upload the local directory to the remote directory.

[Source]

    # File lib/rake/contrib/sshpublisher.rb, line 41
41:     def upload
42:       @files.each do |fn|
43:         sh %{scp -q #{@local_dir}/#{fn} #{@host}:#{@remote_dir}}
44:       end
45:     end

[Validate]