Module: KnifeContainer::Command

Included in:
Chef::Knife::ContainerDockerInit
Defined in:
lib/knife-container/command.rb

Instance Method Summary collapse

Instance Method Details

#chef_runnerObject

An instance of ChefRunner. Calling ChefRunner#converge will trigger convergence and generate the desired code.



26
27
28
# File 'lib/knife-container/command.rb', line 26

def chef_runner
  @chef_runner ||= ChefRunner.new(docker_cookbook_path, ["knife_container::#{recipe}"])
end

#docker_cookbook_pathObject

Path to the directory where the code_generator cookbook is located. For now, this is hard coded to the ‘skeletons’ directory in this repo.



33
34
35
# File 'lib/knife-container/command.rb', line 33

def docker_cookbook_path
  File.expand_path("../skeletons", __FILE__)
end

#generator_contextObject

Delegates to ‘Generator.context`, the singleton instance of Generator::Context



39
40
41
# File 'lib/knife-container/command.rb', line 39

def generator_context
  Generator.context
end