Class: Kitchen::Transport::Exec::Connection
- Inherits:
-
Base::Connection
- Object
- Base::Connection
- Kitchen::Transport::Exec::Connection
- Includes:
- ShellOut
- Defined in:
- lib/kitchen/transport/exec.rb
Overview
Fake connection which just does local operations.
Instance Method Summary collapse
- #execute(command) ⇒ Object
-
#upload(locals, remote) ⇒ Object
“Upload” the files by copying them locally.
Methods included from ShellOut
Methods inherited from Base::Connection
#close, #download, #execute_with_retry, #initialize, #login_command, #retry?, #wait_until_ready
Methods included from Logging
#banner, #debug, #error, #fatal, #info, #warn
Constructor Details
This class inherits a constructor from Kitchen::Transport::Base::Connection
Instance Method Details
#execute(command) ⇒ Object
40 41 42 43 44 |
# File 'lib/kitchen/transport/exec.rb', line 40 def execute(command) return if command.nil? run_command(command) end |
#upload(locals, remote) ⇒ Object
“Upload” the files by copying them locally.
49 50 51 52 53 54 |
# File 'lib/kitchen/transport/exec.rb', line 49 def upload(locals, remote) FileUtils.mkdir_p(remote) Array(locals).each do |local| FileUtils.cp_r(local, remote) end end |