chef

https://github.com/opscode/chef

Ruby

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

Chef::ResourceReporter::ResourceReport#for_json

Future: Some resources store state information that does not convert nicely
to json. We can't call a resource's state method here, since there are conflicts
with some LWRPs, so we can't override a resource's state method to return
json-friendly state data.

The registry key resource returns json-friendly state data through its state
attribute, and uses a read-only variable for fetching true state data. If
we have conflicts with other resources reporting json incompatible state, we
may want to extend the state_attrs API with the ability to rename POST'd
attrs.

Source | Google | Stack overflow

Edit

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

cd chef

open lib/chef/resource_reporter.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Chef--ResourceReporter--ResourceReport-for_json-for-pr


# Commit to git

git add lib/chef/resource_reporter.rbgit commit -m "better docs for Chef::ResourceReporter::ResourceReport#for_json"


# 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--ResourceReporter--ResourceReport-for_json-for-pr

hub pull-request


# Celebrate!