Thank you for you response!
Is it reasonable to just nil the events dispatcher out? I'm struggling to understand what it does in a concrete manner - I'd be delighted to RTFM if there's some overview documentation about how I interact with it somewhere that I cannot find.
If I wanted to just use an existing events dispatcher during a run, how would I access it? Is that even a reasonable question, or should I be making a new one if I am making a new run context?Thanks again,
BrianOn Wed, Sep 25, 2013 at 2:41 PM, Ranjib Dey < " target="_blank"> > wrote:
a run context object expects a node object at leas (rc= Chef::RunContext.new(node, nil, nil)) , check the setup_run_context method inside lib/chef/client.rb
On Wed, Sep 25, 2013 at 11:23 AM, Brian Hatfield < " target="_blank"> > wrote:Thank you!I have a library that needs to set up a raw ruby resource, similar to how it's documented here: http://docs.opscode.com/chef/resources.html#ruby-block. Unfortunately, part of that is setting up the RunContext, which I cannot find properly documented anywhere.How do I instantiate such an object to pass to the RunContext so I can get my resource to work correctly? Can someone point me at some documentation or an example for this?
The code snippet `run_context = Chef::RunContext.new(node, {})` fails with an ArgumentError `wrong number of arguments (2 for 3)`, which after looking at the raw RunContext code, is correct - it wants a third, undocumented argument called "events".
Brian
Archive powered by MHonArc 2.6.16.