Class: Kitchen::Transport::SshTgz::Connection
- Inherits:
-
Kitchen::Transport::Ssh::Connection
- Object
- Kitchen::Transport::Ssh::Connection
- Kitchen::Transport::SshTgz::Connection
- Defined in:
- lib/kitchen/transport/ssh_tgz.rb
Overview
Manage a connection for the SshTgz transport mechanism. This is essentially the same as for the Ssh::Connection class, except we compress before uploading.
Instance Method Summary collapse
Instance Method Details
#upload(locals, remote) ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/kitchen/transport/ssh_tgz.rb', line 62 def upload(locals, remote) # dirty work-around when this transport is used to push the "install script" if Array(locals).length == 1 super return end # attempt tar-gzip upload, to improve performance. return if Array(locals).empty? || upload_via_tgz(Array(locals), remote) # if tgz upload fails (e.g. not supported on target platform), fall back to # file-by-file upload. logger.warn("Tgz upload failed. Resorting to file-by-file upload.") super end |