nanoc 4.11.0 → 4.11.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (154) hide show
  1. checksums.yaml +4 -4
  2. data/NEWS.md +6 -0
  3. data/lib/nanoc.rb +4 -7
  4. data/lib/nanoc/base.rb +3 -3
  5. data/lib/nanoc/base/assertions.rb +1 -1
  6. data/lib/nanoc/base/entities.rb +2 -20
  7. data/lib/nanoc/base/entities/action_sequence.rb +60 -64
  8. data/lib/nanoc/base/entities/checksum_collection.rb +23 -21
  9. data/lib/nanoc/base/entities/dependency.rb +24 -22
  10. data/lib/nanoc/base/entities/outdatedness_reasons.rb +74 -72
  11. data/lib/nanoc/base/entities/outdatedness_status.rb +19 -17
  12. data/lib/nanoc/base/entities/props.rb +119 -117
  13. data/lib/nanoc/base/entities/site.rb +46 -50
  14. data/lib/nanoc/base/errors.rb +183 -198
  15. data/lib/nanoc/base/repos.rb +4 -2
  16. data/lib/nanoc/base/repos/action_sequence_store.rb +44 -42
  17. data/lib/nanoc/base/repos/aggregate_data_source.rb +24 -22
  18. data/lib/nanoc/base/repos/checksum_store.rb +51 -49
  19. data/lib/nanoc/base/repos/compiled_content_cache.rb +47 -45
  20. data/lib/nanoc/base/repos/compiled_content_store.rb +76 -0
  21. data/lib/nanoc/base/repos/config_loader.rb +74 -72
  22. data/lib/nanoc/base/repos/dependency_store.rb +174 -172
  23. data/lib/nanoc/base/repos/in_mem_data_source.rb +17 -15
  24. data/lib/nanoc/base/repos/item_rep_repo.rb +26 -24
  25. data/lib/nanoc/base/repos/outdatedness_store.rb +50 -48
  26. data/lib/nanoc/base/repos/prefixed_data_source.rb +21 -19
  27. data/lib/nanoc/base/repos/site_loader.rb +75 -73
  28. data/lib/nanoc/base/repos/store.rb +93 -91
  29. data/lib/nanoc/base/services.rb +7 -3
  30. data/lib/nanoc/base/services/action_provider.rb +23 -21
  31. data/lib/nanoc/base/services/action_sequence_builder.rb +42 -34
  32. data/lib/nanoc/base/services/compilation_context.rb +49 -47
  33. data/lib/nanoc/base/services/compiler.rb +177 -170
  34. data/lib/nanoc/base/services/compiler/phases.rb +8 -1
  35. data/lib/nanoc/base/services/compiler/phases/abstract.rb +44 -38
  36. data/lib/nanoc/base/services/compiler/phases/cache.rb +34 -28
  37. data/lib/nanoc/base/services/compiler/phases/mark_done.rb +17 -11
  38. data/lib/nanoc/base/services/compiler/phases/notify.rb +21 -0
  39. data/lib/nanoc/base/services/compiler/phases/recalculate.rb +37 -31
  40. data/lib/nanoc/base/services/compiler/phases/resume.rb +47 -48
  41. data/lib/nanoc/base/services/compiler/phases/write.rb +65 -59
  42. data/lib/nanoc/base/services/compiler/stage.rb +27 -8
  43. data/lib/nanoc/base/services/compiler/stages.rb +7 -1
  44. data/lib/nanoc/base/services/compiler/stages/build_reps.rb +25 -19
  45. data/lib/nanoc/base/services/compiler/stages/calculate_checksums.rb +34 -28
  46. data/lib/nanoc/base/services/compiler/stages/cleanup.rb +33 -27
  47. data/lib/nanoc/base/services/compiler/stages/compile_reps.rb +79 -69
  48. data/lib/nanoc/base/services/compiler/stages/determine_outdatedness.rb +46 -40
  49. data/lib/nanoc/base/services/compiler/stages/forget_outdated_dependencies.rb +15 -9
  50. data/lib/nanoc/base/services/compiler/stages/load_stores.rb +28 -22
  51. data/lib/nanoc/base/services/compiler/stages/postprocess.rb +16 -10
  52. data/lib/nanoc/base/services/compiler/stages/preprocess.rb +25 -19
  53. data/lib/nanoc/base/services/compiler/stages/prune.rb +23 -17
  54. data/lib/nanoc/base/services/compiler/stages/store_post_compilation_state.rb +15 -9
  55. data/lib/nanoc/base/services/compiler/stages/store_pre_compilation_state.rb +26 -20
  56. data/lib/nanoc/base/services/compiler_loader.rb +26 -24
  57. data/lib/nanoc/base/services/dependency_tracker.rb +47 -45
  58. data/lib/nanoc/base/services/executor.rb +16 -15
  59. data/lib/nanoc/base/services/filter.rb +37 -5
  60. data/lib/nanoc/base/services/instrumentor.rb +12 -10
  61. data/lib/nanoc/base/services/item_rep_builder.rb +21 -19
  62. data/lib/nanoc/base/services/item_rep_router.rb +72 -70
  63. data/lib/nanoc/base/services/item_rep_selector.rb +48 -46
  64. data/lib/nanoc/base/services/item_rep_writer.rb +58 -53
  65. data/lib/nanoc/base/services/outdatedness_checker.rb +181 -179
  66. data/lib/nanoc/base/services/outdatedness_rule.rb +23 -21
  67. data/lib/nanoc/base/services/outdatedness_rules.rb +5 -3
  68. data/lib/nanoc/base/services/outdatedness_rules/attributes_modified.rb +28 -24
  69. data/lib/nanoc/base/services/outdatedness_rules/code_snippets_modified.rb +20 -16
  70. data/lib/nanoc/base/services/outdatedness_rules/content_modified.rb +13 -9
  71. data/lib/nanoc/base/services/outdatedness_rules/item_collection_extended.rb +12 -8
  72. data/lib/nanoc/base/services/outdatedness_rules/layout_collection_extended.rb +12 -8
  73. data/lib/nanoc/base/services/outdatedness_rules/not_written.rb +10 -6
  74. data/lib/nanoc/base/services/outdatedness_rules/rules_modified.rb +39 -35
  75. data/lib/nanoc/base/services/outdatedness_rules/uses_always_outdated_filter.rb +19 -15
  76. data/lib/nanoc/base/services/pruner.rb +2 -2
  77. data/lib/nanoc/base/views.rb +7 -0
  78. data/lib/nanoc/base/views/basic_item_view.rb +1 -1
  79. data/lib/nanoc/base/views/compilation_item_rep_view.rb +2 -2
  80. data/lib/nanoc/base/views/identifiable_collection_view.rb +2 -2
  81. data/lib/nanoc/base/views/mixins/document_view_mixin.rb +1 -1
  82. data/lib/nanoc/base/views/mixins/mutable_document_view_mixin.rb +5 -5
  83. data/lib/nanoc/base/views/mutable_item_collection_view.rb +3 -3
  84. data/lib/nanoc/base/views/mutable_layout_collection_view.rb +2 -2
  85. data/lib/nanoc/base/views/view_context_for_compilation.rb +6 -6
  86. data/lib/nanoc/base/views/view_context_for_pre_compilation.rb +2 -2
  87. data/lib/nanoc/base/views/view_context_for_shell.rb +2 -2
  88. data/lib/nanoc/checking/check.rb +1 -1
  89. data/lib/nanoc/cli/commands/compile_listeners/abstract.rb +24 -7
  90. data/lib/nanoc/cli/commands/compile_listeners/debug_printer.rb +79 -15
  91. data/lib/nanoc/cli/commands/compile_listeners/diff_generator.rb +4 -7
  92. data/lib/nanoc/cli/commands/compile_listeners/file_action_printer.rb +15 -24
  93. data/lib/nanoc/cli/commands/compile_listeners/timing_recorder.rb +22 -18
  94. data/lib/nanoc/cli/commands/create-site.rb +2 -7
  95. data/lib/nanoc/cli/commands/shell.rb +1 -1
  96. data/lib/nanoc/cli/commands/show-data.rb +9 -9
  97. data/lib/nanoc/cli/logger.rb +1 -1
  98. data/lib/nanoc/data_sources/filesystem.rb +8 -8
  99. data/lib/nanoc/filters/erb.rb +1 -1
  100. data/lib/nanoc/filters/erubi.rb +1 -1
  101. data/lib/nanoc/filters/erubis.rb +1 -1
  102. data/lib/nanoc/filters/haml.rb +1 -1
  103. data/lib/nanoc/filters/sass.rb +1 -1
  104. data/lib/nanoc/filters/slim.rb +1 -1
  105. data/lib/nanoc/helpers/breadcrumbs.rb +2 -2
  106. data/lib/nanoc/helpers/capturing.rb +9 -8
  107. data/lib/nanoc/helpers/filtering.rb +2 -2
  108. data/lib/nanoc/helpers/rendering.rb +1 -1
  109. data/lib/nanoc/rule_dsl.rb +10 -0
  110. data/lib/nanoc/rule_dsl/action_provider.rb +3 -3
  111. data/lib/nanoc/rule_dsl/action_recorder.rb +3 -3
  112. data/lib/nanoc/rule_dsl/action_sequence_calculator.rb +7 -7
  113. data/lib/nanoc/rule_dsl/compilation_rule.rb +2 -2
  114. data/lib/nanoc/rule_dsl/compilation_rule_context.rb +9 -9
  115. data/lib/nanoc/rule_dsl/compiler_dsl.rb +4 -4
  116. data/lib/nanoc/rule_dsl/routing_rule.rb +3 -3
  117. data/lib/nanoc/rule_dsl/rule.rb +5 -5
  118. data/lib/nanoc/rule_dsl/rule_context.rb +3 -3
  119. data/lib/nanoc/rule_dsl/rules_collection.rb +4 -4
  120. data/lib/nanoc/spec.rb +15 -15
  121. data/lib/nanoc/version.rb +1 -1
  122. metadata +10 -111
  123. data/lib/nanoc/base/contracts_support.rb +0 -130
  124. data/lib/nanoc/base/core_ext.rb +0 -5
  125. data/lib/nanoc/base/core_ext/array.rb +0 -50
  126. data/lib/nanoc/base/core_ext/hash.rb +0 -54
  127. data/lib/nanoc/base/core_ext/string.rb +0 -16
  128. data/lib/nanoc/base/entities/code_snippet.rb +0 -53
  129. data/lib/nanoc/base/entities/configuration-schema.json +0 -122
  130. data/lib/nanoc/base/entities/configuration.rb +0 -206
  131. data/lib/nanoc/base/entities/content.rb +0 -112
  132. data/lib/nanoc/base/entities/context.rb +0 -70
  133. data/lib/nanoc/base/entities/directed_graph.rb +0 -195
  134. data/lib/nanoc/base/entities/document.rb +0 -125
  135. data/lib/nanoc/base/entities/identifiable_collection.rb +0 -141
  136. data/lib/nanoc/base/entities/identifier.rb +0 -222
  137. data/lib/nanoc/base/entities/item.rb +0 -10
  138. data/lib/nanoc/base/entities/item_collection.rb +0 -14
  139. data/lib/nanoc/base/entities/item_rep.rb +0 -91
  140. data/lib/nanoc/base/entities/layout.rb +0 -10
  141. data/lib/nanoc/base/entities/layout_collection.rb +0 -14
  142. data/lib/nanoc/base/entities/lazy_value.rb +0 -43
  143. data/lib/nanoc/base/entities/pattern.rb +0 -85
  144. data/lib/nanoc/base/entities/processing_action.rb +0 -21
  145. data/lib/nanoc/base/entities/processing_actions.rb +0 -5
  146. data/lib/nanoc/base/entities/processing_actions/filter.rb +0 -36
  147. data/lib/nanoc/base/entities/processing_actions/layout.rb +0 -36
  148. data/lib/nanoc/base/entities/processing_actions/snapshot.rb +0 -46
  149. data/lib/nanoc/base/entities/snapshot_def.rb +0 -22
  150. data/lib/nanoc/base/repos/data_source.rb +0 -168
  151. data/lib/nanoc/base/repos/snapshot_repo.rb +0 -67
  152. data/lib/nanoc/base/services/checksummer.rb +0 -274
  153. data/lib/nanoc/base/services/notification_center.rb +0 -87
  154. data/lib/nanoc/base/services/temp_filename_factory.rb +0 -52
