Module: ChefHelper

Included in:
MiniTest::Assertions::RemoteChef
Defined in:
lib/chef-workflow/helpers/chef.rb

Overview

Small helper library, intended to be mixed into others that provides short helpers for doing complicated things with the Chef API.

Instance Method Summary collapse

Instance Method Details

#perform_search(type, query) ⇒ Object

Perform a search and return the names of the nodes that match the search.



12
13
14
# File 'lib/chef-workflow/helpers/chef.rb', line 12

def perform_search(type, query)
  Chef::Search::Query.new.search(type, query).first.map(&:name)
end