nanoc 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/NEWS.md +7 -1
- data/bin/nanoc +1 -1
- data/lib/nanoc.rb +2 -27
- data/lib/nanoc/base.rb +3 -6
- data/lib/nanoc/base/errors.rb +6 -104
- data/lib/nanoc/checking/check.rb +4 -4
- data/lib/nanoc/checking/checks/external_links.rb +1 -1
- data/lib/nanoc/checking/checks/stale.rb +1 -1
- data/lib/nanoc/checking/runner.rb +2 -2
- data/lib/nanoc/data_sources/filesystem/tools.rb +4 -4
- data/lib/nanoc/extra.rb +1 -1
- data/lib/nanoc/helpers/blogging.rb +8 -8
- data/lib/nanoc/helpers/capturing.rb +1 -1
- data/lib/nanoc/helpers/link_to.rb +1 -1
- data/lib/nanoc/orig_cli.rb +20 -0
- data/lib/nanoc/{cli → orig_cli}/commands/check.rb +3 -3
- data/lib/nanoc/{cli → orig_cli}/commands/deploy.rb +8 -8
- data/lib/nanoc/{cli → orig_cli}/commands/show-rules.rb +3 -3
- data/lib/nanoc/rule_dsl/action_provider.rb +5 -5
- data/lib/nanoc/rule_dsl/action_recorder.rb +4 -4
- data/lib/nanoc/rule_dsl/compilation_rule_context.rb +1 -1
- data/lib/nanoc/rule_dsl/compiler_dsl.rb +1 -1
- data/lib/nanoc/rule_dsl/rule_context.rb +6 -6
- data/lib/nanoc/version.rb +1 -1
- metadata +13 -152
- data/lib/nanoc/base/error.rb +0 -7
- data/lib/nanoc/base/feature.rb +0 -104
- data/lib/nanoc/base/repos.rb +0 -4
- data/lib/nanoc/base/repos/config_loader.rb +0 -95
- data/lib/nanoc/base/repos/site_loader.rb +0 -102
- data/lib/nanoc/base/services.rb +0 -23
- data/lib/nanoc/base/services/compiler.rb +0 -214
- data/lib/nanoc/base/services/compiler/phases.rb +0 -19
- data/lib/nanoc/base/services/compiler/phases/abstract.rb +0 -50
- data/lib/nanoc/base/services/compiler/phases/cache.rb +0 -45
- data/lib/nanoc/base/services/compiler/phases/mark_done.rb +0 -25
- data/lib/nanoc/base/services/compiler/phases/notify.rb +0 -21
- data/lib/nanoc/base/services/compiler/phases/recalculate.rb +0 -51
- data/lib/nanoc/base/services/compiler/phases/resume.rb +0 -54
- data/lib/nanoc/base/services/compiler/phases/write.rb +0 -86
- data/lib/nanoc/base/services/compiler/stages.rb +0 -23
- data/lib/nanoc/base/services/compiler/stages/build_reps.rb +0 -38
- data/lib/nanoc/base/services/compiler/stages/calculate_checksums.rb +0 -44
- data/lib/nanoc/base/services/compiler/stages/cleanup.rb +0 -45
- data/lib/nanoc/base/services/compiler/stages/compile_reps.rb +0 -98
- data/lib/nanoc/base/services/compiler/stages/determine_outdatedness.rb +0 -51
- data/lib/nanoc/base/services/compiler/stages/forget_outdated_dependencies.rb +0 -22
- data/lib/nanoc/base/services/compiler/stages/load_stores.rb +0 -37
- data/lib/nanoc/base/services/compiler/stages/postprocess.rb +0 -23
- data/lib/nanoc/base/services/compiler/stages/preprocess.rb +0 -34
- data/lib/nanoc/base/services/compiler/stages/prune.rb +0 -32
- data/lib/nanoc/base/services/compiler/stages/store_post_compilation_state.rb +0 -22
- data/lib/nanoc/base/services/compiler/stages/store_pre_compilation_state.rb +0 -34
- data/lib/nanoc/base/services/compiler_loader.rb +0 -48
- data/lib/nanoc/base/services/executor.rb +0 -134
- data/lib/nanoc/base/services/filter.rb +0 -267
- data/lib/nanoc/base/services/item_rep_builder.rb +0 -54
- data/lib/nanoc/base/services/item_rep_selector.rb +0 -69
- data/lib/nanoc/base/services/item_rep_writer.rb +0 -86
- data/lib/nanoc/base/services/outdatedness_checker.rb +0 -222
- data/lib/nanoc/base/services/outdatedness_rules.rb +0 -18
- data/lib/nanoc/base/services/outdatedness_rules/attributes_modified.rb +0 -41
- data/lib/nanoc/base/services/outdatedness_rules/code_snippets_modified.rb +0 -31
- data/lib/nanoc/base/services/outdatedness_rules/content_modified.rb +0 -21
- data/lib/nanoc/base/services/outdatedness_rules/item_collection_extended.rb +0 -20
- data/lib/nanoc/base/services/outdatedness_rules/layout_collection_extended.rb +0 -20
- data/lib/nanoc/base/services/outdatedness_rules/not_written.rb +0 -17
- data/lib/nanoc/base/services/outdatedness_rules/rules_modified.rb +0 -45
- data/lib/nanoc/base/services/outdatedness_rules/uses_always_outdated_filter.rb +0 -26
- data/lib/nanoc/base/services/pruner.rb +0 -123
- data/lib/nanoc/base/views.rb +0 -40
- data/lib/nanoc/base/views/basic_item_rep_collection_view.rb +0 -86
- data/lib/nanoc/base/views/basic_item_rep_view.rb +0 -81
- data/lib/nanoc/base/views/basic_item_view.rb +0 -52
- data/lib/nanoc/base/views/compilation_item_rep_collection_view.rb +0 -10
- data/lib/nanoc/base/views/compilation_item_rep_view.rb +0 -49
- data/lib/nanoc/base/views/compilation_item_view.rb +0 -45
- data/lib/nanoc/base/views/config_view.rb +0 -68
- data/lib/nanoc/base/views/identifiable_collection_view.rb +0 -109
- data/lib/nanoc/base/views/item_collection_with_reps_view.rb +0 -10
- data/lib/nanoc/base/views/item_collection_without_reps_view.rb +0 -10
- data/lib/nanoc/base/views/layout_collection_view.rb +0 -10
- data/lib/nanoc/base/views/layout_view.rb +0 -7
- data/lib/nanoc/base/views/mixins/document_view_mixin.rb +0 -88
- data/lib/nanoc/base/views/mixins/mutable_document_view_mixin.rb +0 -58
- data/lib/nanoc/base/views/mutable_config_view.rb +0 -14
- data/lib/nanoc/base/views/mutable_identifiable_collection_view.rb +0 -17
- data/lib/nanoc/base/views/mutable_item_collection_view.rb +0 -32
- data/lib/nanoc/base/views/mutable_item_view.rb +0 -7
- data/lib/nanoc/base/views/mutable_layout_collection_view.rb +0 -24
- data/lib/nanoc/base/views/mutable_layout_view.rb +0 -7
- data/lib/nanoc/base/views/post_compile_item_collection_view.rb +0 -10
- data/lib/nanoc/base/views/post_compile_item_rep_collection_view.rb +0 -10
- data/lib/nanoc/base/views/post_compile_item_rep_view.rb +0 -31
- data/lib/nanoc/base/views/post_compile_item_view.rb +0 -18
- data/lib/nanoc/base/views/view.rb +0 -41
- data/lib/nanoc/cli.rb +0 -241
- data/lib/nanoc/cli/ansi_string_colorizer.rb +0 -28
- data/lib/nanoc/cli/cleaning_stream.rb +0 -160
- data/lib/nanoc/cli/command_runner.rb +0 -72
- data/lib/nanoc/cli/commands/compile.rb +0 -57
- data/lib/nanoc/cli/commands/compile_listeners/abstract.rb +0 -58
- data/lib/nanoc/cli/commands/compile_listeners/aggregate.rb +0 -50
- data/lib/nanoc/cli/commands/compile_listeners/debug_printer.rb +0 -100
- data/lib/nanoc/cli/commands/compile_listeners/diff_generator.rb +0 -101
- data/lib/nanoc/cli/commands/compile_listeners/file_action_printer.rb +0 -76
- data/lib/nanoc/cli/commands/compile_listeners/timing_recorder.rb +0 -170
- data/lib/nanoc/cli/commands/create-site.rb +0 -257
- data/lib/nanoc/cli/commands/nanoc.rb +0 -42
- data/lib/nanoc/cli/commands/prune.rb +0 -49
- data/lib/nanoc/cli/commands/shell.rb +0 -57
- data/lib/nanoc/cli/commands/show-data.rb +0 -185
- data/lib/nanoc/cli/commands/show-plugins.rb +0 -89
- data/lib/nanoc/cli/commands/view.rb +0 -68
- data/lib/nanoc/cli/error_handler.rb +0 -365
- data/lib/nanoc/cli/logger.rb +0 -75
- data/lib/nanoc/cli/stack_trace_writer.rb +0 -50
- data/lib/nanoc/cli/stream_cleaners.rb +0 -10
- data/lib/nanoc/cli/stream_cleaners/abstract.rb +0 -21
- data/lib/nanoc/cli/stream_cleaners/ansi_colors.rb +0 -13
- data/lib/nanoc/cli/stream_cleaners/utf8.rb +0 -17
- data/lib/nanoc/cli/transform.rb +0 -16
- data/lib/nanoc/spec.rb +0 -240
@@ -10,7 +10,7 @@ flag :a, :all, 'run all checks'
|
|
10
10
|
flag :L, :list, 'list all checks'
|
11
11
|
flag :d, :deploy, '(deprecated)'
|
12
12
|
|
13
|
-
module Nanoc::
|
13
|
+
module Nanoc::OrigCLI::Commands
|
14
14
|
class Check < ::Nanoc::CLI::CommandRunner
|
15
15
|
def run
|
16
16
|
site = load_site
|
@@ -34,10 +34,10 @@ module Nanoc::CLI::Commands
|
|
34
34
|
end
|
35
35
|
|
36
36
|
unless success
|
37
|
-
raise Nanoc::
|
37
|
+
raise Nanoc::Core::TrivialError, 'One or more checks failed'
|
38
38
|
end
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
-
runner Nanoc::
|
43
|
+
runner Nanoc::OrigCLI::Commands::Check
|
@@ -12,11 +12,11 @@ flag :L, :list, 'list available locations to deploy to'
|
|
12
12
|
flag :D, :'list-deployers', 'list available deployers'
|
13
13
|
option :n, :'dry-run', 'show what would be deployed'
|
14
14
|
|
15
|
-
module Nanoc::
|
15
|
+
module Nanoc::OrigCLI::Commands
|
16
16
|
class Deploy < ::Nanoc::CLI::CommandRunner
|
17
17
|
def run
|
18
18
|
@site = load_site
|
19
|
-
Nanoc::
|
19
|
+
Nanoc::Core::Compiler.new_for(@site).run_until_preprocessed
|
20
20
|
|
21
21
|
if options[:'list-deployers']
|
22
22
|
list_deployers
|
@@ -60,22 +60,22 @@ module Nanoc::CLI::Commands
|
|
60
60
|
|
61
61
|
def deploy_config
|
62
62
|
if deploy_configs.empty?
|
63
|
-
raise Nanoc::
|
63
|
+
raise Nanoc::Core::TrivialError, 'The site has no deployment configurations.'
|
64
64
|
end
|
65
65
|
|
66
66
|
if arguments.length > 1
|
67
|
-
raise Nanoc::
|
67
|
+
raise Nanoc::Core::TrivialError, "usage: #{command.usage}"
|
68
68
|
end
|
69
69
|
|
70
70
|
target_from_arguments = arguments[0]
|
71
71
|
target_from_options = options.fetch(:target, nil)
|
72
72
|
if target_from_arguments && target_from_options
|
73
|
-
raise Nanoc::
|
73
|
+
raise Nanoc::Core::TrivialError, 'Only one deployment target can be specified on the command line.'
|
74
74
|
end
|
75
75
|
|
76
76
|
target = target_from_arguments || target_from_options || :default
|
77
77
|
deploy_configs.fetch(target.to_sym) do
|
78
|
-
raise Nanoc::
|
78
|
+
raise Nanoc::Core::TrivialError, "The site has no deployment configuration named `#{target}`."
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|
@@ -116,11 +116,11 @@ module Nanoc::CLI::Commands
|
|
116
116
|
deployer_class = Nanoc::Deploying::Deployer.named(name.to_sym)
|
117
117
|
if deployer_class.nil?
|
118
118
|
names = Nanoc::Deploying::Deployer.all.map(&:identifier)
|
119
|
-
raise Nanoc::
|
119
|
+
raise Nanoc::Core::TrivialError, "The specified deploy target has an unrecognised kind “#{name}” (expected one of #{names.join(', ')})."
|
120
120
|
end
|
121
121
|
deployer_class
|
122
122
|
end
|
123
123
|
end
|
124
124
|
end
|
125
125
|
|
126
|
-
runner Nanoc::
|
126
|
+
runner Nanoc::OrigCLI::Commands::Deploy
|
@@ -8,12 +8,12 @@ Prints the rules used for all items and layouts in the current site.
|
|
8
8
|
"
|
9
9
|
no_params
|
10
10
|
|
11
|
-
module Nanoc::
|
11
|
+
module Nanoc::OrigCLI::Commands
|
12
12
|
class ShowRules < ::Nanoc::CLI::CommandRunner
|
13
13
|
def run
|
14
14
|
site = load_site
|
15
15
|
|
16
|
-
res = Nanoc::
|
16
|
+
res = Nanoc::Core::Compiler.new_for(site).run_until_reps_built
|
17
17
|
reps = res.fetch(:reps)
|
18
18
|
|
19
19
|
action_provider = Nanoc::Core::ActionProvider.named(site.config.action_provider).for(site)
|
@@ -61,4 +61,4 @@ module Nanoc::CLI::Commands
|
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
64
|
-
runner Nanoc::
|
64
|
+
runner Nanoc::OrigCLI::Commands::ShowRules
|
@@ -80,17 +80,17 @@ module Nanoc::RuleDSL
|
|
80
80
|
Nanoc::Core::ViewContextForPreCompilation.new(items: site.items)
|
81
81
|
|
82
82
|
Nanoc::Core::Context.new(
|
83
|
-
config: Nanoc::MutableConfigView.new(site.config, view_context),
|
84
|
-
items: Nanoc::MutableItemCollectionView.new(site.items, view_context),
|
85
|
-
layouts: Nanoc::MutableLayoutCollectionView.new(site.layouts, view_context),
|
83
|
+
config: Nanoc::Core::MutableConfigView.new(site.config, view_context),
|
84
|
+
items: Nanoc::Core::MutableItemCollectionView.new(site.items, view_context),
|
85
|
+
layouts: Nanoc::Core::MutableLayoutCollectionView.new(site.layouts, view_context),
|
86
86
|
)
|
87
87
|
end
|
88
88
|
|
89
89
|
# @api private
|
90
90
|
def new_postprocessor_context(site, view_context)
|
91
91
|
Nanoc::Core::Context.new(
|
92
|
-
config: Nanoc::ConfigView.new(site.config, view_context),
|
93
|
-
items: Nanoc::PostCompileItemCollectionView.new(site.items, view_context),
|
92
|
+
config: Nanoc::Core::ConfigView.new(site.config, view_context),
|
93
|
+
items: Nanoc::Core::PostCompileItemCollectionView.new(site.items, view_context),
|
94
94
|
)
|
95
95
|
end
|
96
96
|
end
|
@@ -37,15 +37,15 @@ module Nanoc
|
|
37
37
|
@any_layouts = true
|
38
38
|
end
|
39
39
|
|
40
|
-
MaybePathlike = C::Or[nil, Nanoc::UNDEFINED, String, Nanoc::Core::Identifier]
|
40
|
+
MaybePathlike = C::Or[nil, Nanoc::Core::UNDEFINED, String, Nanoc::Core::Identifier]
|
41
41
|
contract Symbol, C::KeywordArgs[path: C::Optional[MaybePathlike]] => nil
|
42
|
-
def snapshot(snapshot_name, path: Nanoc::UNDEFINED)
|
43
|
-
unless Nanoc::UNDEFINED.equal?(path)
|
42
|
+
def snapshot(snapshot_name, path: Nanoc::Core::UNDEFINED)
|
43
|
+
unless Nanoc::Core::UNDEFINED.equal?(path)
|
44
44
|
@snapshots_for_which_to_skip_routing_rule << snapshot_name
|
45
45
|
end
|
46
46
|
|
47
47
|
path =
|
48
|
-
if Nanoc::UNDEFINED.equal?(path) || path.nil?
|
48
|
+
if Nanoc::Core::UNDEFINED.equal?(path) || path.nil?
|
49
49
|
nil
|
50
50
|
else
|
51
51
|
path.to_s
|
@@ -11,12 +11,12 @@ module Nanoc::RuleDSL
|
|
11
11
|
] => C::Any
|
12
12
|
def initialize(rep:, site:, view_context:)
|
13
13
|
super({
|
14
|
-
item: Nanoc::BasicItemView.new(rep.item, view_context),
|
15
|
-
rep: Nanoc::BasicItemRepView.new(rep, view_context),
|
16
|
-
item_rep: Nanoc::BasicItemRepView.new(rep, view_context),
|
17
|
-
items: Nanoc::ItemCollectionWithoutRepsView.new(site.items, view_context),
|
18
|
-
layouts: Nanoc::LayoutCollectionView.new(site.layouts, view_context),
|
19
|
-
config: Nanoc::ConfigView.new(site.config, view_context),
|
14
|
+
item: Nanoc::Core::BasicItemView.new(rep.item, view_context),
|
15
|
+
rep: Nanoc::Core::BasicItemRepView.new(rep, view_context),
|
16
|
+
item_rep: Nanoc::Core::BasicItemRepView.new(rep, view_context),
|
17
|
+
items: Nanoc::Core::ItemCollectionWithoutRepsView.new(site.items, view_context),
|
18
|
+
layouts: Nanoc::Core::LayoutCollectionView.new(site.layouts, view_context),
|
19
|
+
config: Nanoc::Core::ConfigView.new(site.config, view_context),
|
20
20
|
})
|
21
21
|
end
|
22
22
|
end
|
data/lib/nanoc/version.rb
CHANGED
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.
|
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: addressable
|
@@ -39,47 +39,33 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: nanoc-cli
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '2.15'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '2.15'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: diff-lcs
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
45
|
+
- - '='
|
60
46
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
47
|
+
version: 4.11.13
|
62
48
|
type: :runtime
|
63
49
|
prerelease: false
|
64
50
|
version_requirements: !ruby/object:Gem::Requirement
|
65
51
|
requirements:
|
66
|
-
- -
|
52
|
+
- - '='
|
67
53
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
54
|
+
version: 4.11.13
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: nanoc-core
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
72
58
|
requirements:
|
73
59
|
- - '='
|
74
60
|
- !ruby/object:Gem::Version
|
75
|
-
version: 4.11.
|
61
|
+
version: 4.11.13
|
76
62
|
type: :runtime
|
77
63
|
prerelease: false
|
78
64
|
version_requirements: !ruby/object:Gem::Requirement
|
79
65
|
requirements:
|
80
66
|
- - '='
|
81
67
|
- !ruby/object:Gem::Version
|
82
|
-
version: 4.11.
|
68
|
+
version: 4.11.13
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: parallel
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,20 +80,6 @@ dependencies:
|
|
94
80
|
- - "~>"
|
95
81
|
- !ruby/object:Gem::Version
|
96
82
|
version: '1.12'
|
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
83
|
- !ruby/object:Gem::Dependency
|
112
84
|
name: tty-command
|
113
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,20 +94,6 @@ dependencies:
|
|
122
94
|
- - "~>"
|
123
95
|
- !ruby/object:Gem::Version
|
124
96
|
version: '0.8'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: tty-platform
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - "~>"
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0.2'
|
132
|
-
type: :runtime
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - "~>"
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0.2'
|
139
97
|
- !ruby/object:Gem::Dependency
|
140
98
|
name: tty-which
|
141
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -167,78 +125,7 @@ files:
|
|
167
125
|
- lib/nanoc.rb
|
168
126
|
- lib/nanoc/base.rb
|
169
127
|
- lib/nanoc/base/changes_stream.rb
|
170
|
-
- lib/nanoc/base/error.rb
|
171
128
|
- lib/nanoc/base/errors.rb
|
172
|
-
- lib/nanoc/base/feature.rb
|
173
|
-
- lib/nanoc/base/repos.rb
|
174
|
-
- lib/nanoc/base/repos/config_loader.rb
|
175
|
-
- lib/nanoc/base/repos/site_loader.rb
|
176
|
-
- lib/nanoc/base/services.rb
|
177
|
-
- lib/nanoc/base/services/compiler.rb
|
178
|
-
- lib/nanoc/base/services/compiler/phases.rb
|
179
|
-
- lib/nanoc/base/services/compiler/phases/abstract.rb
|
180
|
-
- lib/nanoc/base/services/compiler/phases/cache.rb
|
181
|
-
- lib/nanoc/base/services/compiler/phases/mark_done.rb
|
182
|
-
- lib/nanoc/base/services/compiler/phases/notify.rb
|
183
|
-
- lib/nanoc/base/services/compiler/phases/recalculate.rb
|
184
|
-
- lib/nanoc/base/services/compiler/phases/resume.rb
|
185
|
-
- lib/nanoc/base/services/compiler/phases/write.rb
|
186
|
-
- lib/nanoc/base/services/compiler/stages.rb
|
187
|
-
- lib/nanoc/base/services/compiler/stages/build_reps.rb
|
188
|
-
- lib/nanoc/base/services/compiler/stages/calculate_checksums.rb
|
189
|
-
- lib/nanoc/base/services/compiler/stages/cleanup.rb
|
190
|
-
- lib/nanoc/base/services/compiler/stages/compile_reps.rb
|
191
|
-
- lib/nanoc/base/services/compiler/stages/determine_outdatedness.rb
|
192
|
-
- lib/nanoc/base/services/compiler/stages/forget_outdated_dependencies.rb
|
193
|
-
- lib/nanoc/base/services/compiler/stages/load_stores.rb
|
194
|
-
- lib/nanoc/base/services/compiler/stages/postprocess.rb
|
195
|
-
- lib/nanoc/base/services/compiler/stages/preprocess.rb
|
196
|
-
- lib/nanoc/base/services/compiler/stages/prune.rb
|
197
|
-
- lib/nanoc/base/services/compiler/stages/store_post_compilation_state.rb
|
198
|
-
- lib/nanoc/base/services/compiler/stages/store_pre_compilation_state.rb
|
199
|
-
- lib/nanoc/base/services/compiler_loader.rb
|
200
|
-
- lib/nanoc/base/services/executor.rb
|
201
|
-
- lib/nanoc/base/services/filter.rb
|
202
|
-
- lib/nanoc/base/services/item_rep_builder.rb
|
203
|
-
- lib/nanoc/base/services/item_rep_selector.rb
|
204
|
-
- lib/nanoc/base/services/item_rep_writer.rb
|
205
|
-
- lib/nanoc/base/services/outdatedness_checker.rb
|
206
|
-
- lib/nanoc/base/services/outdatedness_rules.rb
|
207
|
-
- lib/nanoc/base/services/outdatedness_rules/attributes_modified.rb
|
208
|
-
- lib/nanoc/base/services/outdatedness_rules/code_snippets_modified.rb
|
209
|
-
- lib/nanoc/base/services/outdatedness_rules/content_modified.rb
|
210
|
-
- lib/nanoc/base/services/outdatedness_rules/item_collection_extended.rb
|
211
|
-
- lib/nanoc/base/services/outdatedness_rules/layout_collection_extended.rb
|
212
|
-
- lib/nanoc/base/services/outdatedness_rules/not_written.rb
|
213
|
-
- lib/nanoc/base/services/outdatedness_rules/rules_modified.rb
|
214
|
-
- lib/nanoc/base/services/outdatedness_rules/uses_always_outdated_filter.rb
|
215
|
-
- lib/nanoc/base/services/pruner.rb
|
216
|
-
- lib/nanoc/base/views.rb
|
217
|
-
- lib/nanoc/base/views/basic_item_rep_collection_view.rb
|
218
|
-
- lib/nanoc/base/views/basic_item_rep_view.rb
|
219
|
-
- lib/nanoc/base/views/basic_item_view.rb
|
220
|
-
- lib/nanoc/base/views/compilation_item_rep_collection_view.rb
|
221
|
-
- lib/nanoc/base/views/compilation_item_rep_view.rb
|
222
|
-
- lib/nanoc/base/views/compilation_item_view.rb
|
223
|
-
- lib/nanoc/base/views/config_view.rb
|
224
|
-
- lib/nanoc/base/views/identifiable_collection_view.rb
|
225
|
-
- lib/nanoc/base/views/item_collection_with_reps_view.rb
|
226
|
-
- lib/nanoc/base/views/item_collection_without_reps_view.rb
|
227
|
-
- lib/nanoc/base/views/layout_collection_view.rb
|
228
|
-
- lib/nanoc/base/views/layout_view.rb
|
229
|
-
- lib/nanoc/base/views/mixins/document_view_mixin.rb
|
230
|
-
- lib/nanoc/base/views/mixins/mutable_document_view_mixin.rb
|
231
|
-
- lib/nanoc/base/views/mutable_config_view.rb
|
232
|
-
- lib/nanoc/base/views/mutable_identifiable_collection_view.rb
|
233
|
-
- lib/nanoc/base/views/mutable_item_collection_view.rb
|
234
|
-
- lib/nanoc/base/views/mutable_item_view.rb
|
235
|
-
- lib/nanoc/base/views/mutable_layout_collection_view.rb
|
236
|
-
- lib/nanoc/base/views/mutable_layout_view.rb
|
237
|
-
- lib/nanoc/base/views/post_compile_item_collection_view.rb
|
238
|
-
- lib/nanoc/base/views/post_compile_item_rep_collection_view.rb
|
239
|
-
- lib/nanoc/base/views/post_compile_item_rep_view.rb
|
240
|
-
- lib/nanoc/base/views/post_compile_item_view.rb
|
241
|
-
- lib/nanoc/base/views/view.rb
|
242
129
|
- lib/nanoc/checking.rb
|
243
130
|
- lib/nanoc/checking/check.rb
|
244
131
|
- lib/nanoc/checking/checks.rb
|
@@ -253,35 +140,6 @@ files:
|
|
253
140
|
- lib/nanoc/checking/issue.rb
|
254
141
|
- lib/nanoc/checking/loader.rb
|
255
142
|
- lib/nanoc/checking/runner.rb
|
256
|
-
- lib/nanoc/cli.rb
|
257
|
-
- lib/nanoc/cli/ansi_string_colorizer.rb
|
258
|
-
- lib/nanoc/cli/cleaning_stream.rb
|
259
|
-
- lib/nanoc/cli/command_runner.rb
|
260
|
-
- lib/nanoc/cli/commands/check.rb
|
261
|
-
- lib/nanoc/cli/commands/compile.rb
|
262
|
-
- lib/nanoc/cli/commands/compile_listeners/abstract.rb
|
263
|
-
- lib/nanoc/cli/commands/compile_listeners/aggregate.rb
|
264
|
-
- lib/nanoc/cli/commands/compile_listeners/debug_printer.rb
|
265
|
-
- lib/nanoc/cli/commands/compile_listeners/diff_generator.rb
|
266
|
-
- lib/nanoc/cli/commands/compile_listeners/file_action_printer.rb
|
267
|
-
- lib/nanoc/cli/commands/compile_listeners/timing_recorder.rb
|
268
|
-
- lib/nanoc/cli/commands/create-site.rb
|
269
|
-
- lib/nanoc/cli/commands/deploy.rb
|
270
|
-
- lib/nanoc/cli/commands/nanoc.rb
|
271
|
-
- lib/nanoc/cli/commands/prune.rb
|
272
|
-
- lib/nanoc/cli/commands/shell.rb
|
273
|
-
- lib/nanoc/cli/commands/show-data.rb
|
274
|
-
- lib/nanoc/cli/commands/show-plugins.rb
|
275
|
-
- lib/nanoc/cli/commands/show-rules.rb
|
276
|
-
- lib/nanoc/cli/commands/view.rb
|
277
|
-
- lib/nanoc/cli/error_handler.rb
|
278
|
-
- lib/nanoc/cli/logger.rb
|
279
|
-
- lib/nanoc/cli/stack_trace_writer.rb
|
280
|
-
- lib/nanoc/cli/stream_cleaners.rb
|
281
|
-
- lib/nanoc/cli/stream_cleaners/abstract.rb
|
282
|
-
- lib/nanoc/cli/stream_cleaners/ansi_colors.rb
|
283
|
-
- lib/nanoc/cli/stream_cleaners/utf8.rb
|
284
|
-
- lib/nanoc/cli/transform.rb
|
285
143
|
- lib/nanoc/data_sources.rb
|
286
144
|
- lib/nanoc/data_sources/filesystem.rb
|
287
145
|
- lib/nanoc/data_sources/filesystem/errors.rb
|
@@ -344,6 +202,10 @@ files:
|
|
344
202
|
- lib/nanoc/helpers/tagging.rb
|
345
203
|
- lib/nanoc/helpers/text.rb
|
346
204
|
- lib/nanoc/helpers/xml_sitemap.rb
|
205
|
+
- lib/nanoc/orig_cli.rb
|
206
|
+
- lib/nanoc/orig_cli/commands/check.rb
|
207
|
+
- lib/nanoc/orig_cli/commands/deploy.rb
|
208
|
+
- lib/nanoc/orig_cli/commands/show-rules.rb
|
347
209
|
- lib/nanoc/rule_dsl.rb
|
348
210
|
- lib/nanoc/rule_dsl/action_provider.rb
|
349
211
|
- lib/nanoc/rule_dsl/action_recorder.rb
|
@@ -357,7 +219,6 @@ files:
|
|
357
219
|
- lib/nanoc/rule_dsl/rule_context.rb
|
358
220
|
- lib/nanoc/rule_dsl/rules_collection.rb
|
359
221
|
- lib/nanoc/rule_dsl/rules_loader.rb
|
360
|
-
- lib/nanoc/spec.rb
|
361
222
|
- lib/nanoc/version.rb
|
362
223
|
homepage: https://nanoc.ws/
|
363
224
|
licenses:
|
data/lib/nanoc/base/error.rb
DELETED
data/lib/nanoc/base/feature.rb
DELETED
@@ -1,104 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Nanoc
|
4
|
-
# @api private
|
5
|
-
#
|
6
|
-
# @example Defining a feature and checking its enabledness
|
7
|
-
#
|
8
|
-
# Nanoc::Feature.define('environments', version: '4.3')
|
9
|
-
# Nanoc::Feature.enabled?(Nanoc::Feature::ENVIRONMENTS)
|
10
|
-
#
|
11
|
-
module Feature
|
12
|
-
# Defines a new feature with the given name, experimental in the given
|
13
|
-
# version. The feature will be made available as a constant with the same
|
14
|
-
# name, in uppercase, on the Nanoc::Feature module.
|
15
|
-
#
|
16
|
-
# @example Defining Nanoc::Feature::ENVIRONMENTS
|
17
|
-
#
|
18
|
-
# Nanoc::Feature.define('environments', version: '4.3')
|
19
|
-
#
|
20
|
-
# @param name The name of the feature
|
21
|
-
#
|
22
|
-
# @param version The minor version in which the feature is considered
|
23
|
-
# experimental.
|
24
|
-
#
|
25
|
-
# @return [void]
|
26
|
-
def self.define(name, version:)
|
27
|
-
repo[name] = version
|
28
|
-
const_set(name.upcase, name)
|
29
|
-
end
|
30
|
-
|
31
|
-
# Undefines the feature with the given name. For testing purposes only.
|
32
|
-
#
|
33
|
-
# @param name The name of the feature
|
34
|
-
#
|
35
|
-
# @return [void]
|
36
|
-
#
|
37
|
-
# @private
|
38
|
-
def self.undefine(name)
|
39
|
-
repo.delete(name)
|
40
|
-
remove_const(name.upcase)
|
41
|
-
end
|
42
|
-
|
43
|
-
# @param [String] feature_name
|
44
|
-
#
|
45
|
-
# @return [Boolean] Whether or not the feature with the given name is enabled
|
46
|
-
def self.enabled?(feature_name)
|
47
|
-
enabled_features.include?(feature_name) ||
|
48
|
-
enabled_features.include?('all')
|
49
|
-
end
|
50
|
-
|
51
|
-
# @api private
|
52
|
-
def self.enable(feature_name)
|
53
|
-
raise ArgumentError, 'no block given' unless block_given?
|
54
|
-
|
55
|
-
if enabled?(feature_name)
|
56
|
-
yield
|
57
|
-
else
|
58
|
-
begin
|
59
|
-
enabled_features << feature_name
|
60
|
-
yield
|
61
|
-
ensure
|
62
|
-
enabled_features.delete(feature_name)
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
# @api private
|
68
|
-
def self.reset_caches
|
69
|
-
@enabled_features = nil
|
70
|
-
end
|
71
|
-
|
72
|
-
# @api private
|
73
|
-
def self.enabled_features
|
74
|
-
@enabled_features ||= Set.new(ENV.fetch('NANOC_FEATURES', '').split(','))
|
75
|
-
end
|
76
|
-
|
77
|
-
# @api private
|
78
|
-
def self.repo
|
79
|
-
@repo ||= {}
|
80
|
-
end
|
81
|
-
|
82
|
-
# @return [Enumerable<String>] Names of features that still exist, but
|
83
|
-
# should not be considered as experimental in the current version of
|
84
|
-
# Nanoc.
|
85
|
-
def self.all_outdated
|
86
|
-
repo.keys.reject do |name|
|
87
|
-
version = repo[name]
|
88
|
-
Nanoc::VERSION.start_with?(version)
|
89
|
-
end
|
90
|
-
end
|
91
|
-
end
|
92
|
-
end
|
93
|
-
|
94
|
-
# Tracking issue:
|
95
|
-
# https://github.com/nanoc/features/issues/24
|
96
|
-
Nanoc::Feature.define('live_cmd', version: '4.11')
|
97
|
-
|
98
|
-
# Tracking issue:
|
99
|
-
# https://github.com/nanoc/features/issues/40
|
100
|
-
Nanoc::Feature.define('toml', version: '4.11')
|
101
|
-
|
102
|
-
# Tracking issue:
|
103
|
-
# https://github.com/nanoc/features/issues/20
|
104
|
-
Nanoc::Feature.define('binary_compiled_content_cache', version: '4.11')
|