gettalong-webgen 0.5.5.20081001 → 0.5.5.20081010

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. data/doc/extensions.page +1 -1
  2. data/doc/reference_configuration.page +85 -0
  3. data/doc/tag/tikz.page +158 -0
  4. data/lib/webgen/common/sitemap.rb +2 -3
  5. data/lib/webgen/contentprocessor/blocks.rb +0 -2
  6. data/lib/webgen/contentprocessor/context.rb +0 -3
  7. data/lib/webgen/contentprocessor/erubis.rb +0 -2
  8. data/lib/webgen/default_config.rb +8 -1
  9. data/lib/webgen/node.rb +49 -24
  10. data/lib/webgen/page.rb +25 -15
  11. data/lib/webgen/path.rb +20 -10
  12. data/lib/webgen/sourcehandler/base.rb +36 -14
  13. data/lib/webgen/sourcehandler/copy.rb +2 -2
  14. data/lib/webgen/sourcehandler/directory.rb +16 -13
  15. data/lib/webgen/sourcehandler/feed.rb +3 -6
  16. data/lib/webgen/sourcehandler/fragment.rb +6 -11
  17. data/lib/webgen/sourcehandler/memory.rb +41 -0
  18. data/lib/webgen/sourcehandler/metainfo.rb +21 -21
  19. data/lib/webgen/sourcehandler/page.rb +8 -12
  20. data/lib/webgen/sourcehandler/sitemap.rb +0 -2
  21. data/lib/webgen/sourcehandler/template.rb +0 -4
  22. data/lib/webgen/sourcehandler/virtual.rb +18 -18
  23. data/lib/webgen/sourcehandler.rb +83 -70
  24. data/lib/webgen/tag/breadcrumbtrail.rb +1 -4
  25. data/lib/webgen/tag/coderay.rb +0 -3
  26. data/lib/webgen/tag/date.rb +0 -2
  27. data/lib/webgen/tag/executecommand.rb +1 -2
  28. data/lib/webgen/tag/includefile.rb +1 -3
  29. data/lib/webgen/tag/langbar.rb +1 -4
  30. data/lib/webgen/tag/menu.rb +1 -4
  31. data/lib/webgen/tag/metainfo.rb +0 -2
  32. data/lib/webgen/tag/relocatable.rb +2 -3
  33. data/lib/webgen/tag/sitemap.rb +0 -3
  34. data/lib/webgen/tag/tikz.rb +117 -0
  35. data/lib/webgen/tag.rb +1 -0
  36. data/lib/webgen/tree.rb +9 -5
  37. data/test/test_common_sitemap.rb +4 -4
  38. data/test/test_contentprocessor_context.rb +1 -1
  39. data/test/test_contentprocessor_redcloth.rb +1 -0
  40. data/test/test_contentprocessor_tags.rb +1 -1
  41. data/test/test_node.rb +33 -13
  42. data/test/test_output_filesystem.rb +1 -1
  43. data/test/test_page.rb +13 -4
  44. data/test/test_path.rb +37 -5
  45. data/test/test_source_filesystem.rb +1 -1
  46. data/test/test_source_stacked.rb +1 -1
  47. data/test/test_sourcehandler_base.rb +30 -1
  48. data/test/test_sourcehandler_copy.rb +1 -1
  49. data/test/test_sourcehandler_directory.rb +16 -1
  50. data/test/test_sourcehandler_feed.rb +6 -7
  51. data/test/test_sourcehandler_fragment.rb +1 -1
  52. data/test/test_sourcehandler_memory.rb +42 -0
  53. data/test/test_sourcehandler_metainfo.rb +23 -21
  54. data/test/test_sourcehandler_page.rb +5 -7
  55. data/test/test_sourcehandler_template.rb +1 -1
  56. data/test/test_sourcehandler_virtual.rb +2 -2
  57. data/test/test_tag_base.rb +0 -1
  58. data/test/test_tag_breadcrumbtrail.rb +4 -4
  59. data/test/test_tag_includefile.rb +3 -3
  60. data/test/test_tag_langbar.rb +5 -6
  61. data/test/test_tag_menu.rb +7 -7
  62. data/test/test_tag_metainfo.rb +1 -1
  63. data/test/test_tag_relocatable.rb +1 -1
  64. data/test/test_tag_tikz.rb +66 -0
  65. data/test/test_tree.rb +2 -7
  66. metadata +7 -2
