Class: Kitchen::Provisioner::Base
- Inherits:
-
Object
- Object
- Kitchen::Provisioner::Base
- Defined in:
- lib/kitchen/helpers.rb
Instance Method Summary collapse
- #create_sandbox ⇒ Object
- #instance_name ⇒ Object
-
#sandbox_path ⇒ Object
this MUST be named ‘sandbox_path’ because ruby.
Instance Method Details
#create_sandbox ⇒ Object
267 268 269 270 |
# File 'lib/kitchen/helpers.rb', line 267 def create_sandbox info("Creating kitchen sandbox in #{sandbox_path}") FileUtils.mkdir_p(sandbox_path, :mode => 0o755) end |
#instance_name ⇒ Object
277 278 279 280 |
# File 'lib/kitchen/helpers.rb', line 277 def instance_name prefix = (Digest::SHA2.hexdigest FileUtils.pwd)[0, 10] "#{prefix}-#{instance.name}" end |
#sandbox_path ⇒ Object
this MUST be named ‘sandbox_path’ because ruby.
273 274 275 |
# File 'lib/kitchen/helpers.rb', line 273 def sandbox_path "#{Dir.home}/.dokken/kitchen_sandbox/#{instance_name}" end |