nanoc-core 4.11.12 → 4.11.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nanoc/core.rb +37 -0
- data/lib/nanoc/core/basic_item_rep_collection_view.rb +88 -0
- data/lib/nanoc/core/basic_item_rep_view.rb +83 -0
- data/lib/nanoc/core/basic_item_view.rb +54 -0
- data/lib/nanoc/core/checksummer.rb +2 -0
- data/lib/nanoc/core/compilation_item_rep_collection_view.rb +12 -0
- data/lib/nanoc/core/compilation_item_rep_view.rb +51 -0
- data/lib/nanoc/core/compilation_item_view.rb +47 -0
- data/lib/nanoc/core/compilation_phases/abstract.rb +48 -0
- data/lib/nanoc/core/compilation_phases/cache.rb +43 -0
- data/lib/nanoc/core/compilation_phases/mark_done.rb +23 -0
- data/lib/nanoc/core/compilation_phases/notify.rb +19 -0
- data/lib/nanoc/core/compilation_phases/recalculate.rb +49 -0
- data/lib/nanoc/core/compilation_phases/resume.rb +52 -0
- data/lib/nanoc/core/compilation_phases/write.rb +84 -0
- data/lib/nanoc/core/compilation_stages/build_reps.rb +36 -0
- data/lib/nanoc/core/compilation_stages/calculate_checksums.rb +42 -0
- data/lib/nanoc/core/compilation_stages/cleanup.rb +43 -0
- data/lib/nanoc/core/compilation_stages/compile_reps.rb +96 -0
- data/lib/nanoc/core/compilation_stages/determine_outdatedness.rb +49 -0
- data/lib/nanoc/core/compilation_stages/forget_outdated_dependencies.rb +20 -0
- data/lib/nanoc/core/compilation_stages/load_stores.rb +35 -0
- data/lib/nanoc/core/compilation_stages/postprocess.rb +21 -0
- data/lib/nanoc/core/compilation_stages/preprocess.rb +32 -0
- data/lib/nanoc/core/compilation_stages/prune.rb +30 -0
- data/lib/nanoc/core/compilation_stages/store_post_compilation_state.rb +20 -0
- data/lib/nanoc/core/compilation_stages/store_pre_compilation_state.rb +32 -0
- data/lib/nanoc/core/compiler.rb +214 -0
- data/lib/nanoc/core/compiler_loader.rb +48 -0
- data/lib/nanoc/core/config_loader.rb +95 -0
- data/lib/nanoc/core/config_view.rb +67 -0
- data/lib/nanoc/core/configuration.rb +2 -4
- data/lib/nanoc/core/document_view_mixin.rb +87 -0
- data/lib/nanoc/core/errors.rb +97 -0
- data/lib/nanoc/core/executor.rb +134 -0
- data/lib/nanoc/core/feature.rb +92 -0
- data/lib/nanoc/core/filter.rb +269 -0
- data/lib/nanoc/core/identifiable_collection_view.rb +111 -0
- data/lib/nanoc/core/item_collection_with_reps_view.rb +12 -0
- data/lib/nanoc/core/item_collection_without_reps_view.rb +12 -0
- data/lib/nanoc/core/item_rep_builder.rb +54 -0
- data/lib/nanoc/core/item_rep_selector.rb +67 -0
- data/lib/nanoc/core/item_rep_writer.rb +85 -0
- data/lib/nanoc/core/layout_collection_view.rb +12 -0
- data/lib/nanoc/core/layout_view.rb +9 -0
- data/lib/nanoc/core/mutable_config_view.rb +16 -0
- data/lib/nanoc/core/mutable_document_view_mixin.rb +60 -0
- data/lib/nanoc/core/mutable_identifiable_collection_view.rb +19 -0
- data/lib/nanoc/core/mutable_item_collection_view.rb +34 -0
- data/lib/nanoc/core/mutable_item_view.rb +9 -0
- data/lib/nanoc/core/mutable_layout_collection_view.rb +26 -0
- data/lib/nanoc/core/mutable_layout_view.rb +9 -0
- data/lib/nanoc/core/outdatedness_checker.rb +222 -0
- data/lib/nanoc/core/outdatedness_rules/attributes_modified.rb +41 -0
- data/lib/nanoc/core/outdatedness_rules/code_snippets_modified.rb +31 -0
- data/lib/nanoc/core/outdatedness_rules/content_modified.rb +21 -0
- data/lib/nanoc/core/outdatedness_rules/item_collection_extended.rb +20 -0
- data/lib/nanoc/core/outdatedness_rules/layout_collection_extended.rb +20 -0
- data/lib/nanoc/core/outdatedness_rules/not_written.rb +17 -0
- data/lib/nanoc/core/outdatedness_rules/rules_modified.rb +45 -0
- data/lib/nanoc/core/outdatedness_rules/uses_always_outdated_filter.rb +26 -0
- data/lib/nanoc/core/post_compile_item_collection_view.rb +12 -0
- data/lib/nanoc/core/post_compile_item_rep_collection_view.rb +12 -0
- data/lib/nanoc/core/post_compile_item_rep_view.rb +33 -0
- data/lib/nanoc/core/post_compile_item_view.rb +20 -0
- data/lib/nanoc/core/pruner.rb +119 -0
- data/lib/nanoc/core/site_loader.rb +102 -0
- data/lib/nanoc/core/trivial_error.rb +10 -0
- data/lib/nanoc/core/version.rb +1 -1
- data/lib/nanoc/core/view.rb +43 -0
- data/lib/nanoc/core/view_context_for_compilation.rb +6 -6
- metadata +95 -2
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Nanoc
|
4
|
+
module Core
|
5
|
+
# Generic trivial error. Superclass for all Nanoc-specific errors that are
|
6
|
+
# considered "trivial", i.e. errors that do not require a full crash report.
|
7
|
+
class TrivialError < ::Nanoc::Core::Error
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
data/lib/nanoc/core/version.rb
CHANGED
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Nanoc
|
4
|
+
module Core
|
5
|
+
class View
|
6
|
+
include Nanoc::Core::ContractsSupport
|
7
|
+
|
8
|
+
# @api private
|
9
|
+
# TODO: disallow nil
|
10
|
+
contract C::Maybe[C::Or[
|
11
|
+
Nanoc::Core::ViewContextForCompilation,
|
12
|
+
Nanoc::Core::ViewContextForPreCompilation,
|
13
|
+
Nanoc::Core::ViewContextForShell
|
14
|
+
]] => C::Any
|
15
|
+
def initialize(context)
|
16
|
+
@context = context
|
17
|
+
end
|
18
|
+
|
19
|
+
# @api private
|
20
|
+
def _context
|
21
|
+
@context
|
22
|
+
end
|
23
|
+
|
24
|
+
# @api private
|
25
|
+
def _unwrap
|
26
|
+
raise NotImplementedError
|
27
|
+
end
|
28
|
+
|
29
|
+
# True if the wrapped object is frozen; false otherwise.
|
30
|
+
#
|
31
|
+
# @return [Boolean]
|
32
|
+
#
|
33
|
+
# @see Object#frozen?
|
34
|
+
def frozen?
|
35
|
+
_unwrap.frozen?
|
36
|
+
end
|
37
|
+
|
38
|
+
def inspect
|
39
|
+
"<#{self.class}>"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -37,12 +37,12 @@ module Nanoc
|
|
37
37
|
end
|
38
38
|
|
39
39
|
content_or_filename_assigns.merge(
|
40
|
-
item: Nanoc::CompilationItemView.new(rep.item, self),
|
41
|
-
rep: Nanoc::CompilationItemRepView.new(rep, self),
|
42
|
-
item_rep: Nanoc::CompilationItemRepView.new(rep, self),
|
43
|
-
items: Nanoc::ItemCollectionWithRepsView.new(site.items, self),
|
44
|
-
layouts: Nanoc::LayoutCollectionView.new(site.layouts, self),
|
45
|
-
config: Nanoc::ConfigView.new(site.config, self),
|
40
|
+
item: Nanoc::Core::CompilationItemView.new(rep.item, self),
|
41
|
+
rep: Nanoc::Core::CompilationItemRepView.new(rep, self),
|
42
|
+
item_rep: Nanoc::Core::CompilationItemRepView.new(rep, self),
|
43
|
+
items: Nanoc::Core::ItemCollectionWithRepsView.new(site.items, self),
|
44
|
+
layouts: Nanoc::Core::LayoutCollectionView.new(site.layouts, self),
|
45
|
+
config: Nanoc::Core::ConfigView.new(site.config, self),
|
46
46
|
)
|
47
47
|
end
|
48
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nanoc-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.11.
|
4
|
+
version: 4.11.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Defreyne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ddmemoize
|
@@ -94,6 +94,34 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '1.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: tomlrb
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1.2'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.2'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: tty-platform
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0.2'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0.2'
|
97
125
|
- !ruby/object:Gem::Dependency
|
98
126
|
name: zeitwerk
|
99
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -124,6 +152,9 @@ files:
|
|
124
152
|
- lib/nanoc/core/action_sequence_store.rb
|
125
153
|
- lib/nanoc/core/aggregate_data_source.rb
|
126
154
|
- lib/nanoc/core/assertions.rb
|
155
|
+
- lib/nanoc/core/basic_item_rep_collection_view.rb
|
156
|
+
- lib/nanoc/core/basic_item_rep_view.rb
|
157
|
+
- lib/nanoc/core/basic_item_view.rb
|
127
158
|
- lib/nanoc/core/binary_compiled_content_cache.rb
|
128
159
|
- lib/nanoc/core/binary_content.rb
|
129
160
|
- lib/nanoc/core/checksum_collection.rb
|
@@ -131,9 +162,35 @@ files:
|
|
131
162
|
- lib/nanoc/core/checksummer.rb
|
132
163
|
- lib/nanoc/core/code_snippet.rb
|
133
164
|
- lib/nanoc/core/compilation_context.rb
|
165
|
+
- lib/nanoc/core/compilation_item_rep_collection_view.rb
|
166
|
+
- lib/nanoc/core/compilation_item_rep_view.rb
|
167
|
+
- lib/nanoc/core/compilation_item_view.rb
|
168
|
+
- lib/nanoc/core/compilation_phases/abstract.rb
|
169
|
+
- lib/nanoc/core/compilation_phases/cache.rb
|
170
|
+
- lib/nanoc/core/compilation_phases/mark_done.rb
|
171
|
+
- lib/nanoc/core/compilation_phases/notify.rb
|
172
|
+
- lib/nanoc/core/compilation_phases/recalculate.rb
|
173
|
+
- lib/nanoc/core/compilation_phases/resume.rb
|
174
|
+
- lib/nanoc/core/compilation_phases/write.rb
|
134
175
|
- lib/nanoc/core/compilation_stage.rb
|
176
|
+
- lib/nanoc/core/compilation_stages/build_reps.rb
|
177
|
+
- lib/nanoc/core/compilation_stages/calculate_checksums.rb
|
178
|
+
- lib/nanoc/core/compilation_stages/cleanup.rb
|
179
|
+
- lib/nanoc/core/compilation_stages/compile_reps.rb
|
180
|
+
- lib/nanoc/core/compilation_stages/determine_outdatedness.rb
|
181
|
+
- lib/nanoc/core/compilation_stages/forget_outdated_dependencies.rb
|
182
|
+
- lib/nanoc/core/compilation_stages/load_stores.rb
|
183
|
+
- lib/nanoc/core/compilation_stages/postprocess.rb
|
184
|
+
- lib/nanoc/core/compilation_stages/preprocess.rb
|
185
|
+
- lib/nanoc/core/compilation_stages/prune.rb
|
186
|
+
- lib/nanoc/core/compilation_stages/store_post_compilation_state.rb
|
187
|
+
- lib/nanoc/core/compilation_stages/store_pre_compilation_state.rb
|
135
188
|
- lib/nanoc/core/compiled_content_cache.rb
|
136
189
|
- lib/nanoc/core/compiled_content_store.rb
|
190
|
+
- lib/nanoc/core/compiler.rb
|
191
|
+
- lib/nanoc/core/compiler_loader.rb
|
192
|
+
- lib/nanoc/core/config_loader.rb
|
193
|
+
- lib/nanoc/core/config_view.rb
|
137
194
|
- lib/nanoc/core/configuration-schema.json
|
138
195
|
- lib/nanoc/core/configuration.rb
|
139
196
|
- lib/nanoc/core/content.rb
|
@@ -149,41 +206,77 @@ files:
|
|
149
206
|
- lib/nanoc/core/dependency_tracker.rb
|
150
207
|
- lib/nanoc/core/directed_graph.rb
|
151
208
|
- lib/nanoc/core/document.rb
|
209
|
+
- lib/nanoc/core/document_view_mixin.rb
|
152
210
|
- lib/nanoc/core/error.rb
|
153
211
|
- lib/nanoc/core/errors.rb
|
212
|
+
- lib/nanoc/core/executor.rb
|
213
|
+
- lib/nanoc/core/feature.rb
|
214
|
+
- lib/nanoc/core/filter.rb
|
154
215
|
- lib/nanoc/core/identifiable_collection.rb
|
216
|
+
- lib/nanoc/core/identifiable_collection_view.rb
|
155
217
|
- lib/nanoc/core/identifier.rb
|
156
218
|
- lib/nanoc/core/in_memory_data_source.rb
|
157
219
|
- lib/nanoc/core/instrumentor.rb
|
158
220
|
- lib/nanoc/core/item.rb
|
159
221
|
- lib/nanoc/core/item_collection.rb
|
222
|
+
- lib/nanoc/core/item_collection_with_reps_view.rb
|
223
|
+
- lib/nanoc/core/item_collection_without_reps_view.rb
|
160
224
|
- lib/nanoc/core/item_rep.rb
|
225
|
+
- lib/nanoc/core/item_rep_builder.rb
|
161
226
|
- lib/nanoc/core/item_rep_repo.rb
|
162
227
|
- lib/nanoc/core/item_rep_router.rb
|
228
|
+
- lib/nanoc/core/item_rep_selector.rb
|
229
|
+
- lib/nanoc/core/item_rep_writer.rb
|
163
230
|
- lib/nanoc/core/layout.rb
|
164
231
|
- lib/nanoc/core/layout_collection.rb
|
232
|
+
- lib/nanoc/core/layout_collection_view.rb
|
233
|
+
- lib/nanoc/core/layout_view.rb
|
165
234
|
- lib/nanoc/core/lazy_value.rb
|
235
|
+
- lib/nanoc/core/mutable_config_view.rb
|
236
|
+
- lib/nanoc/core/mutable_document_view_mixin.rb
|
237
|
+
- lib/nanoc/core/mutable_identifiable_collection_view.rb
|
238
|
+
- lib/nanoc/core/mutable_item_collection_view.rb
|
239
|
+
- lib/nanoc/core/mutable_item_view.rb
|
240
|
+
- lib/nanoc/core/mutable_layout_collection_view.rb
|
241
|
+
- lib/nanoc/core/mutable_layout_view.rb
|
166
242
|
- lib/nanoc/core/notification_center.rb
|
243
|
+
- lib/nanoc/core/outdatedness_checker.rb
|
167
244
|
- lib/nanoc/core/outdatedness_reasons.rb
|
168
245
|
- lib/nanoc/core/outdatedness_rule.rb
|
246
|
+
- lib/nanoc/core/outdatedness_rules/attributes_modified.rb
|
247
|
+
- lib/nanoc/core/outdatedness_rules/code_snippets_modified.rb
|
248
|
+
- lib/nanoc/core/outdatedness_rules/content_modified.rb
|
249
|
+
- lib/nanoc/core/outdatedness_rules/item_collection_extended.rb
|
250
|
+
- lib/nanoc/core/outdatedness_rules/layout_collection_extended.rb
|
251
|
+
- lib/nanoc/core/outdatedness_rules/not_written.rb
|
252
|
+
- lib/nanoc/core/outdatedness_rules/rules_modified.rb
|
253
|
+
- lib/nanoc/core/outdatedness_rules/uses_always_outdated_filter.rb
|
169
254
|
- lib/nanoc/core/outdatedness_status.rb
|
170
255
|
- lib/nanoc/core/outdatedness_store.rb
|
171
256
|
- lib/nanoc/core/pattern.rb
|
257
|
+
- lib/nanoc/core/post_compile_item_collection_view.rb
|
258
|
+
- lib/nanoc/core/post_compile_item_rep_collection_view.rb
|
259
|
+
- lib/nanoc/core/post_compile_item_rep_view.rb
|
260
|
+
- lib/nanoc/core/post_compile_item_view.rb
|
172
261
|
- lib/nanoc/core/prefixed_data_source.rb
|
173
262
|
- lib/nanoc/core/processing_action.rb
|
174
263
|
- lib/nanoc/core/processing_actions.rb
|
175
264
|
- lib/nanoc/core/processing_actions/filter.rb
|
176
265
|
- lib/nanoc/core/processing_actions/layout.rb
|
177
266
|
- lib/nanoc/core/processing_actions/snapshot.rb
|
267
|
+
- lib/nanoc/core/pruner.rb
|
178
268
|
- lib/nanoc/core/regexp_pattern.rb
|
179
269
|
- lib/nanoc/core/site.rb
|
270
|
+
- lib/nanoc/core/site_loader.rb
|
180
271
|
- lib/nanoc/core/snapshot_def.rb
|
181
272
|
- lib/nanoc/core/store.rb
|
182
273
|
- lib/nanoc/core/string_pattern.rb
|
183
274
|
- lib/nanoc/core/temp_filename_factory.rb
|
184
275
|
- lib/nanoc/core/textual_compiled_content_cache.rb
|
185
276
|
- lib/nanoc/core/textual_content.rb
|
277
|
+
- lib/nanoc/core/trivial_error.rb
|
186
278
|
- lib/nanoc/core/version.rb
|
279
|
+
- lib/nanoc/core/view.rb
|
187
280
|
- lib/nanoc/core/view_context_for_compilation.rb
|
188
281
|
- lib/nanoc/core/view_context_for_pre_compilation.rb
|
189
282
|
- lib/nanoc/core/view_context_for_shell.rb
|