chef
https://github.com/opscode/chef
Ruby
A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.
Chef::DSL::DeclareResource#with_run_context
Helper for switching run_contexts. Allows for using :parent or :root in place of passing the run_context. Executes the block in the run_context. Returns the return value of the passed block.
Edit
git clone [email protected]:opscode/chef.git
cd chef
open lib/chef/dsl/declare_resource.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Chef--DSL--DeclareResource-with_run_context-for-pr
# Commit to gitgit add lib/chef/dsl/declare_resource.rbgit commit -m "better docs for Chef::DSL::DeclareResource#with_run_context"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Chef--DSL--DeclareResource-with_run_context-for-pr
hub pull-request
# Celebrate!