gettalong-webgen 0.5.6.20081020 → 0.5.7.20090227

Sign up to get free protection for your applications and to get access to all the features.
Files changed (165) hide show
  1. data/AUTHORS +3 -0
  2. data/THANKS +1 -0
  3. data/bin/webgen +2 -0
  4. data/data/webgen/webgui/controller/main.rb +2 -0
  5. data/data/webgen/website_skeleton/ext/init.rb +4 -0
  6. data/doc/contentprocessor/blocks.page +44 -14
  7. data/doc/contentprocessor/builder.page +1 -1
  8. data/doc/contentprocessor/erb.page +1 -1
  9. data/doc/contentprocessor/erubis.page +1 -1
  10. data/doc/contentprocessor/fragments.page +1 -1
  11. data/doc/contentprocessor/haml.page +1 -1
  12. data/doc/contentprocessor/rdiscount.page +1 -1
  13. data/doc/contentprocessor/rdoc.page +1 -1
  14. data/doc/contentprocessor/redcloth.page +1 -1
  15. data/doc/contentprocessor/sass.page +1 -1
  16. data/doc/faq.page +7 -2
  17. data/doc/manual.page +6 -5
  18. data/doc/reference_metainfo.page +1 -1
  19. data/doc/sourcehandler/feed.page +9 -1
  20. data/doc/sourcehandler/sitemap.page +1 -1
  21. data/doc/tag/coderay.page +1 -1
  22. data/doc/tag/langbar.page +15 -0
  23. data/doc/tag/menu.page +1 -1
  24. data/doc/tag/relocatable.page +2 -2
  25. data/lib/webgen/blackboard.rb +9 -4
  26. data/lib/webgen/cache.rb +2 -0
  27. data/lib/webgen/cli.rb +6 -1
  28. data/lib/webgen/cli/create_command.rb +2 -0
  29. data/lib/webgen/cli/run_command.rb +2 -0
  30. data/lib/webgen/cli/utils.rb +2 -0
  31. data/lib/webgen/cli/webgui_command.rb +2 -0
  32. data/lib/webgen/common.rb +12 -1
  33. data/lib/webgen/common/sitemap.rb +12 -4
  34. data/lib/webgen/configuration.rb +2 -0
  35. data/lib/webgen/contentprocessor.rb +2 -0
  36. data/lib/webgen/contentprocessor/blocks.rb +22 -8
  37. data/lib/webgen/contentprocessor/builder.rb +2 -0
  38. data/lib/webgen/contentprocessor/context.rb +2 -0
  39. data/lib/webgen/contentprocessor/erb.rb +2 -0
  40. data/lib/webgen/contentprocessor/erubis.rb +2 -0
  41. data/lib/webgen/contentprocessor/fragments.rb +2 -0
  42. data/lib/webgen/contentprocessor/haml.rb +2 -0
  43. data/lib/webgen/contentprocessor/maruku.rb +2 -0
  44. data/lib/webgen/contentprocessor/rdiscount.rb +2 -0
  45. data/lib/webgen/contentprocessor/rdoc.rb +2 -0
  46. data/lib/webgen/contentprocessor/redcloth.rb +2 -0
  47. data/lib/webgen/contentprocessor/sass.rb +2 -0
  48. data/lib/webgen/contentprocessor/tags.rb +2 -0
  49. data/lib/webgen/coreext.rb +2 -0
  50. data/lib/webgen/default_config.rb +4 -1
  51. data/lib/webgen/languages.rb +2 -0
  52. data/lib/webgen/loggable.rb +2 -0
  53. data/lib/webgen/logger.rb +2 -0
  54. data/lib/webgen/node.rb +22 -8
  55. data/lib/webgen/output.rb +3 -1
  56. data/lib/webgen/output/filesystem.rb +2 -0
  57. data/lib/webgen/page.rb +2 -0
  58. data/lib/webgen/path.rb +3 -1
  59. data/lib/webgen/source.rb +2 -0
  60. data/lib/webgen/source/filesystem.rb +5 -2
  61. data/lib/webgen/source/resource.rb +2 -0
  62. data/lib/webgen/source/stacked.rb +2 -0
  63. data/lib/webgen/sourcehandler.rb +8 -0
  64. data/lib/webgen/sourcehandler/base.rb +2 -0
  65. data/lib/webgen/sourcehandler/copy.rb +2 -0
  66. data/lib/webgen/sourcehandler/directory.rb +2 -0
  67. data/lib/webgen/sourcehandler/feed.rb +3 -1
  68. data/lib/webgen/sourcehandler/fragment.rb +2 -0
  69. data/lib/webgen/sourcehandler/memory.rb +2 -0
  70. data/lib/webgen/sourcehandler/metainfo.rb +3 -1
  71. data/lib/webgen/sourcehandler/page.rb +2 -0
  72. data/lib/webgen/sourcehandler/sitemap.rb +2 -0
  73. data/lib/webgen/sourcehandler/template.rb +2 -0
  74. data/lib/webgen/sourcehandler/virtual.rb +3 -1
  75. data/lib/webgen/tag.rb +2 -0
  76. data/lib/webgen/tag/base.rb +2 -0
  77. data/lib/webgen/tag/breadcrumbtrail.rb +2 -0
  78. data/lib/webgen/tag/coderay.rb +2 -0
  79. data/lib/webgen/tag/date.rb +2 -0
  80. data/lib/webgen/tag/executecommand.rb +2 -0
  81. data/lib/webgen/tag/includefile.rb +2 -0
  82. data/lib/webgen/tag/langbar.rb +4 -1
  83. data/lib/webgen/tag/link.rb +2 -0
  84. data/lib/webgen/tag/menu.rb +2 -0
  85. data/lib/webgen/tag/metainfo.rb +2 -0
  86. data/lib/webgen/tag/relocatable.rb +2 -0
  87. data/lib/webgen/tag/sitemap.rb +2 -0
  88. data/lib/webgen/tag/tikz.rb +3 -1
  89. data/lib/webgen/tree.rb +5 -0
  90. data/lib/webgen/version.rb +3 -1
  91. data/lib/webgen/webgentask.rb +2 -0
  92. data/lib/webgen/website.rb +104 -3
  93. data/lib/webgen/websiteaccess.rb +2 -0
  94. data/lib/webgen/websitemanager.rb +2 -0
  95. data/man/man1/webgen.1 +6 -0
  96. data/misc/default.css +36 -12
  97. data/misc/default.template +1 -1
  98. data/misc/images/error.png +0 -0
  99. data/misc/images/important.png +0 -0
  100. data/misc/images/information.png +0 -0
  101. data/misc/images/warning.png +0 -0
  102. data/test/helper.rb +4 -0
  103. data/test/test_blackboard.rb +2 -0
  104. data/test/test_cache.rb +2 -0
  105. data/test/test_cli.rb +7 -0
  106. data/test/test_common.rb +18 -0
  107. data/test/test_common_sitemap.rb +7 -5
  108. data/test/test_configuration.rb +2 -0
  109. data/test/test_contentprocessor.rb +2 -0
  110. data/test/test_contentprocessor_blocks.rb +22 -1
  111. data/test/test_contentprocessor_builder.rb +2 -0
  112. data/test/test_contentprocessor_context.rb +2 -0
  113. data/test/test_contentprocessor_erb.rb +2 -0
  114. data/test/test_contentprocessor_erubis.rb +2 -0
  115. data/test/test_contentprocessor_fragments.rb +2 -0
  116. data/test/test_contentprocessor_haml.rb +2 -0
  117. data/test/test_contentprocessor_maruku.rb +2 -0
  118. data/test/test_contentprocessor_rdiscount.rb +2 -0
  119. data/test/test_contentprocessor_rdoc.rb +2 -0
  120. data/test/test_contentprocessor_redcloth.rb +2 -0
  121. data/test/test_contentprocessor_sass.rb +2 -0
  122. data/test/test_contentprocessor_tags.rb +2 -0
  123. data/test/test_languages.rb +2 -0
  124. data/test/test_loggable.rb +2 -0
  125. data/test/test_logger.rb +2 -0
  126. data/test/test_node.rb +2 -0
  127. data/test/test_output_filesystem.rb +2 -0
  128. data/test/test_page.rb +2 -0
  129. data/test/test_path.rb +2 -0
  130. data/test/test_source_filesystem.rb +17 -0
  131. data/test/test_source_resource.rb +2 -0
  132. data/test/test_source_stacked.rb +2 -0
  133. data/test/test_sourcehandler_base.rb +2 -0
  134. data/test/test_sourcehandler_copy.rb +2 -0
  135. data/test/test_sourcehandler_directory.rb +2 -0
  136. data/test/test_sourcehandler_feed.rb +2 -0
  137. data/test/test_sourcehandler_fragment.rb +2 -0
  138. data/test/test_sourcehandler_memory.rb +2 -0
  139. data/test/test_sourcehandler_metainfo.rb +2 -0
  140. data/test/test_sourcehandler_page.rb +2 -0
  141. data/test/test_sourcehandler_sitemap.rb +2 -0
  142. data/test/test_sourcehandler_template.rb +2 -0
  143. data/test/test_sourcehandler_virtual.rb +2 -0
  144. data/test/test_tag_base.rb +4 -0
  145. data/test/test_tag_breadcrumbtrail.rb +2 -0
  146. data/test/test_tag_coderay.rb +2 -0
  147. data/test/test_tag_date.rb +2 -0
  148. data/test/test_tag_executecommand.rb +2 -0
  149. data/test/test_tag_includefile.rb +2 -0
  150. data/test/test_tag_langbar.rb +13 -6
  151. data/test/test_tag_link.rb +2 -0
  152. data/test/test_tag_menu.rb +2 -0
  153. data/test/test_tag_metainfo.rb +2 -0
  154. data/test/test_tag_relocatable.rb +2 -0
  155. data/test/test_tag_sitemap.rb +4 -1
  156. data/test/test_tag_tikz.rb +4 -1
  157. data/test/test_tree.rb +2 -0
  158. data/test/test_webgentask.rb +2 -0
  159. data/test/test_website.rb +6 -4
  160. data/test/test_websiteaccess.rb +2 -0
  161. data/test/test_websitemanager.rb +2 -0
  162. metadata +8 -5
  163. data/misc/images/error.gif +0 -0
  164. data/misc/images/exclamation.gif +0 -0
  165. data/misc/images/information.gif +0 -0
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'helper'
3
5
  require 'webgen/source'
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'helper'
3
5
  require 'webgen/source'
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'helper'
3
5
  require 'webgen/tree'
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'helper'
3
5
  require 'webgen/sourcehandler'
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'helper'
3
5
  require 'webgen/sourcehandler'
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'helper'
3
5
  require 'webgen/sourcehandler'
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'helper'
3
5
  require 'webgen/sourcehandler'
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'helper'
3
5
  require 'webgen/sourcehandler'
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'helper'
3
5
  require 'webgen/sourcehandler'
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'helper'
3
5
  require 'webgen/sourcehandler'
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'helper'
3
5
  require 'webgen/sourcehandler'
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'helper'
3
5
  require 'webgen/tree'
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'helper'
3
5
  require 'webgen/sourcehandler'