@@ -1,6 +1,6 @@
1
1
  require 'test/unit'
2
2
  require 'helper'
3
- require 'webgen/sourcehandler/feed'
3
+ require 'webgen/sourcehandler'
4
4
  require 'stringio'
5
5
 
6
6
  class TestSourceHandlerFeed < Test::Unit::TestCase
@@ -36,7 +36,7 @@ EOF
36
36
  assert_equal('atom', atom_node.node_info[:feed_type])
37
37
  assert_equal('rss', rss_node.node_info[:feed_type])
38
38
 
39
- assert_equal([nil, nil], @obj.create_node(@nodes[:root], @path))
39
+ assert_equal([atom_node, rss_node], @obj.create_node(@nodes[:root], @path))
40
40
  end
41
41
 
42
42
  def test_content
@@ -58,15 +58,14 @@ EOF
58
58
  atom_node.content # populate cache
59
59
  @website.cache.old_data.update(@website.cache.new_data)
60
60
 
61
- atom_node.dirty = false
61
+ atom_node.unflag(:dirty)
62
62
  assert(atom_node.changed?)
63
63
 
64
- atom_node.dirty = false
65
- @nodes[:file1_en].dirty = false
66
- @nodes[:index_en].dirty = false
64
+ atom_node.unflag(:dirty)
65
+ @nodes[:file1_en].unflag(:dirty)
66
+ @nodes[:index_en].unflag(:dirty)
67
67
  assert(!atom_node.changed?)
68
68
 
69
- atom_node.dirty = false
70
69
  atom_node['entries'] = 'file.*.html'
71
70
  assert(atom_node.changed?)
72
71
  end
@@ -1,6 +1,6 @@
1
1
  require 'test/unit'
2
2
  require 'helper'
3
- require 'webgen/sourcehandler/fragment'
3
+ require 'webgen/sourcehandler'
4
4
  require 'stringio'
5
5
 
6
6
  class TestSourceHandlerFragment < Test::Unit::TestCase
@@ -0,0 +1,42 @@
1
+ require 'test/unit'
2
+ require 'helper'
3
+ require 'webgen/sourcehandler'
4
+ require 'stringio'
5
+
6
+ class TestSourceHandlerMemory < Test::Unit::TestCase
7
+
8
+ include Test::WebsiteHelper
9
+
10
+ def test_all
11
+ obj = Webgen::SourceHandler::Memory.new
12
+ root = Webgen::Node.new(Webgen::Tree.new.dummy_root, '/', '/')
13
+ shm = Webgen::SourceHandler::Main.new # for using service :create_nodes
14
+ root.unflag(:dirty)
15
+ root.unflag(:created)
16
+
17
+ node = obj.create_node(root, path_with_meta_info('/test.png'), '/', 'data')
18
+ assert_equal('/', node.node_info[:memory_source_alcn])
19
+ assert_equal('data', obj.content(node))
20
+ assert(!node.flagged(:reinit))
21
+ root.tree.delete_node(node)
22
+
23
+ node = obj.create_node(root, path_with_meta_info('/test.png'), '/') {|n| assert_equal(node, n); 'data'}
24
+ assert_equal('/', node.node_info[:memory_source_alcn])
25
+ assert_equal('data', obj.content(node))
26
+ assert(!node.flagged(:reinit))
27
+
28
+ assert(!root.flagged(:dirty))
29
+ node.flag(:reinit)
30
+ assert(root.flagged(:dirty))
31
+ root.unflag(:dirty)
32
+ root.tree.delete_node(node)
33
+
34
+ node = obj.create_node(root, path_with_meta_info('/test.png'), '/', 'data')
35
+ assert_equal('/', node.node_info[:memory_source_alcn])
36
+ obj.instance_eval { @data = nil }
37
+ assert_nil(obj.content(node))
38
+ assert(node.flagged(:reinit))
39
+ assert(root.flagged(:dirty))
40
+ end
41
+
42
+ end
@@ -1,6 +1,6 @@
1
1
  require 'test/unit'
2
2
  require 'helper'
