Class: Kitchen::Platform::Localhost

Inherits:
Kitchen::Platform show all
Includes:
Localhost::ShellOut
Defined in:
lib/kitchen/platform/localhost.rb

Overview

A customized platform class that figures out on its own whether we’re on a Windows or *nix system, rather than relying on platform name.

Author:

Instance Method Summary collapse

Methods included from Localhost::ShellOut

#cp_r, #mkdir_p, #rm_rf, #run_command, #run_command_psh, #run_command_sh, #windows_os?

Constructor Details

#initialize(options = {}) ⇒ Localhost

Figure out automatically whether localhost is a Windows or *nix system.

(see Platform#initialize)



38
39
40
41
42
43
44
# File 'lib/kitchen/platform/localhost.rb', line 38

def initialize(options = {})
  if windows_os?
    options[:os_type] = 'windows'
    options[:shell_type] = 'powershell'
  end
  super(options)
end