nanoc3 3.2.0a4 → 3.2.0b1
Sign up to get free protection for your applications and to get access to all the features.
- data/NEWS.md +20 -2
- data/README.md +7 -3
- data/bin/nanoc3 +1 -3
- data/lib/nanoc3.rb +1 -13
- data/lib/nanoc3/base/compilation/filter.rb +21 -0
- data/lib/nanoc3/base/compilation/item_rep_recorder_proxy.rb +1 -3
- data/lib/nanoc3/base/compilation/outdatedness_checker.rb +1 -1
- data/lib/nanoc3/base/compilation/rule_memory_calculator.rb +0 -2
- data/lib/nanoc3/base/compilation/rules_collection.rb +37 -13
- data/lib/nanoc3/base/directed_graph.rb +3 -3
- data/lib/nanoc3/base/memoization.rb +6 -9
- data/lib/nanoc3/base/source_data/code_snippet.rb +2 -1
- data/lib/nanoc3/base/source_data/configuration.rb +7 -3
- data/lib/nanoc3/base/source_data/item.rb +52 -10
- data/lib/nanoc3/base/source_data/layout.rb +28 -1
- data/lib/nanoc3/base/source_data/site.rb +14 -3
- data/lib/nanoc3/cli.rb +98 -6
- data/lib/nanoc3/cli/{base.rb → command.rb} +117 -153
- data/lib/nanoc3/cli/commands/autocompile.rb +20 -48
- data/lib/nanoc3/cli/commands/compile.rb +32 -48
- data/lib/nanoc3/cli/commands/create_item.rb +21 -37
- data/lib/nanoc3/cli/commands/create_layout.rb +18 -36
- data/lib/nanoc3/cli/commands/create_site.rb +15 -34
- data/lib/nanoc3/cli/commands/debug.rb +17 -31
- data/lib/nanoc3/cli/commands/info.rb +14 -29
- data/lib/nanoc3/cli/commands/nanoc.rb +37 -0
- data/lib/nanoc3/cli/commands/update.rb +21 -44
- data/lib/nanoc3/cli/commands/view.rb +18 -44
- data/lib/nanoc3/cli/commands/watch.rb +16 -31
- data/lib/nanoc3/data_sources/filesystem.rb +25 -6
- data/lib/nanoc3/data_sources/filesystem_unified.rb +5 -5
- data/lib/nanoc3/extra/auto_compiler.rb +1 -0
- data/lib/nanoc3/extra/file_proxy.rb +0 -1
- data/lib/nanoc3/filters.rb +2 -0
- data/lib/nanoc3/filters/asciidoc.rb +16 -36
- data/lib/nanoc3/filters/bluecloth.rb +2 -2
- data/lib/nanoc3/filters/coderay.rb +2 -2
- data/lib/nanoc3/filters/colorize_syntax.rb +18 -5
- data/lib/nanoc3/filters/erb.rb +2 -2
- data/lib/nanoc3/filters/erubis.rb +2 -2
- data/lib/nanoc3/filters/haml.rb +2 -2
- data/lib/nanoc3/filters/kramdown.rb +2 -2
- data/lib/nanoc3/filters/less.rb +32 -1
- data/lib/nanoc3/filters/markaby.rb +2 -2
- data/lib/nanoc3/filters/maruku.rb +2 -2
- data/lib/nanoc3/filters/mustache.rb +2 -2
- data/lib/nanoc3/filters/rainpress.rb +2 -2
- data/lib/nanoc3/filters/rdiscount.rb +4 -3
- data/lib/nanoc3/filters/rdoc.rb +10 -6
- data/lib/nanoc3/filters/redcarpet.rb +2 -2
- data/lib/nanoc3/filters/redcloth.rb +2 -2
- data/lib/nanoc3/filters/rubypants.rb +2 -2
- data/lib/nanoc3/filters/sass.rb +44 -52
- data/lib/nanoc3/filters/slim.rb +2 -2
- data/lib/nanoc3/filters/typogruby.rb +2 -2
- data/lib/nanoc3/filters/uglify_js.rb +42 -0
- data/nanoc3.gemspec +1 -1
- data/tasks/test.rake +6 -0
- data/test/base/core_ext/array_spec.rb +0 -2
- data/test/base/core_ext/hash_spec.rb +0 -2
- data/test/base/core_ext/pathname_spec.rb +0 -2
- data/test/base/core_ext/string_spec.rb +0 -2
- data/test/base/test_checksum_store.rb +0 -2
- data/test/base/test_code_snippet.rb +0 -2
- data/test/base/test_compiler.rb +2 -4
- data/test/base/test_compiler_dsl.rb +1 -3
- data/test/base/test_context.rb +0 -2
- data/test/base/test_data_source.rb +0 -2
- data/test/base/test_dependency_tracker.rb +0 -2
- data/test/base/test_directed_graph.rb +0 -2
- data/test/base/test_filter.rb +0 -2
- data/test/base/test_item.rb +19 -4
- data/test/base/test_item_rep.rb +0 -2
- data/test/base/test_layout.rb +19 -4
- data/test/base/test_memoization.rb +39 -2
- data/test/base/test_notification_center.rb +0 -2
- data/test/base/test_outdatedness_checker.rb +31 -2
- data/test/base/test_plugin.rb +0 -2
- data/test/base/test_rule.rb +0 -2
- data/test/base/test_rule_context.rb +0 -2
- data/test/base/test_site.rb +30 -3
- data/test/cli/commands/test_compile.rb +24 -3
- data/test/cli/commands/test_create_item.rb +5 -3
- data/test/cli/commands/test_create_layout.rb +4 -4
- data/test/cli/commands/test_create_site.rb +5 -5
- data/test/cli/commands/test_help.rb +3 -3
- data/test/cli/commands/test_info.rb +2 -3
- data/test/cli/commands/test_update.rb +0 -2
- data/test/cli/test_cli.rb +40 -0
- data/test/cli/test_logger.rb +0 -2
- data/test/data_sources/test_filesystem.rb +0 -2
- data/test/data_sources/test_filesystem_unified.rb +32 -58
- data/test/data_sources/test_filesystem_verbose.rb +0 -2
- data/test/extra/core_ext/test_enumerable.rb +0 -2
- data/test/extra/core_ext/test_time.rb +0 -2
- data/test/extra/deployers/test_rsync.rb +0 -2
- data/test/extra/test_auto_compiler.rb +5 -7
- data/test/extra/test_file_proxy.rb +0 -2
- data/test/extra/test_vcs.rb +0 -2
- data/test/extra/validators/test_links.rb +0 -2
- data/test/extra/validators/test_w3c.rb +0 -2
- data/test/filters/test_asciidoc.rb +0 -2
- data/test/filters/test_bluecloth.rb +0 -2
- data/test/filters/test_coderay.rb +0 -2
- data/test/filters/test_colorize_syntax.rb +49 -2
- data/test/filters/test_erb.rb +0 -2
- data/test/filters/test_erubis.rb +0 -2
- data/test/filters/test_haml.rb +0 -2
- data/test/filters/test_kramdown.rb +0 -2
- data/test/filters/test_less.rb +59 -5
- data/test/filters/test_markaby.rb +0 -2
- data/test/filters/test_maruku.rb +0 -2
- data/test/filters/test_mustache.rb +0 -2
- data/test/filters/test_rainpress.rb +0 -2
- data/test/filters/test_rdiscount.rb +0 -2
- data/test/filters/test_rdoc.rb +0 -2
- data/test/filters/test_redcarpet.rb +0 -2
- data/test/filters/test_redcloth.rb +0 -2
- data/test/filters/test_relativize_paths.rb +77 -24
- data/test/filters/test_rubypants.rb +0 -2
- data/test/filters/test_sass.rb +136 -10
- data/test/filters/test_slim.rb +0 -2
- data/test/filters/test_typogruby.rb +0 -2
- data/test/filters/test_uglify_js.rb +30 -0
- data/test/gem_loader.rb +11 -0
- data/test/helper.rb +3 -0
- data/test/helpers/test_blogging.rb +0 -2
- data/test/helpers/test_breadcrumbs.rb +0 -2
- data/test/helpers/test_capturing.rb +0 -2
- data/test/helpers/test_filtering.rb +0 -2
- data/test/helpers/test_html_escape.rb +0 -2
- data/test/helpers/test_link_to.rb +0 -2
- data/test/helpers/test_rendering.rb +0 -2
- data/test/helpers/test_tagging.rb +0 -2
- data/test/helpers/test_text.rb +0 -2
- data/test/helpers/test_xml_sitemap.rb +0 -2
- data/test/tasks/test_clean.rb +0 -2
- metadata +11 -9
- data/lib/nanoc3/cli/commands.rb +0 -16
- data/lib/nanoc3/cli/commands/help.rb +0 -71
- data/tasks/clean.rake +0 -11
@@ -1,7 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
require 'test/helper'
|
4
|
-
|
5
3
|
class Nanoc3::Extra::AutoCompilerTest < MiniTest::Unit::TestCase
|
6
4
|
|
7
5
|
include Nanoc3::TestHelpers
|
@@ -9,7 +7,7 @@ class Nanoc3::Extra::AutoCompilerTest < MiniTest::Unit::TestCase
|
|
9
7
|
def test_handle_request_with_item_rep_with_index_filename
|
10
8
|
if_have 'mime/types', 'rack' do
|
11
9
|
# Create site
|
12
|
-
Nanoc3::CLI
|
10
|
+
Nanoc3::CLI.run %w( create_site bar)
|
13
11
|
|
14
12
|
FileUtils.cd('bar') do
|
15
13
|
# Create item
|
@@ -49,7 +47,7 @@ class Nanoc3::Extra::AutoCompilerTest < MiniTest::Unit::TestCase
|
|
49
47
|
def test_handle_request_with_broken_url
|
50
48
|
if_have 'mime/types', 'rack' do
|
51
49
|
# Create site
|
52
|
-
Nanoc3::CLI
|
50
|
+
Nanoc3::CLI.run %w( create_site bar)
|
53
51
|
|
54
52
|
FileUtils.cd('bar') do
|
55
53
|
# Create site
|
@@ -293,7 +291,7 @@ class Nanoc3::Extra::AutoCompilerTest < MiniTest::Unit::TestCase
|
|
293
291
|
def test_serve_with_working_item
|
294
292
|
if_have 'mime/types', 'rack' do
|
295
293
|
# Create site
|
296
|
-
Nanoc3::CLI
|
294
|
+
Nanoc3::CLI.run %w( create_site bar)
|
297
295
|
|
298
296
|
FileUtils.cd('bar') do
|
299
297
|
# Create item
|
@@ -331,7 +329,7 @@ class Nanoc3::Extra::AutoCompilerTest < MiniTest::Unit::TestCase
|
|
331
329
|
def test_serve_with_broken_item
|
332
330
|
if_have 'mime/types', 'rack' do
|
333
331
|
# Create site
|
334
|
-
Nanoc3::CLI
|
332
|
+
Nanoc3::CLI.run %w( create_site bar)
|
335
333
|
|
336
334
|
FileUtils.cd('bar') do
|
337
335
|
# Create item
|
@@ -359,7 +357,7 @@ class Nanoc3::Extra::AutoCompilerTest < MiniTest::Unit::TestCase
|
|
359
357
|
def test_reload_config_file_before_each_request
|
360
358
|
if_have 'rack' do
|
361
359
|
# Create site
|
362
|
-
Nanoc3::CLI
|
360
|
+
Nanoc3::CLI.run %w( create_site foo )
|
363
361
|
|
364
362
|
FileUtils.cd('foo') do
|
365
363
|
# Create item that outputs config elements
|
data/test/extra/test_vcs.rb
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
require 'test/helper'
|
4
|
-
|
5
3
|
class Nanoc3::Filters::ColorizeSyntaxTest < MiniTest::Unit::TestCase
|
6
4
|
|
7
5
|
include Nanoc3::TestHelpers
|
@@ -146,4 +144,53 @@ class Nanoc3::Filters::ColorizeSyntaxTest < MiniTest::Unit::TestCase
|
|
146
144
|
end
|
147
145
|
end
|
148
146
|
|
147
|
+
def test_colorize_syntax_with_default_colorizer
|
148
|
+
if `which pygmentize`.strip.empty?
|
149
|
+
skip 'no pygmentize found, which is required for this test'
|
150
|
+
return
|
151
|
+
end
|
152
|
+
|
153
|
+
if_have 'nokogiri' do
|
154
|
+
# Create filter
|
155
|
+
filter = ::Nanoc3::Filters::ColorizeSyntax.new
|
156
|
+
|
157
|
+
# Get input and expected output
|
158
|
+
input = '<pre><code class="language-ruby">puts "foo"</code></pre>'
|
159
|
+
expected_output = '<pre><code class="language-ruby"><span class="nb">puts</span> <span class="s2">"foo"</span></code></pre>'
|
160
|
+
|
161
|
+
# Run filter
|
162
|
+
actual_output = filter.run(input, :default_colorizer => :pygmentize)
|
163
|
+
assert_equal(expected_output, actual_output)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
def test_colorize_syntax_with_missing_executables
|
168
|
+
if_have 'nokogiri' do
|
169
|
+
begin
|
170
|
+
original_path = ENV['PATH']
|
171
|
+
ENV['PATH'] = './blooblooblah'
|
172
|
+
|
173
|
+
# Create filter
|
174
|
+
filter = ::Nanoc3::Filters::ColorizeSyntax.new
|
175
|
+
|
176
|
+
# Get input and expected output
|
177
|
+
input = '<pre><code class="language-ruby">puts "foo"</code></pre>'
|
178
|
+
|
179
|
+
# Run filter
|
180
|
+
[ :pygmentize, :simon_highlight ].each do |colorizer|
|
181
|
+
begin
|
182
|
+
input = '<pre><code class="language-ruby">puts "foo"</code></pre>'
|
183
|
+
actual_output = filter.run(
|
184
|
+
input,
|
185
|
+
:colorizers => { :ruby => colorizer })
|
186
|
+
flunk "expected colorizer to raise if no executable is available"
|
187
|
+
rescue => e
|
188
|
+
end
|
189
|
+
end
|
190
|
+
ensure
|
191
|
+
ENV['PATH'] = original_path
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
149
196
|
end
|
data/test/filters/test_erb.rb
CHANGED
data/test/filters/test_erubis.rb
CHANGED
data/test/filters/test_haml.rb
CHANGED
data/test/filters/test_less.rb
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
require 'test/helper'
|
4
|
-
|
5
3
|
class Nanoc3::Filters::LessTest < MiniTest::Unit::TestCase
|
6
4
|
|
7
5
|
include Nanoc3::TestHelpers
|
@@ -12,7 +10,7 @@ class Nanoc3::Filters::LessTest < MiniTest::Unit::TestCase
|
|
12
10
|
@item = Nanoc3::Item.new("blah", { :content_filename => 'content/foo/bar.txt' }, '/foo/bar/')
|
13
11
|
|
14
12
|
# Create filter
|
15
|
-
filter = ::Nanoc3::Filters::Less.new(:item => @item)
|
13
|
+
filter = ::Nanoc3::Filters::Less.new(:item => @item, :items => [ @item ])
|
16
14
|
|
17
15
|
# Run filter
|
18
16
|
result = filter.run('.foo { bar: 1 + 1 }')
|
@@ -30,7 +28,7 @@ class Nanoc3::Filters::LessTest < MiniTest::Unit::TestCase
|
|
30
28
|
@item = Nanoc3::Item.new("blah", { :content_filename => 'content/foo/bar.txt' }, '/foo/bar/')
|
31
29
|
|
32
30
|
# Create filter
|
33
|
-
filter = ::Nanoc3::Filters::Less.new(:item => @item)
|
31
|
+
filter = ::Nanoc3::Filters::Less.new(:item => @item, :items => [ @item ])
|
34
32
|
|
35
33
|
# Run filter
|
36
34
|
result = filter.run('@import "content/foo/bar/imported_file.less";')
|
@@ -45,10 +43,11 @@ class Nanoc3::Filters::LessTest < MiniTest::Unit::TestCase
|
|
45
43
|
File.open('content/foo/bar/imported_file.less', 'w') { |io| io.write('p { color: red; }') }
|
46
44
|
|
47
45
|
# Create item
|
46
|
+
File.open('content/foo/bar.txt', 'w') { |io| io.write('meh') }
|
48
47
|
@item = Nanoc3::Item.new("blah", { :content_filename => 'content/foo/bar.txt' }, '/foo/bar/')
|
49
48
|
|
50
49
|
# Create filter
|
51
|
-
filter = ::Nanoc3::Filters::Less.new(:item => @item)
|
50
|
+
filter = ::Nanoc3::Filters::Less.new(:item => @item, :items => [ @item ])
|
52
51
|
|
53
52
|
# Run filter
|
54
53
|
result = filter.run('@import "bar/imported_file.less";')
|
@@ -56,4 +55,59 @@ class Nanoc3::Filters::LessTest < MiniTest::Unit::TestCase
|
|
56
55
|
end
|
57
56
|
end
|
58
57
|
|
58
|
+
def test_recompile_includes
|
59
|
+
if_have 'less' do
|
60
|
+
with_site do |site|
|
61
|
+
# Create two less files
|
62
|
+
Dir['content/*'].each { |i| FileUtils.rm(i) }
|
63
|
+
File.open('content/a.less', 'w') do |io|
|
64
|
+
io.write('@import "b.less";')
|
65
|
+
end
|
66
|
+
File.open('content/b.less', 'w') do |io|
|
67
|
+
io.write("p { color: red; }")
|
68
|
+
end
|
69
|
+
|
70
|
+
# Update rules
|
71
|
+
File.open('Rules', 'w') do |io|
|
72
|
+
io.write "compile '*' do\n"
|
73
|
+
io.write " filter :less\n"
|
74
|
+
io.write "end\n"
|
75
|
+
io.write "\n"
|
76
|
+
io.write "route '/a/' do\n"
|
77
|
+
io.write " item.identifier.chop + '.css'\n"
|
78
|
+
io.write "end\n"
|
79
|
+
io.write "\n"
|
80
|
+
io.write "route '/b/' do\n"
|
81
|
+
io.write " nil\n"
|
82
|
+
io.write "end\n"
|
83
|
+
end
|
84
|
+
|
85
|
+
# Compile
|
86
|
+
site = Nanoc3::Site.new('.')
|
87
|
+
site.compile
|
88
|
+
|
89
|
+
# Check
|
90
|
+
assert Dir['output/*'].size == 1
|
91
|
+
assert File.file?('output/a.css')
|
92
|
+
refute File.file?('output/b.css')
|
93
|
+
assert_match /^p\s*\{\s*color:\s*red;?\s*\}/, File.read('output/a.css')
|
94
|
+
|
95
|
+
# Update included file
|
96
|
+
File.open('content/b.less', 'w') do |io|
|
97
|
+
io.write("p { color: blue; }")
|
98
|
+
end
|
99
|
+
|
100
|
+
# Recompile
|
101
|
+
site = Nanoc3::Site.new('.')
|
102
|
+
site.compile
|
103
|
+
|
104
|
+
# Recheck
|
105
|
+
assert Dir['output/*'].size == 1
|
106
|
+
assert File.file?('output/a.css')
|
107
|
+
refute File.file?('output/b.css')
|
108
|
+
assert_match /^p\s*\{\s*color:\s*blue;?\s*\}/, File.read('output/a.css')
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
59
113
|
end
|
data/test/filters/test_maruku.rb
CHANGED
data/test/filters/test_rdoc.rb
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
require 'test/helper'
|
4
|
-
|
5
3
|
class Nanoc3::Filters::RelativizePathsTest < MiniTest::Unit::TestCase
|
6
4
|
|
7
5
|
include Nanoc3::TestHelpers
|
@@ -12,8 +10,13 @@ class Nanoc3::Filters::RelativizePathsTest < MiniTest::Unit::TestCase
|
|
12
10
|
|
13
11
|
# Mock item
|
14
12
|
filter.instance_eval do
|
15
|
-
@item_rep =
|
16
|
-
|
13
|
+
@item_rep = Nanoc3::ItemRep.new(
|
14
|
+
Nanoc3::Item.new(
|
15
|
+
'content',
|
16
|
+
{},
|
17
|
+
'/foo/bar/baz/'),
|
18
|
+
:blah)
|
19
|
+
@item_rep.path = '/foo/bar/baz/'
|
17
20
|
end
|
18
21
|
|
19
22
|
# Set content
|
@@ -31,8 +34,13 @@ class Nanoc3::Filters::RelativizePathsTest < MiniTest::Unit::TestCase
|
|
31
34
|
|
32
35
|
# Mock item
|
33
36
|
filter.instance_eval do
|
34
|
-
@item_rep =
|
35
|
-
|
37
|
+
@item_rep = Nanoc3::ItemRep.new(
|
38
|
+
Nanoc3::Item.new(
|
39
|
+
'content',
|
40
|
+
{},
|
41
|
+
'/foo/bar/baz/'),
|
42
|
+
:blah)
|
43
|
+
@item_rep.path = '/foo/bar/baz/'
|
36
44
|
end
|
37
45
|
|
38
46
|
# Set content
|
@@ -50,8 +58,13 @@ class Nanoc3::Filters::RelativizePathsTest < MiniTest::Unit::TestCase
|
|
50
58
|
|
51
59
|
# Mock item
|
52
60
|
filter.instance_eval do
|
53
|
-
@item_rep =
|
54
|
-
|
61
|
+
@item_rep = Nanoc3::ItemRep.new(
|
62
|
+
Nanoc3::Item.new(
|
63
|
+
'content',
|
64
|
+
{},
|
65
|
+
'/foo/bar/baz/'),
|
66
|
+
:blah)
|
67
|
+
@item_rep.path = '/foo/bar/baz/'
|
55
68
|
end
|
56
69
|
|
57
70
|
# Set content
|
@@ -69,8 +82,13 @@ class Nanoc3::Filters::RelativizePathsTest < MiniTest::Unit::TestCase
|
|
69
82
|
|
70
83
|
# Mock item
|
71
84
|
filter.instance_eval do
|
72
|
-
@item_rep =
|
73
|
-
|
85
|
+
@item_rep = Nanoc3::ItemRep.new(
|
86
|
+
Nanoc3::Item.new(
|
87
|
+
'content',
|
88
|
+
{},
|
89
|
+
'/foo/bar/baz/'),
|
90
|
+
:blah)
|
91
|
+
@item_rep.path = '/foo/bar/baz/'
|
74
92
|
end
|
75
93
|
|
76
94
|
# Set content
|
@@ -88,8 +106,13 @@ class Nanoc3::Filters::RelativizePathsTest < MiniTest::Unit::TestCase
|
|
88
106
|
|
89
107
|
# Mock item
|
90
108
|
filter.instance_eval do
|
91
|
-
@item_rep =
|
92
|
-
|
109
|
+
@item_rep = Nanoc3::ItemRep.new(
|
110
|
+
Nanoc3::Item.new(
|
111
|
+
'content',
|
112
|
+
{},
|
113
|
+
'/foo/bar/baz/'),
|
114
|
+
:blah)
|
115
|
+
@item_rep.path = '/foo/bar/baz/'
|
93
116
|
end
|
94
117
|
|
95
118
|
# Set content
|
@@ -107,8 +130,13 @@ class Nanoc3::Filters::RelativizePathsTest < MiniTest::Unit::TestCase
|
|
107
130
|
|
108
131
|
# Mock item
|
109
132
|
filter.instance_eval do
|
110
|
-
@item_rep =
|
111
|
-
|
133
|
+
@item_rep = Nanoc3::ItemRep.new(
|
134
|
+
Nanoc3::Item.new(
|
135
|
+
'content',
|
136
|
+
{},
|
137
|
+
'/foo/bar/baz/'),
|
138
|
+
:blah)
|
139
|
+
@item_rep.path = '/woof/meow/'
|
112
140
|
end
|
113
141
|
|
114
142
|
# Set content
|
@@ -136,8 +164,13 @@ class Nanoc3::Filters::RelativizePathsTest < MiniTest::Unit::TestCase
|
|
136
164
|
|
137
165
|
# Mock item
|
138
166
|
filter.instance_eval do
|
139
|
-
@item_rep =
|
140
|
-
|
167
|
+
@item_rep = Nanoc3::ItemRep.new(
|
168
|
+
Nanoc3::Item.new(
|
169
|
+
'content',
|
170
|
+
{},
|
171
|
+
'/foo/bar/baz/'),
|
172
|
+
:blah)
|
173
|
+
@item_rep.path = '/foo/bar/baz/'
|
141
174
|
end
|
142
175
|
|
143
176
|
# Set content
|
@@ -155,8 +188,13 @@ class Nanoc3::Filters::RelativizePathsTest < MiniTest::Unit::TestCase
|
|
155
188
|
|
156
189
|
# Mock item
|
157
190
|
filter.instance_eval do
|
158
|
-
@item_rep =
|
159
|
-
|
191
|
+
@item_rep = Nanoc3::ItemRep.new(
|
192
|
+
Nanoc3::Item.new(
|
193
|
+
'content',
|
194
|
+
{},
|
195
|
+
'/foo/bar/baz/'),
|
196
|
+
:blah)
|
197
|
+
@item_rep.path = '/foo/bar/baz/'
|
160
198
|
end
|
161
199
|
|
162
200
|
# Set content
|
@@ -174,8 +212,13 @@ class Nanoc3::Filters::RelativizePathsTest < MiniTest::Unit::TestCase
|
|
174
212
|
|
175
213
|
# Mock item
|
176
214
|
filter.instance_eval do
|
177
|
-
@item_rep =
|
178
|
-
|
215
|
+
@item_rep = Nanoc3::ItemRep.new(
|
216
|
+
Nanoc3::Item.new(
|
217
|
+
'content',
|
218
|
+
{},
|
219
|
+
'/foo/bar/baz/'),
|
220
|
+
:blah)
|
221
|
+
@item_rep.path = '/foo/bar/baz/'
|
179
222
|
end
|
180
223
|
|
181
224
|
# Set content
|
@@ -193,8 +236,13 @@ class Nanoc3::Filters::RelativizePathsTest < MiniTest::Unit::TestCase
|
|
193
236
|
|
194
237
|
# Mock item
|
195
238
|
filter.instance_eval do
|
196
|
-
@item_rep =
|
197
|
-
|
239
|
+
@item_rep = Nanoc3::ItemRep.new(
|
240
|
+
Nanoc3::Item.new(
|
241
|
+
'content',
|
242
|
+
{},
|
243
|
+
'/foo/bar/baz/'),
|
244
|
+
:blah)
|
245
|
+
@item_rep.path = '/foo/bar/baz/'
|
198
246
|
end
|
199
247
|
|
200
248
|
# Set content
|
@@ -215,8 +263,13 @@ class Nanoc3::Filters::RelativizePathsTest < MiniTest::Unit::TestCase
|
|
215
263
|
|
216
264
|
# Mock item
|
217
265
|
filter.instance_eval do
|
218
|
-
@item_rep =
|
219
|
-
|
266
|
+
@item_rep = Nanoc3::ItemRep.new(
|
267
|
+
Nanoc3::Item.new(
|
268
|
+
'content',
|
269
|
+
{},
|
270
|
+
'/foo/bar/baz/'),
|
271
|
+
:blah)
|
272
|
+
@item_rep.path = '/woof/meow/'
|
220
273
|
end
|
221
274
|
|
222
275
|
# Set content
|