diff options
Diffstat (limited to 'lib/chef/cookbook_version.rb')
-rw-r--r-- | lib/chef/cookbook_version.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/chef/cookbook_version.rb b/lib/chef/cookbook_version.rb index 4482f778c1..76e6d152b2 100644 --- a/lib/chef/cookbook_version.rb +++ b/lib/chef/cookbook_version.rb @@ -51,10 +51,14 @@ class Chef attr_accessor :provider_filenames attr_accessor :root_filenames attr_accessor :name - attr_accessor :metadata attr_accessor :metadata_filenames attr_accessor :status + # A Chef::Cookbook::Metadata object. It has a setter that fixes up the + # metadata to add descriptions of the recipes contained in this + # CookbookVersion. + attr_reader :metadata + # attribute_filenames also has a setter that has non-default # functionality. attr_reader :attribute_filenames @@ -195,6 +199,12 @@ class Chef attribute_filenames end + def metadata=(metadata) + @metadata = metadata + @metadata.recipes_from_cookbook_version(self) + @metadata + end + ## BACKCOMPAT/DEPRECATED - Remove these and fix breakage before release [DAN - 5/20/2010]## alias :attribute_files :attribute_filenames alias :attribute_files= :attribute_filenames= |