nanoc 4.11.2 → 4.11.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS.md +15 -8
- data/README.md +1 -1
- data/lib/nanoc.rb +4 -1
- data/lib/nanoc/base/entities.rb +0 -2
- data/lib/nanoc/base/entities/site.rb +8 -1
- data/lib/nanoc/base/errors.rb +0 -19
- data/lib/nanoc/base/services.rb +0 -3
- data/lib/nanoc/base/services/compiler/stage.rb +1 -1
- data/lib/nanoc/base/services/compiler/stages/calculate_checksums.rb +1 -1
- data/lib/nanoc/base/services/compiler/stages/load_stores.rb +1 -1
- data/lib/nanoc/base/services/compiler/stages/store_pre_compilation_state.rb +1 -1
- data/lib/nanoc/base/services/compiler_loader.rb +1 -1
- data/lib/nanoc/base/services/executor.rb +1 -1
- data/lib/nanoc/base/services/item_rep_builder.rb +22 -1
- data/lib/nanoc/base/services/outdatedness_checker.rb +2 -2
- data/lib/nanoc/base/services/outdatedness_rule.rb +1 -1
- data/lib/nanoc/checking/check.rb +1 -1
- data/lib/nanoc/checking/checks/external_links.rb +5 -0
- data/lib/nanoc/cli/commands/compile_listeners/diff_generator.rb +2 -8
- data/lib/nanoc/cli/commands/create-site.rb +3 -3
- data/lib/nanoc/cli/commands/shell.rb +1 -1
- data/lib/nanoc/cli/commands/show-rules.rb +1 -1
- data/lib/nanoc/deploying/deployers.rb +2 -0
- data/lib/nanoc/deploying/deployers/git.rb +8 -16
- data/lib/nanoc/deploying/deployers/rsync.rb +1 -2
- data/lib/nanoc/extra.rb +0 -1
- data/lib/nanoc/filters/asciidoc.rb +1 -5
- data/lib/nanoc/filters/colorize_syntax/colorizers.rb +3 -14
- data/lib/nanoc/filters/kramdown.rb +1 -1
- data/lib/nanoc/filters/mustache.rb +1 -1
- data/lib/nanoc/filters/rainpress.rb +1 -1
- data/lib/nanoc/filters/rdiscount.rb +1 -1
- data/lib/nanoc/helpers/blogging.rb +4 -4
- data/lib/nanoc/helpers/breadcrumbs.rb +2 -2
- data/lib/nanoc/helpers/capturing.rb +1 -1
- data/lib/nanoc/helpers/child_parent.rb +1 -1
- data/lib/nanoc/helpers/filtering.rb +1 -1
- data/lib/nanoc/helpers/html_escape.rb +1 -1
- data/lib/nanoc/helpers/link_to.rb +1 -1
- data/lib/nanoc/helpers/rendering.rb +1 -1
- data/lib/nanoc/helpers/tagging.rb +1 -1
- data/lib/nanoc/helpers/text.rb +1 -1
- data/lib/nanoc/helpers/xml_sitemap.rb +1 -1
- data/lib/nanoc/rule_dsl/action_provider.rb +1 -1
- data/lib/nanoc/rule_dsl/action_recorder.rb +2 -2
- data/lib/nanoc/rule_dsl/action_sequence_calculator.rb +4 -4
- data/lib/nanoc/spec.rb +2 -7
- data/lib/nanoc/version.rb +1 -1
- metadata +62 -12
- data/lib/nanoc/base/entities/action_sequence.rb +0 -80
- data/lib/nanoc/base/entities/checksum_collection.rb +0 -34
- data/lib/nanoc/base/services/action_provider.rb +0 -34
- data/lib/nanoc/base/services/action_sequence_builder.rb +0 -55
- data/lib/nanoc/base/services/instrumentor.rb +0 -17
- data/lib/nanoc/extra/piper.rb +0 -47
data/lib/nanoc/extra.rb
CHANGED
@@ -12,11 +12,7 @@ module Nanoc::Filters
|
|
12
12
|
#
|
13
13
|
# @return [String] The filtered content
|
14
14
|
def run(content, _params = {})
|
15
|
-
|
16
|
-
stderr = $stderr
|
17
|
-
piper = Nanoc::Extra::Piper.new(stdout: stdout, stderr: stderr)
|
18
|
-
piper.run(%w[asciidoc -o - -], content)
|
19
|
-
stdout.string
|
15
|
+
TTY::Command.new(printer: :null).run('asciidoc -o - -', input: content).out
|
20
16
|
end
|
21
17
|
end
|
22
18
|
end
|
@@ -13,8 +13,7 @@ module Nanoc::Filters::ColorizeSyntax::Colorizers
|
|
13
13
|
private
|
14
14
|
|
15
15
|
def check_availability(*cmd)
|
16
|
-
|
17
|
-
piper.run(cmd, nil)
|
16
|
+
TTY::Command.new(printer: :null).run!(*cmd).success?
|
18
17
|
end
|
19
18
|
end
|
20
19
|
|
@@ -66,12 +65,7 @@ module Nanoc::Filters::ColorizeSyntax::Colorizers
|
|
66
65
|
cmd = ['pygmentize', '-l', language, '-f', 'html']
|
67
66
|
cmd << '-O' << params.map { |k, v| "#{k}=#{v}" }.join(',') unless params.empty?
|
68
67
|
|
69
|
-
|
70
|
-
stderr = $stderr
|
71
|
-
piper = Nanoc::Extra::Piper.new(stdout: stdout, stderr: stderr)
|
72
|
-
piper.run(cmd, code)
|
73
|
-
|
74
|
-
stdout.string
|
68
|
+
TTY::Command.new(printer: :null).run(*cmd, input: code).out
|
75
69
|
end
|
76
70
|
end
|
77
71
|
|
@@ -116,12 +110,7 @@ module Nanoc::Filters::ColorizeSyntax::Colorizers
|
|
116
110
|
end
|
117
111
|
end
|
118
112
|
|
119
|
-
|
120
|
-
stderr = $stderr
|
121
|
-
piper = Nanoc::Extra::Piper.new(stdout: stdout, stderr: stderr)
|
122
|
-
piper.run(cmd, code)
|
123
|
-
|
124
|
-
stdout.string
|
113
|
+
TTY::Command.new(printer: :null).run(*cmd, input: code).out
|
125
114
|
end
|
126
115
|
end
|
127
116
|
|
@@ -7,7 +7,7 @@ module Nanoc::Filters
|
|
7
7
|
|
8
8
|
requires 'kramdown'
|
9
9
|
|
10
|
-
# Runs the content through [Kramdown](
|
10
|
+
# Runs the content through [Kramdown](https://kramdown.gettalong.org/).
|
11
11
|
# Parameters passed to this filter will be passed on to Kramdown.
|
12
12
|
#
|
13
13
|
# @param [String] content The content to filter
|
@@ -8,7 +8,7 @@ module Nanoc::Filters
|
|
8
8
|
requires 'mustache'
|
9
9
|
|
10
10
|
# Runs the content through
|
11
|
-
# [Mustache](
|
11
|
+
# [Mustache](https://github.com/defunkt/mustache). This method takes no
|
12
12
|
# options.
|
13
13
|
#
|
14
14
|
# @param [String] content The content to filter
|
@@ -7,7 +7,7 @@ module Nanoc::Filters
|
|
7
7
|
|
8
8
|
requires 'rainpress'
|
9
9
|
|
10
|
-
# Runs the content through [Rainpress](
|
10
|
+
# Runs the content through [Rainpress](https://github.com/ddfreyne/rainpress).
|
11
11
|
# Parameters passed to this filter will be passed on to Rainpress.
|
12
12
|
#
|
13
13
|
# @param [String] content The content to filter
|
@@ -7,7 +7,7 @@ module Nanoc::Filters
|
|
7
7
|
|
8
8
|
requires 'rdiscount'
|
9
9
|
|
10
|
-
# Runs the content through [RDiscount](
|
10
|
+
# Runs the content through [RDiscount](https://github.com/davidfstr/rdiscount).
|
11
11
|
#
|
12
12
|
# @option params [Array] :extensions ([]) A list of RDiscount extensions
|
13
13
|
#
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Nanoc::Helpers
|
4
|
-
# @see
|
4
|
+
# @see https://nanoc.ws/doc/reference/helpers/#blogging
|
5
5
|
module Blogging
|
6
6
|
# @return [Array]
|
7
7
|
def articles
|
@@ -120,8 +120,8 @@ module Nanoc::Helpers
|
|
120
120
|
xml.updated(updated.__nanoc_to_iso8601_time)
|
121
121
|
|
122
122
|
# Add links
|
123
|
-
xml.link(rel: 'alternate', href: (alt_link || root_url))
|
124
|
-
xml.link(rel: 'self', href: feed_url)
|
123
|
+
xml.link(rel: 'alternate', href: (alt_link || root_url), type: 'text/html')
|
124
|
+
xml.link(rel: 'self', href: feed_url, type: 'application/atom+xml')
|
125
125
|
|
126
126
|
# Add author information
|
127
127
|
xml.author do
|
@@ -163,7 +163,7 @@ module Nanoc::Helpers
|
|
163
163
|
end
|
164
164
|
|
165
165
|
# Add link
|
166
|
-
xml.link(rel: 'alternate', href: url)
|
166
|
+
xml.link(rel: 'alternate', href: url, type: 'text/html')
|
167
167
|
|
168
168
|
# Add content
|
169
169
|
summary = excerpt_proc.call(article)
|
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Nanoc::Helpers
|
4
|
-
# @see
|
4
|
+
# @see https://nanoc.ws/doc/reference/helpers/#breadcrumbs
|
5
5
|
module Breadcrumbs
|
6
|
-
class AmbiguousAncestorError < Nanoc::
|
6
|
+
class AmbiguousAncestorError < ::Nanoc::Core::Error
|
7
7
|
def initialize(pattern, items)
|
8
8
|
@pattern = pattern
|
9
9
|
@items = items
|
data/lib/nanoc/helpers/text.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Nanoc::Helpers
|
4
|
-
# @see
|
4
|
+
# @see https://nanoc.ws/doc/reference/helpers/#xmlsitemap
|
5
5
|
module XMLSitemap
|
6
6
|
# @option params [Array] :items
|
7
7
|
# @option params [Proc] :rep_select
|
@@ -7,7 +7,7 @@ module Nanoc
|
|
7
7
|
|
8
8
|
contract Nanoc::Core::ItemRep => C::Any
|
9
9
|
def initialize(rep)
|
10
|
-
@action_sequence_builder = Nanoc::
|
10
|
+
@action_sequence_builder = Nanoc::Core::ActionSequenceBuilder.new(rep)
|
11
11
|
|
12
12
|
@any_layouts = false
|
13
13
|
@last_snapshot = false
|
@@ -61,7 +61,7 @@ module Nanoc
|
|
61
61
|
nil
|
62
62
|
end
|
63
63
|
|
64
|
-
contract C::None => Nanoc::
|
64
|
+
contract C::None => Nanoc::Core::ActionSequence
|
65
65
|
def action_sequence
|
66
66
|
@action_sequence_builder.action_sequence
|
67
67
|
end
|
@@ -40,7 +40,7 @@ module Nanoc::RuleDSL
|
|
40
40
|
|
41
41
|
# @param [#reference] obj
|
42
42
|
#
|
43
|
-
# @return [Nanoc::
|
43
|
+
# @return [Nanoc::Core::ActionSequence]
|
44
44
|
def [](obj)
|
45
45
|
case obj
|
46
46
|
when Nanoc::Core::ItemRep
|
@@ -78,7 +78,7 @@ module Nanoc::RuleDSL
|
|
78
78
|
|
79
79
|
# @param [Nanoc::Core::Layout] layout
|
80
80
|
#
|
81
|
-
# @return [Nanoc::
|
81
|
+
# @return [Nanoc::Core::ActionSequence]
|
82
82
|
def new_action_sequence_for_layout(layout)
|
83
83
|
res = @rules_collection.filter_for_layout(layout)
|
84
84
|
|
@@ -86,7 +86,7 @@ module Nanoc::RuleDSL
|
|
86
86
|
raise NoActionSequenceForLayoutException.new(layout)
|
87
87
|
end
|
88
88
|
|
89
|
-
Nanoc::
|
89
|
+
Nanoc::Core::ActionSequenceBuilder.build(layout) do |b|
|
90
90
|
b.add_filter(res[0], res[1])
|
91
91
|
end
|
92
92
|
end
|
@@ -100,7 +100,7 @@ module Nanoc::RuleDSL
|
|
100
100
|
actions << action
|
101
101
|
end
|
102
102
|
end
|
103
|
-
Nanoc::
|
103
|
+
Nanoc::Core::ActionSequence.new(seq.item_rep, actions: actions)
|
104
104
|
end
|
105
105
|
|
106
106
|
def copy_paths_from_routing_rules(seq, snapshots_for_which_to_skip_routing_rule, rep:)
|
data/lib/nanoc/spec.rb
CHANGED
@@ -12,13 +12,8 @@ module Nanoc
|
|
12
12
|
Dir.chdir(here)
|
13
13
|
end
|
14
14
|
|
15
|
-
def on_windows?
|
16
|
-
Nanoc.on_windows?
|
17
|
-
end
|
18
|
-
|
19
15
|
def command?(cmd)
|
20
|
-
|
21
|
-
system("#{which} #{cmd} > #{null} 2>&1")
|
16
|
+
TTY::Which.exist?(cmd)
|
22
17
|
end
|
23
18
|
|
24
19
|
def skip_unless_have_command(cmd)
|
@@ -184,7 +179,7 @@ module Nanoc
|
|
184
179
|
end
|
185
180
|
|
186
181
|
def new_action_provider
|
187
|
-
Class.new(Nanoc::
|
182
|
+
Class.new(Nanoc::Core::ActionProvider) do
|
188
183
|
def self.for(_context)
|
189
184
|
raise NotImplementedError
|
190
185
|
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.3
|
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-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 4.11.
|
47
|
+
version: 4.11.3
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 4.11.
|
54
|
+
version: 4.11.3
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: parallel
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,6 +94,62 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '1.2'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: tty-command
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.8'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.8'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: tty-file
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0.7'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0.7'
|
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
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: tty-which
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0.4'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0.4'
|
97
153
|
description: Nanoc is a static-site generator focused on flexibility. It transforms
|
98
154
|
content from a format such as Markdown or AsciiDoc into another format, usually
|
99
155
|
HTML, and lays out pages consistently to retain the site’s look and feel throughout.
|
@@ -113,8 +169,6 @@ files:
|
|
113
169
|
- lib/nanoc/base/assertions.rb
|
114
170
|
- lib/nanoc/base/changes_stream.rb
|
115
171
|
- lib/nanoc/base/entities.rb
|
116
|
-
- lib/nanoc/base/entities/action_sequence.rb
|
117
|
-
- lib/nanoc/base/entities/checksum_collection.rb
|
118
172
|
- lib/nanoc/base/entities/dependency.rb
|
119
173
|
- lib/nanoc/base/entities/outdatedness_reasons.rb
|
120
174
|
- lib/nanoc/base/entities/outdatedness_status.rb
|
@@ -140,8 +194,6 @@ files:
|
|
140
194
|
- lib/nanoc/base/repos/store.rb
|
141
195
|
- lib/nanoc/base/repos/textual_compiled_content_cache.rb
|
142
196
|
- lib/nanoc/base/services.rb
|
143
|
-
- lib/nanoc/base/services/action_provider.rb
|
144
|
-
- lib/nanoc/base/services/action_sequence_builder.rb
|
145
197
|
- lib/nanoc/base/services/compilation_context.rb
|
146
198
|
- lib/nanoc/base/services/compiler.rb
|
147
199
|
- lib/nanoc/base/services/compiler/phases.rb
|
@@ -170,7 +222,6 @@ files:
|
|
170
222
|
- lib/nanoc/base/services/dependency_tracker.rb
|
171
223
|
- lib/nanoc/base/services/executor.rb
|
172
224
|
- lib/nanoc/base/services/filter.rb
|
173
|
-
- lib/nanoc/base/services/instrumentor.rb
|
174
225
|
- lib/nanoc/base/services/item_rep_builder.rb
|
175
226
|
- lib/nanoc/base/services/item_rep_router.rb
|
176
227
|
- lib/nanoc/base/services/item_rep_selector.rb
|
@@ -276,7 +327,6 @@ files:
|
|
276
327
|
- lib/nanoc/extra/core_ext/time.rb
|
277
328
|
- lib/nanoc/extra/jruby_nokogiri_warner.rb
|
278
329
|
- lib/nanoc/extra/link_collector.rb
|
279
|
-
- lib/nanoc/extra/piper.rb
|
280
330
|
- lib/nanoc/filters.rb
|
281
331
|
- lib/nanoc/filters/asciidoc.rb
|
282
332
|
- lib/nanoc/filters/asciidoctor.rb
|
@@ -337,7 +387,7 @@ files:
|
|
337
387
|
- lib/nanoc/rule_dsl/rules_loader.rb
|
338
388
|
- lib/nanoc/spec.rb
|
339
389
|
- lib/nanoc/version.rb
|
340
|
-
homepage:
|
390
|
+
homepage: https://nanoc.ws/
|
341
391
|
licenses:
|
342
392
|
- MIT
|
343
393
|
metadata: {}
|
@@ -356,7 +406,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
356
406
|
- !ruby/object:Gem::Version
|
357
407
|
version: '0'
|
358
408
|
requirements: []
|
359
|
-
rubygems_version: 3.0.
|
409
|
+
rubygems_version: 3.0.3
|
360
410
|
signing_key:
|
361
411
|
specification_version: 4
|
362
412
|
summary: A static-site generator with a focus on flexibility.
|