@@ -43,9 +43,9 @@ module Nanoc::RuleDSL
43
43
  # @return [Nanoc::Int::ActionSequence]
44
44
  def [](obj)
45
45
  case obj
46
- when Nanoc::Int::ItemRep
46
+ when Nanoc::Core::ItemRep
47
47
  new_action_sequence_for_rep(obj)
48
- when Nanoc::Int::Layout
48
+ when Nanoc::Core::Layout
49
49
  new_action_sequence_for_layout(obj)
50
50
  else
51
51
  raise UnsupportedObjectTypeException.new(obj)
@@ -66,7 +66,7 @@ module Nanoc::RuleDSL
66
66
  recorder.snapshot(:raw)
67
67
  rule.apply_to(rep, recorder: recorder, site: @site, view_context: view_context)
68
68
  recorder.snapshot(:post) if recorder.any_layouts?
69
- recorder.snapshot(:last) unless recorder.last_snapshot?
69
+ recorder.snapshot(:last)
70
70
  recorder.snapshot(:pre) unless recorder.pre_snapshot?
71
71
 
72
72
  copy_paths_from_routing_rules(
@@ -76,7 +76,7 @@ module Nanoc::RuleDSL
76
76
  )
77
77
  end
78
78
 
79
- # @param [Nanoc::Int::Layout] layout
79
+ # @param [Nanoc::Core::Layout] layout
80
80
  #
