chef
https://github.com/opscode/chef
Ruby
A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.
Chef::Search::Query#search
New search input, designed to be backwards compatible with the old method signature
'type' and 'query' are the same as before, args now will accept either a Hash of
search arguments with symbols as the keys (ie :sort, :start, :rows) and a :filter_result
option.
:filter_result should be in the format of another Hash with the structure of:
{
:returned_name1 => ["path", "to", "variable"],
:returned_name2 => ["shorter", "path"]
}
a real world example might be something like:
{
:ip_address => ["ipaddress"],
:ruby_version => ["languages", "ruby", "version"]
}
this will bring back 2 variables 'ip_address' and 'ruby_version' with whatever value was found
an example of the returned json may be:
{"ip_address":"127.0.0.1", "ruby_version": "1.9.3"}Edit
git clone [email protected]:opscode/chef.git
cd chef
open lib/chef/search/query.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Chef--Search--Query-search-for-pr
# Commit to gitgit add lib/chef/search/query.rbgit commit -m "better docs for Chef::Search::Query#search"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Chef--Search--Query-search-for-pr
hub pull-request
# Celebrate!