@@ -1,3 +1,7 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ # -*- encoding: utf-8 -*-
4
+
1
5
  require 'test/unit'
2
6
  require 'helper'
3
7
  require 'stringio'
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'helper'
3
5
  require 'webgen/tree'
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'helper'
3
5
  require 'webgen/tag'
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'helper'
3
5
  require 'webgen/contentprocessor'
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'helper'
3
5
  require 'webgen/tag'
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'helper'
3
5
  require 'fileutils'
@@ -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
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'helper'
3
5
  require 'webgen/tree'
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'helper'
3
5
  require 'webgen/tree'
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'webgen/tree'
3
5
  require 'webgen/contentprocessor'
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'helper'
3
5
  require 'webgen/tree'
@@ -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></ul>",
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']))
@@ -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
- context = Webgen::ContentProcessor::Context.new(:chain => [root])
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
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'helper'
3
5
  require 'webgen/tree'
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'webgen/webgentask'
3
5
 
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 test_render
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 > 0)
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')))
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'test/unit'
2
4
  require 'webgen/websiteaccess'
3
5
 
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'fileutils'
2
4
  require 'tmpdir'
3
5
  require 'helper'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gettalong-webgen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6.20081020
4
+ version: 0.5.7.20090227
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: 2008-10-19 15:00:00 -07:00
12
+ date: 2009-02-26 15:00:00 -08:00
13
13
  default_executable: webgen
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -447,6 +447,7 @@ files:
447
447
  - lib/webgen/sourcehandler/directory.rb
448
448
  - lib/webgen/sourcehandler/feed.rb
449
449
  - lib/webgen/sourcehandler/fragment.rb
450
+ - lib/webgen/sourcehandler/gallery.rb
450
451
  - lib/webgen/sourcehandler/memory.rb
451
452
  - lib/webgen/sourcehandler/metainfo.rb
452
453
  - lib/webgen/sourcehandler/page.rb
@@ -481,14 +482,16 @@ files:
481
482
  - misc/htmldoc.virtual
482
483
  - misc/images
483
484
  - misc/images/arrow.gif
484
- - misc/images/error.gif
485
- - misc/images/exclamation.gif
485
+ - misc/images/error.png
486
486
  - misc/images/headerbg.jpg
487
- - misc/images/information.gif
487
+ - misc/images/important.png
488
+ - misc/images/information.png
488
489
  - misc/images/quote.gif
490
+ - misc/images/warning.png
489
491
  - test/test_blackboard.rb
490
492
  - test/test_cache.rb
491
493
  - test/test_cli.rb
494
+ - test/test_common.rb
492
495
  - test/test_common_sitemap.rb
493
496
  - test/test_configuration.rb
494
497
  - test/test_contentprocessor.rb
Binary file
Binary file
Binary file