nanoc 3.8.0 → 4.0.0a1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/Gemfile.lock +322 -0
- data/NEWS.md +6 -0
- data/bin/nanoc +0 -18
- data/lib/nanoc.rb +5 -3
- data/lib/nanoc/base.rb +24 -6
- data/lib/nanoc/base/checksummer.rb +6 -4
- data/lib/nanoc/base/compilation/checksum_store.rb +4 -4
- data/lib/nanoc/base/compilation/compiled_content_cache.rb +5 -5
- data/lib/nanoc/base/compilation/compiler.rb +60 -65
- data/lib/nanoc/base/compilation/compiler_dsl.rb +11 -9
- data/lib/nanoc/base/compilation/dependency_tracker.rb +24 -38
- data/lib/nanoc/base/compilation/filter.rb +22 -7
- data/lib/nanoc/base/compilation/item_rep_proxy.rb +14 -12
- data/lib/nanoc/base/compilation/item_rep_recorder_proxy.rb +8 -8
- data/lib/nanoc/base/compilation/outdatedness_checker.rb +32 -32
- data/lib/nanoc/base/compilation/outdatedness_reasons.rb +3 -1
- data/lib/nanoc/base/compilation/rule.rb +9 -7
- data/lib/nanoc/base/compilation/rule_context.rb +15 -15
- data/lib/nanoc/base/compilation/rule_memory_calculator.rb +3 -3
- data/lib/nanoc/base/compilation/rule_memory_store.rb +7 -7
- data/lib/nanoc/base/compilation/rules_collection.rb +28 -30
- data/lib/nanoc/base/context.rb +2 -2
- data/lib/nanoc/base/core_ext/array.rb +17 -25
- data/lib/nanoc/base/core_ext/hash.rb +17 -25
- data/lib/nanoc/base/core_ext/pathname.rb +4 -2
- data/lib/nanoc/base/core_ext/string.rb +5 -3
- data/lib/nanoc/base/directed_graph.rb +4 -9
- data/lib/nanoc/base/error.rb +7 -0
- data/lib/nanoc/base/errors.rb +16 -23
- data/lib/nanoc/base/memoization.rb +4 -2
- data/lib/nanoc/base/notification_center.rb +3 -1
- data/lib/nanoc/base/plugin_registry.rb +14 -21
- data/lib/nanoc/base/result_data/item_rep.rb +43 -88
- data/lib/nanoc/base/source_data/code_snippet.rb +6 -4
- data/lib/nanoc/base/source_data/configuration.rb +3 -1
- data/lib/nanoc/base/source_data/data_source.rb +12 -94
- data/lib/nanoc/base/source_data/identifier.rb +50 -0
- data/lib/nanoc/base/source_data/item.rb +24 -67
- data/lib/nanoc/base/source_data/item_array.rb +6 -4
- data/lib/nanoc/base/source_data/layout.rb +17 -28
- data/lib/nanoc/base/source_data/site.rb +33 -44
- data/lib/nanoc/base/store.rb +3 -5
- data/lib/nanoc/base/temp_filename_factory.rb +3 -2
- data/lib/nanoc/base/views/config.rb +19 -0
- data/lib/nanoc/base/views/item.rb +77 -0
- data/lib/nanoc/base/views/item_collection.rb +43 -0
- data/lib/nanoc/base/views/item_rep.rb +125 -0
- data/lib/nanoc/base/views/layout.rb +42 -0
- data/lib/nanoc/base/views/layout_collection.rb +26 -0
- data/lib/nanoc/base/views/mutable_config.rb +9 -0
- data/lib/nanoc/base/views/mutable_item.rb +9 -0
- data/lib/nanoc/base/views/mutable_item_collection.rb +18 -0
- data/lib/nanoc/base/views/mutable_layout.rb +9 -0
- data/lib/nanoc/base/views/mutable_layout_collection.rb +18 -0
- data/lib/nanoc/base/views/site.rb +35 -0
- data/lib/nanoc/cli.rb +3 -6
- data/lib/nanoc/cli/ansi_string_colorizer.rb +2 -0
- data/lib/nanoc/cli/cleaning_stream.rb +2 -0
- data/lib/nanoc/cli/command_runner.rb +8 -42
- data/lib/nanoc/cli/commands/check.rb +2 -2
- data/lib/nanoc/cli/commands/compile.rb +19 -34
- data/lib/nanoc/cli/commands/create-site.rb +46 -83
- data/lib/nanoc/cli/commands/deploy.rb +4 -4
- data/lib/nanoc/cli/commands/shell.rb +1 -1
- data/lib/nanoc/cli/commands/show-plugins.rb +4 -6
- data/lib/nanoc/cli/error_handler.rb +4 -14
- data/lib/nanoc/cli/logger.rb +2 -0
- data/lib/nanoc/cli/stream_cleaners.rb +1 -0
- data/lib/nanoc/cli/stream_cleaners/abstract.rb +2 -0
- data/lib/nanoc/cli/stream_cleaners/ansi_colors.rb +2 -0
- data/lib/nanoc/cli/stream_cleaners/utf8.rb +2 -0
- data/lib/nanoc/data_sources.rb +1 -17
- data/lib/nanoc/data_sources/filesystem.rb +6 -37
- data/lib/nanoc/data_sources/filesystem_unified.rb +5 -3
- data/lib/nanoc/data_sources/filesystem_verbose.rb +5 -3
- data/lib/nanoc/data_sources/static.rb +4 -2
- data/lib/nanoc/extra.rb +1 -13
- data/lib/nanoc/extra/checking.rb +1 -0
- data/lib/nanoc/extra/checking/check.rb +4 -2
- data/lib/nanoc/extra/checking/checks.rb +1 -0
- data/lib/nanoc/extra/checking/checks/css.rb +1 -0
- data/lib/nanoc/extra/checking/checks/external_links.rb +2 -0
- data/lib/nanoc/extra/checking/checks/html.rb +1 -0
- data/lib/nanoc/extra/checking/checks/internal_links.rb +2 -0
- data/lib/nanoc/extra/checking/checks/mixed_content.rb +2 -0
- data/lib/nanoc/extra/checking/checks/stale.rb +1 -0
- data/lib/nanoc/extra/checking/dsl.rb +1 -0
- data/lib/nanoc/extra/checking/issue.rb +1 -0
- data/lib/nanoc/extra/checking/runner.rb +3 -3
- data/lib/nanoc/extra/core_ext/pathname.rb +5 -3
- data/lib/nanoc/extra/core_ext/time.rb +4 -2
- data/lib/nanoc/extra/deployer.rb +3 -1
- data/lib/nanoc/extra/deployers.rb +1 -0
- data/lib/nanoc/extra/deployers/fog.rb +2 -0
- data/lib/nanoc/extra/deployers/rsync.rb +2 -0
- data/lib/nanoc/extra/filesystem_tools.rb +3 -7
- data/lib/nanoc/extra/jruby_nokogiri_warner.rb +1 -0
- data/lib/nanoc/extra/link_collector.rb +1 -0
- data/lib/nanoc/extra/piper.rb +2 -1
- data/lib/nanoc/extra/pruner.rb +5 -3
- data/lib/nanoc/filters.rb +1 -2
- data/lib/nanoc/filters/asciidoc.rb +2 -0
- data/lib/nanoc/filters/bluecloth.rb +1 -0
- data/lib/nanoc/filters/coffeescript.rb +2 -0
- data/lib/nanoc/filters/colorize_syntax.rb +1 -12
- data/lib/nanoc/filters/erb.rb +2 -1
- data/lib/nanoc/filters/erubis.rb +2 -1
- data/lib/nanoc/filters/haml.rb +2 -1
- data/lib/nanoc/filters/handlebars.rb +2 -0
- data/lib/nanoc/filters/kramdown.rb +1 -0
- data/lib/nanoc/filters/less.rb +1 -0
- data/lib/nanoc/filters/markaby.rb +1 -0
- data/lib/nanoc/filters/maruku.rb +1 -0
- data/lib/nanoc/filters/mustache.rb +2 -0
- data/lib/nanoc/filters/pandoc.rb +1 -0
- data/lib/nanoc/filters/rainpress.rb +1 -0
- data/lib/nanoc/filters/rdiscount.rb +1 -0
- data/lib/nanoc/filters/rdoc.rb +1 -0
- data/lib/nanoc/filters/redcarpet.rb +2 -0
- data/lib/nanoc/filters/redcloth.rb +1 -0
- data/lib/nanoc/filters/relativize_paths.rb +1 -0
- data/lib/nanoc/filters/rubypants.rb +1 -0
- data/lib/nanoc/filters/sass.rb +1 -0
- data/lib/nanoc/filters/sass/sass_filesystem_importer.rb +2 -0
- data/lib/nanoc/filters/slim.rb +3 -1
- data/lib/nanoc/filters/typogruby.rb +2 -0
- data/lib/nanoc/filters/uglify_js.rb +1 -0
- data/lib/nanoc/filters/xsl.rb +2 -0
- data/lib/nanoc/filters/yui_compressor.rb +2 -0
- data/lib/nanoc/helpers/blogging.rb +30 -30
- data/lib/nanoc/helpers/breadcrumbs.rb +2 -2
- data/lib/nanoc/helpers/capturing.rb +6 -17
- data/lib/nanoc/helpers/filtering.rb +3 -3
- data/lib/nanoc/helpers/link_to.rb +3 -3
- data/lib/nanoc/helpers/rendering.rb +11 -11
- data/lib/nanoc/helpers/xml_sitemap.rb +3 -3
- data/lib/nanoc/tasks.rb +1 -0
- data/lib/nanoc/tasks/clean.rake +1 -1
- data/lib/nanoc/version.rb +1 -1
- data/tasks/doc.rake +2 -1
- data/tasks/test.rake +7 -1
- data/test/base/checksummer_spec.rb +15 -15
- data/test/base/core_ext/array_spec.rb +10 -10
- data/test/base/core_ext/hash_spec.rb +16 -16
- data/test/base/core_ext/pathname_spec.rb +2 -2
- data/test/base/core_ext/string_spec.rb +9 -9
- data/test/base/temp_filename_factory_spec.rb +3 -7
- data/test/base/test_checksum_store.rb +5 -5
- data/test/base/test_code_snippet.rb +3 -3
- data/test/base/test_compiler.rb +29 -29
- data/test/base/test_compiler_dsl.rb +23 -23
- data/test/base/test_context.rb +4 -4
- data/test/base/test_data_source.rb +17 -7
- data/test/base/test_dependency_tracker.rb +29 -29
- data/test/base/test_directed_graph.rb +27 -27
- data/test/base/test_item.rb +23 -21
- data/test/base/test_item_array.rb +18 -18
- data/test/base/test_item_rep.rb +76 -76
- data/test/base/test_item_rep_recorder_proxy.rb +4 -4
- data/test/base/test_layout.rb +8 -16
- data/test/base/test_memoization.rb +4 -4
- data/test/base/test_notification_center.rb +6 -6
- data/test/base/test_outdatedness_checker.rb +18 -18
- data/test/base/test_plugin.rb +1 -1
- data/test/base/test_rule.rb +2 -2
- data/test/base/test_rule_context.rb +5 -5
- data/test/base/test_site.rb +62 -38
- data/test/base/test_store.rb +2 -2
- data/test/cli/commands/test_check.rb +1 -1
- data/test/cli/commands/test_compile.rb +24 -18
- data/test/cli/commands/test_create_site.rb +5 -7
- data/test/cli/commands/test_deploy.rb +1 -1
- data/test/data_sources/test_filesystem.rb +22 -67
- data/test/data_sources/test_filesystem_unified.rb +10 -23
- data/test/data_sources/test_filesystem_verbose.rb +8 -53
- data/test/data_sources/test_static.rb +9 -9
- data/test/extra/checking/checks/test_stale.rb +1 -1
- data/test/extra/core_ext/test_pathname.rb +3 -3
- data/test/extra/core_ext/test_time.rb +4 -4
- data/test/extra/test_filesystem_tools.rb +1 -1
- data/test/filters/test_handlebars.rb +3 -3
- data/test/filters/test_less.rb +6 -6
- data/test/filters/test_mustache.rb +2 -2
- data/test/filters/test_relativize_paths.rb +81 -81
- data/test/filters/test_sass.rb +7 -7
- data/test/filters/test_xsl.rb +6 -6
- data/test/helper.rb +1 -1
- data/test/helpers/test_blogging.rb +78 -99
- data/test/helpers/test_breadcrumbs.rb +12 -12
- data/test/helpers/test_capturing.rb +10 -11
- data/test/helpers/test_filtering.rb +6 -6
- data/test/helpers/test_rendering.rb +3 -3
- data/test/helpers/test_tagging.rb +7 -7
- data/test/helpers/test_xml_sitemap.rb +34 -33
- metadata +19 -43
- data/lib/nanoc/cli/commands/autocompile.rb +0 -69
- data/lib/nanoc/cli/commands/create-item.rb +0 -55
- data/lib/nanoc/cli/commands/create-layout.rb +0 -68
- data/lib/nanoc/cli/commands/sync.rb +0 -32
- data/lib/nanoc/cli/commands/update.rb +0 -63
- data/lib/nanoc/cli/commands/validate-css.rb +0 -20
- data/lib/nanoc/cli/commands/validate-html.rb +0 -20
- data/lib/nanoc/cli/commands/validate-links.rb +0 -27
- data/lib/nanoc/cli/commands/watch.rb +0 -176
- data/lib/nanoc/data_sources/deprecated/delicious.rb +0 -38
- data/lib/nanoc/data_sources/deprecated/last_fm.rb +0 -85
- data/lib/nanoc/data_sources/deprecated/twitter.rb +0 -34
- data/lib/nanoc/extra/auto_compiler.rb +0 -99
- data/lib/nanoc/extra/chick.rb +0 -117
- data/lib/nanoc/extra/file_proxy.rb +0 -36
- data/lib/nanoc/extra/validators.rb +0 -8
- data/lib/nanoc/extra/validators/links.rb +0 -18
- data/lib/nanoc/extra/validators/w3c.rb +0 -23
- data/lib/nanoc/extra/vcs.rb +0 -62
- data/lib/nanoc/extra/vcses.rb +0 -15
- data/lib/nanoc/extra/vcses/bazaar.rb +0 -21
- data/lib/nanoc/extra/vcses/dummy.rb +0 -20
- data/lib/nanoc/extra/vcses/git.rb +0 -21
- data/lib/nanoc/extra/vcses/mercurial.rb +0 -21
- data/lib/nanoc/extra/vcses/subversion.rb +0 -21
- data/lib/nanoc/filters/coderay.rb +0 -19
- data/lib/nanoc3.rb +0 -3
- data/lib/nanoc3/cli.rb +0 -3
- data/lib/nanoc3/tasks.rb +0 -3
- data/test/cli/commands/test_create_item.rb +0 -10
- data/test/cli/commands/test_create_layout.rb +0 -24
- data/test/cli/commands/test_sync.rb +0 -27
- data/test/cli/commands/test_update.rb +0 -6
- data/test/cli/commands/test_watch.rb +0 -74
- data/test/extra/test_auto_compiler.rb +0 -437
- data/test/extra/test_vcs.rb +0 -18
- data/test/extra/validators/test_links.rb +0 -4
- data/test/extra/validators/test_w3c.rb +0 -37
- data/test/filters/test_coderay.rb +0 -40
@@ -3,7 +3,7 @@
|
|
3
3
|
class Nanoc::DataSources::FilesystemVerboseTest < Nanoc::TestCase
|
4
4
|
def new_data_source(params = nil)
|
5
5
|
# Mock site
|
6
|
-
site = Nanoc::Site.new({})
|
6
|
+
site = Nanoc::Int::Site.new({})
|
7
7
|
|
8
8
|
# Create data source
|
9
9
|
data_source = Nanoc::DataSources::FilesystemVerbose.new(site, nil, nil, params)
|
@@ -81,11 +81,11 @@ class Nanoc::DataSources::FilesystemVerboseTest < Nanoc::TestCase
|
|
81
81
|
|
82
82
|
# Check
|
83
83
|
assert_equal 2, items.size
|
84
|
-
assert_equal '/foo/', items[0].identifier
|
84
|
+
assert_equal '/foo/', items[0].identifier.to_s
|
85
85
|
assert_equal 'Foo', items[0][:title]
|
86
86
|
assert_equal 'content/foo/foo.css', items[0][:content_filename]
|
87
87
|
assert_equal 'content/foo/foo.yaml', items[0][:meta_filename]
|
88
|
-
assert_equal '/foo.bar/', items[1].identifier
|
88
|
+
assert_equal '/foo.bar/', items[1].identifier.to_s
|
89
89
|
assert_equal 'Foo Bar', items[1][:title]
|
90
90
|
assert_equal 'content/foo.bar/foo.bar.css', items[1][:content_filename]
|
91
91
|
assert_equal 'content/foo.bar/foo.bar.yaml', items[1][:meta_filename]
|
@@ -178,9 +178,9 @@ class Nanoc::DataSources::FilesystemVerboseTest < Nanoc::TestCase
|
|
178
178
|
|
179
179
|
# Check
|
180
180
|
assert_equal 2, layouts.size
|
181
|
-
assert_equal '/bar/', layouts[0].identifier
|
181
|
+
assert_equal '/bar/', layouts[0].identifier.to_s
|
182
182
|
assert_equal 'meow', layouts[0][:cat]
|
183
|
-
assert_equal '/foo/', layouts[1].identifier
|
183
|
+
assert_equal '/foo/', layouts[1].identifier.to_s
|
184
184
|
assert_equal 'woof', layouts[1][:dog]
|
185
185
|
end
|
186
186
|
|
@@ -210,57 +210,12 @@ class Nanoc::DataSources::FilesystemVerboseTest < Nanoc::TestCase
|
|
210
210
|
|
211
211
|
# Check
|
212
212
|
assert_equal 2, layouts.size
|
213
|
-
assert_equal '/bar.xyz/', layouts[0].identifier
|
213
|
+
assert_equal '/bar.xyz/', layouts[0].identifier.to_s
|
214
214
|
assert_equal 'meow', layouts[0][:cat]
|
215
|
-
assert_equal '/foo/', layouts[1].identifier
|
215
|
+
assert_equal '/foo/', layouts[1].identifier.to_s
|
216
216
|
assert_equal 'woof', layouts[1][:dog]
|
217
217
|
end
|
218
218
|
|
219
|
-
def test_create_item_at_root
|
220
|
-
# Create item
|
221
|
-
data_source = new_data_source
|
222
|
-
data_source.create_item('content here', { foo: 'bar' }, '/')
|
223
|
-
|
224
|
-
# Check file existance
|
225
|
-
assert File.directory?('content')
|
226
|
-
assert File.file?('content/content.html')
|
227
|
-
assert File.file?('content/content.yaml')
|
228
|
-
|
229
|
-
# Check file content
|
230
|
-
assert_equal 'content here', File.read('content/content.html')
|
231
|
-
assert_match 'foo: bar', File.read('content/content.yaml')
|
232
|
-
end
|
233
|
-
|
234
|
-
def test_create_item_not_at_root
|
235
|
-
# Create item
|
236
|
-
data_source = new_data_source
|
237
|
-
data_source.create_item('content here', { foo: 'bar' }, '/moo/')
|
238
|
-
|
239
|
-
# Check file existance
|
240
|
-
assert File.directory?('content/moo')
|
241
|
-
assert File.file?('content/moo/moo.html')
|
242
|
-
assert File.file?('content/moo/moo.yaml')
|
243
|
-
|
244
|
-
# Check file content
|
245
|
-
assert_equal 'content here', File.read('content/moo/moo.html')
|
246
|
-
assert_match 'foo: bar', File.read('content/moo/moo.yaml')
|
247
|
-
end
|
248
|
-
|
249
|
-
def test_create_layout
|
250
|
-
# Create layout
|
251
|
-
data_source = new_data_source
|
252
|
-
data_source.create_layout('content here', { foo: 'bar' }, '/moo/')
|
253
|
-
|
254
|
-
# Check file existance
|
255
|
-
assert File.directory?('layouts/moo')
|
256
|
-
assert File.file?('layouts/moo/moo.html')
|
257
|
-
assert File.file?('layouts/moo/moo.yaml')
|
258
|
-
|
259
|
-
# Check file content
|
260
|
-
assert_equal 'content here', File.read('layouts/moo/moo.html')
|
261
|
-
assert_match 'foo: bar', File.read('layouts/moo/moo.yaml')
|
262
|
-
end
|
263
|
-
|
264
219
|
def test_load_binary_objects
|
265
220
|
# Create data source
|
266
221
|
data_source = new_data_source
|
@@ -270,7 +225,7 @@ class Nanoc::DataSources::FilesystemVerboseTest < Nanoc::TestCase
|
|
270
225
|
File.open('foo/stuff.dat', 'w') { |io| io.write('random binary data') }
|
271
226
|
|
272
227
|
# Load
|
273
|
-
items = data_source.send(:load_objects, 'foo', 'item', Nanoc::Item)
|
228
|
+
items = data_source.send(:load_objects, 'foo', 'item', Nanoc::Int::Item)
|
274
229
|
|
275
230
|
# Check
|
276
231
|
assert_equal 1, items.size
|
@@ -3,7 +3,7 @@
|
|
3
3
|
class Nanoc::DataSources::StaticTest < Nanoc::TestCase
|
4
4
|
def new_data_source(params = nil)
|
5
5
|
# Mock site
|
6
|
-
site = Nanoc::Site.new({})
|
6
|
+
site = Nanoc::Int::Site.new({})
|
7
7
|
|
8
8
|
# Create data source
|
9
9
|
data_source = Nanoc::DataSources::Static.new(site, nil, nil, params)
|
@@ -37,7 +37,7 @@ class Nanoc::DataSources::StaticTest < Nanoc::TestCase
|
|
37
37
|
|
38
38
|
# Check items
|
39
39
|
items = data_source.send(:items).sort_by(&:identifier)
|
40
|
-
actual_item_identifiers = items.map(&:identifier).sort
|
40
|
+
actual_item_identifiers = items.map(&:identifier).map(&:to_s).sort
|
41
41
|
expected_item_identifiers = %w( /a.png/ /1/b.png/ /c.png/ ).sort
|
42
42
|
assert_equal expected_item_identifiers, actual_item_identifiers
|
43
43
|
end
|
@@ -55,29 +55,29 @@ class Nanoc::DataSources::StaticTest < Nanoc::TestCase
|
|
55
55
|
|
56
56
|
# Get expected and actual output
|
57
57
|
expected_out = [
|
58
|
-
Nanoc::Item.new(
|
58
|
+
Nanoc::Int::Item.new(
|
59
59
|
'foo/bar.png',
|
60
60
|
{ extension: 'png', filename: 'foo/bar.png' },
|
61
61
|
'/bar.png/',
|
62
62
|
binary: true,
|
63
63
|
mtime: File.mtime('foo/bar.png'),
|
64
|
-
checksum: Pathname.new('foo/bar.png').
|
64
|
+
checksum: Pathname.new('foo/bar.png').__nanoc_checksum
|
65
65
|
),
|
66
|
-
Nanoc::Item.new(
|
66
|
+
Nanoc::Int::Item.new(
|
67
67
|
'foo/b.c.css',
|
68
68
|
{ extension: 'css', filename: 'foo/b.c.css' },
|
69
69
|
'/b.c.css/',
|
70
70
|
binary: true,
|
71
71
|
mtime: File.mtime('foo/b.c.css'),
|
72
|
-
checksum: Pathname.new('foo/b.c.css').
|
72
|
+
checksum: Pathname.new('foo/b.c.css').__nanoc_checksum
|
73
73
|
),
|
74
|
-
Nanoc::Item.new(
|
74
|
+
Nanoc::Int::Item.new(
|
75
75
|
'foo/a/b/c.gif',
|
76
76
|
{ extension: 'gif', filename: 'foo/a/b/c.gif' },
|
77
77
|
'/a/b/c.gif/',
|
78
78
|
binary: true,
|
79
79
|
mtime: File.mtime('foo/a/b/c.gif'),
|
80
|
-
checksum: Pathname.new('foo/a/b/c.gif').
|
80
|
+
checksum: Pathname.new('foo/a/b/c.gif').__nanoc_checksum
|
81
81
|
)
|
82
82
|
].sort_by(&:identifier)
|
83
83
|
|
@@ -86,7 +86,7 @@ class Nanoc::DataSources::StaticTest < Nanoc::TestCase
|
|
86
86
|
(0..expected_out.size - 1).each do |i|
|
87
87
|
assert_equal expected_out[i].raw_content, actual_out[i].raw_content, 'content must match'
|
88
88
|
assert_equal expected_out[i].identifier, actual_out[i].identifier, 'identifier must match'
|
89
|
-
assert_equal expected_out[i].mtime, actual_out[i].mtime, 'mtime must match'
|
89
|
+
assert_equal expected_out[i].attributes[:mtime], actual_out[i].attributes[:mtime], 'mtime must match'
|
90
90
|
assert_equal expected_out[i].raw_filename, actual_out[i].raw_filename, 'file paths must match'
|
91
91
|
end
|
92
92
|
end
|
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
class Nanoc::Extra::CoreExtPathnameTest < Nanoc::TestCase
|
4
4
|
def test_components
|
5
|
-
assert_equal %w( / a bb ccc dd e ), Pathname.new('/a/bb/ccc/dd/e').
|
5
|
+
assert_equal %w( / a bb ccc dd e ), Pathname.new('/a/bb/ccc/dd/e').__nanoc_components
|
6
6
|
end
|
7
7
|
|
8
8
|
def test_include_component
|
9
|
-
assert Pathname.new('/home/ddfreyne/').
|
10
|
-
refute Pathname.new('/home/ddfreyne/').
|
9
|
+
assert Pathname.new('/home/ddfreyne/').__nanoc_include_component?('ddfreyne')
|
10
|
+
refute Pathname.new('/home/ddfreyne/').__nanoc_include_component?('acid')
|
11
11
|
end
|
12
12
|
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
class Nanoc::ExtraCoreExtTimeTest < Nanoc::TestCase
|
4
|
-
def
|
5
|
-
assert_equal('2008-05-19', Time.utc(2008, 5, 19, 14, 20, 0, 0).
|
4
|
+
def test___nanoc_to_iso8601_date
|
5
|
+
assert_equal('2008-05-19', Time.utc(2008, 5, 19, 14, 20, 0, 0).__nanoc_to_iso8601_date)
|
6
6
|
end
|
7
7
|
|
8
|
-
def
|
9
|
-
assert_equal('2008-05-19T14:20:00Z', Time.utc(2008, 5, 19, 14, 20, 0, 0).
|
8
|
+
def test___nanoc_to_iso8601_time
|
9
|
+
assert_equal('2008-05-19T14:20:00Z', Time.utc(2008, 5, 19, 14, 20, 0, 0).__nanoc_to_iso8601_time)
|
10
10
|
end
|
11
11
|
end
|
@@ -137,7 +137,7 @@ class Nanoc::Extra::FilesystemToolsTest < Nanoc::TestCase
|
|
137
137
|
|
138
138
|
pattern = { dotfiles: '**/.other' }
|
139
139
|
|
140
|
-
assert_raises Nanoc::Errors::GenericTrivial, "Do not know how to handle extra_files: #{pattern.inspect}" do
|
140
|
+
assert_raises Nanoc::Int::Errors::GenericTrivial, "Do not know how to handle extra_files: #{pattern.inspect}" do
|
141
141
|
Nanoc::Extra::FilesystemTools.all_files_in('dir0', pattern)
|
142
142
|
end
|
143
143
|
end
|
@@ -4,11 +4,11 @@ class Nanoc::Filters::HandlebarsTest < Nanoc::TestCase
|
|
4
4
|
def test_filter
|
5
5
|
if_have 'handlebars' do
|
6
6
|
# Create data
|
7
|
-
item = Nanoc::Item.new(
|
7
|
+
item = Nanoc::Int::Item.new(
|
8
8
|
'content',
|
9
9
|
{ title: 'Max Payne', protagonist: 'Max Payne', location: 'here' },
|
10
10
|
'/games/max-payne/')
|
11
|
-
layout = Nanoc::Layout.new(
|
11
|
+
layout = Nanoc::Int::Layout.new(
|
12
12
|
'layout content',
|
13
13
|
{ name: 'Max Payne' },
|
14
14
|
'/default/')
|
@@ -36,7 +36,7 @@ class Nanoc::Filters::HandlebarsTest < Nanoc::TestCase
|
|
36
36
|
def test_filter_without_layout
|
37
37
|
if_have 'handlebars' do
|
38
38
|
# Create data
|
39
|
-
item = Nanoc::Item.new(
|
39
|
+
item = Nanoc::Int::Item.new(
|
40
40
|
'content',
|
41
41
|
{ title: 'Max Payne', protagonist: 'Max Payne', location: 'here' },
|
42
42
|
'/games/max-payne/')
|
data/test/filters/test_less.rb
CHANGED
@@ -4,7 +4,7 @@ class Nanoc::Filters::LessTest < Nanoc::TestCase
|
|
4
4
|
def test_filter
|
5
5
|
if_have 'less' do
|
6
6
|
# Create item
|
7
|
-
@item = Nanoc::Item.new('blah', { content_filename: 'content/foo/bar.txt' }, '/foo/bar/')
|
7
|
+
@item = Nanoc::Int::Item.new('blah', { content_filename: 'content/foo/bar.txt' }, '/foo/bar/')
|
8
8
|
|
9
9
|
# Create filter
|
10
10
|
filter = ::Nanoc::Filters::Less.new(item: @item, items: [@item])
|
@@ -22,7 +22,7 @@ class Nanoc::Filters::LessTest < Nanoc::TestCase
|
|
22
22
|
File.open('content/foo/bar/imported_file.less', 'w') { |io| io.write('p { color: red; }') }
|
23
23
|
|
24
24
|
# Create item
|
25
|
-
@item = Nanoc::Item.new('blah', { content_filename: 'content/foo/bar.txt' }, '/foo/bar/')
|
25
|
+
@item = Nanoc::Int::Item.new('blah', { content_filename: 'content/foo/bar.txt' }, '/foo/bar/')
|
26
26
|
|
27
27
|
# Create filter
|
28
28
|
filter = ::Nanoc::Filters::Less.new(item: @item, items: [@item])
|
@@ -41,7 +41,7 @@ class Nanoc::Filters::LessTest < Nanoc::TestCase
|
|
41
41
|
|
42
42
|
# Create item
|
43
43
|
File.open('content/foo/bar.txt', 'w') { |io| io.write('meh') }
|
44
|
-
@item = Nanoc::Item.new('blah', { content_filename: 'content/foo/bar.txt' }, '/foo/bar/')
|
44
|
+
@item = Nanoc::Int::Item.new('blah', { content_filename: 'content/foo/bar.txt' }, '/foo/bar/')
|
45
45
|
|
46
46
|
# Create filter
|
47
47
|
filter = ::Nanoc::Filters::Less.new(item: @item, items: [@item])
|
@@ -80,7 +80,7 @@ class Nanoc::Filters::LessTest < Nanoc::TestCase
|
|
80
80
|
end
|
81
81
|
|
82
82
|
# Compile
|
83
|
-
site = Nanoc::Site.new('.')
|
83
|
+
site = Nanoc::Int::Site.new('.')
|
84
84
|
site.compile
|
85
85
|
|
86
86
|
# Check
|
@@ -95,7 +95,7 @@ class Nanoc::Filters::LessTest < Nanoc::TestCase
|
|
95
95
|
end
|
96
96
|
|
97
97
|
# Recompile
|
98
|
-
site = Nanoc::Site.new('.')
|
98
|
+
site = Nanoc::Int::Site.new('.')
|
99
99
|
site.compile
|
100
100
|
|
101
101
|
# Recheck
|
@@ -110,7 +110,7 @@ class Nanoc::Filters::LessTest < Nanoc::TestCase
|
|
110
110
|
def test_compression
|
111
111
|
if_have 'less' do
|
112
112
|
# Create item
|
113
|
-
@item = Nanoc::Item.new('blah', { content_filename: 'content/foo/bar.txt' }, '/foo/bar/')
|
113
|
+
@item = Nanoc::Int::Item.new('blah', { content_filename: 'content/foo/bar.txt' }, '/foo/bar/')
|
114
114
|
|
115
115
|
# Create filter
|
116
116
|
filter = ::Nanoc::Filters::Less.new(item: @item, items: [@item])
|
@@ -4,7 +4,7 @@ class Nanoc::Filters::MustacheTest < Nanoc::TestCase
|
|
4
4
|
def test_filter
|
5
5
|
if_have 'mustache' do
|
6
6
|
# Create item
|
7
|
-
item = Nanoc::Item.new(
|
7
|
+
item = Nanoc::Int::Item.new(
|
8
8
|
'content',
|
9
9
|
{ title: 'Max Payne', protagonist: 'Max Payne' },
|
10
10
|
'/games/max-payne/'
|
@@ -22,7 +22,7 @@ class Nanoc::Filters::MustacheTest < Nanoc::TestCase
|
|
22
22
|
def test_filter_with_yield
|
23
23
|
if_have 'mustache' do
|
24
24
|
# Create item
|
25
|
-
item = Nanoc::Item.new(
|
25
|
+
item = Nanoc::Int::Item.new(
|
26
26
|
'content',
|
27
27
|
{ title: 'Max Payne', protagonist: 'Max Payne' },
|
28
28
|
'/games/max-payne/'
|
@@ -7,13 +7,13 @@ class Nanoc::Filters::RelativizePathsTest < Nanoc::TestCase
|
|
7
7
|
|
8
8
|
# Mock item
|
9
9
|
filter.instance_eval do
|
10
|
-
@item_rep = Nanoc::ItemRep.new(
|
11
|
-
Nanoc::Item.new(
|
10
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
11
|
+
Nanoc::Int::Item.new(
|
12
12
|
'content',
|
13
13
|
{},
|
14
14
|
'/foo/bar/baz/'),
|
15
15
|
:blah)
|
16
|
-
@item_rep.
|
16
|
+
@item_rep.paths[:last] = '/foo/bar/baz/'
|
17
17
|
end
|
18
18
|
|
19
19
|
# Set content
|
@@ -31,13 +31,13 @@ class Nanoc::Filters::RelativizePathsTest < Nanoc::TestCase
|
|
31
31
|
|
32
32
|
# Mock item
|
33
33
|
filter.instance_eval do
|
34
|
-
@item_rep = Nanoc::ItemRep.new(
|
35
|
-
Nanoc::Item.new(
|
34
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
35
|
+
Nanoc::Int::Item.new(
|
36
36
|
'content',
|
37
37
|
{},
|
38
38
|
'/foo/bar/baz/'),
|
39
39
|
:blah)
|
40
|
-
@item_rep.
|
40
|
+
@item_rep.paths[:last] = '/foo/bar/baz/'
|
41
41
|
end
|
42
42
|
|
43
43
|
# Set content
|
@@ -55,13 +55,13 @@ class Nanoc::Filters::RelativizePathsTest < Nanoc::TestCase
|
|
55
55
|
|
56
56
|
# Mock item
|
57
57
|
filter.instance_eval do
|
58
|
-
@item_rep = Nanoc::ItemRep.new(
|
59
|
-
Nanoc::Item.new(
|
58
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
59
|
+
Nanoc::Int::Item.new(
|
60
60
|
'content',
|
61
61
|
{},
|
62
62
|
'/foo/bar/baz/'),
|
63
63
|
:blah)
|
64
|
-
@item_rep.
|
64
|
+
@item_rep.paths[:last] = '/foo/bar/baz/'
|
65
65
|
end
|
66
66
|
|
67
67
|
# Set content
|
@@ -79,13 +79,13 @@ class Nanoc::Filters::RelativizePathsTest < Nanoc::TestCase
|
|
79
79
|
|
80
80
|
# Mock item
|
81
81
|
filter.instance_eval do
|
82
|
-
@item_rep = Nanoc::ItemRep.new(
|
83
|
-
Nanoc::Item.new(
|
82
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
83
|
+
Nanoc::Int::Item.new(
|
84
84
|
'content',
|
85
85
|
{},
|
86
86
|
'/foo/bar/baz/'),
|
87
87
|
:blah)
|
88
|
-
@item_rep.
|
88
|
+
@item_rep.paths[:last] = '/foo/bar/baz/'
|
89
89
|
end
|
90
90
|
|
91
91
|
# Set content
|
@@ -115,13 +115,13 @@ EOS
|
|
115
115
|
|
116
116
|
# Mock item
|
117
117
|
filter.instance_eval do
|
118
|
-
@item_rep = Nanoc::ItemRep.new(
|
119
|
-
Nanoc::Item.new(
|
118
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
119
|
+
Nanoc::Int::Item.new(
|
120
120
|
'content',
|
121
121
|
{},
|
122
122
|
'/foo/bar/baz/'),
|
123
123
|
:blah)
|
124
|
-
@item_rep.
|
124
|
+
@item_rep.paths[:last] = '/foo/bar/baz/'
|
125
125
|
end
|
126
126
|
|
127
127
|
# Set content
|
@@ -139,13 +139,13 @@ EOS
|
|
139
139
|
|
140
140
|
# Mock item
|
141
141
|
filter.instance_eval do
|
142
|
-
@item_rep = Nanoc::ItemRep.new(
|
143
|
-
Nanoc::Item.new(
|
142
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
143
|
+
Nanoc::Int::Item.new(
|
144
144
|
'content',
|
145
145
|
{},
|
146
146
|
'/foo/bar/baz/'),
|
147
147
|
:blah)
|
148
|
-
@item_rep.
|
148
|
+
@item_rep.paths[:last] = '/foo/bar/baz/'
|
149
149
|
end
|
150
150
|
|
151
151
|
# Set content
|
@@ -163,13 +163,13 @@ EOS
|
|
163
163
|
|
164
164
|
# Mock item
|
165
165
|
filter.instance_eval do
|
166
|
-
@item_rep = Nanoc::ItemRep.new(
|
167
|
-
Nanoc::Item.new(
|
166
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
167
|
+
Nanoc::Int::Item.new(
|
168
168
|
'content',
|
169
169
|
{},
|
170
170
|
'/foo/bar/baz/'),
|
171
171
|
:blah)
|
172
|
-
@item_rep.
|
172
|
+
@item_rep.paths[:last] = '/foo/bar/baz/'
|
173
173
|
end
|
174
174
|
|
175
175
|
# Set content
|
@@ -187,13 +187,13 @@ EOS
|
|
187
187
|
|
188
188
|
# Mock item
|
189
189
|
filter.instance_eval do
|
190
|
-
@item_rep = Nanoc::ItemRep.new(
|
191
|
-
Nanoc::Item.new(
|
190
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
191
|
+
Nanoc::Int::Item.new(
|
192
192
|
'content',
|
193
193
|
{},
|
194
194
|
'/foo/bar/baz/'),
|
195
195
|
:blah)
|
196
|
-
@item_rep.
|
196
|
+
@item_rep.paths[:last] = '/woof/meow/'
|
197
197
|
end
|
198
198
|
|
199
199
|
# Set content
|
@@ -211,13 +211,13 @@ EOS
|
|
211
211
|
|
212
212
|
# Mock item
|
213
213
|
filter.instance_eval do
|
214
|
-
@item_rep = Nanoc::ItemRep.new(
|
215
|
-
Nanoc::Item.new(
|
214
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
215
|
+
Nanoc::Int::Item.new(
|
216
216
|
'content',
|
217
217
|
{},
|
218
218
|
'/foo/bar/baz/'),
|
219
219
|
:blah)
|
220
|
-
@item_rep.
|
220
|
+
@item_rep.paths[:last] = '/woof/meow/'
|
221
221
|
end
|
222
222
|
|
223
223
|
# Set content
|
@@ -235,13 +235,13 @@ EOS
|
|
235
235
|
|
236
236
|
# Mock item
|
237
237
|
filter.instance_eval do
|
238
|
-
@item_rep = Nanoc::ItemRep.new(
|
239
|
-
Nanoc::Item.new(
|
238
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
239
|
+
Nanoc::Int::Item.new(
|
240
240
|
'content',
|
241
241
|
{},
|
242
242
|
'/foo/bar/baz/'),
|
243
243
|
:blah)
|
244
|
-
@item_rep.
|
244
|
+
@item_rep.paths[:last] = '/woof/meow/'
|
245
245
|
end
|
246
246
|
|
247
247
|
# Set content
|
@@ -259,13 +259,13 @@ EOS
|
|
259
259
|
|
260
260
|
# Mock item
|
261
261
|
filter.instance_eval do
|
262
|
-
@item_rep = Nanoc::ItemRep.new(
|
263
|
-
Nanoc::Item.new(
|
262
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
263
|
+
Nanoc::Int::Item.new(
|
264
264
|
'content',
|
265
265
|
{},
|
266
266
|
'/foo/bar/baz/'),
|
267
267
|
:blah)
|
268
|
-
@item_rep.
|
268
|
+
@item_rep.paths[:last] = '/woof/meow/'
|
269
269
|
end
|
270
270
|
|
271
271
|
# Set content
|
@@ -283,13 +283,13 @@ EOS
|
|
283
283
|
|
284
284
|
# Mock item
|
285
285
|
filter.instance_eval do
|
286
|
-
@item_rep = Nanoc::ItemRep.new(
|
287
|
-
Nanoc::Item.new(
|
286
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
287
|
+
Nanoc::Int::Item.new(
|
288
288
|
'content',
|
289
289
|
{},
|
290
290
|
'/foo/bar/baz/'),
|
291
291
|
:blah)
|
292
|
-
@item_rep.
|
292
|
+
@item_rep.paths[:last] = '/woof/meow/'
|
293
293
|
end
|
294
294
|
|
295
295
|
# Set content
|
@@ -307,13 +307,13 @@ EOS
|
|
307
307
|
|
308
308
|
# Mock item
|
309
309
|
filter.instance_eval do
|
310
|
-
@item_rep = Nanoc::ItemRep.new(
|
311
|
-
Nanoc::Item.new(
|
310
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
311
|
+
Nanoc::Int::Item.new(
|
312
312
|
'content',
|
313
313
|
{},
|
314
314
|
'/foo/bar/baz/'),
|
315
315
|
:blah)
|
316
|
-
@item_rep.
|
316
|
+
@item_rep.paths[:last] = '/woof/meow/'
|
317
317
|
end
|
318
318
|
|
319
319
|
raw_content = %(<object data="/example"><param name="movie" content="/example"></object>)
|
@@ -339,13 +339,13 @@ EOS
|
|
339
339
|
|
340
340
|
# Mock item
|
341
341
|
filter.instance_eval do
|
342
|
-
@item_rep = Nanoc::ItemRep.new(
|
343
|
-
Nanoc::Item.new(
|
342
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
343
|
+
Nanoc::Int::Item.new(
|
344
344
|
'content',
|
345
345
|
{},
|
346
346
|
'/foo/bar/baz/'),
|
347
347
|
:blah)
|
348
|
-
@item_rep.
|
348
|
+
@item_rep.paths[:last] = '/foo/bar/baz/'
|
349
349
|
end
|
350
350
|
|
351
351
|
# Set content
|
@@ -363,13 +363,13 @@ EOS
|
|
363
363
|
|
364
364
|
# Mock item
|
365
365
|
filter.instance_eval do
|
366
|
-
@item_rep = Nanoc::ItemRep.new(
|
367
|
-
Nanoc::Item.new(
|
366
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
367
|
+
Nanoc::Int::Item.new(
|
368
368
|
'content',
|
369
369
|
{},
|
370
370
|
'/foo/bar/baz/'),
|
371
371
|
:blah)
|
372
|
-
@item_rep.
|
372
|
+
@item_rep.paths[:last] = '/foo/bar/baz/'
|
373
373
|
end
|
374
374
|
|
375
375
|
# Set content
|
@@ -387,13 +387,13 @@ EOS
|
|
387
387
|
|
388
388
|
# Mock item
|
389
389
|
filter.instance_eval do
|
390
|
-
@item_rep = Nanoc::ItemRep.new(
|
391
|
-
Nanoc::Item.new(
|
390
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
391
|
+
Nanoc::Int::Item.new(
|
392
392
|
'content',
|
393
393
|
{},
|
394
394
|
'/foo/bar/baz/'),
|
395
395
|
:blah)
|
396
|
-
@item_rep.
|
396
|
+
@item_rep.paths[:last] = '/foo/bar/baz/'
|
397
397
|
end
|
398
398
|
|
399
399
|
# Set content
|
@@ -411,13 +411,13 @@ EOS
|
|
411
411
|
|
412
412
|
# Mock item
|
413
413
|
filter.instance_eval do
|
414
|
-
@item_rep = Nanoc::ItemRep.new(
|
415
|
-
Nanoc::Item.new(
|
414
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
415
|
+
Nanoc::Int::Item.new(
|
416
416
|
'content',
|
417
417
|
{},
|
418
418
|
'/foo/bar/baz/'),
|
419
419
|
:blah)
|
420
|
-
@item_rep.
|
420
|
+
@item_rep.paths[:last] = '/foo/bar/baz/'
|
421
421
|
end
|
422
422
|
|
423
423
|
# Set content
|
@@ -438,13 +438,13 @@ EOS
|
|
438
438
|
|
439
439
|
# Mock item
|
440
440
|
filter.instance_eval do
|
441
|
-
@item_rep = Nanoc::ItemRep.new(
|
442
|
-
Nanoc::Item.new(
|
441
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
442
|
+
Nanoc::Int::Item.new(
|
443
443
|
'content',
|
444
444
|
{},
|
445
445
|
'/foo/bar/baz/'),
|
446
446
|
:blah)
|
447
|
-
@item_rep.
|
447
|
+
@item_rep.paths[:last] = '/woof/meow/'
|
448
448
|
end
|
449
449
|
|
450
450
|
# Set content
|
@@ -462,13 +462,13 @@ EOS
|
|
462
462
|
|
463
463
|
# Mock item
|
464
464
|
filter.instance_eval do
|
465
|
-
@item_rep = Nanoc::ItemRep.new(
|
466
|
-
Nanoc::Item.new(
|
465
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
466
|
+
Nanoc::Int::Item.new(
|
467
467
|
'content',
|
468
468
|
{},
|
469
469
|
'/foo/bar/baz/'),
|
470
470
|
:blah)
|
471
|
-
@item_rep.
|
471
|
+
@item_rep.paths[:last] = '/woof/meow/'
|
472
472
|
end
|
473
473
|
|
474
474
|
# Set content
|
@@ -487,13 +487,13 @@ EOS
|
|
487
487
|
|
488
488
|
# Mock item
|
489
489
|
filter.instance_eval do
|
490
|
-
@item_rep = Nanoc::ItemRep.new(
|
491
|
-
Nanoc::Item.new(
|
490
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
491
|
+
Nanoc::Int::Item.new(
|
492
492
|
'content',
|
493
493
|
{},
|
494
494
|
'/foo/bar/baz/'),
|
495
495
|
:blah)
|
496
|
-
@item_rep.
|
496
|
+
@item_rep.paths[:last] = '/foo/bar/baz/'
|
497
497
|
end
|
498
498
|
|
499
499
|
# Set content
|
@@ -518,13 +518,13 @@ XML
|
|
518
518
|
|
519
519
|
# Mock item
|
520
520
|
filter.instance_eval do
|
521
|
-
@item_rep = Nanoc::ItemRep.new(
|
522
|
-
Nanoc::Item.new(
|
521
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
522
|
+
Nanoc::Int::Item.new(
|
523
523
|
'content',
|
524
524
|
{},
|
525
525
|
'/foo/bar/baz/'),
|
526
526
|
:blah)
|
527
|
-
@item_rep.
|
527
|
+
@item_rep.paths[:last] = '/foo/bar/baz/'
|
528
528
|
end
|
529
529
|
|
530
530
|
# Set content
|
@@ -548,13 +548,13 @@ XML
|
|
548
548
|
|
549
549
|
# Mock item
|
550
550
|
filter.instance_eval do
|
551
|
-
@item_rep = Nanoc::ItemRep.new(
|
552
|
-
Nanoc::Item.new(
|
551
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
552
|
+
Nanoc::Int::Item.new(
|
553
553
|
'content',
|
554
554
|
{},
|
555
555
|
'/foo/bar/baz/'),
|
556
556
|
:blah)
|
557
|
-
@item_rep.
|
557
|
+
@item_rep.paths[:last] = '/foo/bar/baz/'
|
558
558
|
end
|
559
559
|
|
560
560
|
# Set content
|
@@ -582,13 +582,13 @@ XML
|
|
582
582
|
|
583
583
|
# Mock item
|
584
584
|
filter.instance_eval do
|
585
|
-
@item_rep = Nanoc::ItemRep.new(
|
586
|
-
Nanoc::Item.new(
|
585
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
586
|
+
Nanoc::Int::Item.new(
|
587
587
|
'content',
|
588
588
|
{},
|
589
589
|
'/foo/bar/baz/'),
|
590
590
|
:blah)
|
591
|
-
@item_rep.
|
591
|
+
@item_rep.paths[:last] = '/foo/bar/baz/'
|
592
592
|
end
|
593
593
|
|
594
594
|
# Set content
|
@@ -622,13 +622,13 @@ XML
|
|
622
622
|
|
623
623
|
# Mock item
|
624
624
|
filter.instance_eval do
|
625
|
-
@item_rep = Nanoc::ItemRep.new(
|
626
|
-
Nanoc::Item.new(
|
625
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
626
|
+
Nanoc::Int::Item.new(
|
627
627
|
'content',
|
628
628
|
{},
|
629
629
|
'/foo/bar/baz/'),
|
630
630
|
:blah)
|
631
|
-
@item_rep.
|
631
|
+
@item_rep.paths[:last] = '/foo/bar/baz/'
|
632
632
|
end
|
633
633
|
|
634
634
|
# Set content
|
@@ -655,13 +655,13 @@ XML
|
|
655
655
|
|
656
656
|
# Mock item
|
657
657
|
filter.instance_eval do
|
658
|
-
@item_rep = Nanoc::ItemRep.new(
|
659
|
-
Nanoc::Item.new(
|
658
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
659
|
+
Nanoc::Int::Item.new(
|
660
660
|
'content',
|
661
661
|
{},
|
662
662
|
'/foo/baz/'),
|
663
663
|
:blah)
|
664
|
-
@item_rep.
|
664
|
+
@item_rep.paths[:last] = '/foo/baz/'
|
665
665
|
end
|
666
666
|
|
667
667
|
# Set content
|
@@ -687,13 +687,13 @@ XML
|
|
687
687
|
|
688
688
|
# Mock item
|
689
689
|
filter.instance_eval do
|
690
|
-
@item_rep = Nanoc::ItemRep.new(
|
691
|
-
Nanoc::Item.new(
|
690
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
691
|
+
Nanoc::Int::Item.new(
|
692
692
|
'content',
|
693
693
|
{},
|
694
694
|
'/foo/baz/'),
|
695
695
|
:blah)
|
696
|
-
@item_rep.
|
696
|
+
@item_rep.paths[:last] = '/foo/baz/'
|
697
697
|
end
|
698
698
|
|
699
699
|
# Set content
|
@@ -716,13 +716,13 @@ XML
|
|
716
716
|
|
717
717
|
# Mock item
|
718
718
|
filter.instance_eval do
|
719
|
-
@item_rep = Nanoc::ItemRep.new(
|
720
|
-
Nanoc::Item.new(
|
719
|
+
@item_rep = Nanoc::Int::ItemRep.new(
|
720
|
+
Nanoc::Int::Item.new(
|
721
721
|
'content',
|
722
722
|
{},
|
723
723
|
'/foo/bar/baz/'),
|
724
724
|
:blah)
|
725
|
-
@item_rep.
|
725
|
+
@item_rep.paths[:last] = '/foo/bar/baz/'
|
726
726
|
end
|
727
727
|
|
728
728
|
# Set content
|