nanoc 4.8.9 → 4.8.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +6 -4
  3. data/Gemfile +2 -1
  4. data/NEWS.md +7 -0
  5. data/README.md +1 -1
  6. data/lib/nanoc.rb +2 -6
  7. data/lib/nanoc/base/entities/site.rb +9 -5
  8. data/lib/nanoc/base/repos/data_source.rb +0 -15
  9. data/lib/nanoc/base/repos/outdatedness_store.rb +17 -15
  10. data/lib/nanoc/base/services/compilation_context.rb +4 -4
  11. data/lib/nanoc/base/services/compiler.rb +102 -103
  12. data/lib/nanoc/base/services/compiler/stages/build_reps.rb +7 -7
  13. data/lib/nanoc/base/services/compiler/stages/compile_reps.rb +4 -2
  14. data/lib/nanoc/base/services/compiler/stages/determine_outdatedness.rb +25 -7
  15. data/lib/nanoc/base/services/compiler/stages/postprocess.rb +3 -3
  16. data/lib/nanoc/base/services/compiler/stages/preprocess.rb +3 -0
  17. data/lib/nanoc/base/services/compiler_loader.rb +1 -4
  18. data/lib/nanoc/base/views.rb +13 -6
  19. data/lib/nanoc/base/views/{item_rep_collection_view.rb → basic_item_rep_collection_view.rb} +6 -6
  20. data/lib/nanoc/base/views/{item_rep_view.rb → basic_item_rep_view.rb} +8 -29
  21. data/lib/nanoc/base/views/{item_without_reps_view.rb → basic_item_view.rb} +3 -3
  22. data/lib/nanoc/base/views/compilation_item_rep_collection_view.rb +10 -0
  23. data/lib/nanoc/base/views/compilation_item_rep_view.rb +42 -0
  24. data/lib/nanoc/base/views/{mixins/with_reps_view_mixin.rb → compilation_item_view.rb} +3 -3
  25. data/lib/nanoc/base/views/item_collection_with_reps_view.rb +1 -1
  26. data/lib/nanoc/base/views/item_collection_without_reps_view.rb +1 -1
  27. data/lib/nanoc/base/views/mixins/mutable_document_view_mixin.rb +1 -1
  28. data/lib/nanoc/base/views/mutable_item_view.rb +1 -1
  29. data/lib/nanoc/base/views/post_compile_item_rep_collection_view.rb +1 -1
  30. data/lib/nanoc/base/views/post_compile_item_rep_view.rb +7 -2
  31. data/lib/nanoc/base/views/post_compile_item_view.rb +1 -1
  32. data/lib/nanoc/base/views/{view_context.rb → view_context_for_compilation.rb} +10 -1
  33. data/lib/nanoc/base/views/view_context_for_pre_compilation.rb +18 -0
  34. data/lib/nanoc/base/views/view_context_for_shell.rb +23 -0
  35. data/lib/nanoc/checking/check.rb +5 -1
  36. data/lib/nanoc/checking/runner.rb +1 -1
  37. data/lib/nanoc/cli.rb +1 -0
  38. data/lib/nanoc/cli/command_runner.rb +1 -7
  39. data/lib/nanoc/cli/commands/check.rb +2 -2
  40. data/lib/nanoc/cli/commands/compile.rb +8 -47
  41. data/lib/nanoc/cli/commands/compile_listeners/abstract.rb +9 -0
  42. data/lib/nanoc/cli/commands/compile_listeners/aggregate.rb +49 -0
  43. data/lib/nanoc/cli/commands/deploy.rb +2 -1
  44. data/lib/nanoc/cli/commands/prune.rb +5 -4
  45. data/lib/nanoc/cli/commands/shell.rb +4 -6
  46. data/lib/nanoc/cli/commands/show-data.rb +20 -27
  47. data/lib/nanoc/cli/commands/show-rules.rb +20 -22
  48. data/lib/nanoc/cli/error_handler.rb +0 -17
  49. data/lib/nanoc/data_sources/filesystem.rb +4 -2
  50. data/lib/nanoc/deploying/deployers/fog.rb +4 -1
  51. data/lib/nanoc/helpers/link_to.rb +1 -1
  52. data/lib/nanoc/rule_dsl/action_provider.rb +8 -11
  53. data/lib/nanoc/rule_dsl/action_sequence_calculator.rb +14 -5
  54. data/lib/nanoc/rule_dsl/recording_executor.rb +4 -0
  55. data/lib/nanoc/rule_dsl/rule.rb +14 -9
  56. data/lib/nanoc/rule_dsl/rule_context.rb +4 -4
  57. data/lib/nanoc/spec.rb +27 -19
  58. data/lib/nanoc/version.rb +1 -1
  59. data/spec/nanoc/base/checksummer_spec.rb +19 -11
  60. data/spec/nanoc/base/compiler_spec.rb +18 -14
  61. data/spec/nanoc/base/filter_spec.rb +7 -6
  62. data/spec/nanoc/base/repos/outdatedness_store_spec.rb +3 -32
  63. data/spec/nanoc/base/services/compiler/stages/compile_reps_spec.rb +2 -1
  64. data/spec/nanoc/base/services/compiler/stages/determine_outdatedness_spec.rb +148 -0
  65. data/spec/nanoc/base/services/compiler/stages/preprocess_spec.rb +110 -0
  66. data/spec/nanoc/base/services/executor_spec.rb +6 -6
  67. data/spec/nanoc/base/views/basic_item_rep_collection_view_spec.rb +8 -0
  68. data/spec/nanoc/base/views/basic_item_rep_view_spec.rb +9 -0
  69. data/spec/nanoc/base/views/compilation_item_rep_collection_view_spec.rb +8 -0
  70. data/spec/nanoc/base/views/compilation_item_rep_view_spec.rb +136 -0
  71. data/spec/nanoc/base/views/config_view_spec.rb +5 -5
  72. data/spec/nanoc/base/views/item_collection_with_reps_view_spec.rb +4 -2
  73. data/spec/nanoc/base/views/item_collection_without_reps_view_spec.rb +4 -2
  74. data/spec/nanoc/base/views/item_view_spec.rb +13 -11
  75. data/spec/nanoc/base/views/layout_collection_view_spec.rb +3 -1
  76. data/spec/nanoc/base/views/layout_view_spec.rb +3 -1
  77. data/spec/nanoc/base/views/mutable_item_collection_view_spec.rb +5 -2
  78. data/spec/nanoc/base/views/mutable_item_view_spec.rb +2 -0
  79. data/spec/nanoc/base/views/mutable_layout_collection_view_spec.rb +5 -2
  80. data/spec/nanoc/base/views/mutable_layout_view_spec.rb +2 -0
  81. data/spec/nanoc/base/views/post_compile_item_rep_collection_view_spec.rb +2 -0
  82. data/spec/nanoc/base/views/post_compile_item_rep_view_spec.rb +9 -3
  83. data/spec/nanoc/base/views/{document_view_spec.rb → support/document_view_examples.rb} +5 -5
  84. data/spec/nanoc/base/views/{identifiable_collection_view_spec.rb → support/identifiable_collection_view_examples.rb} +4 -4
  85. data/spec/nanoc/base/views/{item_rep_collection_view_spec.rb → support/item_rep_collection_view_examples.rb} +3 -8
  86. data/spec/nanoc/base/views/{item_rep_view_spec.rb → support/item_rep_view_examples.rb} +10 -111
  87. data/spec/nanoc/base/views/{mutable_document_view_spec.rb → support/mutable_document_view_examples.rb} +7 -6
  88. data/spec/nanoc/base/views/{mutable_identifiable_collection_view_spec.rb → support/mutable_identifiable_collection_view_examples.rb} +1 -1
  89. data/spec/nanoc/cli/commands/compile/abstract_spec.rb +80 -0
  90. data/spec/nanoc/cli/commands/compile_spec.rb +30 -51
  91. data/spec/nanoc/cli/commands/show_data_spec.rb +2 -23
  92. data/spec/nanoc/cli/commands/show_rules_spec.rb +4 -2
  93. data/spec/nanoc/regressions/gh_767_spec.rb +1 -1
  94. data/spec/nanoc/regressions/gh_776_spec.rb +2 -1
  95. data/spec/nanoc/rule_dsl/action_sequence_calculator_spec.rb +25 -12
  96. data/spec/nanoc/rule_dsl/rule_context_spec.rb +16 -6
  97. data/test/base/test_data_source.rb +0 -18
  98. data/test/checking/checks/test_external_links.rb +4 -6
  99. data/test/checking/checks/test_internal_links.rb +6 -9
  100. data/test/cli/commands/test_compile.rb +0 -35
  101. data/test/cli/test_cleaning_stream.rb +1 -1
  102. data/test/data_sources/test_filesystem.rb +16 -0
  103. data/test/filters/test_kramdown.rb +4 -4
  104. data/test/filters/test_sass.rb +1 -1
  105. data/test/filters/test_slim.rb +7 -5
  106. data/test/filters/test_xsl.rb +10 -8
  107. data/test/helpers/test_blogging.rb +5 -5
  108. data/test/helpers/test_capturing.rb +8 -6
  109. data/test/helpers/test_link_to.rb +4 -4
  110. data/test/helpers/test_xml_sitemap.rb +19 -19
  111. metadata +25 -15
  112. data/lib/nanoc/base/views/item_with_reps_view.rb +0 -7
  113. data/spec/nanoc/base/core_ext/pathname_spec.rb +0 -0
