chef
https://github.com/opscode/chef
Ruby
A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.
Chef::Node#consume_chef_environment
chef_environment when set in -j JSON will take precedence over -E ENVIRONMENT. Ideally, IMO, the order of precedence should be (lowest to highest): config_file -j JSON -E ENVIRONMENT so that users could reuse their JSON and override the chef_environment configured within it with -E ENVIRONMENT. Because command line options are merged with Chef::Config there is currently no way to distinguish between an environment set via config from an environment set via command line.
Edit
git clone [email protected]:opscode/chef.git
cd chef
open lib/chef/node.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Chef--Node-consume_chef_environment-for-pr
# Commit to gitgit add lib/chef/node.rbgit commit -m "better docs for Chef::Node#consume_chef_environment"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Chef--Node-consume_chef_environment-for-pr
hub pull-request
# Celebrate!