Class: Shef::StandAloneSession

Inherits:
ShefSession show all
Defined in:
lib/chef/shef/shef_session.rb

Instance Attribute Summary

Attributes inherited from ShefSession

#client, #compile, #node, #node_attributes, #recipe, #run_context

Instance Method Summary collapse

Methods inherited from ShefSession

#cookbook_loader, #definitions, #initialize, inspect, #node_built?, #reset!, #resource_collection, #save_node, session_type

Constructor Details

This class inherits a constructor from Shef::ShefSession

Instance Method Details

#rebuild_contextObject



144
145
146
147
148
# File 'lib/chef/shef/shef_session.rb', line 144

def rebuild_context
  cookbook_collection = Chef::CookbookCollection.new({})
  @run_context = Chef::RunContext.new(@node, cookbook_collection, @events) # no recipes
  @run_context.load(Chef::RunList::RunListExpansionFromDisk.new("_default", [])) # empty recipe list
end