3
- require 'webgen/sourcehandler/metainfo'
3
+ require 'webgen/sourcehandler'
4
4
  require 'stringio'
5
5
 
6
6
  class TestSourceHandlerMetainfo < Test::Unit::TestCase
@@ -30,22 +30,32 @@ EOF
30
30
  end
31
31
 
32
32
  def test_create_node
33
+ assert(@node.flagged(:dirty_meta_info))
33
34
  assert_equal({'/**/*' => {'title' => 'new title', 'before' => 'valbef'}}, @node.node_info[:mi_paths])
34
35
  assert_equal({'/**/*' => {'after' => 'valaft'}}, @node.node_info[:mi_alcn])
35
36
  end
36
37
 
37
38
  def test_meta_info_changed
38
39
  other = TestSH.new.create_node(@root, path_with_meta_info('/default.css'))
39
- assert(@obj.send(:meta_info_changed?, @node, other))
40
- @website.cache.old_data.update(@website.cache.new_data)
41
40
  assert(!@obj.send(:meta_info_changed?, @node, other))
41
+ assert(@obj.send(:meta_info_changed?, @node, other, :force))
42
+ assert(!@obj.send(:meta_info_changed?, @node, other, :no_old_data))
42
43
  end
43
44
 
44
45
  def test_mark_all_matched_dirty
45
46
  other = TestSH.new.create_node(@root, path_with_meta_info('/default.css'))
46
- other.dirty_meta_info = false
47
+
48
+ other.unflag(:dirty_meta_info)
47
49
  @obj.send(:mark_all_matched_dirty, @node)
48
- assert(other.dirty_meta_info)
50
+ assert(!other.flagged(:dirty_meta_info))
51
+
52
+ other.unflag(:dirty_meta_info)
53
+ @obj.send(:mark_all_matched_dirty, @node, :force)
54
+ assert(other.flagged(:dirty_meta_info))
55
+
56
+ other.unflag(:dirty_meta_info)
57
+ @obj.send(:mark_all_matched_dirty, @node, :no_old_data)
58
+ assert(!other.flagged(:dirty_meta_info))
49
59
  end
50
60
 
51
61
  def test_before_node_created
@@ -62,28 +72,20 @@ EOF
62
72
 
63
73
  def test_before_node_deleted
64
74
  other = TestSH.new.create_node(@root, path_with_meta_info('/default.css'))
65
- other.dirty_meta_info = false
66
-
67
- @website.blackboard.del_service(:source_paths)
68
- @website.blackboard.add_service(:source_paths) { {'/metainfo' => ''} }
69
75
  @website.blackboard.dispatch_msg(:before_node_deleted, @node)
70
- assert(!other.dirty_meta_info)
71
-
72
- @website.blackboard.del_service(:source_paths)
73
- @website.blackboard.add_service(:source_paths) { {} }
74
- @website.blackboard.dispatch_msg(:before_node_deleted, @node)
75
- assert(other.dirty_meta_info)
76
+ assert(other.flagged(:dirty_meta_info))
77
+ assert(@obj.nodes.empty?)
76
78
  end
77
79
 
78
80
  def test_node_meta_info_changed
79
- @node.dirty_meta_info = false
81
+ @node.unflag(:dirty_meta_info)
80
82
  @website.blackboard.dispatch_msg(:node_meta_info_changed?, @node)
81
- assert(!@node.dirty_meta_info)
83
+ assert(!@node.flagged(:dirty_meta_info))
82
84
 
83
- other = TestSH.new.create_node(@root, path_with_meta_info('/default.css'))
84
- other.dirty_meta_info = false
85
- @website.blackboard.dispatch_msg(:node_meta_info_changed?, other)
86
- assert(other.dirty_meta_info)
85
+ @node.node_info[:mi_alcn] = @node.node_info[:mi_alcn].dup
86
+ @node.node_info[:mi_alcn]['/*metainfo'] = {'other' => 'doit'}
87
+ @website.blackboard.dispatch_msg(:node_meta_info_changed?, @node)
88
+ assert(@node.flagged(:dirty_meta_info))
87
89
  end
88
90
 
89
91
  def test_content
@@ -1,6 +1,6 @@
1
1
  require 'test/unit'
2
2
  require 'helper'
