Class SshFilePublisher
In: lib/rake/contrib/publisher.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/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 the local directory to the remote directory.

[Source]

    # 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

[Validate]