lib/nanoc/extra/checking/checks/stale.rb in nanoc-3.7.4 vs lib/nanoc/extra/checking/checks/stale.rb in nanoc-3.7.5

- old
+ new

@@ -1,31 +1,27 @@ # 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 }) + item_rep_paths = Set.new(@site.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) add_issue( 'file without matching item', - :subject => f) + subject: f) end end protected def pruner exclude_config = @site.config.fetch(:prune, {}).fetch(:exclude, []) - @pruner ||= Nanoc::Extra::Pruner.new(@site, :exclude => exclude_config) + @pruner ||= Nanoc::Extra::Pruner.new(@site, exclude: exclude_config) end - end - end