diff --git a/lib/nanoc/base/services/compiler.rb b/lib/nanoc/base/services/compiler.rb index 121138af5c..15221513d1 100644 --- a/lib/nanoc/base/services/compiler.rb +++ b/lib/nanoc/base/services/compiler.rb @@ -98,7 +98,7 @@ def run(rep, is_outdated:) # rubocop:disable Lint/UnusedMethodArgument when Nanoc::Int::ProcessingActions::Layout executor.layout(action.layout_identifier, action.params) when Nanoc::Int::ProcessingActions::Snapshot - executor.snapshot(action.snapshot_name, final: true, path: action.path) + executor.snapshot(action.snapshot_name, path: action.path) else raise Nanoc::Int::Errors::InternalInconsistency, "unknown action #{action.inspect}" end diff --git a/lib/nanoc/base/services/executor.rb b/lib/nanoc/base/services/executor.rb index a94c924f66..fdda4798d8 100644 --- a/lib/nanoc/base/services/executor.rb +++ b/lib/nanoc/base/services/executor.rb @@ -75,7 +75,7 @@ def layout(layout_identifier, extra_filter_args = nil) end end - def snapshot(snapshot_name, final: true, path: nil) # rubocop:disable Lint/UnusedMethodArgument + def snapshot(snapshot_name, path: nil) # rubocop:disable Lint/UnusedMethodArgument @rep.snapshot_contents[snapshot_name] = @rep.snapshot_contents[:last] end diff --git a/lib/nanoc/rule_dsl/rule_memory_calculator.rb b/lib/nanoc/rule_dsl/rule_memory_calculator.rb index 5f1b74c75c..5db8787abd 100644 --- a/lib/nanoc/rule_dsl/rule_memory_calculator.rb +++ b/lib/nanoc/rule_dsl/rule_memory_calculator.rb @@ -54,12 +54,6 @@ def [](obj) end end - # @param [Nanoc::Int::ItemRep] rep The item representation for which to fetch - # the list of snapshots - # - # @return [Array] A list of snapshots, represented as arrays where the - # first element is the snapshot name (a Symbol) and the last element is - # a Boolean indicating whether the snapshot is final or not def snapshots_defs_for(rep) self[rep].snapshot_actions.map do |a| Nanoc::Int::SnapshotDef.new(a.snapshot_name) diff --git a/spec/nanoc/base/services/executor_spec.rb b/spec/nanoc/base/services/executor_spec.rb index a5f54df74f..4ad539015d 100644 --- a/spec/nanoc/base/services/executor_spec.rb +++ b/spec/nanoc/base/services/executor_spec.rb @@ -340,7 +340,7 @@ def run(_content, params = {}) end before do - executor.snapshot(:pre, final: true, path: nil) + executor.snapshot(:pre, path: nil) end it 'can contain compiled_content reference' do