summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanielsdeleo <dan@chef.io>2016-02-05 16:06:16 -0800
committerdanielsdeleo <dan@chef.io>2016-02-16 15:26:43 -0800
commit51df1d29ec3ee1d7890bb4f9a5e8ddc011b88411 (patch)
treeb2f526ce43a8d6fc66d9591398e84eca82e93ec2
parentbb0f14e5021bb78c9f9fe75f117096751fa44e8c (diff)
downloadchef-51df1d29ec3ee1d7890bb4f9a5e8ddc011b88411.tar.gz
inline cheffs cookbook dir 3 levels
-rw-r--r--lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbooks_dir.rb30
1 files changed, 29 insertions, 1 deletions
diff --git a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbooks_dir.rb b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbooks_dir.rb
index 9c50d162ef..7d74295e6a 100644
--- a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbooks_dir.rb
+++ b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbooks_dir.rb
@@ -32,7 +32,10 @@ class Chef
#class ChefRepositoryFileSystemCookbooksDir < FileSystemEntry
# With FileSystemEntry inlined
- class ChefRepositoryFileSystemCookbooksDir < BaseFSDir
+ #class ChefRepositoryFileSystemCookbooksDir < BaseFSDir
+
+ # With BaseFSDir inlined
+ class ChefRepositoryFileSystemCookbooksDir < BaseFSObject
# Original initialize
## def initialize(name, parent, file_path)
@@ -264,6 +267,31 @@ class Chef
## def make_child_entry(child_name)
## FileSystemEntry.new(child_name, self)
## end
+
+ ##############################
+ # Inlined from BaseFSDir
+ ##############################
+
+ # trivial initializer
+ ## def initialize(name, parent)
+ ## super
+ ## end
+
+ # No longer needed
+ ## def dir?
+ ## true
+ ## end
+
+ # overridden by subclass
+ ## def can_have_child?(name, is_dir)
+ ## true
+ ## end
+
+ # An empty children array is an empty dir
+ def empty?
+ children.empty?
+ end
+
end
end
end