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#edit_resource
Lookup a resource in the resource collection by name. If it exists, return it. If it does not exist, create it. This is a useful function for accumulator patterns. In CRUD terminology this is an "upsert" operation and is used to assert that the resource must exist with the specified properties.
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-edit_resource-for-pr
# Commit to gitgit add lib/chef/dsl/declare_resource.rbgit commit -m "better docs for Chef::DSL::DeclareResource#edit_resource"
# 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-edit_resource-for-pr
hub pull-request
# Celebrate!