3
- require 'webgen/sourcehandler/page'
3
+ require 'webgen/sourcehandler'
4
4
  require 'stringio'
5
5
 
6
6
  class TestSourceHandlerPage < Test::Unit::TestCase
@@ -34,7 +34,7 @@ class TestSourceHandlerPage < Test::Unit::TestCase
34
34
  assert_equal(Webgen::LanguageManager.language_for_code('epo'), node.lang)
35
35
  assert_not_nil(@website.cache.permanent[:page_sections]['/test/index.eo.html'])
36
36
 
37
- assert_nil(@obj.create_node(@root, @path.dup))
37
+ assert_equal(node, @obj.create_node(@root, @path.dup))
38
38
 
39
39
  @root.tree.delete_node(node)
40
40
  path = @path.dup
@@ -58,13 +58,11 @@ class TestSourceHandlerPage < Test::Unit::TestCase
58
58
  def test_meta_info_changed
59
59
  node = @obj.create_node(@root, @path)
60
60
  @website.blackboard.dispatch_msg(:node_meta_info_changed?, node)
61
- assert(node.meta_info_changed?)
61
+ assert(!node.meta_info_changed?)
62
62
 
63
- node.dirty_meta_info = false
64
- @website.cache.restore(@website.cache.dump)
65
- @website.cache[[:sh_page_node_mi, node.absolute_lcn]]['modified_at'] = Time.now
63
+ @path.instance_eval { @io = Webgen::Path::SourceIO.new {StringIO.new("---\ntitle: test\n---\ncontent")} }
66
64
  @website.blackboard.dispatch_msg(:node_meta_info_changed?, node)
67
- assert(!node.meta_info_changed?)
65
+ assert(node.meta_info_changed?)
68
66
  end
69
67
 
70
68
  end
@@ -3,7 +3,7 @@ require 'helper'
3
3
  require 'webgen/tree'
4
4
  require 'webgen/node'
5
5
  require 'webgen/path'
6
- require 'webgen/sourcehandler/template'
6
+ require 'webgen/sourcehandler'
7
7
  require 'stringio'
8
8
 
9
9
  class TestSourceHandlerTemplate < Test::Unit::TestCase
@@ -11,11 +11,11 @@ class TestSourceHandlerVirtual < Test::Unit::TestCase
11
11
  \\--- !omap
12
12
  - path.de.html:
13
13
 
14
+ - /dir/file.html:
15
+
14
16
  - /dir/:
15
17
  title: My Dir
16
18
 
17
- - /dir/file.html:
18
-
19
19
  - /directory/path.en.html:
20
20
  url: other.html
21
21
  title: new title
@@ -2,7 +2,6 @@ require 'test/unit'
2
2
  require 'helper'
3
3
  require 'stringio'
4
4
  require 'webgen/tag'
5
- require 'webgen/tag/base'
6
5
 
7
6
  class TestTagBase < Test::Unit::TestCase
8
7
 
@@ -77,13 +77,13 @@ class TestTagBreadcrumbTrail < Test::Unit::TestCase
77
77
  context = Webgen::ContentProcessor::Context.new(:chain => [nodes[:file11_en]])
78
78
  call(context, ' / ', false, 0, -1)
79
79
 
80
- nodes[:file11_en].dirty = false
80
+ nodes[:file11_en].unflag(:dirty)
81
81
  @website.blackboard.dispatch_msg(:node_changed?, nodes[:file11_en])
82
- assert(!nodes[:file11_en].dirty)
82
+ assert(!nodes[:file11_en].flagged(:dirty))
83
83
 
84
- nodes[:index11_en].dirty_meta_info = true
84
+ nodes[:index11_en].flag(:dirty_meta_info)
85
85
  @website.blackboard.dispatch_msg(:node_changed?, nodes[:file11_en])
86
- assert(nodes[:file11_en].dirty)
86
+ assert(nodes[:file11_en].flagged(:dirty))
87
87
  end
88
88
 
89
89
  end
@@ -36,13 +36,13 @@ class TestTagIncludeFile < Test::Unit::TestCase
36
36
  assert_equal([CGI::escapeHTML(content), true], call(context, file.path, true, true))
37
37
  assert_raise(Errno::ENOENT) { call(context, 'invalidfile', true, true) }
