Method: Chef::ChefFS::FileSystem::Repository::ChefRepositoryFileSystemRootDir#fs_description
- Defined in:
- lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb
#fs_description ⇒ Object
Used to print out a human-readable file system description
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb', line 141 def fs_description repo_paths = root_paths || [ File.dirname(child_paths["cookbooks"][0]) ] result = "repository at #{repo_paths.join(", ")}\n" if versioned_cookbooks result << " Multiple versions per cookbook\n" else result << " One version per cookbook\n" end child_paths.each_pair do |name, paths| if paths.any? { |path| !repo_paths.include?(File.dirname(path)) } result << " #{name} at #{paths.join(", ")}\n" end end result end |