Sha256: c9bdd22d8d7274dc04f7158ed49911ab7f6df892b9100f25486f922e310e03e4
Contents?: true
Size: 676 Bytes
Versions: 8
Compression:
Stored size: 676 Bytes
Contents
# encoding: utf-8 module Nanoc::Extra::Checking::Checks class Stale < ::Nanoc::Extra::Checking::Check def run require 'set' item_rep_paths = Set.new(@site.items.map { |i| i.reps }.flatten.map { |r| r.raw_path }) output_filenames.each do |f| next if pruner.filename_excluded?(f) if !item_rep_paths.include?(f) add_issue( 'file without matching item', :subject => f) end end end protected def pruner exclude_config = @site.config.fetch(:prune, {}).fetch(:exclude, []) @pruner ||= Nanoc::Extra::Pruner.new(@site, :exclude => exclude_config) end end end
Version data entries
8 entries across 8 versions & 1 rubygems