chef
https://github.com/opscode/chef
Ruby
A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.
Chef::Mixin::ApiVersionRequestHandling#server_client_api_version_intersection
Input: exeception: Net::HTTPServerException that may or may not contain the x-ops-server-api-version header supported_client_versions: An array of Integers that represent the API versions the client supports. Output: nil: If the execption was not a 406 or the server does not support versioning Array of length zero: If there was no intersection between supported client versions and supported server versions Arrary of Integers: If there was an intersection of supported versions, the array returns will contain that intersection
Edit
git clone [email protected]:opscode/chef.git
cd chef
open lib/chef/mixin/api_version_request_handling.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Chef--Mixin--ApiVersionRequestHandling-server_client_api_version_intersection-for-pr
# Commit to gitgit add lib/chef/mixin/api_version_request_handling.rbgit commit -m "better docs for Chef::Mixin::ApiVersionRequestHandling#server_client_api_version_intersection"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Chef--Mixin--ApiVersionRequestHandling-server_client_api_version_intersection-for-pr
hub pull-request
# Celebrate!