@@ -2,19 +2,16 @@
2
2
 
3
3
  module Nanoc::Int::Compiler::Stages
4
4
  class BuildReps
5
- def initialize(site:, action_provider:, reps:)
5
+ def initialize(site:, action_provider:)
6
6
  @site = site
7
7
  @action_provider = action_provider
8
- @reps = reps
9
8
  end
10
9
 
11
10
  def run
12
- # FIXME: This also, as a side effect, generates the action sequences. :(
13
- # Better: let this stage return a mapping of reps onto (raw) paths *and* a mapping of objects
14
- # onto action sequences.
11
+ reps = Nanoc::Int::ItemRepRepo.new
15
12
 
16
13
  builder = Nanoc::Int::ItemRepBuilder.new(
17
- @site, @action_provider, @reps
14
+ @site, @action_provider, reps
18
15
  )
19
16
 
20
17
  action_sequences = builder.run
@@ -23,7 +20,10 @@ module Nanoc::Int::Compiler::Stages
23
20
  action_sequences[layout] = @action_provider.action_sequence_for(layout)
24
21
  end
25
22
 
26
- action_sequences
23
+ {
24
+ reps: reps,
25
+ action_sequences: action_sequences,
26
+ }
27
27
  end
28
28
  end
29
29
  end
@@ -2,7 +2,8 @@
2
2
 
