nanoc 3.6.1 → 3.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/Gemfile.lock +4 -4
- data/LICENSE +1 -1
- data/NEWS.md +17 -0
- data/lib/nanoc.rb +1 -1
- data/lib/nanoc/base/result_data/item_rep.rb +20 -12
- data/lib/nanoc/base/source_data/item_array.rb +1 -1
- data/lib/nanoc/cli/commands/check.rb +1 -1
- data/lib/nanoc/cli/commands/deploy.rb +32 -23
- data/lib/nanoc/cli/commands/prune.rb +2 -2
- data/lib/nanoc/cli/commands/validate-css.rb +1 -0
- data/lib/nanoc/cli/commands/validate-html.rb +1 -0
- data/lib/nanoc/cli/commands/validate-links.rb +2 -0
- data/lib/nanoc/cli/commands/watch.rb +1 -1
- data/lib/nanoc/extra/checking/checks/external_links.rb +5 -2
- data/lib/nanoc/extra/checking/runner.rb +9 -4
- data/lib/nanoc/filters/rdoc.rb +9 -2
- data/lib/nanoc/helpers/breadcrumbs.rb +10 -15
- data/nanoc.gemspec +3 -2
- data/test/base/test_checksum_store.rb +1 -3
- data/test/base/test_code_snippet.rb +1 -3
- data/test/base/test_compiler.rb +24 -3
- data/test/base/test_compiler_dsl.rb +1 -3
- data/test/base/test_context.rb +1 -3
- data/test/base/test_data_source.rb +1 -3
- data/test/base/test_dependency_tracker.rb +1 -3
- data/test/base/test_directed_graph.rb +1 -3
- data/test/base/test_filter.rb +1 -3
- data/test/base/test_item.rb +1 -3
- data/test/base/test_item_array.rb +1 -3
- data/test/base/test_item_rep.rb +1 -3
- data/test/base/test_layout.rb +1 -3
- data/test/base/test_memoization.rb +1 -3
- data/test/base/test_notification_center.rb +1 -3
- data/test/base/test_outdatedness_checker.rb +1 -3
- data/test/base/test_plugin.rb +1 -3
- data/test/base/test_rule.rb +1 -3
- data/test/base/test_rule_context.rb +1 -3
- data/test/base/test_site.rb +1 -3
- data/test/cli/commands/test_check.rb +1 -3
- data/test/cli/commands/test_compile.rb +1 -3
- data/test/cli/commands/test_create_item.rb +1 -3
- data/test/cli/commands/test_create_layout.rb +1 -3
- data/test/cli/commands/test_create_site.rb +1 -3
- data/test/cli/commands/test_deploy.rb +45 -4
- data/test/cli/commands/test_help.rb +1 -3
- data/test/cli/commands/test_info.rb +1 -3
- data/test/cli/commands/test_prune.rb +1 -3
- data/test/cli/commands/test_sync.rb +1 -3
- data/test/cli/commands/test_update.rb +1 -3
- data/test/cli/commands/test_watch.rb +1 -3
- data/test/cli/test_cleaning_stream.rb +1 -3
- data/test/cli/test_cli.rb +1 -3
- data/test/cli/test_error_handler.rb +1 -3
- data/test/cli/test_logger.rb +1 -3
- data/test/data_sources/test_filesystem.rb +1 -3
- data/test/data_sources/test_filesystem_unified.rb +1 -3
- data/test/data_sources/test_filesystem_verbose.rb +1 -3
- data/test/data_sources/test_static.rb +1 -3
- data/test/extra/checking/checks/test_css.rb +1 -3
- data/test/extra/checking/checks/test_external_links.rb +20 -43
- data/test/extra/checking/checks/test_html.rb +1 -3
- data/test/extra/checking/checks/test_internal_links.rb +1 -3
- data/test/extra/checking/checks/test_stale.rb +1 -3
- data/test/extra/checking/test_check.rb +1 -3
- data/test/extra/checking/test_dsl.rb +1 -3
- data/test/extra/checking/test_runner.rb +1 -3
- data/test/extra/core_ext/test_enumerable.rb +1 -3
- data/test/extra/core_ext/test_pathname.rb +1 -3
- data/test/extra/core_ext/test_time.rb +1 -3
- data/test/extra/deployers/test_fog.rb +1 -3
- data/test/extra/deployers/test_rsync.rb +1 -3
- data/test/extra/test_auto_compiler.rb +1 -3
- data/test/extra/test_file_proxy.rb +1 -3
- data/test/extra/test_link_collector.rb +1 -3
- data/test/extra/test_vcs.rb +1 -3
- data/test/extra/validators/test_links.rb +1 -3
- data/test/extra/validators/test_w3c.rb +1 -3
- data/test/filters/test_asciidoc.rb +1 -3
- data/test/filters/test_bluecloth.rb +1 -3
- data/test/filters/test_coderay.rb +1 -3
- data/test/filters/test_coffeescript.rb +1 -3
- data/test/filters/test_colorize_syntax.rb +3 -16
- data/test/filters/test_erb.rb +1 -3
- data/test/filters/test_erubis.rb +1 -3
- data/test/filters/test_haml.rb +1 -3
- data/test/filters/test_handlebars.rb +1 -3
- data/test/filters/test_kramdown.rb +1 -3
- data/test/filters/test_less.rb +1 -3
- data/test/filters/test_markaby.rb +1 -3
- data/test/filters/test_maruku.rb +1 -3
- data/test/filters/test_mustache.rb +1 -3
- data/test/filters/test_pandoc.rb +1 -3
- data/test/filters/test_rainpress.rb +1 -3
- data/test/filters/test_rdiscount.rb +1 -3
- data/test/filters/test_rdoc.rb +6 -10
- data/test/filters/test_redcarpet.rb +1 -3
- data/test/filters/test_redcloth.rb +1 -3
- data/test/filters/test_relativize_paths.rb +2 -9
- data/test/filters/test_rubypants.rb +1 -3
- data/test/filters/test_sass.rb +1 -3
- data/test/filters/test_slim.rb +1 -3
- data/test/filters/test_typogruby.rb +1 -3
- data/test/filters/test_uglify_js.rb +1 -3
- data/test/filters/test_xsl.rb +1 -3
- data/test/filters/test_yui_compressor.rb +1 -3
- data/test/helper.rb +6 -0
- data/test/helpers/test_blogging.rb +1 -3
- data/test/helpers/test_breadcrumbs.rb +21 -59
- data/test/helpers/test_capturing.rb +1 -3
- data/test/helpers/test_filtering.rb +1 -3
- data/test/helpers/test_html_escape.rb +1 -3
- data/test/helpers/test_link_to.rb +1 -3
- data/test/helpers/test_rendering.rb +1 -3
- data/test/helpers/test_tagging.rb +1 -3
- data/test/helpers/test_text.rb +1 -3
- data/test/helpers/test_xml_sitemap.rb +1 -3
- data/test/tasks/test_clean.rb +1 -3
- data/test/test_gem.rb +1 -3
- metadata +7 -20
data/test/base/test_compiler.rb
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
class Nanoc::CompilerTest <
|
4
|
-
|
5
|
-
include Nanoc::TestHelpers
|
3
|
+
class Nanoc::CompilerTest < Nanoc::TestCase
|
6
4
|
|
7
5
|
def test_compilation_rule_for
|
8
6
|
# Mock rules
|
@@ -519,4 +517,27 @@ class Nanoc::CompilerTest < MiniTest::Unit::TestCase
|
|
519
517
|
end
|
520
518
|
end
|
521
519
|
|
520
|
+
def test_unfiltered_binary_item_should_not_be_moved_outside_content
|
521
|
+
with_site do
|
522
|
+
File.open('content/blah.dat', 'w') { |io| io.write('o hello') }
|
523
|
+
|
524
|
+
File.open('Rules', 'w') do |io|
|
525
|
+
io.write "compile '*' do\n"
|
526
|
+
io.write "end\n"
|
527
|
+
io.write "\n"
|
528
|
+
io.write "route '*' do\n"
|
529
|
+
io.write " item.identifier.chop + '.' + item[:extension]\n"
|
530
|
+
io.write "end\n"
|
531
|
+
io.write "\n"
|
532
|
+
io.write "layout '*', :erb\n"
|
533
|
+
end
|
534
|
+
|
535
|
+
site = Nanoc::Site.new('.')
|
536
|
+
site.compile
|
537
|
+
|
538
|
+
assert_equal Set.new(%w( content/blah.dat )), Set.new(Dir['content/*'])
|
539
|
+
assert_equal Set.new(%w( output/blah.dat )), Set.new(Dir['output/*'])
|
540
|
+
end
|
541
|
+
end
|
542
|
+
|
522
543
|
end
|
data/test/base/test_context.rb
CHANGED
data/test/base/test_filter.rb
CHANGED
data/test/base/test_item.rb
CHANGED
data/test/base/test_item_rep.rb
CHANGED
data/test/base/test_layout.rb
CHANGED
data/test/base/test_plugin.rb
CHANGED
data/test/base/test_rule.rb
CHANGED
data/test/base/test_site.rb
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
class Nanoc::CLI::Commands::CreateSiteTest <
|
4
|
-
|
5
|
-
include Nanoc::TestHelpers
|
3
|
+
class Nanoc::CLI::Commands::CreateSiteTest < Nanoc::TestCase
|
6
4
|
|
7
5
|
def test_create_site_with_existing_name
|
8
6
|
Nanoc::CLI.run %w( create_site foo )
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
class Nanoc::CLI::Commands::DeployTest <
|
4
|
-
|
5
|
-
include Nanoc::TestHelpers
|
3
|
+
class Nanoc::CLI::Commands::DeployTest < Nanoc::TestCase
|
6
4
|
|
7
5
|
def test_deploy
|
8
6
|
if_have 'systemu' do
|
@@ -46,6 +44,24 @@ class Nanoc::CLI::Commands::DeployTest < MiniTest::Unit::TestCase
|
|
46
44
|
end
|
47
45
|
end
|
48
46
|
|
47
|
+
def test_deploy_with_list_without_config
|
48
|
+
if_have 'systemu' do
|
49
|
+
with_site do |site|
|
50
|
+
FileUtils.mkdir_p('output')
|
51
|
+
File.open('output/blah.html', 'w') { |io| io.write 'moo' }
|
52
|
+
|
53
|
+
ios = capturing_stdio do
|
54
|
+
Nanoc::CLI.run %w( deploy -L )
|
55
|
+
end
|
56
|
+
|
57
|
+
assert ios[:stdout].include?('No deployment configurations.')
|
58
|
+
|
59
|
+
refute File.directory?('mydestination')
|
60
|
+
refute File.file?('mydestination/blah.html')
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
49
65
|
def test_deploy_with_list
|
50
66
|
if_have 'systemu' do
|
51
67
|
with_site do |site|
|
@@ -71,6 +87,31 @@ class Nanoc::CLI::Commands::DeployTest < MiniTest::Unit::TestCase
|
|
71
87
|
end
|
72
88
|
end
|
73
89
|
|
90
|
+
def test_deploy_with_list_deployers
|
91
|
+
if_have 'systemu' do
|
92
|
+
with_site do |site|
|
93
|
+
File.open('nanoc.yaml', 'w') do |io|
|
94
|
+
io.write "deploy:\n"
|
95
|
+
io.write " public:\n"
|
96
|
+
io.write " kind: rsync\n"
|
97
|
+
io.write " dst: mydestination"
|
98
|
+
end
|
99
|
+
|
100
|
+
FileUtils.mkdir_p('output')
|
101
|
+
File.open('output/blah.html', 'w') { |io| io.write 'moo' }
|
102
|
+
|
103
|
+
ios = capturing_stdio do
|
104
|
+
Nanoc::CLI.run %w( deploy -D )
|
105
|
+
end
|
106
|
+
|
107
|
+
assert ios[:stdout].include?('Available deployers:')
|
108
|
+
|
109
|
+
refute File.directory?('mydestination')
|
110
|
+
refute File.file?('mydestination/blah.html')
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
74
115
|
def test_deploy_without_kind
|
75
116
|
if_have 'systemu' do
|
76
117
|
with_site do |site|
|
@@ -111,7 +152,7 @@ class Nanoc::CLI::Commands::DeployTest < MiniTest::Unit::TestCase
|
|
111
152
|
err = assert_raises Nanoc::Errors::GenericTrivial do
|
112
153
|
Nanoc::CLI.run %w( deploy )
|
113
154
|
end
|
114
|
-
assert_equal 'The site
|
155
|
+
assert_equal 'The site has no deployment configuration for default.', err.message
|
115
156
|
end
|
116
157
|
end
|
117
158
|
end
|
data/test/cli/test_cli.rb
CHANGED