Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused PathsModified #1156

Merged
merged 1 commit into from Apr 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions lib/nanoc/base/entities/outdatedness_reasons.rb
Expand Up @@ -62,11 +62,6 @@ def initialize(attributes)
end
end

PathsModified = Generic.new(
'One or more output paths of this item have been modified since the last time the site was compiled.',
Props.new(path: true),
)

UsesAlwaysOutdatedFilter = Generic.new(
'This item rep uses one or more filters that cannot track dependencies, and will thus always be considered as outdated.',
Props.new(raw_content: true, attributes: true, compiled_content: true),
Expand Down
1 change: 0 additions & 1 deletion lib/nanoc/base/services/outdatedness_checker.rb
Expand Up @@ -13,7 +13,6 @@ class Basic
RULES_FOR_ITEM_REP =
[
Rules::RulesModified,
Rules::PathsModified,
Rules::ContentModified,
Rules::AttributesModified,
Rules::NotWritten,
Expand Down
1 change: 0 additions & 1 deletion lib/nanoc/base/services/outdatedness_rules.rb
Expand Up @@ -9,6 +9,5 @@ module OutdatednessRules
require_relative 'outdatedness_rules/configuration_modified'
require_relative 'outdatedness_rules/content_modified'
require_relative 'outdatedness_rules/not_written'
require_relative 'outdatedness_rules/paths_modified'
require_relative 'outdatedness_rules/rules_modified'
require_relative 'outdatedness_rules/uses_always_outdated_filter'
20 changes: 0 additions & 20 deletions lib/nanoc/base/services/outdatedness_rules/paths_modified.rb

This file was deleted.

54 changes: 0 additions & 54 deletions spec/nanoc/base/services/outdatedness_rules_spec.rb
Expand Up @@ -332,60 +332,6 @@
end
end

context 'PathsModified' do
let(:rule_class) { Nanoc::Int::OutdatednessRules::PathsModified }

let(:action_sequences) { { item_rep => new_mem } }

context 'old mem does not exist' do
let(:new_mem) do
Nanoc::Int::ActionSequence.new(item_rep).tap do |mem|
mem.add_snapshot(:donkey, '/foo.md')
mem.add_filter(:asdf, {})
end
end

it { is_expected.to be }
end

context 'old mem exists' do
let(:old_mem) do
Nanoc::Int::ActionSequence.new(item_rep).tap do |mem|
mem.add_filter(:erb, {})
mem.add_snapshot(:donkey, '/foo.md')
end
end

before do
action_sequence_store[item_rep] = old_mem.serialize
end

context 'paths in memory are the same' do
let(:new_mem) do
Nanoc::Int::ActionSequence.new(item_rep).tap do |mem|
mem.add_snapshot(:donkey, '/foo.md')
mem.add_filter(:asdf, {})
end
end

it { is_expected.not_to be }
end

context 'paths in memory are different' do
let(:new_mem) do
Nanoc::Int::ActionSequence.new(item_rep).tap do |mem|
mem.add_filter(:erb, {})
mem.add_snapshot(:donkey, '/foo.md')
mem.add_filter(:donkey, {})
mem.add_snapshot(:giraffe, '/bar.md')
end
end

it { is_expected.to be }
end
end
end

describe '#{Content,Attributes}Modified' do
subject do
[
Expand Down