Class: Kitchen::Provisioner::Base
- Inherits:
-
Object
- Object
- Kitchen::Provisioner::Base
- Defined in:
- lib/kitchen/helpers.rb
Instance Method Summary collapse
Instance Method Details
#create_sandbox ⇒ Object
120 121 122 123 124 |
# File 'lib/kitchen/helpers.rb', line 120 def create_sandbox info("Creating local sandbox in #{sandbox_path}") FileUtils.mkdir_p(sandbox_path) File.chmod(0755, sandbox_path) end |
#instance_name ⇒ Object
130 131 132 133 |
# File 'lib/kitchen/helpers.rb', line 130 def instance_name prefix = (Digest::SHA2.hexdigest FileUtils.pwd)[0, 10] "#{prefix}-#{instance.name}" end |
#sandbox_path ⇒ Object
126 127 128 |
# File 'lib/kitchen/helpers.rb', line 126 def sandbox_path "#{Dir.home}/.dokken/sandbox/#{instance_name}" end |