38
38
 
39
- root.dirty = false
39
+ root.unflag(:dirty)
40
40
  @website.blackboard.dispatch_msg(:node_changed?, root)
41
- assert(!root.dirty)
41
+ assert(!root.flagged(:dirty))
42
42
 
43
43
  File.utime(Time.now + 1, Time.now + 1, file.path)
44
44
  @website.blackboard.dispatch_msg(:node_changed?, root)
45
- assert(root.dirty)
45
+ assert(root.flagged(:dirty))
46
46
  end
47
47
 
48
48
  end
@@ -14,8 +14,7 @@ class TestTagLangbar < Test::Unit::TestCase
14
14
  def create_default_nodes
15
15
  {
16
16
  :root => root = Webgen::Node.new(Webgen::Tree.new.dummy_root, '/', '/', {'index_path' => 'index.html'}),
17
- :file_en => Webgen::Node.new(root, '/file1.html', 'file1.html',
18
- {'lang' => 'en', 'title' => 'File1'}),
17
+ :file_en => Webgen::Node.new(root, '/file1.html', 'file1.html', {'lang' => 'en', 'title' => 'File1'}),
19
18
  :index_en => Webgen::Node.new(root, '/index.html', 'index.html', {'lang' => 'en'}),
20
19
  :index_de => Webgen::Node.new(root, '/index.de.html', 'index.html', {'lang' => 'de'}),
21
20
  }
@@ -31,15 +30,15 @@ class TestTagLangbar < Test::Unit::TestCase
31
30
  link = '<span>en</span>'
32
31
  check_results(nodes[:file_en], link, '', '', '')
33
32
 
34
- @obj.set_params('tag.langbar.show_single_lang'=>true, 'tag.langbar.show_own_lang'=>true, 'tag.langbar.separator' => ' --- ')
33
+ @obj.set_params('tag.langbar.show_single_lang' => true, 'tag.langbar.show_own_lang' => true, 'tag.langbar.separator' => ' --- ')
35
34
  assert_equal("#{de_link} --- #{en_link}", @obj.call('langbar', '', Webgen::ContentProcessor::Context.new(:chain => [nodes[:index_en]])))
36
35
 
37
- nodes[:index_en].dirty = false
36
+ nodes[:index_en].unflag(:dirty)
38
37
  @website.blackboard.dispatch_msg(:node_changed?, nodes[:index_en])
39
- assert(!nodes[:index_en].dirty)
38
+ assert(!nodes[:index_en].flagged(:dirty))
40
39
  nodes[:index_en].tree.delete_node(nodes[:index_de])
41
40
  @website.blackboard.dispatch_msg(:node_changed?, nodes[:index_en])
42
- assert(nodes[:index_en].dirty)
41
+ assert(nodes[:index_en].flagged(:dirty))
43
42
  end
44
43
 
45
44
  def check_results(node, both_true, both_false, first_false, second_false)
@@ -2,7 +2,7 @@ require 'test/unit'
2
2
  require 'helper'
3
3
  require 'webgen/tree'
4
4
  require 'webgen/contentprocessor'
5
- require 'webgen/tag/menu'
5
+ require 'webgen/tag'
6
6
 
7
7
  class TestTagMenu < Test::Unit::TestCase
8
8
 
@@ -88,18 +88,18 @@ class TestTagMenu < Test::Unit::TestCase
88
88
  @obj.set_params({})
89
89
  assert_equal("", output)
90
90
 
91
- nodes.each {|k,v| v.dirty = false}
91
+ nodes.each {|k,v| v.unflag(:dirty)}
92
92
  @website.blackboard.dispatch_msg(:node_changed?, nodes[:file11_en])
93
- assert(!nodes[:file11_en].dirty)
93
+ assert(!nodes[:file11_en].flagged(:dirty))
94
94
 
95
- nodes[:index11_en].dirty_meta_info = true
95
+ nodes[:index11_en].flag(:dirty_meta_info)
96
96
  @website.blackboard.dispatch_msg(:node_changed?, nodes[:file11_en])
97
- assert(nodes[:file11_en].dirty)
97
+ assert(nodes[:file11_en].flagged(:dirty))
98
98
 
