Class: Kitchen::Provisioner::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/kitchen/helpers.rb

Instance Method Summary collapse

Instance Method Details

#create_sandboxObject



111
112
113
114
115
# File 'lib/kitchen/helpers.rb', line 111

def create_sandbox
  info("Creating local sandbox in #{sandbox_path}")
  FileUtils.mkdir_p(sandbox_path)
  File.chmod(0755, sandbox_path)
end

#instance_nameObject



121
122
123
124
# File 'lib/kitchen/helpers.rb', line 121

def instance_name
  prefix = (Digest::SHA2.hexdigest FileUtils.pwd)[0, 10]
  "#{prefix}-#{instance.name}"
end

#sandbox_pathObject



117
118
119
# File 'lib/kitchen/helpers.rb', line 117

def sandbox_path
  "#{Dir.home}/.dokken/sandbox/#{instance_name}"
end