Sha256: 7dea363401d980c05fe9c4b8878fdcc0c55175a34b94066c974e0cf3997dc125

Contents?: true

Size: 608 Bytes

Versions: 8

Compression:

Stored size: 608 Bytes

Contents

# frozen_string_literal: true

module Nanoc
  module Int
    module OutdatednessRules
      class ContentModified < Nanoc::Int::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::Int::OutdatednessReasons::ContentModified
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
nanoc-4.11.8 lib/nanoc/base/services/outdatedness_rules/content_modified.rb
nanoc-4.11.7 lib/nanoc/base/services/outdatedness_rules/content_modified.rb
nanoc-4.11.6 lib/nanoc/base/services/outdatedness_rules/content_modified.rb
nanoc-4.11.5 lib/nanoc/base/services/outdatedness_rules/content_modified.rb
nanoc-4.11.4 lib/nanoc/base/services/outdatedness_rules/content_modified.rb
nanoc-4.11.3 lib/nanoc/base/services/outdatedness_rules/content_modified.rb
nanoc-4.11.2 lib/nanoc/base/services/outdatedness_rules/content_modified.rb
nanoc-4.11.1 lib/nanoc/base/services/outdatedness_rules/content_modified.rb