81
81
  # @return [Nanoc::Int::ActionSequence]
82
82
  def new_action_sequence_for_layout(layout)
@@ -86,7 +86,7 @@ module Nanoc::RuleDSL
86
86
  raise NoActionSequenceForLayoutException.new(layout)
87
87
  end
88
88
 
89
- Nanoc::Int::ActionSequence.build(layout) do |b|
89
+ Nanoc::Int::ActionSequenceBuilder.build(layout) do |b|
90
90
  b.add_filter(res[0], res[1])
91
91
  end
92
92
  end
@@ -94,7 +94,7 @@ module Nanoc::RuleDSL
94
94
  def compact_snapshots(seq)
95
95
  actions = []
96
96
  seq.actions.each do |action|
97
- if [actions.last, action].all? { |a| a.is_a?(Nanoc::Int::ProcessingActions::Snapshot) }
97
+ if [actions.last, action].all? { |a| a.is_a?(Nanoc::Core::ProcessingActions::Snapshot) }
98
98
  actions[-1] = actions.last.update(snapshot_names: action.snapshot_names, paths: action.paths)
99
99
  else
100
100
  actions << action
@@ -108,7 +108,7 @@ module Nanoc::RuleDSL
108
108
 
109
109
  seq.map do |action|
110
110
  # Only potentially modify snapshot actions