3
3
  module Nanoc::Int::Compiler::Stages
4
4
  class CompileReps
5
- def initialize(outdatedness_store:, dependency_store:, action_sequences:, compilation_context:, compiled_content_cache:)
5
+ def initialize(reps:, outdatedness_store:, dependency_store:, action_sequences:, compilation_context:, compiled_content_cache:)
6
+ @reps = reps
6
7
  @outdatedness_store = outdatedness_store
7
8
  @dependency_store = dependency_store
8
9
  @action_sequences = action_sequences
@@ -11,7 +12,8 @@ module Nanoc::Int::Compiler::Stages
11
12
  end
12
13
 
13
14
  def run
14
- selector = Nanoc::Int::ItemRepSelector.new(@outdatedness_store.to_a)
15
+ outdated_reps = @reps.select { |r| @outdatedness_store.include?(r) }
16
+ selector = Nanoc::Int::ItemRepSelector.new(outdated_reps)
15
17
  selector.each do |rep|
16
18
  handle_errors_while(rep) { compile_rep(rep, is_outdated: @outdatedness_store.include?(rep)) }
17
19
  end
@@ -12,16 +12,34 @@ module Nanoc::Int::Compiler::Stages
12
12
 
13
13
  contract C::None => C::Any
14
14
  def run
