lib/nanoc/extra/checking/checks/stale.rb in nanoc-4.0.0b2 vs lib/nanoc/extra/checking/checks/stale.rb in nanoc-4.0.0b3
- old
+ new
@@ -1,14 +1,12 @@
-# encoding: utf-8
-
module Nanoc::Extra::Checking::Checks
# @api private
class Stale < ::Nanoc::Extra::Checking::Check
def run
require 'set'
- item_rep_paths = Set.new(@site.items.map(&:reps).flatten.map(&:raw_path))
+ item_rep_paths = Set.new(@items.map(&:reps).flatten.map(&:raw_path))
output_filenames.each do |f|
next if pruner.filename_excluded?(f)
next if item_rep_paths.include?(f)
@@ -19,10 +17,10 @@
end
protected
def pruner
- exclude_config = @site.config.fetch(:prune, {}).fetch(:exclude, [])
+ exclude_config = @config.fetch(:prune, {}).fetch(:exclude, [])
@pruner ||= Nanoc::Extra::Pruner.new(@site, exclude: exclude_config)
end
end
end