Class: Kitchen::Provisioner::Base

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

Instance Method Summary collapse

Instance Method Details

#create_sandboxObject



171
172
173
174
175
# File 'lib/kitchen/helpers.rb', line 171

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

#instance_nameObject



182
183
184
185
# File 'lib/kitchen/helpers.rb', line 182

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

#sandbox_pathObject

this MUST be named ‘sandbox_path’ because ruby.



178
179
180
# File 'lib/kitchen/helpers.rb', line 178

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