15
- outdated_reps_tmp = @reps.select do |r|
16
- @outdatedness_store.include?(r) || @outdatedness_checker.outdated?(r)
17
- end
15
+ outdated_items = select_outdated_items
16
+ outdated_reps = reps_of_items(outdated_items)
18
17
 
19
- outdated_items = outdated_reps_tmp.map(&:item).uniq
20
- outdated_reps = Set.new(outdated_items.flat_map { |i| @reps[i] })
21
-
22
- outdated_reps.each { |r| @outdatedness_store.add(r) }
18
+ store_outdated_reps(outdated_reps)
23
19
 
24
20
  outdated_items
25
21
  end
22
+
23
+ private
24
+
25
+ def store_outdated_reps(reps)
26
+ @outdatedness_store.clear
27
+ reps.each { |r| @outdatedness_store.add(r) }
28
+ end
29
+
30
+ def select_outdated_items
31
+ @reps
32
+ .select { |r| outdated?(r) }
33
+ .map(&:item)
34
+ .uniq
35
+ end
36
+
37
+ def reps_of_items(items)
38
+ Set.new(items.flat_map { |i| @reps[i] })
39
+ end
40
+
41
+ def outdated?(r)
42
+ @outdatedness_store.include?(r) || @outdatedness_checker.outdated?(r)
43
+ end
26
44
  end
27
45
  end
@@ -10,9 +10,9 @@ module Nanoc::Int::Compiler::Stages
10
10
  @reps = reps
11
11
  end
12
12
 
13
- contract C::None => C::Any
14
- def run
15
- @action_provider.postprocess(@site, @reps)
13
+ contract Nanoc::Int::Compiler => C::Any
14
+ def run(compiler)
15
+ @action_provider.postprocess(@site, compiler, @reps)
16
16
  end
17
17
  end
18
18
  end
@@ -10,6 +10,8 @@ module Nanoc::Int::Compiler::Stages
10
10
  end
11
11
 
12
12
  def run
13
+ return if @site.preprocessed?
14
+
13
15
  if @action_provider.need_preprocessing?
14
16
  @site.data_source = Nanoc::Int::InMemDataSource.new(@site.items, @site.layouts)
15
17
  @action_provider.preprocess(@site)
@@ -19,6 +21,7 @@ module Nanoc::Int::Compiler::Stages
19
21
  @checksum_store.objects = @site.items.to_a + @site.layouts.to_a + @site.code_snippets + [@site.config]
20
22
  end
21
23
 
24
+ @site.mark_as_preprocessed
22
25
  @site.freeze
23
26
  end
24
27
  end
@@ -14,12 +14,10 @@ module Nanoc::Int
14
14
  checksum_store =
15
15
  Nanoc::Int::ChecksumStore.new(site: site, objects: objects)
16
16
 
17
- item_rep_repo = Nanoc::Int::ItemRepRepo.new
18
-
19
17
  action_provider ||= Nanoc::Int::ActionProvider.named(:rule_dsl).for(site)
20
18
 
21
19
  outdatedness_store =
22
- Nanoc::Int::OutdatednessStore.new(site: site, reps: item_rep_repo)
20
+ Nanoc::Int::OutdatednessStore.new(site: site)
23
21
 
24
22
  compiled_content_cache =
