chef
https://github.com/opscode/chef
Ruby
A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.
Chef::ChefFS::DataHandler::DataHandlerBase#normalize_hash
Utility function to help subclasses do normalize(). Pass in a hash
and a list of keys with defaults, and normalize will:
1. Fill in the defaults
2. Put the actual values in the order of the defaults
3. Move any other values to the end
== Example
normalize_hash({x: 100, c: 2, a: 1}, { a: 10, b: 20, c: 30})
-> { a: 1, b: 20, c: 2, x: 100}Edit
git clone [email protected]:opscode/chef.git
cd chef
open lib/chef/chef_fs/data_handler/data_handler_base.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Chef--ChefFS--DataHandler--DataHandlerBase-normalize_hash-for-pr
# Commit to gitgit add lib/chef/chef_fs/data_handler/data_handler_base.rbgit commit -m "better docs for Chef::ChefFS::DataHandler::DataHandlerBase#normalize_hash"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Chef--ChefFS--DataHandler--DataHandlerBase-normalize_hash-for-pr
hub pull-request
# Celebrate!