def packaging_slip
      root = File.expand_path(cookbook.path)
      path = File.join(root, "{#{ACCEPTABLE_FILES_LIST}}")

      Dir.glob(path, File::FNM_DOTMATCH)
        .reject { |path| %w(. ..).include?(File.basename(path)) }
        .reject { |path| TMP_FILES.any? { |regex| path.match(regex) } }
        .map    { |path| [path, path.sub(/^#{Regexp.escape(root)}/, cookbook.name)] }
        .reduce({}) do |map, (cookbook_file, tarball_file)|
          map[cookbook_file] = tarball_file
        map
      end
    end
def packaging_slip
      root = File.expand_path(cookbook.path)
      path = File.join(root, "{#{ACCEPTABLE_FILES_LIST}}")

      Dir.glob(path, File::FNM_DOTMATCH)
        .reject { |path| %w(. ..).include?(File.basename(path)) }
        .reject { |path| TMP_FILES.any? { |regex| path.match(regex) } }
        .map    { |path| [path, path.sub(/^#{Regexp.escape(root)}/, cookbook.name)] }
        .reduce({}) do |map, (cookbook_file, tarball_file)|
          map[cookbook_file] = tarball_file
        map
      end
    end
Create a new packager instance.

 @param [Stove::Cookbook]
   the cookbook to package
 @param [true, false] extended_metadata
   include new extended metadata attributes
 A map from physical file path to tarball file path

 @example
   # Assuming +cookbook.name+ is 'apt'

   {
     '/home/user/apt-cookbook/metadata.json' => 'apt/metadata.json',
     '/home/user/apt-cookbook/README.md' => 'apt/README.md'
   }

 @return [Hash<String, String>]
   the map of file paths