webgen 0.5.6 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +3 -0
- data/ChangeLog +426 -0
- data/THANKS +1 -0
- data/VERSION +1 -1
- data/bin/webgen +2 -0
- data/data/webgen/webgui/controller/main.rb +2 -0
- data/data/webgen/website_skeleton/ext/init.rb +4 -0
- data/doc/contentprocessor/blocks.page +44 -14
- data/doc/contentprocessor/builder.page +1 -1
- data/doc/contentprocessor/erb.page +1 -1
- data/doc/contentprocessor/erubis.page +1 -1
- data/doc/contentprocessor/fragments.page +1 -1
- data/doc/contentprocessor/haml.page +1 -1
- data/doc/contentprocessor/rdiscount.page +1 -1
- data/doc/contentprocessor/rdoc.page +1 -1
- data/doc/contentprocessor/redcloth.page +1 -1
- data/doc/contentprocessor/sass.page +1 -1
- data/doc/faq.page +7 -2
- data/doc/manual.page +6 -5
- data/doc/reference_metainfo.page +1 -1
- data/doc/sourcehandler/feed.page +9 -1
- data/doc/sourcehandler/sitemap.page +1 -1
- data/doc/tag/coderay.page +1 -1
- data/doc/tag/langbar.page +15 -0
- data/doc/tag/menu.page +1 -1
- data/doc/tag/relocatable.page +2 -2
- data/lib/webgen/blackboard.rb +9 -4
- data/lib/webgen/cache.rb +2 -0
- data/lib/webgen/cli.rb +6 -1
- data/lib/webgen/cli/create_command.rb +2 -0
- data/lib/webgen/cli/run_command.rb +2 -0
- data/lib/webgen/cli/utils.rb +2 -0
- data/lib/webgen/cli/webgui_command.rb +2 -0
- data/lib/webgen/common.rb +12 -1
- data/lib/webgen/common/sitemap.rb +12 -4
- data/lib/webgen/configuration.rb +2 -0
- data/lib/webgen/contentprocessor.rb +2 -0
- data/lib/webgen/contentprocessor/blocks.rb +22 -8
- data/lib/webgen/contentprocessor/builder.rb +2 -0
- data/lib/webgen/contentprocessor/context.rb +2 -0
- data/lib/webgen/contentprocessor/erb.rb +2 -0
- data/lib/webgen/contentprocessor/erubis.rb +2 -0
- data/lib/webgen/contentprocessor/fragments.rb +2 -0
- data/lib/webgen/contentprocessor/haml.rb +2 -0
- data/lib/webgen/contentprocessor/maruku.rb +2 -0
- data/lib/webgen/contentprocessor/rdiscount.rb +2 -0
- data/lib/webgen/contentprocessor/rdoc.rb +2 -0
- data/lib/webgen/contentprocessor/redcloth.rb +2 -0
- data/lib/webgen/contentprocessor/sass.rb +2 -0
- data/lib/webgen/contentprocessor/tags.rb +2 -0
- data/lib/webgen/coreext.rb +2 -0
- data/lib/webgen/default_config.rb +4 -1
- data/lib/webgen/languages.rb +2 -0
- data/lib/webgen/loggable.rb +2 -0
- data/lib/webgen/logger.rb +2 -0
- data/lib/webgen/node.rb +22 -8
- data/lib/webgen/output.rb +3 -1
- data/lib/webgen/output/filesystem.rb +2 -0
- data/lib/webgen/page.rb +2 -0
- data/lib/webgen/path.rb +3 -1
- data/lib/webgen/source.rb +2 -0
- data/lib/webgen/source/filesystem.rb +5 -2
- data/lib/webgen/source/resource.rb +2 -0
- data/lib/webgen/source/stacked.rb +2 -0
- data/lib/webgen/sourcehandler.rb +8 -0
- data/lib/webgen/sourcehandler/base.rb +2 -0
- data/lib/webgen/sourcehandler/copy.rb +2 -0
- data/lib/webgen/sourcehandler/directory.rb +2 -0
- data/lib/webgen/sourcehandler/feed.rb +3 -1
- data/lib/webgen/sourcehandler/fragment.rb +2 -0
- data/lib/webgen/sourcehandler/memory.rb +2 -0
- data/lib/webgen/sourcehandler/metainfo.rb +3 -1
- data/lib/webgen/sourcehandler/page.rb +2 -0
- data/lib/webgen/sourcehandler/sitemap.rb +2 -0
- data/lib/webgen/sourcehandler/template.rb +2 -0
- data/lib/webgen/sourcehandler/virtual.rb +3 -1
- data/lib/webgen/tag.rb +2 -0
- data/lib/webgen/tag/base.rb +2 -0
- data/lib/webgen/tag/breadcrumbtrail.rb +2 -0
- data/lib/webgen/tag/coderay.rb +2 -0
- data/lib/webgen/tag/date.rb +2 -0
- data/lib/webgen/tag/executecommand.rb +2 -0
- data/lib/webgen/tag/includefile.rb +2 -0
- data/lib/webgen/tag/langbar.rb +4 -1
- data/lib/webgen/tag/link.rb +2 -0
- data/lib/webgen/tag/menu.rb +2 -0
- data/lib/webgen/tag/metainfo.rb +2 -0
- data/lib/webgen/tag/relocatable.rb +2 -0
- data/lib/webgen/tag/sitemap.rb +2 -0
- data/lib/webgen/tag/tikz.rb +3 -1
- data/lib/webgen/tree.rb +5 -0
- data/lib/webgen/version.rb +3 -1
- data/lib/webgen/webgentask.rb +2 -0
- data/lib/webgen/website.rb +104 -3
- data/lib/webgen/websiteaccess.rb +2 -0
- data/lib/webgen/websitemanager.rb +2 -0
- data/man/man1/webgen.1 +6 -0
- data/misc/default.css +36 -12
- data/misc/default.template +1 -1
- data/misc/images/error.png +0 -0
- data/misc/images/important.png +0 -0
- data/misc/images/information.png +0 -0
- data/misc/images/warning.png +0 -0
- data/test/helper.rb +4 -0
- data/test/test_blackboard.rb +2 -0
- data/test/test_cache.rb +2 -0
- data/test/test_cli.rb +7 -0
- data/test/test_common.rb +18 -0
- data/test/test_common_sitemap.rb +7 -5
- data/test/test_configuration.rb +2 -0
- data/test/test_contentprocessor.rb +2 -0
- data/test/test_contentprocessor_blocks.rb +22 -1
- data/test/test_contentprocessor_builder.rb +2 -0
- data/test/test_contentprocessor_context.rb +2 -0
- data/test/test_contentprocessor_erb.rb +2 -0
- data/test/test_contentprocessor_erubis.rb +2 -0
- data/test/test_contentprocessor_fragments.rb +2 -0
- data/test/test_contentprocessor_haml.rb +2 -0
- data/test/test_contentprocessor_maruku.rb +2 -0
- data/test/test_contentprocessor_rdiscount.rb +2 -0
- data/test/test_contentprocessor_rdoc.rb +2 -0
- data/test/test_contentprocessor_redcloth.rb +2 -0
- data/test/test_contentprocessor_sass.rb +2 -0
- data/test/test_contentprocessor_tags.rb +2 -0
- data/test/test_languages.rb +2 -0
- data/test/test_loggable.rb +2 -0
- data/test/test_logger.rb +2 -0
- data/test/test_node.rb +2 -0
- data/test/test_output_filesystem.rb +2 -0
- data/test/test_page.rb +2 -0
- data/test/test_path.rb +2 -0
- data/test/test_source_filesystem.rb +17 -0
- data/test/test_source_resource.rb +2 -0
- data/test/test_source_stacked.rb +2 -0
- data/test/test_sourcehandler_base.rb +2 -0
- data/test/test_sourcehandler_copy.rb +2 -0
- data/test/test_sourcehandler_directory.rb +2 -0
- data/test/test_sourcehandler_feed.rb +2 -0
- data/test/test_sourcehandler_fragment.rb +2 -0
- data/test/test_sourcehandler_memory.rb +2 -0
- data/test/test_sourcehandler_metainfo.rb +2 -0
- data/test/test_sourcehandler_page.rb +2 -0
- data/test/test_sourcehandler_sitemap.rb +2 -0
- data/test/test_sourcehandler_template.rb +2 -0
- data/test/test_sourcehandler_virtual.rb +2 -0
- data/test/test_tag_base.rb +4 -0
- data/test/test_tag_breadcrumbtrail.rb +2 -0
- data/test/test_tag_coderay.rb +2 -0
- data/test/test_tag_date.rb +2 -0
- data/test/test_tag_executecommand.rb +2 -0
- data/test/test_tag_includefile.rb +2 -0
- data/test/test_tag_langbar.rb +13 -6
- data/test/test_tag_link.rb +2 -0
- data/test/test_tag_menu.rb +2 -0
- data/test/test_tag_metainfo.rb +2 -0
- data/test/test_tag_relocatable.rb +2 -0
- data/test/test_tag_sitemap.rb +4 -1
- data/test/test_tag_tikz.rb +4 -1
- data/test/test_tree.rb +2 -0
- data/test/test_webgentask.rb +2 -0
- data/test/test_website.rb +6 -4
- data/test/test_websiteaccess.rb +2 -0
- data/test/test_websitemanager.rb +2 -0
- metadata +8 -6
- data/misc/images/error.gif +0 -0
- data/misc/images/exclamation.gif +0 -0
- data/misc/images/information.gif +0 -0
data/test/test_source_stacked.rb
CHANGED
data/test/test_tag_base.rb
CHANGED
data/test/test_tag_coderay.rb
CHANGED
data/test/test_tag_date.rb
CHANGED
data/test/test_tag_langbar.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
1
3
|
require 'test/unit'
|
2
4
|
require 'helper'
|
3
5
|
require 'webgen/tag'
|
@@ -31,12 +33,17 @@ class TestTagLangbar < Test::Unit::TestCase
|
|
31
33
|
check_results(nodes[:file_en], link, '', '', '')
|
32
34
|
|
33
35
|
@obj.set_params('tag.langbar.show_single_lang' => true, 'tag.langbar.show_own_lang' => true, 'tag.langbar.separator' => ' --- ')
|
34
|
-
assert_equal("#{de_link} --- #{en_link}",
|
36
|
+
assert_equal(["#{de_link} --- #{en_link}", false],
|
35
37
|
@obj.call('langbar', '', Webgen::ContentProcessor::Context.new(:chain => [nodes[:index_en]])))
|
36
38
|
|
37
39
|
@obj.set_params('tag.langbar.show_single_lang' => true, 'tag.langbar.show_own_lang' => true,
|
38
40
|
'tag.langbar.lang_names' => {'de' => 'Deutsch'})
|
39
|
-
assert_equal("<a href=\"index.de.html\">Deutsch</a> | #{en_link}",
|
41
|
+
assert_equal(["<a href=\"index.de.html\">Deutsch</a> | #{en_link}", false],
|
42
|
+
@obj.call('langbar', '', Webgen::ContentProcessor::Context.new(:chain => [nodes[:index_en]])))
|
43
|
+
|
44
|
+
@obj.set_params('tag.langbar.show_single_lang' => true, 'tag.langbar.show_own_lang' => true,
|
45
|
+
'tag.langbar.process_output' => true)
|
46
|
+
assert_equal(["#{de_link} | #{en_link}", true],
|
40
47
|
@obj.call('langbar', '', Webgen::ContentProcessor::Context.new(:chain => [nodes[:index_en]])))
|
41
48
|
|
42
49
|
nodes[:index_en].unflag(:dirty)
|
@@ -50,16 +57,16 @@ class TestTagLangbar < Test::Unit::TestCase
|
|
50
57
|
def check_results(node, both_true, both_false, first_false, second_false)
|
51
58
|
context = Webgen::ContentProcessor::Context.new(:chain => [node])
|
52
59
|
@obj.set_params('tag.langbar.show_single_lang'=>true, 'tag.langbar.show_own_lang'=>true)
|
53
|
-
assert_equal(both_true, @obj.call('langbar', '', context))
|
60
|
+
assert_equal(both_true, @obj.call('langbar', '', context).first)
|
54
61
|
|
55
62
|
@obj.set_params('tag.langbar.show_single_lang'=>false, 'tag.langbar.show_own_lang'=>false)
|
56
|
-
assert_equal(both_false, @obj.call('langbar', '', context))
|
63
|
+
assert_equal(both_false, @obj.call('langbar', '', context).first)
|
57
64
|
|
58
65
|
@obj.set_params('tag.langbar.show_single_lang'=>false, 'tag.langbar.show_own_lang'=>true)
|
59
|
-
assert_equal(first_false, @obj.call('langbar', '', context))
|
66
|
+
assert_equal(first_false, @obj.call('langbar', '', context).first)
|
60
67
|
|
61
68
|
@obj.set_params('tag.langbar.show_single_lang'=>true, 'tag.langbar.show_own_lang'=>false)
|
62
|
-
assert_equal(second_false, @obj.call('langbar', '', context))
|
69
|
+
assert_equal(second_false, @obj.call('langbar', '', context).first)
|
63
70
|
end
|
64
71
|
|
65
72
|
end
|
data/test/test_tag_link.rb
CHANGED
data/test/test_tag_menu.rb
CHANGED
data/test/test_tag_metainfo.rb
CHANGED
data/test/test_tag_sitemap.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
1
3
|
require 'test/unit'
|
2
4
|
require 'helper'
|
3
5
|
require 'webgen/tree'
|
@@ -31,7 +33,8 @@ class TestTagSitemap < Test::Unit::TestCase
|
|
31
33
|
"<ul><li><a href=\"#f1\"></a></li></ul></li></ul></li>" +
|
32
34
|
"<li><a href=\"../dir2/\"></a>" +
|
33
35
|
"<ul><li><a href=\"../dir2/file21.en.html\"></a></li></ul></li>"+
|
34
|
-
"<li><a href=\"../index.en.html\"></a></li
|
36
|
+
"<li><a href=\"../index.en.html\"></a></li>" +
|
37
|
+
"<li><a href=\"../dir3/index.en.html\"></a></li></ul>",
|
35
38
|
call(context, false, false, []))
|
36
39
|
assert_equal("",
|
37
40
|
call(context, false, false, ['noone']))
|
data/test/test_tag_tikz.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
1
3
|
require 'test/unit'
|
2
4
|
require 'helper'
|
3
5
|
require 'webgen/tag'
|
@@ -24,7 +26,8 @@ class TestTagTikZ < Test::Unit::TestCase
|
|
24
26
|
|
25
27
|
def test_call
|
26
28
|
root = Webgen::Node.new(Webgen::Tree.new.dummy_root, '/', '/')
|
27
|
-
|
29
|
+
node = Webgen::Node.new(root, '/file.html', 'file.page')
|
30
|
+
context = Webgen::ContentProcessor::Context.new(:chain => [node])
|
28
31
|
|
29
32
|
output = call(context, '\tikz \draw (0,0) -- (0,1);', 'test.png', [], '', '72 72', false, {})
|
30
33
|
assert_equal('<img src="test.png" />', output)
|
data/test/test_tree.rb
CHANGED
data/test/test_webgentask.rb
CHANGED
data/test/test_website.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
1
3
|
require 'test/unit'
|
2
4
|
require 'webgen/website'
|
3
5
|
require 'tmpdir'
|
@@ -38,12 +40,12 @@ class TestWebsite < Test::Unit::TestCase
|
|
38
40
|
assert_not_nil(ws.tree)
|
39
41
|
end
|
40
42
|
|
41
|
-
def
|
43
|
+
def test_render_of_non_webgen_website
|
42
44
|
ws = Webgen::Website.new(File.dirname(__FILE__), nil) do |config|
|
43
45
|
config['website.cache'] = [:string, '']
|
44
46
|
end
|
45
|
-
ws.render
|
46
|
-
assert(ws.config['website.cache'][1].length
|
47
|
+
assert_nil(ws.render)
|
48
|
+
assert(ws.config['website.cache'][1].length == 0)
|
47
49
|
end
|
48
50
|
|
49
51
|
def test_execute_in_env
|
@@ -84,7 +86,7 @@ class TestWebsite < Test::Unit::TestCase
|
|
84
86
|
FileUtils.touch(File.join(dir, 'src', 'test.jpg'))
|
85
87
|
|
86
88
|
ws = Webgen::Website.new(dir, nil)
|
87
|
-
ws.render
|
89
|
+
assert_equal(:success, ws.render)
|
88
90
|
assert(File.exists?(File.join(dir, 'out', 'test.jpg')))
|
89
91
|
ws.clean
|
90
92
|
assert(!File.exists?(File.join(dir, 'out', 'test.jpg')))
|
data/test/test_websiteaccess.rb
CHANGED
data/test/test_websitemanager.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webgen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Leitner
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2009-02-27 00:00:00 +01:00
|
13
13
|
default_executable: webgen
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -483,14 +483,16 @@ files:
|
|
483
483
|
- misc/htmldoc.virtual
|
484
484
|
- misc/images
|
485
485
|
- misc/images/arrow.gif
|
486
|
-
- misc/images/error.
|
487
|
-
- misc/images/exclamation.gif
|
486
|
+
- misc/images/error.png
|
488
487
|
- misc/images/headerbg.jpg
|
489
|
-
- misc/images/
|
488
|
+
- misc/images/important.png
|
489
|
+
- misc/images/information.png
|
490
490
|
- misc/images/quote.gif
|
491
|
+
- misc/images/warning.png
|
491
492
|
- test/test_blackboard.rb
|
492
493
|
- test/test_cache.rb
|
493
494
|
- test/test_cli.rb
|
495
|
+
- test/test_common.rb
|
494
496
|
- test/test_common_sitemap.rb
|
495
497
|
- test/test_configuration.rb
|
496
498
|
- test/test_contentprocessor.rb
|
@@ -582,7 +584,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
582
584
|
requirements: []
|
583
585
|
|
584
586
|
rubyforge_project: webgen
|
585
|
-
rubygems_version: 1.3.
|
587
|
+
rubygems_version: 1.3.1
|
586
588
|
signing_key:
|
587
589
|
specification_version: 2
|
588
590
|
summary: webgen is a fast, powerful, and extensible static website generator.
|
data/misc/images/error.gif
DELETED
Binary file
|
data/misc/images/exclamation.gif
DELETED
Binary file
|
data/misc/images/information.gif
DELETED
Binary file
|