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
270 271 272 273 274 |
# File 'lib/kitchen/helpers.rb', line 270 def create_sandbox info("Creating kitchen sandbox in #{sandbox_path}") FileUtils.mkdir_p(sandbox_path) File.chmod(0o755, sandbox_path) end |
#instance_name ⇒ Object
281 282 283 284 |
# File 'lib/kitchen/helpers.rb', line 281 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.
277 278 279 |
# File 'lib/kitchen/helpers.rb', line 277 def sandbox_path "#{Dir.home}/.dokken/kitchen_sandbox/#{instance_name}" end |