lib/nanoc/data_sources/static.rb in nanoc-3.8.0 vs lib/nanoc/data_sources/static.rb in nanoc-4.0.0a1

- old
+ new

@@ -22,10 +22,12 @@ # # Unless the `hide_items` configuration attribute is false, items from static # data sources will have the :is_hidden attribute set by default, which will # exclude them from the Blogging helper's atom feed generator, among other # things. + # + # @api private class Static < Nanoc::DataSource identifier :static def items # Get prefix @@ -38,12 +40,12 @@ filename: filename, } attributes[:is_hidden] = true unless config[:hide_items] == false identifier = filename[(prefix.length + 1)..-1] + '/' mtime = File.mtime(filename) - checksum = Pathname.new(filename).checksum + checksum = Pathname.new(filename).__nanoc_checksum - Nanoc::Item.new( + Nanoc::Int::Item.new( filename, attributes, identifier, binary: true, mtime: mtime, checksum: checksum )