lib/fulmar/infrastructure/service/copy_service.rb in fulmar-1.8.1 vs lib/fulmar/infrastructure/service/copy_service.rb in fulmar-1.8.2
- old
+ new
@@ -7,21 +7,21 @@
# @param [Fulmar::Infrastructue::Service::ShellService] shell
# @param [String] local_file local filename, should be absolute
# @param [String] remote_host SSH hostname
# @param [String] remote_dir remote directory
def self.upload(shell, local_file, remote_host, remote_dir)
- if shell.run "scp -r #{local_file} #{remote_host}:#{remote_dir.chomp('/')}/"
+ if shell.run "scp -Cr #{local_file} #{remote_host}:#{remote_dir.chomp('/')}/"
"#{remote_dir.chomp('/')}/#{File.basename(local_file)}"
end
end
# Downloads a file from a remote server
# @param [Fulmar::Infrastructue::Service::ShellService] shell
# @param [String] remote_host SSH hostname
# @param [String] remote_file remote directory
# @param [String] local_dir local filename, should be absolute
def self.download(shell, remote_host, remote_file, local_dir = '.')
- if shell.run "scp -r #{remote_host}:#{remote_file} #{local_dir.chomp('/')}/"
+ if shell.run "scp -Cr #{remote_host}:#{remote_file} #{local_dir.chomp('/')}/"
"#{local_dir.chomp('/')}/#{File.basename(remote_file)}"
end
end
end
end