summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/chef/cookbook_version.rb4
-rw-r--r--spec/unit/cookbook_version_spec.rb6
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/chef/cookbook_version.rb b/lib/chef/cookbook_version.rb
index 9ebf705d79..d9e9897a06 100644
--- a/lib/chef/cookbook_version.rb
+++ b/lib/chef/cookbook_version.rb
@@ -40,6 +40,8 @@ class Chef
COOKBOOK_SEGMENTS = [ :resources, :providers, :recipes, :definitions, :libraries, :attributes, :files, :templates, :root_files ]
+ attr_accessor :all_unignored_files
+
attr_accessor :root_paths
attr_accessor :definition_filenames
attr_accessor :template_filenames
@@ -128,6 +130,8 @@ class Chef
@metadata_filenames = Array.new
@root_filenames = Array.new
+ @all_unignored_files = Array.new
+
# deprecated
@status = :ready
@file_vendor = nil
diff --git a/spec/unit/cookbook_version_spec.rb b/spec/unit/cookbook_version_spec.rb
index 7bf21b1c74..a74786c1d1 100644
--- a/spec/unit/cookbook_version_spec.rb
+++ b/spec/unit/cookbook_version_spec.rb
@@ -57,6 +57,10 @@ describe Chef::CookbookVersion do
expect(cookbook_version.metadata_filenames).to be_empty
end
+ it "has an empty set of all_unignored_files" do
+ expect(cookbook_version.all_unignored_files).to be_empty
+ end
+
it "is not frozen" do
expect(cookbook_version).not_to be_frozen_version
end
@@ -78,6 +82,7 @@ describe Chef::CookbookVersion do
let(:cookbook_paths_by_type) do
{
# Dunno if the paths here are representitive of what is set by CookbookLoader...
+ all_unignored_files: Dir[File.join(cookbook_root, "**", "*.rb")],
attribute_filenames: Dir[File.join(cookbook_root, "attributes", "**", "*.rb")],
definition_filenames: Dir[File.join(cookbook_root, "definitions", "**", "*.rb")],
file_filenames: Dir[File.join(cookbook_root, "files", "**", "*.tgz")],
@@ -164,6 +169,7 @@ describe Chef::CookbookVersion do
let(:cookbook_paths_by_type) do
{
# Dunno if the paths here are representitive of what is set by CookbookLoader...
+ all_unignored_files: Dir[File.join(cookbook_root, "**", "*.rb")],
attribute_filenames: Dir[File.join(cookbook_root, "attributes", "**", "*.rb")],
definition_filenames: Dir[File.join(cookbook_root, "definitions", "**", "*.rb")],
file_filenames: Dir[File.join(cookbook_root, "files", "**", "*.*")],