nanoc 3.7.3 → 3.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +71 -46
- data/NEWS.md +14 -0
- data/lib/nanoc.rb +1 -1
- data/lib/nanoc/base/checksummer.rb +1 -1
- data/lib/nanoc/base/compilation/checksum_store.rb +1 -1
- data/lib/nanoc/base/compilation/compiled_content_cache.rb +1 -1
- data/lib/nanoc/base/compilation/compiler.rb +11 -10
- data/lib/nanoc/base/compilation/compiler_dsl.rb +4 -4
- data/lib/nanoc/base/compilation/dependency_tracker.rb +7 -7
- data/lib/nanoc/base/compilation/filter.rb +1 -1
- data/lib/nanoc/base/compilation/item_rep_proxy.rb +6 -5
- data/lib/nanoc/base/compilation/item_rep_recorder_proxy.rb +8 -7
- data/lib/nanoc/base/compilation/outdatedness_checker.rb +6 -6
- data/lib/nanoc/base/compilation/rule.rb +1 -1
- data/lib/nanoc/base/compilation/rule_memory_store.rb +1 -1
- data/lib/nanoc/base/compilation/rules_collection.rb +5 -5
- data/lib/nanoc/base/context.rb +1 -1
- data/lib/nanoc/base/core_ext/array.rb +1 -1
- data/lib/nanoc/base/core_ext/date.rb +1 -1
- data/lib/nanoc/base/core_ext/hash.rb +1 -1
- data/lib/nanoc/base/directed_graph.rb +3 -3
- data/lib/nanoc/base/memoization.rb +1 -1
- data/lib/nanoc/base/notification_center.rb +1 -1
- data/lib/nanoc/base/ordered_hash.rb +1 -1
- data/lib/nanoc/base/plugin_registry.rb +3 -3
- data/lib/nanoc/base/result_data/item_rep.rb +13 -11
- data/lib/nanoc/base/source_data/code_snippet.rb +2 -2
- data/lib/nanoc/base/source_data/data_source.rb +3 -3
- data/lib/nanoc/base/source_data/item.rb +8 -8
- data/lib/nanoc/base/source_data/item_array.rb +1 -1
- data/lib/nanoc/base/source_data/layout.rb +1 -1
- data/lib/nanoc/base/source_data/site.rb +27 -18
- data/lib/nanoc/base/store.rb +3 -3
- data/lib/nanoc/base/temp_filename_factory.rb +2 -2
- data/lib/nanoc/cli.rb +6 -6
- data/lib/nanoc/cli/cleaning_stream.rb +1 -1
- data/lib/nanoc/cli/command_runner.rb +4 -3
- data/lib/nanoc/cli/commands/autocompile.rb +3 -3
- data/lib/nanoc/cli/commands/check.rb +3 -3
- data/lib/nanoc/cli/commands/compile.rb +23 -23
- data/lib/nanoc/cli/commands/create-item.rb +5 -5
- data/lib/nanoc/cli/commands/create-layout.rb +14 -14
- data/lib/nanoc/cli/commands/create-site.rb +6 -6
- data/lib/nanoc/cli/commands/deploy.rb +8 -8
- data/lib/nanoc/cli/commands/nanoc.rb +3 -3
- data/lib/nanoc/cli/commands/prune.rb +3 -3
- data/lib/nanoc/cli/commands/shell.rb +4 -4
- data/lib/nanoc/cli/commands/show-data.rb +5 -5
- data/lib/nanoc/cli/commands/show-plugins.rb +5 -5
- data/lib/nanoc/cli/commands/show-rules.rb +4 -4
- data/lib/nanoc/cli/commands/sync.rb +1 -1
- data/lib/nanoc/cli/commands/update.rb +13 -13
- data/lib/nanoc/cli/commands/validate-css.rb +3 -3
- data/lib/nanoc/cli/commands/validate-html.rb +3 -3
- data/lib/nanoc/cli/commands/validate-links.rb +6 -6
- data/lib/nanoc/cli/commands/view.rb +4 -4
- data/lib/nanoc/cli/commands/watch.rb +11 -11
- data/lib/nanoc/cli/error_handler.rb +10 -10
- data/lib/nanoc/cli/logger.rb +1 -1
- data/lib/nanoc/cli/stream_cleaners/abstract.rb +1 -1
- data/lib/nanoc/data_sources/deprecated/last_fm.rb +5 -5
- data/lib/nanoc/data_sources/deprecated/twitter.rb +1 -1
- data/lib/nanoc/data_sources/filesystem.rb +16 -16
- data/lib/nanoc/data_sources/filesystem_unified.rb +1 -1
- data/lib/nanoc/data_sources/filesystem_verbose.rb +1 -1
- data/lib/nanoc/data_sources/static.rb +1 -1
- data/lib/nanoc/extra/auto_compiler.rb +2 -2
- data/lib/nanoc/extra/checking/check.rb +11 -1
- data/lib/nanoc/extra/checking/checks/external_links.rb +15 -7
- data/lib/nanoc/extra/checking/checks/internal_links.rb +3 -3
- data/lib/nanoc/extra/checking/checks/stale.rb +6 -6
- data/lib/nanoc/extra/checking/runner.rb +10 -9
- data/lib/nanoc/extra/chick.rb +2 -2
- data/lib/nanoc/extra/core_ext/enumerable.rb +1 -1
- data/lib/nanoc/extra/deployers/fog.rb +2 -2
- data/lib/nanoc/extra/deployers/rsync.rb +3 -3
- data/lib/nanoc/extra/file_proxy.rb +3 -3
- data/lib/nanoc/extra/jruby_nokogiri_warner.rb +1 -1
- data/lib/nanoc/extra/link_collector.rb +3 -3
- data/lib/nanoc/extra/piper.rb +2 -2
- data/lib/nanoc/extra/pruner.rb +4 -3
- data/lib/nanoc/extra/validators/links.rb +2 -2
- data/lib/nanoc/extra/validators/w3c.rb +1 -1
- data/lib/nanoc/extra/vcs.rb +5 -5
- data/lib/nanoc/extra/vcses/dummy.rb +1 -1
- data/lib/nanoc/filters/asciidoc.rb +1 -1
- data/lib/nanoc/filters/bluecloth.rb +1 -1
- data/lib/nanoc/filters/coffeescript.rb +1 -1
- data/lib/nanoc/filters/colorize_syntax.rb +19 -21
- data/lib/nanoc/filters/erubis.rb +1 -1
- data/lib/nanoc/filters/handlebars.rb +1 -1
- data/lib/nanoc/filters/less.rb +2 -2
- data/lib/nanoc/filters/markaby.rb +1 -1
- data/lib/nanoc/filters/mustache.rb +1 -1
- data/lib/nanoc/filters/rdoc.rb +1 -1
- data/lib/nanoc/filters/relativize_paths.rb +5 -5
- data/lib/nanoc/filters/rubypants.rb +1 -1
- data/lib/nanoc/filters/sass/sass_filesystem_importer.rb +1 -1
- data/lib/nanoc/filters/typogruby.rb +1 -1
- data/lib/nanoc/filters/xsl.rb +1 -1
- data/lib/nanoc/helpers/blogging.rb +12 -12
- data/lib/nanoc/helpers/capturing.rb +3 -3
- data/lib/nanoc/helpers/html_escape.rb +6 -6
- data/lib/nanoc/helpers/tagging.rb +1 -1
- data/lib/nanoc/helpers/xml_sitemap.rb +4 -4
- data/lib/nanoc/tasks/clean.rake +1 -1
- data/lib/nanoc/tasks/clean.rb +1 -1
- data/lib/nanoc/tasks/deploy/rsync.rake +2 -2
- data/lib/nanoc/version.rb +1 -1
- data/tasks/rubocop.rake +1 -0
- data/test/base/core_ext/array_spec.rb +7 -7
- data/test/base/core_ext/hash_spec.rb +1 -1
- data/test/base/test_checksum_store.rb +1 -1
- data/test/base/test_compiler.rb +14 -14
- data/test/base/test_compiler_dsl.rb +13 -13
- data/test/base/test_context.rb +2 -2
- data/test/base/test_dependency_tracker.rb +42 -42
- data/test/base/test_directed_graph.rb +102 -102
- data/test/base/test_item.rb +21 -21
- data/test/base/test_item_array.rb +19 -19
- data/test/base/test_item_rep.rb +50 -50
- data/test/base/test_layout.rb +6 -6
- data/test/base/test_outdatedness_checker.rb +2 -2
- data/test/base/test_rule_context.rb +2 -2
- data/test/base/test_site.rb +5 -5
- data/test/cli/commands/test_compile.rb +7 -7
- data/test/cli/commands/test_create_site.rb +2 -2
- data/test/cli/commands/test_deploy.rb +10 -10
- data/test/cli/commands/test_prune.rb +2 -2
- data/test/cli/commands/test_sync.rb +1 -1
- data/test/cli/commands/test_watch.rb +7 -7
- data/test/cli/test_cleaning_stream.rb +4 -4
- data/test/cli/test_cli.rb +3 -3
- data/test/cli/test_error_handler.rb +3 -3
- data/test/data_sources/test_filesystem.rb +19 -19
- data/test/data_sources/test_filesystem_unified.rb +30 -30
- data/test/data_sources/test_filesystem_verbose.rb +3 -3
- data/test/data_sources/test_static.rb +9 -9
- data/test/extra/checking/checks/test_stale.rb +8 -8
- data/test/extra/checking/test_check.rb +11 -1
- data/test/extra/checking/test_dsl.rb +1 -1
- data/test/extra/core_ext/test_enumerable.rb +2 -2
- data/test/extra/deployers/test_fog.rb +10 -10
- data/test/extra/deployers/test_rsync.rb +2 -2
- data/test/extra/test_auto_compiler.rb +28 -28
- data/test/extra/test_filesystem_tools.rb +3 -3
- data/test/extra/test_link_collector.rb +39 -20
- data/test/extra/validators/test_w3c.rb +5 -5
- data/test/filters/test_asciidoc.rb +2 -2
- data/test/filters/test_bluecloth.rb +1 -1
- data/test/filters/test_coffeescript.rb +1 -1
- data/test/filters/test_colorize_syntax.rb +20 -13
- data/test/filters/test_erb.rb +1 -1
- data/test/filters/test_kramdown.rb +1 -1
- data/test/filters/test_less.rb +10 -10
- data/test/filters/test_markaby.rb +2 -2
- data/test/filters/test_maruku.rb +2 -2
- data/test/filters/test_pandoc.rb +3 -3
- data/test/filters/test_rainpress.rb +4 -4
- data/test/filters/test_rdiscount.rb +2 -2
- data/test/filters/test_rdoc.rb +1 -1
- data/test/filters/test_redcarpet.rb +5 -5
- data/test/filters/test_redcloth.rb +5 -5
- data/test/filters/test_relativize_paths.rb +33 -31
- data/test/filters/test_rubypants.rb +2 -2
- data/test/filters/test_sass.rb +8 -8
- data/test/filters/test_slim.rb +3 -3
- data/test/filters/test_uglify_js.rb +1 -1
- data/test/filters/test_yui_compressor.rb +3 -3
- data/test/gem_loader.rb +1 -1
- data/test/helper.rb +14 -16
- data/test/helpers/test_blogging.rb +28 -28
- data/test/helpers/test_breadcrumbs.rb +12 -12
- data/test/helpers/test_capturing.rb +7 -7
- data/test/helpers/test_filtering.rb +16 -16
- data/test/helpers/test_link_to.rb +3 -3
- data/test/helpers/test_rendering.rb +1 -1
- data/test/helpers/test_tagging.rb +11 -11
- data/test/helpers/test_xml_sitemap.rb +18 -18
- data/test/tasks/test_clean.rb +8 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15684f17b89e23c06fbe52df15a80529390df3a1
|
4
|
+
data.tar.gz: fcac628a29b82a5783020594f69a5b738d0fdc9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37fde883c3804bd00defeb90266326921e79a4077454402c511acd0988a948361642db481019fa3f29a8708a07abaa5accd8000f08e773363156fcd409b75fff
|
7
|
+
data.tar.gz: fbb6f99a16f66438e70918a0f058b0f3089c41908595270d7d9e68ed5bb29be8feb9c1adff7207c096162a42e33fb15cfb47e7a53b3b08c58b3965eeab599dc7
|
data/Gemfile.lock
CHANGED
@@ -11,12 +11,15 @@ GEM
|
|
11
11
|
addressable (2.3.6)
|
12
12
|
adsf (1.2.0)
|
13
13
|
rack (>= 1.0.0)
|
14
|
+
allison (2.0.3)
|
14
15
|
ast (2.0.0)
|
16
|
+
astrolabe (1.3.0)
|
17
|
+
parser (>= 2.2.0.pre.3, < 3.0)
|
15
18
|
bluecloth (2.2.0)
|
16
19
|
builder (3.2.2)
|
17
|
-
celluloid (0.
|
18
|
-
timers (~>
|
19
|
-
chunky_png (1.3.
|
20
|
+
celluloid (0.16.0)
|
21
|
+
timers (~> 4.0.0)
|
22
|
+
chunky_png (1.3.3)
|
20
23
|
coderay (1.1.0)
|
21
24
|
coffee-script (2.3.0)
|
22
25
|
coffee-script-source
|
@@ -28,29 +31,36 @@ GEM
|
|
28
31
|
chunky_png (~> 1.2)
|
29
32
|
fssm (>= 0.2.7)
|
30
33
|
sass (~> 3.2.19)
|
31
|
-
coveralls (0.7.
|
34
|
+
coveralls (0.7.2)
|
32
35
|
multi_json (~> 1.3)
|
33
|
-
rest-client
|
36
|
+
rest-client (= 1.6.7)
|
34
37
|
simplecov (>= 0.7)
|
35
|
-
term-ansicolor
|
36
|
-
thor
|
38
|
+
term-ansicolor (= 1.2.2)
|
39
|
+
thor (= 0.18.1)
|
37
40
|
crack (0.4.2)
|
38
41
|
safe_yaml (~> 1.0.0)
|
39
42
|
cri (2.6.1)
|
40
43
|
colored (~> 1.2)
|
41
44
|
docile (1.1.5)
|
45
|
+
echoe (4.6.6)
|
46
|
+
allison (>= 2.0.3)
|
47
|
+
rake (>= 0.9.2)
|
48
|
+
rdoc (>= 2.5.11)
|
49
|
+
rubyforge (>= 2.0.4)
|
42
50
|
erubis (2.7.0)
|
43
|
-
excon (0.
|
44
|
-
execjs (2.2.
|
45
|
-
ffi (1.9.
|
46
|
-
fog (1.
|
51
|
+
excon (0.41.0)
|
52
|
+
execjs (2.2.2)
|
53
|
+
ffi (1.9.6)
|
54
|
+
fog (1.24.0)
|
47
55
|
fog-brightbox
|
48
56
|
fog-core (~> 1.23)
|
49
57
|
fog-json
|
58
|
+
fog-radosgw (>= 0.0.2)
|
59
|
+
fog-sakuracloud (>= 0.0.4)
|
50
60
|
fog-softlayer
|
51
61
|
ipaddress (~> 0.5)
|
52
62
|
nokogiri (~> 1.5, >= 1.5.11)
|
53
|
-
fog-brightbox (0.
|
63
|
+
fog-brightbox (0.6.1)
|
54
64
|
fog-core (~> 1.22)
|
55
65
|
fog-json
|
56
66
|
inflecto
|
@@ -63,9 +73,19 @@ GEM
|
|
63
73
|
net-ssh (>= 2.1.3)
|
64
74
|
fog-json (1.0.0)
|
65
75
|
multi_json (~> 1.0)
|
66
|
-
fog-
|
76
|
+
fog-radosgw (0.0.3)
|
77
|
+
fog-core (>= 1.21.0)
|
78
|
+
fog-json
|
79
|
+
fog-xml (>= 0.0.1)
|
80
|
+
fog-sakuracloud (0.1.1)
|
81
|
+
fog-core
|
82
|
+
fog-json
|
83
|
+
fog-softlayer (0.3.24)
|
67
84
|
fog-core
|
68
85
|
fog-json
|
86
|
+
fog-xml (0.1.1)
|
87
|
+
fog-core
|
88
|
+
nokogiri (~> 1.5, >= 1.5.11)
|
69
89
|
formatador (0.2.5)
|
70
90
|
fssm (0.2.10)
|
71
91
|
haml (4.0.5)
|
@@ -74,14 +94,16 @@ GEM
|
|
74
94
|
handlebars-source (~> 1.3.0)
|
75
95
|
therubyracer (~> 0.12.0)
|
76
96
|
handlebars-source (1.3.0)
|
97
|
+
hitimes (1.2.2)
|
77
98
|
inflecto (0.0.2)
|
78
99
|
ipaddress (0.8.0)
|
79
100
|
json (1.8.1)
|
80
|
-
|
101
|
+
json_pure (1.8.1)
|
102
|
+
kramdown (1.5.0)
|
81
103
|
less (2.6.0)
|
82
104
|
commonjs (~> 0.2.7)
|
83
|
-
libv8 (3.16.14.
|
84
|
-
listen (2.
|
105
|
+
libv8 (3.16.14.7)
|
106
|
+
listen (2.8.0)
|
85
107
|
celluloid (>= 0.15.2)
|
86
108
|
rb-fsevent (>= 0.9.3)
|
87
109
|
rb-inotify (>= 0.9)
|
@@ -90,21 +112,20 @@ GEM
|
|
90
112
|
maruku (0.7.2)
|
91
113
|
metaclass (0.0.4)
|
92
114
|
method_source (0.8.2)
|
93
|
-
mime-types (2.3)
|
94
|
-
mini_portile (0.6.
|
115
|
+
mime-types (2.4.3)
|
116
|
+
mini_portile (0.6.1)
|
95
117
|
minitest (4.7.5)
|
96
118
|
mocha (1.1.0)
|
97
119
|
metaclass (~> 0.0.1)
|
98
120
|
multi_json (1.10.1)
|
99
|
-
mustache (0.99.
|
121
|
+
mustache (0.99.7)
|
100
122
|
net-scp (1.2.1)
|
101
123
|
net-ssh (>= 2.6.5)
|
102
124
|
net-ssh (2.9.1)
|
103
|
-
|
104
|
-
|
105
|
-
mini_portile (= 0.6.0)
|
125
|
+
nokogiri (1.6.4.1)
|
126
|
+
mini_portile (~> 0.6.0)
|
106
127
|
pandoc-ruby (0.7.5)
|
107
|
-
parser (2.2.0.pre.
|
128
|
+
parser (2.2.0.pre.7)
|
108
129
|
ast (>= 1.1, < 3.0)
|
109
130
|
slop (~> 3.4, >= 3.4.5)
|
110
131
|
posix-spawn (0.3.9)
|
@@ -119,61 +140,65 @@ GEM
|
|
119
140
|
rack (1.5.2)
|
120
141
|
rainbow (2.0.0)
|
121
142
|
rainpress (1.0)
|
143
|
+
echoe
|
122
144
|
rake (10.3.2)
|
123
145
|
rb-fsevent (0.9.4)
|
124
146
|
rb-inotify (0.9.5)
|
125
147
|
ffi (>= 0.5.0)
|
126
148
|
rdiscount (2.1.7.1)
|
127
|
-
rdoc (4.1.
|
149
|
+
rdoc (4.1.2)
|
128
150
|
json (~> 1.4)
|
129
|
-
redcarpet (3.
|
151
|
+
redcarpet (3.2.0)
|
130
152
|
ref (1.0.5)
|
131
|
-
rest-client (1.7
|
132
|
-
mime-types (>= 1.16
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
parser (>= 2.2.0.pre.
|
153
|
+
rest-client (1.6.7)
|
154
|
+
mime-types (>= 1.16)
|
155
|
+
rouge (1.7.3)
|
156
|
+
rubocop (0.27.1)
|
157
|
+
astrolabe (~> 1.3)
|
158
|
+
parser (>= 2.2.0.pre.7, < 3.0)
|
137
159
|
powerpack (~> 0.0.6)
|
138
160
|
rainbow (>= 1.99.1, < 3.0)
|
139
161
|
ruby-progressbar (~> 1.4)
|
140
|
-
ruby-progressbar (1.
|
162
|
+
ruby-progressbar (1.7.0)
|
163
|
+
rubyforge (2.0.4)
|
164
|
+
json_pure (>= 1.1.7)
|
141
165
|
rubypants (0.2.0)
|
142
|
-
safe_yaml (1.0.
|
166
|
+
safe_yaml (1.0.4)
|
143
167
|
sass (3.2.19)
|
144
|
-
simplecov (0.9.
|
168
|
+
simplecov (0.9.1)
|
145
169
|
docile (~> 1.1.0)
|
146
|
-
multi_json
|
170
|
+
multi_json (~> 1.0)
|
147
171
|
simplecov-html (~> 0.8.0)
|
148
172
|
simplecov-html (0.8.0)
|
149
|
-
slim (2.0
|
150
|
-
temple (~> 0.6.
|
173
|
+
slim (2.1.0)
|
174
|
+
temple (~> 0.6.9)
|
151
175
|
tilt (>= 1.3.3, < 2.1)
|
152
176
|
slop (3.6.0)
|
153
|
-
temple (0.6.
|
154
|
-
term-ansicolor (1.
|
155
|
-
tins (~>
|
177
|
+
temple (0.6.10)
|
178
|
+
term-ansicolor (1.2.2)
|
179
|
+
tins (~> 0.8)
|
156
180
|
therubyracer (0.12.1)
|
157
181
|
libv8 (~> 3.16.14.0)
|
158
182
|
ref
|
159
|
-
thor (0.
|
183
|
+
thor (0.18.1)
|
160
184
|
tilt (2.0.1)
|
161
|
-
timers (
|
162
|
-
|
185
|
+
timers (4.0.1)
|
186
|
+
hitimes
|
187
|
+
tins (0.13.2)
|
163
188
|
typogruby (1.0.17)
|
164
189
|
rubypants
|
165
190
|
uglifier (2.5.3)
|
166
191
|
execjs (>= 0.3.0)
|
167
192
|
json (>= 1.8.0)
|
168
|
-
vcr (2.9.
|
193
|
+
vcr (2.9.3)
|
169
194
|
w3c_validators (1.2)
|
170
195
|
json
|
171
196
|
nokogiri
|
172
|
-
webmock (1.
|
197
|
+
webmock (1.20.4)
|
173
198
|
addressable (>= 2.3.6)
|
174
199
|
crack (>= 0.3.2)
|
175
200
|
yajl-ruby (1.1.0)
|
176
|
-
yard (0.8.7.
|
201
|
+
yard (0.8.7.6)
|
177
202
|
yuicompressor (1.3.3)
|
178
203
|
|
179
204
|
PLATFORMS
|
data/NEWS.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# nanoc news
|
2
2
|
|
3
|
+
## 3.7.4 (2014-11-23)
|
4
|
+
|
5
|
+
Enhancements:
|
6
|
+
|
7
|
+
* Made `check` command fail when output directory is missing (#472) [Mike Pennisi]
|
8
|
+
* Made external links check timeouts start small and grow (#483) [Michal Papis]
|
9
|
+
* Made code and API adhere much more closely to the Ruby style guide (#476)
|
10
|
+
|
11
|
+
Fixes:
|
12
|
+
|
13
|
+
* Fixed potential “parent directory is world writable” error (#465, #474)
|
14
|
+
* Fixed retrying requests in the external link checker (#483) [Michal Papis]
|
15
|
+
* Fixed issue with data sources not being unloaded (#491) [Michal Papis]
|
16
|
+
|
3
17
|
## 3.7.3 (2014-08-31)
|
4
18
|
|
5
19
|
Fixes:
|
data/lib/nanoc.rb
CHANGED
@@ -15,7 +15,7 @@ module Nanoc
|
|
15
15
|
|
16
16
|
# @return [Boolean] True if the current platform is Windows,
|
17
17
|
def self.on_windows?
|
18
|
-
|
18
|
+
RUBY_PLATFORM =~ /windows|bccwin|cygwin|djgpp|mingw|mswin|wince/i
|
19
19
|
end
|
20
20
|
|
21
21
|
end
|
@@ -74,7 +74,7 @@ module Nanoc
|
|
74
74
|
#
|
75
75
|
# @overload run
|
76
76
|
# @return [void]
|
77
|
-
def run(*
|
77
|
+
def run(*_args)
|
78
78
|
# Create output directory if necessary
|
79
79
|
FileUtils.mkdir_p(@site.config[:output_dir])
|
80
80
|
|
@@ -206,7 +206,7 @@ module Nanoc
|
|
206
206
|
# @api private
|
207
207
|
def objects
|
208
208
|
site.items + site.layouts + site.code_snippets +
|
209
|
-
[
|
209
|
+
[site.config, rules_collection]
|
210
210
|
end
|
211
211
|
|
212
212
|
# Creates the representations of all items as defined by the compilation
|
@@ -250,11 +250,12 @@ module Nanoc
|
|
250
250
|
# Get normal path by stripping index filename
|
251
251
|
rep.paths[snapshot] = basic_path
|
252
252
|
@site.config[:index_filenames].each do |index_filename|
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
253
|
+
rep_path_ending = rep.paths[snapshot][-index_filename.length..-1]
|
254
|
+
next unless rep_path_ending == index_filename
|
255
|
+
|
256
|
+
# Strip and stop
|
257
|
+
rep.paths[snapshot] = rep.paths[snapshot][0..-index_filename.length - 1]
|
258
|
+
break
|
258
259
|
end
|
259
260
|
end
|
260
261
|
end
|
@@ -294,7 +295,7 @@ module Nanoc
|
|
294
295
|
end
|
295
296
|
memoize :outdatedness_checker
|
296
297
|
|
297
|
-
|
298
|
+
private
|
298
299
|
|
299
300
|
# @return [Array<Nanoc::Item>] The site’s items
|
300
301
|
def items
|
@@ -324,7 +325,7 @@ module Nanoc
|
|
324
325
|
|
325
326
|
# Listen to processing start/stop
|
326
327
|
Nanoc::NotificationCenter.on(:processing_started, self) { |obj| @stack.push(obj) }
|
327
|
-
Nanoc::NotificationCenter.on(:processing_ended, self) { |
|
328
|
+
Nanoc::NotificationCenter.on(:processing_ended, self) { |_obj| @stack.pop }
|
328
329
|
|
329
330
|
# Assign snapshots
|
330
331
|
reps.each do |rep|
|
@@ -350,7 +351,7 @@ module Nanoc
|
|
350
351
|
end
|
351
352
|
|
352
353
|
# Check whether everything was compiled
|
353
|
-
|
354
|
+
unless content_dependency_graph.vertices.empty?
|
354
355
|
raise Nanoc::Errors::RecursiveCompilation.new(content_dependency_graph.vertices)
|
355
356
|
end
|
356
357
|
ensure
|
@@ -151,7 +151,7 @@ module Nanoc
|
|
151
151
|
#
|
152
152
|
# layout '/custom/', :haml, :format => :html5
|
153
153
|
def layout(identifier, filter_name, params = {})
|
154
|
-
@rules_collection.layout_filter_mapping[identifier_to_regex(identifier)] = [
|
154
|
+
@rules_collection.layout_filter_mapping[identifier_to_regex(identifier)] = [filter_name, params]
|
155
155
|
end
|
156
156
|
|
157
157
|
# Creates a pair of compilation and routing rules that indicate that the
|
@@ -247,13 +247,13 @@ module Nanoc
|
|
247
247
|
# include_rules 'rules/assets'
|
248
248
|
# include_rules 'rules/content'
|
249
249
|
def include_rules(name)
|
250
|
-
filename = [
|
250
|
+
filename = ["#{name}", "#{name}.rb", "./#{name}", "./#{name}.rb"].find { |f| File.file?(f) }
|
251
251
|
raise Nanoc::Errors::NoRulesFileFound.new if filename.nil?
|
252
252
|
|
253
253
|
@rules_collection.parse(filename)
|
254
254
|
end
|
255
255
|
|
256
|
-
|
256
|
+
private
|
257
257
|
|
258
258
|
# Converts the given identifier, which can contain the '*' or '+'
|
259
259
|
# wildcard characters, matching zero or more resp. one or more
|
@@ -264,7 +264,7 @@ module Nanoc
|
|
264
264
|
# Add leading/trailing slashes if necessary
|
265
265
|
new_identifier = identifier.dup
|
266
266
|
new_identifier[/^/] = '/' if identifier[0, 1] != '/'
|
267
|
-
new_identifier[/$/] = '/' unless [
|
267
|
+
new_identifier[/$/] = '/' unless ['*', '/'].include?(identifier[-1, 1])
|
268
268
|
|
269
269
|
/^#{new_identifier.gsub('*', '(.*?)').gsub('+', '(.+?)')}$/
|
270
270
|
else
|
@@ -37,7 +37,7 @@ module Nanoc
|
|
37
37
|
super('tmp/dependencies', 4)
|
38
38
|
|
39
39
|
@objects = objects
|
40
|
-
@graph = Nanoc::DirectedGraph.new([
|
40
|
+
@graph = Nanoc::DirectedGraph.new([nil] + @objects)
|
41
41
|
@stack = []
|
42
42
|
end
|
43
43
|
|
@@ -53,7 +53,7 @@ module Nanoc
|
|
53
53
|
|
54
54
|
# Register start of visits
|
55
55
|
Nanoc::NotificationCenter.on(:visit_started, self) do |obj|
|
56
|
-
|
56
|
+
unless @stack.empty?
|
57
57
|
Nanoc::NotificationCenter.post(:dependency_created, @stack.last, obj)
|
58
58
|
record_dependency(@stack.last, obj)
|
59
59
|
end
|
@@ -61,7 +61,7 @@ module Nanoc
|
|
61
61
|
end
|
62
62
|
|
63
63
|
# Register end of visits
|
64
|
-
Nanoc::NotificationCenter.on(:visit_ended, self) do |
|
64
|
+
Nanoc::NotificationCenter.on(:visit_ended, self) do |_obj|
|
65
65
|
@stack.pop
|
66
66
|
end
|
67
67
|
end
|
@@ -71,7 +71,7 @@ module Nanoc
|
|
71
71
|
# @return [void]
|
72
72
|
def stop
|
73
73
|
# Sanity check
|
74
|
-
|
74
|
+
unless @stack.empty?
|
75
75
|
raise 'Internal inconsistency: dependency tracker stack not empty at end of compilation'
|
76
76
|
end
|
77
77
|
|
@@ -169,10 +169,10 @@ module Nanoc
|
|
169
169
|
|
170
170
|
# @see Nanoc::Store#unload
|
171
171
|
def unload
|
172
|
-
@graph = Nanoc::DirectedGraph.new([
|
172
|
+
@graph = Nanoc::DirectedGraph.new([nil] + @objects)
|
173
173
|
end
|
174
174
|
|
175
|
-
|
175
|
+
protected
|
176
176
|
|
177
177
|
def data
|
178
178
|
{
|
@@ -183,7 +183,7 @@ module Nanoc
|
|
183
183
|
|
184
184
|
def data=(new_data)
|
185
185
|
# Create new graph
|
186
|
-
@graph = Nanoc::DirectedGraph.new([
|
186
|
+
@graph = Nanoc::DirectedGraph.new([nil] + @objects)
|
187
187
|
|
188
188
|
# Load vertices
|
189
189
|
previous_objects = new_data[:vertices].map do |reference|
|
@@ -135,7 +135,7 @@ module Nanoc
|
|
135
135
|
# @return [String, void] If the filter output binary content, the return
|
136
136
|
# value is undefined; if the filter outputs textual content, the return
|
137
137
|
# value will be the filtered content.
|
138
|
-
def run(
|
138
|
+
def run(_content_or_filename, _params = {})
|
139
139
|
raise NotImplementedError.new('Nanoc::Filter subclasses must implement #run')
|
140
140
|
end
|
141
141
|
|