Skip to content

Commit

Permalink
Remove final arg from Executor#snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdefreyne committed Dec 25, 2016
1 parent b28bf2a commit 95971f7
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/nanoc/base/services/compiler.rb
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/nanoc/base/services/executor.rb
Expand Up @@ -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

Expand Down
6 changes: 0 additions & 6 deletions lib/nanoc/rule_dsl/rule_memory_calculator.rb
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion spec/nanoc/base/services/executor_spec.rb
Expand Up @@ -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
Expand Down

0 comments on commit 95971f7

Please sign in to comment.