chef

https://github.com/opscode/chef

Ruby

A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.

Chef::Provider::Service#load_new_resource_state

the new_resource#enabled and #running variables are not user input, but when we
do (e.g.) action_enable we want to set new_resource.enabled so that the comparison
between desired and current state produces the correct change in reporting.
XXX?: the #nil? check below will likely fail if this is a cloned resource or if
we just run multiple actions.

Source | Google | Stack overflow

Edit

git clone [email protected]:opscode/chef.git

cd chef

open lib/chef/provider/service.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Chef--Provider--Service-load_new_resource_state-for-pr


# Commit to git

git add lib/chef/provider/service.rbgit commit -m "better docs for Chef::Provider::Service#load_new_resource_state"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Chef--Provider--Service-load_new_resource_state-for-pr

hub pull-request


# Celebrate!