Class: Kitchen::Transport::Exec::Connection

Inherits:
Base::Connection show all
Includes:
ShellOut
Defined in:
lib/kitchen/transport/exec.rb

Overview

Fake connection which just does local operations.

Since:

  • 1.19

Instance Method Summary collapse

Methods included from ShellOut

#run_command

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

Since:

  • 1.19



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.

See Also:

  • Base#upload

Since:

  • 1.19



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