Method: Shef::SoloSession#rebuild_context

Defined in:
lib/chef/shef/shef_session.rb

#rebuild_contextObject



163
164
165
166
167
168
169
# File 'lib/chef/shef/shef_session.rb', line 163

def rebuild_context
  @run_status = Chef::RunStatus.new(@node)
  Chef::Cookbook::FileVendor.on_create { |manifest| Chef::Cookbook::FileSystemFileVendor.new(manifest, Chef::Config[:cookbook_path]) }
  @run_context = Chef::RunContext.new(@node, Chef::CookbookCollection.new(Chef::CookbookLoader.new(Chef::Config[:cookbook_path])))
  @run_context.load(Chef::RunList::RunListExpansionFromDisk.new("_default", []))
  @run_status.run_context = run_context
end