25
23
  Nanoc::Int::CompiledContentCache.new(
@@ -32,7 +30,6 @@ module Nanoc::Int
32
30
  checksum_store: checksum_store,
33
31
  action_sequence_store: action_sequence_store,
34
32
  dependency_store: dependency_store,
35
- reps: item_rep_repo,
36
33
  action_provider: action_provider,
37
34
  outdatedness_store: outdatedness_store,
38
35
  }
@@ -2,21 +2,28 @@
2
2
 
3
3
  require_relative 'views/mixins/document_view_mixin'
4
4
  require_relative 'views/mixins/mutable_document_view_mixin'
5
- require_relative 'views/mixins/with_reps_view_mixin'
5
+
6
+ require_relative 'views/view_context_for_compilation'
7
+ require_relative 'views/view_context_for_pre_compilation'
8
+ require_relative 'views/view_context_for_shell'
6
9
 
7
10
  require_relative 'views/view'
8
- require_relative 'views/view_context'
11
+
12
+ require_relative 'views/basic_item_rep_view'
13
+ require_relative 'views/basic_item_rep_collection_view'
14
+ require_relative 'views/basic_item_view'
15
+
16
+ require_relative 'views/compilation_item_rep_view'
17
+ require_relative 'views/compilation_item_rep_collection_view'
18
+ require_relative 'views/compilation_item_view'
9
19
 
10
20
  require_relative 'views/config_view'
11
21
  require_relative 'views/identifiable_collection_view'
12
- require_relative 'views/item_without_reps_view'
13
- require_relative 'views/item_with_reps_view'
14
22
  require_relative 'views/item_collection_with_reps_view'
15
23
  require_relative 'views/item_collection_without_reps_view'
16
- require_relative 'views/item_rep_view'
17
- require_relative 'views/item_rep_collection_view'
18
24
  require_relative 'views/layout_view'
19
25
  require_relative 'views/layout_collection_view'
26
+
20
27
  require_relative 'views/mutable_config_view'
21
28
  require_relative 'views/mutable_identifiable_collection_view'
22
29
  require_relative 'views/mutable_item_view'
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nanoc
4
- class ItemRepCollectionView < ::Nanoc::View
4
+ class BasicItemRepCollectionView < ::Nanoc::View
5
5
  include Enumerable
6
6
 
7
7
  class NoSuchItemRepError < ::Nanoc::Error
@@ -23,7 +23,7 @@ module Nanoc
23
23
 
24
24
  # @api private
25
25
  def view_class
26
- Nanoc::ItemRepView
26
+ Nanoc::BasicItemRepView
27
27
  end
28
28
 
29
29
  def to_ary
@@ -53,16 +53,16 @@ module Nanoc
53
53
  #
54
54
  # @return [nil] if no item rep with the given name was found
55
55
  #
56
- # @return [Nanoc::ItemRepView] if an item rep with the given name was found
56
+ # @return [Nanoc::BasicItemRepView] if an item rep with the given name was found
57
57
  def [](rep_name)
58
58
  case rep_name
59
59
  when Symbol
60
60
  res = @item_reps.find { |ir| ir.name == rep_name }
61
61
  res && view_class.new(res, @context)
62
62
  when Integer
63
- raise ArgumentError, "expected ItemRepCollectionView#[] to be called with a symbol (you likely want `.reps[:default]` rather than `.reps[#{rep_name}]`)"
63
+ raise ArgumentError, "expected BasicItemRepCollectionView#[] to be called with a symbol (you likely want `.reps[:default]` rather than `.reps[#{rep_name}]`)"
64
64
  else
65
- raise ArgumentError, 'expected ItemRepCollectionView#[] to be called with a symbol'
65
+ raise ArgumentError, 'expected BasicItemRepCollectionView#[] to be called with a symbol'
66
66
  end
67
67
  end
68
68
 
@@ -71,7 +71,7 @@ module Nanoc
71
71
  #
72
72
  # @param [Symbol] rep_name
73
73
  #
74
- # @return [Nanoc::ItemRepView]
74
+ # @return [Nanoc::BasicItemRepView]
75
75
  #