111
- next action unless action.is_a?(Nanoc::Int::ProcessingActions::Snapshot)
111
+ next action unless action.is_a?(Nanoc::Core::ProcessingActions::Snapshot)
112
112
 
113
113
  # If any of the action’s snapshot are explicitly marked as excluded from
114
114
  # getting a path from a routing rule, then ignore routing rules.
@@ -2,9 +2,9 @@
2
2
 
3
3
  module Nanoc::RuleDSL
4
4
  class CompilationRule < Rule
5
- include Nanoc::Int::ContractsSupport
5
+ include Nanoc::Core::ContractsSupport
6
6
 
7
- contract Nanoc::Int::ItemRep, C::KeywordArgs[
7
+ contract Nanoc::Core::ItemRep, C::KeywordArgs[
8
8
  site: Nanoc::Int::Site,
9
9
  recorder: Nanoc::RuleDSL::ActionRecorder,
10
10
  view_context: Nanoc::ViewContextForPreCompilation,
@@ -2,10 +2,10 @@
2
2
 
3
3
  module Nanoc::RuleDSL
4
4
  class CompilationRuleContext < RuleContext
5
- include Nanoc::Int::ContractsSupport
5
+ include Nanoc::Core::ContractsSupport
6
6
 
7
7
  contract C::KeywordArgs[
8
- rep: Nanoc::Int::ItemRep,
8
+ rep: Nanoc::Core::ItemRep,
9
9
  site: Nanoc::Int::Site,
10
10
  recorder: Nanoc::RuleDSL::ActionRecorder,
11
11
  view_context: Nanoc::ViewContextForPreCompilation,
@@ -16,10 +16,10 @@ module Nanoc::RuleDSL
16
16
  super(rep: rep, site: site, view_context: view_context)
17
17
  end
18
18
 
19
- # Filters the current representation (calls {Nanoc::Int::ItemRep#filter} with
19
+ # Filters the current representation (calls {Nanoc::Core::ItemRep#filter} with
20
20
  # the given arguments on the rep).
21
21
  #
22
- # @see Nanoc::Int::ItemRep#filter
22
+ # @see Nanoc::Core::ItemRep#filter
23
23
  #
24
24
  # @param [Symbol] filter_name The name of the filter to run the item
25
25
  # representations' content through
@@ -32,10 +32,10 @@ module Nanoc::RuleDSL
32
32
  @_recorder.filter(filter_name, filter_args)
33
33
  end
34
34
 
35
- # Layouts the current representation (calls {Nanoc::Int::ItemRep#layout} with
35
+ # Layouts the current representation (calls {Nanoc::Core::ItemRep#layout} with
36
36
  # the given arguments on the rep).
37
37
  #
38
- # @see Nanoc::Int::ItemRep#layout
38
+ # @see Nanoc::Core::ItemRep#layout
39
39
  #
40
40
  # @param [String] layout_identifier The identifier of the layout the item
41
41
  # should be laid out with
@@ -46,9 +46,9 @@ module Nanoc::RuleDSL
46
46
  end
47
47
 
48
48
  # Creates a snapshot of the current compiled item content. Calls
49
- # {Nanoc::Int::ItemRep#snapshot} with the given arguments on the rep.
49
+ # {Nanoc::Core::ItemRep#snapshot} with the given arguments on the rep.
50
50
  #
51
- # @see Nanoc::Int::ItemRep#snapshot
51
+ # @see Nanoc::Core::ItemRep#snapshot
52
52
  #
53
53
  # @param [Symbol] snapshot_name The name of the snapshot to create
54
54
  #
@@ -73,7 +73,7 @@ module Nanoc::RuleDSL
73
73
  @_write_snapshot_counter += 1
74
74
 
75
75
  case arg
76
- when String, Nanoc::Identifier, nil
76
+ when String, Nanoc::Core::Identifier, nil
77
77
  snapshot(snapshot_name, path: arg)
78
78
  when Hash
79
79
  if arg.key?(:ext)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nanoc::RuleDSL
4
- class CompilerDSL < Nanoc::Int::Context
4
+ class CompilerDSL < Nanoc::Core::Context
5
5
  # The current rules filename.
6
6
  #
7
7
  # @return [String] The current rules filename.
@@ -140,7 +140,7 @@ module Nanoc::RuleDSL
140
140
  #
141
141
  # layout '/custom/', :haml, :format => :html5
142
142
  def layout(identifier, filter_name, params = {})
143
- pattern = Nanoc::Int::Pattern.from(create_pattern(identifier))
143
+ pattern = Nanoc::Core::Pattern.from(create_pattern(identifier))
144
144
  @rules_collection.layout_filter_mapping[pattern] = [filter_name, params]
145
145
  end
146
146
 
@@ -254,9 +254,9 @@ module Nanoc::RuleDSL
254
254
  def create_pattern(arg)
255
255
  case @config[:string_pattern_type]
256
256
  when 'glob'
257
- Nanoc::Int::Pattern.from(arg)
257
+ Nanoc::Core::Pattern.from(arg)
258
258
  when 'legacy'
259
- Nanoc::Int::Pattern.from(identifier_to_regex(arg))
259
+ Nanoc::Core::Pattern.from(identifier_to_regex(arg))
260
260
  else
261
261
  raise(
262
262
  Nanoc::Int::Errors::GenericTrivial,
@@ -2,19 +2,19 @@
2
2
 
3
3
  module Nanoc::RuleDSL
4
4
  class RoutingRule < Rule
5
- include Nanoc::Int::ContractsSupport
5
+ include Nanoc::Core::ContractsSupport
6
6
 
7
7
  contract C::None => C::Maybe[Symbol]
8
8
  attr_reader :snapshot_name
9
9
 
10
- contract Nanoc::Int::Pattern, Symbol, Proc, C::KeywordArgs[snapshot_name: C::Optional[Symbol]] => C::Any
10
+ contract Nanoc::Core::Pattern, Symbol, Proc, C::KeywordArgs[snapshot_name: C::Optional[Symbol]] => C::Any
11
11
  def initialize(pattern, rep_name, block, snapshot_name: nil)
12
12
  super(pattern, rep_name, block)
13
13
 
14
14
  @snapshot_name = snapshot_name
15
15
  end
16
16
 
17
- contract Nanoc::Int::ItemRep, C::KeywordArgs[
17
+ contract Nanoc::Core::ItemRep, C::KeywordArgs[
18
18
  site: Nanoc::Int::Site,
19
19
  view_context: Nanoc::ViewContextForPreCompilation,
20
20
  ] => C::Any
@@ -2,28 +2,28 @@
2
2
 
3
3
  module Nanoc::RuleDSL
4
4
  class Rule
5
- include Nanoc::Int::ContractsSupport
5
+ include Nanoc::Core::ContractsSupport
6
6
 
7
7
  contract C::None => Symbol
8
8
  attr_reader :rep_name
9
9
 
10
- contract C::None => Nanoc::Int::Pattern
10
+ contract C::None => Nanoc::Core::Pattern
11
11
  attr_reader :pattern
12
12
 
13
- contract Nanoc::Int::Pattern, Symbol, Proc => C::Any
13
+ contract Nanoc::Core::Pattern, Symbol, Proc => C::Any
14
14
  def initialize(pattern, rep_name, block)
15
15
  @pattern = pattern
16
16
  @rep_name = rep_name.to_sym
17
17
  @block = block
18
18
  end
19
19
 
20
- contract Nanoc::Int::Item => C::Bool
20
+ contract Nanoc::Core::Item => C::Bool
21
21
  def applicable_to?(item)
22
22
  @pattern.match?(item.identifier)
23
23
  end
24
24
 
25
25
  # @api private
26
- contract Nanoc::Identifier => C::Or[nil, C::ArrayOf[String]]
26
+ contract Nanoc::Core::Identifier => C::Or[nil, C::ArrayOf[String]]
27
27
  def matches(identifier)
28
28
  @pattern.captures(identifier)
29
29
  end
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nanoc::RuleDSL
4
- class RuleContext < Nanoc::Int::Context
5
- include Nanoc::Int::ContractsSupport
4
+ class RuleContext < Nanoc::Core::Context
5
+ include Nanoc::Core::ContractsSupport
6
6
 
7
7
  contract C::KeywordArgs[
8
- rep: Nanoc::Int::ItemRep,
8
+ rep: Nanoc::Core::ItemRep,
9
9
  site: Nanoc::Int::Site,
10
10
  view_context: Nanoc::ViewContextForPreCompilation,
11
11
  ] => C::Any
@@ -54,7 +54,7 @@ module Nanoc::RuleDSL
54
54
  @item_routing_rules << rule
55
55
  end
56
56
 
57
- # @param [Nanoc::Int::Item] item The item for which the compilation rules
57
+ # @param [Nanoc::Core::Item] item The item for which the compilation rules
58
58
  # should be retrieved
59
59
  #
60
60
  # @return [Array] The list of item compilation rules for the given item
@@ -65,7 +65,7 @@ module Nanoc::RuleDSL
65
65
  # Finds the first matching compilation rule for the given item
66
66
  # representation.
67
67
  #
68
- # @param [Nanoc::Int::ItemRep] rep The item rep for which to fetch the rule
68
+ # @param [Nanoc::Core::ItemRep] rep The item rep for which to fetch the rule
69
69
  #
70
70
  # @return [Nanoc::Int::Rule, nil] The compilation rule for the given item rep,
71
71
  # or nil if no rules have been found
@@ -80,7 +80,7 @@ module Nanoc::RuleDSL
80
80
  # returned. The result is a hash containing the corresponding rule for
81
81
  # each snapshot.
82
82
  #
83
- # @param [Nanoc::Int::ItemRep] rep The item rep for which to fetch the rules
83
+ # @param [Nanoc::Core::ItemRep] rep The item rep for which to fetch the rules
84
84
  #
85
85
  # @return [Hash<Symbol, Nanoc::Int::Rule>] The routing rules for the given rep
86
86
  def routing_rules_for(rep)
@@ -97,7 +97,7 @@ module Nanoc::RuleDSL
97
97
 
98
98
  # Finds the filter name and arguments to use for the given layout.
99
99
  #
100
- # @param [Nanoc::Int::Layout] layout The layout for which to fetch the filter.
100
+ # @param [Nanoc::Core::Layout] layout The layout for which to fetch the filter.
101
101
  #
102
102
  # @return [Array, nil] A tuple containing the filter name and the filter
103
103
  # arguments for the given layout.
@@ -58,12 +58,12 @@ module Nanoc
58
58
 
59
59
  @erbout = +''
60
60
  @action_sequence = {}
61
- @config = Nanoc::Int::Configuration.new(dir: Dir.getwd).with_defaults
61
+ @config = Nanoc::Core::Configuration.new(dir: Dir.getwd).with_defaults
62
62
  @reps = Nanoc::Int::ItemRepRepo.new
63
- @items = Nanoc::Int::ItemCollection.new(@config)
64
- @layouts = Nanoc::Int::LayoutCollection.new(@config)
63
+ @items = Nanoc::Core::ItemCollection.new(@config)
64
+ @layouts = Nanoc::Core::LayoutCollection.new(@config)
65
65
  @dependency_tracker = Nanoc::Int::DependencyTracker.new(Object.new)
66
- @snapshot_repo = Nanoc::Int::SnapshotRepo.new
66
+ @compiled_content_store = Nanoc::Int::CompiledContentStore.new
67
67
  @action_provider = new_action_provider
68
68
  end
69
69
 
@@ -73,11 +73,11 @@ module Nanoc
73
73
  #
74
74
  # @param [Hash] attributes A hash containing this item's attributes
75
75
  #
76
- # @param [Nanoc::Identifier, String] identifier This item's identifier
76
+ # @param [Nanoc::Core::Identifier, String] identifier This item's identifier
77
77
  #
78
78
  # @return [Nanoc::CompilationItemView] A view for the newly created item
79
79
  def create_item(content, attributes, identifier)
80
- item = Nanoc::Int::Item.new(content, attributes, identifier)
80
+ item = Nanoc::Core::Item.new(content, attributes, identifier)
81
81
  @items = @items.add(item)
82
82
  self
83
83
  end
@@ -88,11 +88,11 @@ module Nanoc
88
88
  #
89
89
  # @param [Hash] attributes A hash containing this layout's attributes
90
90
  #
91
- # @param [Nanoc::Identifier, String] identifier This layout's identifier
91
+ # @param [Nanoc::Core::Identifier, String] identifier This layout's identifier
92
92
  #
93
93
  # @return [Nanoc::CompilationItemView] A view for the newly created layout
94
94
  def create_layout(content, attributes, identifier)
95
- layout = Nanoc::Int::Layout.new(content, attributes, identifier)
95
+ layout = Nanoc::Core::Layout.new(content, attributes, identifier)
96
96
  @layouts = @layouts.add(layout)
97
97
  self
98
98
  end
@@ -104,7 +104,7 @@ module Nanoc
104
104
  # @param [String] path The path of the `:last` snapshot of this item representation
105
105
  # @param [Symbol] rep The rep name to create
106
106
  def create_rep(item, path, rep = :default)
107
- rep = Nanoc::Int::ItemRep.new(item._unwrap, rep)
107
+ rep = Nanoc::Core::ItemRep.new(item._unwrap, rep)
108
108
  rep.paths[:last] = [path]
109
109
  @reps << rep
110
110
  self
@@ -113,7 +113,7 @@ module Nanoc
113
113
  # @return [Object] An object that includes the helper functions
114
114
  def helper
115
115
  mod = @mod
116
- klass = Class.new(Nanoc::Int::Context) { include mod }
116
+ klass = Class.new(Nanoc::Core::Context) { include mod }
117
117
  klass.new(assigns)
118
118
  end
119
119
 
@@ -158,8 +158,8 @@ module Nanoc
158
158
  @action_sequence[obj] = memory
159
159
  end
160
160
 
161
- def snapshot_repo
162
- view_context.snapshot_repo
161
+ def compiled_content_store
162
+ view_context.compiled_content_store
163
163
  end
164
164
 
165
165
  private
@@ -171,7 +171,7 @@ module Nanoc
171
171
  reps: @reps,
172
172
  site: @site,
173
173
  compiled_content_cache: :__compiled_content_cache,
174
- snapshot_repo: @snapshot_repo,
174
+ compiled_content_store: @compiled_content_store,
175
175
  )
176
176
 
177
177
  Nanoc::ViewContextForCompilation.new(
@@ -179,7 +179,7 @@ module Nanoc
179
179
  items: @items,
180
180
  dependency_tracker: @dependency_tracker,
181
181
  compilation_context: compilation_context,
182
- snapshot_repo: @snapshot_repo,
182
+ compiled_content_store: @compiled_content_store,
183
183
  )
184
184
  end
185
185
 
@@ -202,7 +202,7 @@ module Nanoc
202
202
  end
203
203
 
204
204
  def snapshots_defs_for(_rep)
205
- [Nanoc::Int::SnapshotDef.new(:last, binary: false)]
205
+ [Nanoc::Core::SnapshotDef.new(:last, binary: false)]
206
206
  end
207
207
  end.new(self)
208
208
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Nanoc
4
4
  # The current Nanoc version.
5
- VERSION = '4.11.0'
5
+ VERSION = '4.11.1'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nanoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.11.0
4
+ version: 4.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Defreyne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-01 00:00:00.000000000 Z
11
+ date: 2019-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -39,75 +39,19 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.15'
41
41
  - !ruby/object:Gem::Dependency
42
- name: ddmemoize
42
+ name: nanoc-core
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '1.0'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '1.0'
55
- - !ruby/object:Gem::Dependency
56
- name: ddmetrics
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '1.0'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '1.0'
69
- - !ruby/object:Gem::Dependency
70
- name: ddplugin
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
45
+ - - '='
74
46
  - !ruby/object:Gem::Version
75
- version: '1.0'
47
+ version: 4.11.1
76
48
  type: :runtime
77
49
  prerelease: false
78
50
  version_requirements: !ruby/object:Gem::Requirement
79
51
  requirements:
80
- - - "~>"
52
+ - - '='
81
53
  - !ruby/object:Gem::Version
82
- version: '1.0'
83
- - !ruby/object:Gem::Dependency
84
- name: hamster
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '3.0'
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '3.0'
97
- - !ruby/object:Gem::Dependency
98
- name: json_schema
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '0.19'
104
- type: :runtime
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '0.19'
54
+ version: 4.11.1
111
55
  - !ruby/object:Gem::Dependency
112
56
  name: parallel
113
57
  requirement: !ruby/object:Gem::Requirement
@@ -122,20 +66,6 @@ dependencies:
122
66
  - - "~>"
123
67
  - !ruby/object:Gem::Version
124
68
  version: '1.12'
125
- - !ruby/object:Gem::Dependency
126
- name: ref
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: '2.0'
132
- type: :runtime
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: '2.0'
139
69
  - !ruby/object:Gem::Dependency
140
70
  name: slow_enumerator_tools
141
71
  requirement: !ruby/object:Gem::Requirement
@@ -182,41 +112,14 @@ files:
182
112
  - lib/nanoc/base.rb
183
113
  - lib/nanoc/base/assertions.rb
184
114
  - lib/nanoc/base/changes_stream.rb
185
- - lib/nanoc/base/contracts_support.rb
186
- - lib/nanoc/base/core_ext.rb
187
- - lib/nanoc/base/core_ext/array.rb
188
- - lib/nanoc/base/core_ext/hash.rb
189
- - lib/nanoc/base/core_ext/string.rb
190
115
  - lib/nanoc/base/entities.rb
191
116
  - lib/nanoc/base/entities/action_sequence.rb
192
117
  - lib/nanoc/base/entities/checksum_collection.rb
193
- - lib/nanoc/base/entities/code_snippet.rb
194
- - lib/nanoc/base/entities/configuration-schema.json
195
- - lib/nanoc/base/entities/configuration.rb
196
- - lib/nanoc/base/entities/content.rb
197
- - lib/nanoc/base/entities/context.rb
198
118
  - lib/nanoc/base/entities/dependency.rb
199
- - lib/nanoc/base/entities/directed_graph.rb
200
- - lib/nanoc/base/entities/document.rb
201
- - lib/nanoc/base/entities/identifiable_collection.rb
202
- - lib/nanoc/base/entities/identifier.rb
203
- - lib/nanoc/base/entities/item.rb
204
- - lib/nanoc/base/entities/item_collection.rb
205
- - lib/nanoc/base/entities/item_rep.rb
206
- - lib/nanoc/base/entities/layout.rb
207
- - lib/nanoc/base/entities/layout_collection.rb
208
- - lib/nanoc/base/entities/lazy_value.rb
209
119
  - lib/nanoc/base/entities/outdatedness_reasons.rb
210
120
  - lib/nanoc/base/entities/outdatedness_status.rb
211
- - lib/nanoc/base/entities/pattern.rb
212
- - lib/nanoc/base/entities/processing_action.rb
213
- - lib/nanoc/base/entities/processing_actions.rb
214
- - lib/nanoc/base/entities/processing_actions/filter.rb
215
- - lib/nanoc/base/entities/processing_actions/layout.rb
216
- - lib/nanoc/base/entities/processing_actions/snapshot.rb
217
121
  - lib/nanoc/base/entities/props.rb
218
122
  - lib/nanoc/base/entities/site.rb
219
- - lib/nanoc/base/entities/snapshot_def.rb
220
123
  - lib/nanoc/base/error.rb
221
124
  - lib/nanoc/base/errors.rb
222
125
  - lib/nanoc/base/feature.rb
@@ -225,26 +128,25 @@ files:
225
128
  - lib/nanoc/base/repos/aggregate_data_source.rb
226
129
  - lib/nanoc/base/repos/checksum_store.rb
227
130
  - lib/nanoc/base/repos/compiled_content_cache.rb
131
+ - lib/nanoc/base/repos/compiled_content_store.rb
228
132
  - lib/nanoc/base/repos/config_loader.rb
229
- - lib/nanoc/base/repos/data_source.rb
230
133
  - lib/nanoc/base/repos/dependency_store.rb
231
134
  - lib/nanoc/base/repos/in_mem_data_source.rb
232
135
  - lib/nanoc/base/repos/item_rep_repo.rb
233
136
  - lib/nanoc/base/repos/outdatedness_store.rb
234
137
  - lib/nanoc/base/repos/prefixed_data_source.rb
235
138
  - lib/nanoc/base/repos/site_loader.rb
236
- - lib/nanoc/base/repos/snapshot_repo.rb
237
139
  - lib/nanoc/base/repos/store.rb
238
140
  - lib/nanoc/base/services.rb
239
141
  - lib/nanoc/base/services/action_provider.rb
240
142
  - lib/nanoc/base/services/action_sequence_builder.rb
241
- - lib/nanoc/base/services/checksummer.rb
242
143
  - lib/nanoc/base/services/compilation_context.rb
243
144
  - lib/nanoc/base/services/compiler.rb
244
145
  - lib/nanoc/base/services/compiler/phases.rb
245
146
  - lib/nanoc/base/services/compiler/phases/abstract.rb
246
147
  - lib/nanoc/base/services/compiler/phases/cache.rb
247
148
  - lib/nanoc/base/services/compiler/phases/mark_done.rb
149
+ - lib/nanoc/base/services/compiler/phases/notify.rb
248
150
  - lib/nanoc/base/services/compiler/phases/recalculate.rb
249
151
  - lib/nanoc/base/services/compiler/phases/resume.rb
250
152
  - lib/nanoc/base/services/compiler/phases/write.rb
@@ -271,7 +173,6 @@ files:
271
173
  - lib/nanoc/base/services/item_rep_router.rb
272
174
  - lib/nanoc/base/services/item_rep_selector.rb
273
175
  - lib/nanoc/base/services/item_rep_writer.rb
274
- - lib/nanoc/base/services/notification_center.rb
275
176
  - lib/nanoc/base/services/outdatedness_checker.rb
276
177
  - lib/nanoc/base/services/outdatedness_rule.rb
277
178
  - lib/nanoc/base/services/outdatedness_rules.rb
@@ -284,7 +185,6 @@ files:
284
185
  - lib/nanoc/base/services/outdatedness_rules/rules_modified.rb
285
186
  - lib/nanoc/base/services/outdatedness_rules/uses_always_outdated_filter.rb
286
187
  - lib/nanoc/base/services/pruner.rb
287
- - lib/nanoc/base/services/temp_filename_factory.rb
288
188
  - lib/nanoc/base/views.rb
289
189
  - lib/nanoc/base/views/basic_item_rep_collection_view.rb
290
190
  - lib/nanoc/base/views/basic_item_rep_view.rb
@@ -454,8 +354,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
454
354
  - !ruby/object:Gem::Version
455
355
  version: '0'
456
356
  requirements: []
457
- rubyforge_project:
458
- rubygems_version: 2.7.8
357
+ rubygems_version: 3.0.2
459
358
  signing_key:
460
359
  specification_version: 4
461
360
  summary: A static-site generator with a focus on flexibility.