Class: Kitchen::Driver::Exec

Inherits:
Base
  • Object
show all
Includes:
ShellOut
Defined in:
lib/kitchen/driver/exec.rb

Overview

Simple driver that runs commands locally. As with the proxy driver, this has no isolation in general.

Instance Attribute Summary

Attributes included from Configurable

#instance

Instance Method Summary collapse

Methods included from ShellOut

#run_command

Methods inherited from Base

#cache_directory, #doctor, #initialize, kitchen_driver_api_version, no_parallel_for, #package

Methods included from Logging

#banner, #debug, #error, #fatal, #info, #warn

Methods included from Configurable

#[], #bourne_shell?, #calculate_path, #config_keys, #diagnose, #diagnose_plugin, included, #name, #powershell_shell?, #remote_path_join, #unix_os?, #verify_dependencies, #windows_os?

Constructor Details

This class inherits a constructor from Kitchen::Driver::Base

Instance Method Details

#create(state) ⇒ Object

Creates an instance.

Parameters:

  • state (Hash)

    mutable instance and driver state

Raises:



46
47
48
49
# File 'lib/kitchen/driver/exec.rb', line 46

def create(state)
  super
  reset_instance(state)
end

#destroy(state) ⇒ Object

Destroys an instance.

Parameters:

  • state (Hash)

    mutable instance and driver state

Raises:



52
53
54
# File 'lib/kitchen/driver/exec.rb', line 52

def destroy(state)
  reset_instance(state)
end

#finalize_config!(instance) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Hack to force using the exec transport when using this driver. If someone comes up with a use case for using the driver with a different transport, please let us know.



39
40
41
42
43
# File 'lib/kitchen/driver/exec.rb', line 39

def finalize_config!(instance)
  super.tap do
    instance.transport = Kitchen::Transport::Exec.new
  end
end