99
- nodes.each {|k,v| v.dirty = false}
99
+ nodes.each {|k,v| v.unflag(:dirty)}
100
100
  nodes[:file11_en_f2]['in_menu'] = false
101
101
  @website.blackboard.dispatch_msg(:node_changed?, nodes[:file11_en])
102
- assert(nodes[:file11_en].dirty)
102
+ assert(nodes[:file11_en].flagged(:dirty))
103
103
  end
104
104
 
105
105
  def test_menu_tree_for_lang_and_create_menu_tree
@@ -1,7 +1,7 @@
1
1
  require 'test/unit'
2
2
  require 'webgen/tree'
3
3
  require 'webgen/contentprocessor'
4
- require 'webgen/tag/metainfo'
4
+ require 'webgen/tag'
5
5
 
6
6
  class TestTagMetainfo < Test::Unit::TestCase
7
7
 
@@ -2,7 +2,7 @@ require 'test/unit'
2
2
  require 'helper'
3
3
  require 'webgen/tree'
4
4
  require 'webgen/contentprocessor'
5
- require 'webgen/tag/relocatable'
5
+ require 'webgen/tag'
6
6
 
7
7
  class TestTagRelocatable < Test::Unit::TestCase
8
8
 
@@ -0,0 +1,66 @@
1
+ require 'test/unit'
2
+ require 'helper'
3
+ require 'webgen/tag'
4
+
5
+ class TestTagTikZ < Test::Unit::TestCase
6
+
7
+ include Test::WebsiteHelper
8
+
9
+ def setup
10
+ super
11
+ @obj = Webgen::Tag::TikZ.new
12
+ Webgen::SourceHandler::Main.new # service create_nodes
13
+ Webgen::SourceHandler::Directory.new # service create_directories
14
+ end
15
+
16
+ def call(context, body, path, libs, opts, res, trans, imgattr)
17
+ @obj.set_params({'tag.tikz.path' => path, 'tag.tikz.libraries' => libs,
18
+ 'tag.tikz.opts' => opts, 'tag.tikz.resolution' => res,
19
+ 'tag.tikz.transparent' => trans, 'tag.tikz.img_attr' => imgattr})
20
+ result = @obj.call('tikz', body, context)
21
+ @obj.set_params({})
22
+ result
23
+ end
24
+
25
+ def test_call
26
+ root = Webgen::Node.new(Webgen::Tree.new.dummy_root, '/', '/')
27
+ context = Webgen::ContentProcessor::Context.new(:chain => [root])
28
+
29
+ output = call(context, '\tikz \draw (0,0) -- (0,1);', 'test.png', [], '', '72 72', false, {})
30
+ assert_equal('<img src="test.png" />', output)
31
+ assert(root.tree['/test.png'])
32
+ assert_not_nil(root.tree['/test.png'].content)
33
+ root.tree.delete_node('/test.png')
34
+
35
+ output = call(context, '\tikz \asdfasdfasf', 'test.png', [], '', '72 72', false, {})
36
+ assert_equal('<img src="test.png" />', output)
37
+ assert(root.tree['/test.png'])
38
+ assert_nil(root.tree['/test.png'].content)
39
+ root.tree.delete_node('/test.png')
40
+
41
+ output = call(context, '\tikz \draw (0,0) -- (0,1);', '/images/test.gif', ['arrows'], '->', '72 72', true, {'alt' => 'title'})
42
+ assert_equal('<img src="images/test.gif" alt="title" />', output)
43
+ assert(root.tree['/images/test.gif'])
44
+ assert_not_nil(root.tree['/images/test.gif'].content)
45
+ root.tree.delete_node('/images/test.gif')
46
+
47
+ output = call(context, '\tikz \draw (0,0) -- (0,1);', 'images/../img/test.png', [], '', '300 72', true, {})
48
+ assert_equal('<img src="img/test.png" />', output)
49
+ assert(root.tree['/img/test.png'])
50
+ assert_not_nil(root.tree['/img/test.png'].content)
51
+ root.tree.delete_node('/img/test.png')
52
+ end
53
+
54
+ def test_run_command
55
+ root = Webgen::Node.new(Webgen::Tree.new.dummy_root, '/', '/')
56
+ context = Webgen::ContentProcessor::Context.new(:chain => [root])
57
+ assert_equal("hallo\n", @obj.send(:run_command, echo_cmd('hallo'), context))
58
+ assert_nil(@obj.send(:run_command, 'unknown_command 2>&1', context))
59
+ end
60
+
61
+ def echo_cmd(data)
62
+ (Config::CONFIG['arch'].include?('mswin32') ? "echo #{data}" : "echo '#{data}'")
63
+ end
64
+
65
+
66
+ end
data/test/test_tree.rb CHANGED
@@ -42,8 +42,7 @@ class TestTree < Test::Unit::TestCase
42
42
  @tree.delete_node(@tree.dummy_root)
