diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2015-05-07 12:36:30 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-05-18 15:37:41 -0700 |
commit | db62393671925bd778193c3ed8b2af49ccbb63a4 (patch) | |
tree | d363d4697fcd5bf229b4ad83c49185b44e346a40 /lib/chef/run_list | |
parent | 05b07f669b9a06799e7e20608d1df3e5bbc2853a (diff) | |
download | chef-db62393671925bd778193c3ed8b2af49ccbb63a4.tar.gz |
add/fix node attributes
* fix node[:recipes]
* add node[:expanded_run_list]
* add node[:cookbooks]
Diffstat (limited to 'lib/chef/run_list')
-rw-r--r-- | lib/chef/run_list/versioned_recipe_list.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/chef/run_list/versioned_recipe_list.rb b/lib/chef/run_list/versioned_recipe_list.rb index 0eefded964..7cce6fa48c 100644 --- a/lib/chef/run_list/versioned_recipe_list.rb +++ b/lib/chef/run_list/versioned_recipe_list.rb @@ -63,6 +63,24 @@ class Chef end end end + + # Get an array of strings of the fully-qualified recipe names (with ::default appended) and + # with the versions in "NAME@VERSION" format. + # + # @return [Array] Array of strings with fully-qualified recipe names + def with_fully_qualified_names_and_version_constraints + self.map do |recipe_name| + ret = if recipe_name.include?('::') + recipe_name + else + "#{recipe_name}::default" + end + if @versions[recipe_name] + ret << "@#{@versions[recipe_name]}" + end + ret + end + end end end end |