76
76
  # @raise if no rep was found
77
77
  def fetch(rep_name)
@@ -1,13 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nanoc
4
- class ItemRepView < ::Nanoc::View
4
+ class BasicItemRepView < ::Nanoc::View
5
5
  # @api private
6
6
  def initialize(item_rep, context)
7
7
  super(context)
8
8
  @item_rep = item_rep
9
9
  end
10
10
 
11
+ # @abstract
12
+ def item_view_class
13
+ Nanoc::BasicItemView
14
+ end
15
+
11
16
  # @api private
12
17
  def unwrap
13
18
  @item_rep
@@ -35,19 +40,6 @@ module Nanoc
35
40
  @item_rep.name
36
41
  end
37
42
 
38
- # Returns the compiled content.
39
- #
40
- # @param [String] snapshot The name of the snapshot from which to
41
- # fetch the compiled content. By default, the returned compiled content
42
- # will be the content compiled right before the first layout call (if
43
- # any).
44
- #
45
- # @return [String] The content at the given snapshot.
46
- def compiled_content(snapshot: nil)
47
- @context.dependency_tracker.bounce(unwrap.item, compiled_content: true)
48
- @context.snapshot_repo.compiled_content(rep: unwrap, snapshot: snapshot)
49
- end
50
-
51
43
  def snapshot?(name)
52
44
  @context.dependency_tracker.bounce(unwrap.item, compiled_content: true)
53
45
  @item_rep.snapshot?(name)
@@ -69,22 +61,9 @@ module Nanoc
69
61
 
70
62
  # Returns the item that this item rep belongs to.
71
63
  #
72
- # @return [Nanoc::ItemWithRepsView]
64
+ # @return [Nanoc::CompilationItemView]
73
65
  def item
74
- Nanoc::ItemWithRepsView.new(@item_rep.item, @context)
75
- end
76
-
77
- # @api private
78
- def raw_path(snapshot: :last)
79
- @context.dependency_tracker.bounce(unwrap.item, compiled_content: true)
80
-
81
- res = @item_rep.raw_path(snapshot: snapshot)
82
-
83
- unless @item_rep.compiled?
84
- Fiber.yield(Nanoc::Int::Errors::UnmetDependency.new(@item_rep))
85
- end
86
-
87
- res
66
+ item_view_class.new(@item_rep.item, @context)
88
67
  end
89
68
 
90
69
  # @api private
@@ -1,13 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nanoc
4
- class ItemWithoutRepsView < ::Nanoc::View
4
+ class BasicItemView < ::Nanoc::View
5
5
  include Nanoc::DocumentViewMixin
6
6
 
7
7
  # Returns the children of this item. For items with identifiers that have
8
8
  # extensions, returns an empty collection.
9
9
  #
10
- # @return [Enumerable<Nanoc::ItemWithRepsView>]
10
+ # @return [Enumerable<Nanoc::CompilationItemView>]
11
11
  def children
12
12
  unless unwrap.identifier.legacy?
13
13
  raise Nanoc::Int::Errors::CannotGetParentOrChildrenOfNonLegacyItem.new(unwrap.identifier)
@@ -22,7 +22,7 @@ module Nanoc
22
22
  # Returns the parent of this item, if one exists. For items with identifiers
23
23
  # that have extensions, returns nil.
24
24
  #
25
- # @return [Nanoc::ItemWithRepsView] if the item has a parent
25
+ # @return [Nanoc::CompilationItemView] if the item has a parent
26
26
  #
27
27
  # @return [nil] if the item has no parent