43
43
  assert_not_nil(@tree[''])
44
44
 
45
- @tree.delete_node(root)
46
- assert_not_nil(@tree['/'])
45
+ assert_nothing_raised { @tree.delete_node('/unknown_path') }
47
46
 
48
47
  @tree.delete_node(file)
49
48
  assert_nil(@tree['/testfile'])
@@ -52,17 +51,13 @@ class TestTree < Test::Unit::TestCase
52
51
  assert_equal(1, root.children.size)
53
52
  assert_equal(1, nrcalls)
54
53
 
55
- @tree.delete_node('/', true)
54
+ @tree.delete_node('/')
56
55
  assert_nil(@tree['/testdir'])
57
56
  assert_nil(@tree['/testdir', :acn])
58
57
  assert_nil(@tree.node_info['/testdir'])
59
58
  assert_nil(@tree['/'])
60
59
  assert_nil(@tree.node_info['/'])
61
60
  assert_equal(3, nrcalls)
62
-
63
- Webgen::Node.new(root, 'testfile', 'testfile')
64
- Webgen::Node.new(root, 'testdir/', 'testdir')
65
- @tree.delete_node(root, true)
66
61
  assert_equal([@tree.dummy_root], @tree.node_access[:alcn].values)
67
62
  end
68
63
 
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.5.20081001
4
+ version: 0.5.5.20081010
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-09-30 15:00:00 -07:00
12
+ date: 2008-10-09 15:00:00 -07:00
13
13
  default_executable: webgen
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -398,6 +398,7 @@ files:
398
398
  - doc/tag/metainfo.page
399
399
  - doc/tag/relocatable.page
400
400
  - doc/tag/sitemap.page
401
+ - doc/tag/tikz.page
401
402
  - doc/tag.template
402
403
  - doc/upgrading.page
403
404
  - doc/webgen_page_format.page
@@ -443,6 +444,7 @@ files:
443
444
  - lib/webgen/sourcehandler/directory.rb
444
445
  - lib/webgen/sourcehandler/feed.rb
445
446
  - lib/webgen/sourcehandler/fragment.rb
447
+ - lib/webgen/sourcehandler/memory.rb
446
448
  - lib/webgen/sourcehandler/metainfo.rb
447
449
  - lib/webgen/sourcehandler/page.rb
448
450
  - lib/webgen/sourcehandler/sitemap.rb
@@ -460,6 +462,7 @@ files:
460
462
  - lib/webgen/tag/metainfo.rb
461
463
  - lib/webgen/tag/relocatable.rb
462
464
  - lib/webgen/tag/sitemap.rb
465
+ - lib/webgen/tag/tikz.rb
463
466
  - lib/webgen/tag.rb
464
467
  - lib/webgen/tree.rb
465
468
  - lib/webgen/version.rb
@@ -511,6 +514,7 @@ files:
511
514
  - test/test_sourcehandler_directory.rb
512
515
  - test/test_sourcehandler_feed.rb
513
516
  - test/test_sourcehandler_fragment.rb
517
+ - test/test_sourcehandler_memory.rb
514
518
  - test/test_sourcehandler_metainfo.rb
515
519
  - test/test_sourcehandler_page.rb
516
520
  - test/test_sourcehandler_sitemap.rb
@@ -527,6 +531,7 @@ files:
527
531
  - test/test_tag_metainfo.rb
528
532
  - test/test_tag_relocatable.rb
529
533
  - test/test_tag_sitemap.rb
534
+ - test/test_tag_tikz.rb
530
535
  - test/test_tree.rb
531
536
  - test/test_webgentask.rb
532
537
  - test/test_website.rb