Class: Rake::SshDirPublisher
Overview
Publish an entire directory to an existing remote directory using SSH.
Instance Method Summary (collapse)
-
- (SshDirPublisher) initialize(host, remote_dir, local_dir)
constructor
A new instance of SshDirPublisher.
- - (Object) upload
Constructor Details
- (SshDirPublisher) initialize(host, remote_dir, local_dir)
A new instance of SshDirPublisher
8 9 10 11 12 |
# File 'lib/rake/contrib/sshpublisher.rb', line 8 def initialize(host, remote_dir, local_dir) @host = host @remote_dir = remote_dir @local_dir = local_dir end |
Instance Method Details
- (Object) upload
14 15 16 |
# File 'lib/rake/contrib/sshpublisher.rb', line 14 def upload sh %{scp -rq #{@local_dir}/* #{@host}:#{@remote_dir}} end |