28
28
  def parent
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nanoc
4
+ class CompilationItemRepCollectionView < ::Nanoc::BasicItemRepCollectionView
5
+ # @api private
6
+ def view_class
7
+ Nanoc::CompilationItemRepView
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nanoc
4
+ class CompilationItemRepView < ::Nanoc::BasicItemRepView
5
+ # @abstract
6
+ def item_view_class
7
+ Nanoc::CompilationItemView
8
+ end
9
+
10
+ # Returns the item rep’s raw path. It includes the path to the output
11
+ # directory and the full filename.
12
+ #
13
+ # @param [Symbol] snapshot The snapshot for which the path should be
14
+ # returned.
15
+ #
16
+ # @return [String] The item rep’s raw path.
17
+ def raw_path(snapshot: :last)
18
+ @context.dependency_tracker.bounce(unwrap.item, compiled_content: true)
19
+
20
+ res = @item_rep.raw_path(snapshot: snapshot)
21
+
22
+ unless @item_rep.compiled?
23
+ Fiber.yield(Nanoc::Int::Errors::UnmetDependency.new(@item_rep))
24
+ end
25
+
26
+ res
27
+ end
28
+
29
+ # Returns the compiled content.
30
+ #
31
+ # @param [String] snapshot The name of the snapshot from which to
32
+ # fetch the compiled content. By default, the returned compiled content
33
+ # will be the content compiled right before the first layout call (if
34
+ # any).
35
+ #
36
+ # @return [String] The content at the given snapshot.
37
+ def compiled_content(snapshot: nil)
38
+ @context.dependency_tracker.bounce(unwrap.item, compiled_content: true)
39
+ @context.snapshot_repo.compiled_content(rep: unwrap, snapshot: snapshot)
40
+ end
41
+ end
42
+ end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nanoc
4
- module WithRepsViewMixin
4
+ class CompilationItemView < ::Nanoc::BasicItemView
5
5
  # Returns the compiled content.
6
6
  #
7
7
  # @param [String] rep The name of the representation
@@ -37,9 +37,9 @@ module Nanoc
37
37
 
38
38
  # Returns the representations of this item.
39
39
  #
40
- # @return [Nanoc::ItemRepCollectionView]
40
+ # @return [Nanoc::BasicItemRepCollectionView]
41
41
  def reps
42
- Nanoc::ItemRepCollectionView.new(@context.reps[unwrap], @context)
42
+ Nanoc::CompilationItemRepCollectionView.new(@context.reps[unwrap], @context)
43
43
  end
44
44
  end
45
45
  end
@@ -4,7 +4,7 @@ module Nanoc
4
4
  class ItemCollectionWithRepsView < ::Nanoc::IdentifiableCollectionView
5
5
  # @api private
6
6
  def view_class
7
- Nanoc::ItemWithRepsView
7
+ Nanoc::CompilationItemView
8
8
  end
9
9
  end
10
10
  end
@@ -4,7 +4,7 @@ module Nanoc
4
4
  class ItemCollectionWithoutRepsView < ::Nanoc::IdentifiableCollectionView
5
5
  # @api private
6
6
  def view_class
7
- Nanoc::ItemWithoutRepsView
7
+ Nanoc::BasicItemView
8
8
  end
9
9
  end
10
10
  end
@@ -36,7 +36,7 @@ module Nanoc
36
36
  disallowed_value_classes = Set.new([
37
37
  Nanoc::Int::Item,
38
38
  Nanoc::Int::Layout,
39
- Nanoc::ItemWithRepsView,
39
+ Nanoc::CompilationItemView,
40
40
  Nanoc::LayoutView,
41
41
  ])
42
42
  if disallowed_value_classes.include?(value.class)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nanoc
4
- class MutableItemView < Nanoc::ItemWithoutRepsView
4
+ class MutableItemView < Nanoc::BasicItemView
5
5
  include Nanoc::MutableDocumentViewMixin
6
6
  end
7
7
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nanoc
4
- class PostCompileItemRepCollectionView < Nanoc::ItemRepCollectionView
4
+ class PostCompileItemRepCollectionView < Nanoc::BasicItemRepCollectionView
5
5
  # @api private
6
6
  def view_class
7
7
  Nanoc::PostCompileItemRepView