class SshDirPublisher

Publish an entire directory to an existing remote directory using SSH.

Public Class Methods

new(host, remote_dir, local_dir) click to toggle source
   # File lib/rake/contrib/publisher.rb
33 def initialize(host, remote_dir, local_dir)
34   @host = host
35   @remote_dir = remote_dir
36   @local_dir = local_dir
37 end

Public Instance Methods

upload() click to toggle source
   # File lib/rake/contrib/publisher.rb
39 def upload
40   run %{scp -rq #{@local_dir}/* #{@host}:#{@remote_dir}}
41 end