chef

https://github.com/opscode/chef

Ruby

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

Chef::HTTP::SocketlessChefZeroClient::ResponseExts#read_body

Net::HTTP raises an error if #read_body is called with a block or
file argument after the body has already been read from the network.

Since we always set the body to the string response from Chef Zero
and set the `@read` indicator variable, we have to patch this method
or else streaming-style responses won't work.

Source | Google | Stack overflow

Edit

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

cd chef

open lib/chef/http/socketless_chef_zero_client.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Chef--HTTP--SocketlessChefZeroClient--ResponseExts-read_body-for-pr


# Commit to git

git add lib/chef/http/socketless_chef_zero_client.rbgit commit -m "better docs for Chef::HTTP::SocketlessChefZeroClient::ResponseExts#read_body"


# 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--HTTP--SocketlessChefZeroClient--ResponseExts-read_body-for-pr

hub pull-request


# Celebrate!