Module Chef::CookbookVersionSelector
In: lib/chef/cookbook_version_selector.rb

Methods

Public Class methods

Return a hash mapping cookbook names to a CookbookVersion object. If there is no solution that satisfies the constraints, the first run list item that caused unsatisfiability is returned.

This is the final version-resolved list of cookbooks for the RunList.

all_cookbooks - a hash mapping cookbook names to an array of available CookbookVersions.

recipe_constraints - an array of hashes describing the expanded run list. Each element is a hash containing keys :name and :version_constraint. The :name component is either the fully-qualified recipe name (e.g. "cookbook1::non_default_recipe") or just a cookbook name, indicating the default recipe is to be run (e.g. "cookbook1").

all_cookbooks - a hash mapping cookbook names to an array of available CookbookVersions.

Creates a DependencyGraph from CookbookVersion objects

Expands the run_list, constrained to the environment‘s CookbookVersion constraints.

Returns:

  Hash of: name to CookbookVersion

This method replaces verbiage from DepSelector messages with Chef-domain-specific verbiage, such as replacing package with cookbook.

TODO [cw, 2011/2/25]: this is a near-term hack. In the long run, we‘ll do this better.

[Validate]