Sha256: 570635313f1c94648029b373776f5c469a21cc2f6f21993574dd863d3a0e1ee2

Contents?: true

Size: 610 Bytes

Versions: 4

Compression:

Stored size: 610 Bytes

Contents

# frozen_string_literal: true

module Nanoc
  module Int
    module OutdatednessRules
      class ContentModified < Nanoc::Core::OutdatednessRule
        affects_props :raw_content, :compiled_content

        def apply(obj, outdatedness_checker)
          obj = obj.item if obj.is_a?(Nanoc::Core::ItemRep)

          ch_old = outdatedness_checker.checksum_store.content_checksum_for(obj)
          ch_new = outdatedness_checker.checksums.content_checksum_for(obj)
          if ch_old != ch_new
            Nanoc::Core::OutdatednessReasons::ContentModified
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
nanoc-4.11.12 lib/nanoc/base/services/outdatedness_rules/content_modified.rb
nanoc-4.11.11 lib/nanoc/base/services/outdatedness_rules/content_modified.rb
nanoc-4.11.10 lib/nanoc/base/services/outdatedness_rules/content_modified.rb
nanoc-4.11.9 lib/nanoc/base/services/outdatedness_rules/content_modified.rb