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/misc/default.css
CHANGED
@@ -20,7 +20,7 @@
|
|
20
20
|
body {
|
21
21
|
margin: 0;
|
22
22
|
padding: 0;
|
23
|
-
font: normal .80em/1.5em Tahoma, 'Trebuchet MS', sans-serif;
|
23
|
+
font: normal .80em/1.5em 'Helvetica Neue', Tahoma, 'Trebuchet MS', sans-serif;
|
24
24
|
color: #000;
|
25
25
|
text-align: center;
|
26
26
|
background-color: #FCFFF5;
|
@@ -40,7 +40,7 @@ a:hover {
|
|
40
40
|
|
41
41
|
/* headers */
|
42
42
|
h1, h2, h3, h4, h5, h6 {
|
43
|
-
font: bold 1.3em 'Trebuchet MS', Arial, Sans-serif;
|
43
|
+
font: bold 1.3em 'Helvetica Neue', 'Trebuchet MS', Arial, Sans-serif;
|
44
44
|
color: #CE900A;
|
45
45
|
}
|
46
46
|
h1 { font-size: 1.6em; }
|
@@ -53,7 +53,7 @@ h3 { font-size: 1.3em; }
|
|
53
53
|
}
|
54
54
|
|
55
55
|
#sidebar h1 {
|
56
|
-
font: bold 1.4em 'Trebuchet MS', Arial, Sans-serif;
|
56
|
+
font: bold 1.4em 'Helvetica Neue', 'Trebuchet MS', Arial, Sans-serif;
|
57
57
|
background: url(images/arrow.gif) no-repeat 0px .6em;
|
58
58
|
padding: 7px 0 7px 25px;
|
59
59
|
color: #193441;
|
@@ -98,28 +98,52 @@ acronym {
|
|
98
98
|
border-bottom: 1px solid #777;
|
99
99
|
}
|
100
100
|
|
101
|
-
blockquote.
|
101
|
+
blockquote.warning, blockquote.error, blockquote.information, blockquote.important {
|
102
102
|
margin: 10px 0px;
|
103
|
-
padding:
|
103
|
+
padding: 5px 0 0 50px;
|
104
104
|
min-height: 40px;
|
105
105
|
border: 1px solid #91AA9D;
|
106
|
-
font: 'Trebuchet MS', Sans-serif;
|
106
|
+
font: 'Helvetica Neue', 'Trebuchet MS', Sans-serif;
|
107
107
|
background-color: #D1DBBD;
|
108
108
|
background-image: url(images/quote.gif);
|
109
109
|
background-repeat: no-repeat;
|
110
|
-
background-position:
|
110
|
+
background-position: 9px 5px;
|
111
111
|
}
|
112
112
|
|
113
|
-
blockquote.
|
114
|
-
background-image: url(images/
|
113
|
+
blockquote.warning {
|
114
|
+
background-image: url(images/warning.png);
|
115
|
+
}
|
116
|
+
|
117
|
+
blockquote.warning:before {
|
118
|
+
content: 'Caution';
|
119
|
+
font: bold 1.3em 'Helvetica Neue', 'Trebuchet MS', Arial, Sans-serif;
|
115
120
|
}
|
116
121
|
|
117
122
|
blockquote.error {
|
118
|
-
background-image: url(images/error.
|
123
|
+
background-image: url(images/error.png);
|
124
|
+
}
|
125
|
+
|
126
|
+
blockquote.error:before {
|
127
|
+
content: 'Warning';
|
128
|
+
font: bold 1.3em 'Helvetica Neue', 'Trebuchet MS', Arial, Sans-serif;
|
119
129
|
}
|
120
130
|
|
121
131
|
blockquote.information {
|
122
|
-
background-image: url(images/information.
|
132
|
+
background-image: url(images/information.png);
|
133
|
+
}
|
134
|
+
|
135
|
+
blockquote.information:before {
|
136
|
+
content: 'Information';
|
137
|
+
font: bold 1.3em 'Helvetica Neue', 'Trebuchet MS', Arial, Sans-serif;
|
138
|
+
}
|
139
|
+
|
140
|
+
blockquote.important {
|
141
|
+
background-image: url(images/important.png);
|
142
|
+
}
|
143
|
+
|
144
|
+
blockquote.important:before {
|
145
|
+
content: 'Important';
|
146
|
+
font: bold 1.3em 'Helvetica Neue', 'Trebuchet MS', Arial, Sans-serif;
|
123
147
|
}
|
124
148
|
|
125
149
|
blockquote pre {
|
@@ -171,7 +195,7 @@ blockquote pre {
|
|
171
195
|
#header-content ul {
|
172
196
|
position: absolute;
|
173
197
|
right: 20px; top: 75px;
|
174
|
-
font: bolder 1.3em 'Trebuchet MS', sans-serif;
|
198
|
+
font: bolder 1.3em 'Helvetica Neue', 'Trebuchet MS', sans-serif;
|
175
199
|
color: #FCFFF5;
|
176
200
|
list-style: none;
|
177
201
|
margin: 0; padding: 0;
|
data/misc/default.template
CHANGED
@@ -60,7 +60,7 @@
|
|
60
60
|
<p>
|
61
61
|
© 2008 Thomas Leitner | generated by <a href="http://webgen.rubyforge.org">webgen</a><br />
|
62
62
|
Design based on Ablaze 2.1 by <a href="http://www.styleshout.com/">styleshout</a><br />
|
63
|
-
Block quote icons
|
63
|
+
Block quote icons from the <a href="http://tango.freedesktop.org//">Tango Icon Theme</a><br />
|
64
64
|
Valid <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a> |
|
65
65
|
<a href="http://validator.w3.org/check/referer">XHTML</a>
|
66
66
|
</p>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/test/helper.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
1
3
|
require 'webgen/blackboard'
|
2
4
|
require 'webgen/website'
|
3
5
|
|
@@ -33,6 +35,8 @@ module Test
|
|
33
35
|
:file21_en => Webgen::Node.new(dir2, '/dir2/file21.en.html', 'file21.html', {'lang' => 'en', 'in_menu' => false, 'kind' => 'other'}),
|
34
36
|
:file1_de => Webgen::Node.new(root, '/file1.de.html', 'file1.html', {'lang' => 'de', 'in_menu' => true, 'kind' => 'page'}),
|
35
37
|
:index_en => Webgen::Node.new(root, '/index.en.html', 'index.html', {'lang' => 'en', 'kind' => 'page'}),
|
38
|
+
:dir3 => dir3 = Webgen::Node.new(root, '/dir3/', 'dir3/', {'kind' => 'directory', 'index_path' => 'index.html'}),
|
39
|
+
:index3_en => Webgen::Node.new(dir3, '/dir3/index.en.html', 'index.html', {'lang' => 'en', 'kind' => 'page'})
|
36
40
|
}
|
37
41
|
end
|
38
42
|
|
data/test/test_blackboard.rb
CHANGED
data/test/test_cache.rb
CHANGED
data/test/test_cli.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
1
3
|
require 'test/unit'
|
2
4
|
require 'webgen/cli'
|
3
5
|
|
@@ -11,4 +13,9 @@ class TestCLICommandParser < Test::Unit::TestCase
|
|
11
13
|
assert_equal(Dir.pwd, cli.directory)
|
12
14
|
end
|
13
15
|
|
16
|
+
def test_website_from_env
|
17
|
+
ENV['WEBGEN_WEBSITE'] = '/webgen/test/site'
|
18
|
+
cli = Webgen::CLI::CommandParser.new
|
19
|
+
assert_equal('/webgen/test/site', cli.directory)
|
20
|
+
end
|
14
21
|
end
|
data/test/test_common.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
require 'test/unit'
|
4
|
+
require 'webgen/common'
|
5
|
+
|
6
|
+
class TestCommon < Test::Unit::TestCase
|
7
|
+
|
8
|
+
def test_absolute_path
|
9
|
+
assert_raise(ArgumentError) { Webgen::Common.absolute_path('test', 'test') }
|
10
|
+
assert_equal('/', Webgen::Common.absolute_path('/', '/'))
|
11
|
+
assert_equal('/dir', Webgen::Common.absolute_path('/dir', '/other'))
|
12
|
+
assert_equal('/other/dir', Webgen::Common.absolute_path('dir', '/other'))
|
13
|
+
assert_equal('/test/dir', Webgen::Common.absolute_path('../test/dir', '/other'))
|
14
|
+
assert_equal('/', Webgen::Common.absolute_path('/..', '/'))
|
15
|
+
assert_equal('/dir', Webgen::Common.absolute_path('/../dir/.', '/'))
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
data/test/test_common_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'
|
@@ -25,24 +27,24 @@ class TestCommonSitemap < Test::Unit::TestCase
|
|
25
27
|
|
26
28
|
def test_create_sitemap_and_node_chagned
|
27
29
|
do_assert(@nodes[:file11_en], 'en', false, false, ['page'],
|
28
|
-
[:dir1, :file11_en, :index_en])
|
30
|
+
[:dir1, :file11_en, :index_en, :dir3])
|
29
31
|
do_assert(@nodes[:file11_en], 'en', true, false, ['page'],
|
30
32
|
[:dir1, :file11_en])
|
31
33
|
do_assert(@nodes[:file11_en], 'en', false, false, ['page', 'other'],
|
32
|
-
[:dir1, :file11_en, :dir2, :file21_en, :index_en])
|
34
|
+
[:dir1, :file11_en, :dir2, :file21_en, :index_en, :dir3])
|
33
35
|
do_assert(@nodes[:file11_en], 'en', false, false, [],
|
34
|
-
[:dir1, :file11_en, :file11_en_f1, :dir2, :file21_en, :index_en])
|
36
|
+
[:dir1, :file11_en, :file11_en_f1, :dir2, :file21_en, :index_en, :dir3])
|
35
37
|
do_assert(@nodes[:file11_en], 'en', false, false, ['noone'],
|
36
38
|
[])
|
37
39
|
do_assert(@nodes[:file11_en], 'en', false, false, ['page', 'directory'],
|
38
|
-
[:dir1, :file11_en, :dir2, :index_en])
|
40
|
+
[:dir1, :file11_en, :dir2, :index_en, :dir3])
|
39
41
|
do_assert(@nodes[:file11_en], 'en', true, false, ['page', 'directory'],
|
40
42
|
[:dir1, :file11_en])
|
41
43
|
|
42
44
|
do_assert(@nodes[:file1_de], 'de', false, false, ['page'],
|
43
45
|
[:file1_de])
|
44
46
|
do_assert(@nodes[:file1_de], 'de', false, true, ['page'],
|
45
|
-
[:dir1, :file11_en, :file1_de, :index_en])
|
47
|
+
[:dir1, :file11_en, :file1_de, :index_en, :dir3, :index3_en])
|
46
48
|
|
47
49
|
@nodes[:file11_en].unflag(:dirty)
|
48
50
|
@website.blackboard.dispatch_msg(:node_changed?, @nodes[:file11_en])
|
data/test/test_configuration.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
1
3
|
require 'test/unit'
|
2
4
|
require 'webgen/tree'
|
3
5
|
require 'webgen/page'
|
@@ -9,7 +11,7 @@ class TestContentProcessorBlocks < Test::Unit::TestCase
|
|
9
11
|
obj = Webgen::ContentProcessor::Blocks.new
|
10
12
|
root = Webgen::Node.new(Webgen::Tree.new.dummy_root, '/', '/')
|
11
13
|
node = Webgen::Node.new(root, 'test', 'test')
|
12
|
-
node.node_info[:page] = Webgen::Page.from_data("--- name:content\ndata")
|
14
|
+
node.node_info[:page] = Webgen::Page.from_data("--- name:content\ndata\n--- name:other\nother")
|
13
15
|
template = Webgen::Node.new(root, 'template', 'template')
|
14
16
|
template.node_info[:page] = Webgen::Page.from_data("--- name:content pipeline:blocks\nbefore<webgen:block name='content' />after")
|
15
17
|
processors = { 'blocks' => obj }
|
@@ -29,6 +31,25 @@ class TestContentProcessorBlocks < Test::Unit::TestCase
|
|
29
31
|
obj.call(context)
|
30
32
|
assert_equal('<webgen:block name="content" chain="invalid" />beforedataafter', context.content)
|
31
33
|
assert_equal(Set.new([template.absolute_lcn, node.absolute_lcn]), node.node_info[:used_nodes])
|
34
|
+
|
35
|
+
context.content = 'bef<webgen:block name="other" chain="template;test" notfound="ignore" />aft'
|
36
|
+
obj.call(context)
|
37
|
+
assert_equal('befaft', context.content)
|
38
|
+
|
39
|
+
context.content = '<webgen:block name="other" chain="template" node="first" />'
|
40
|
+
assert_raise(RuntimeError) { obj.call(context) }
|
41
|
+
|
42
|
+
context.content = '<webgen:block name="other" chain="template;test" node="first" />'
|
43
|
+
obj.call(context)
|
44
|
+
assert_equal('other', context.content)
|
45
|
+
|
46
|
+
context.content = '<webgen:block name="other" chain="test" node="first" />'
|
47
|
+
obj.call(context)
|
48
|
+
assert_equal('other', context.content)
|
49
|
+
|
50
|
+
context.content = '<webgen:block name="invalid" node="first" notfound="ignore" /><webgen:block name="content" />'
|
51
|
+
obj.call(context)
|
52
|
+
assert_equal('beforedataafter', context.content)
|
32
53
|
end
|
33
54
|
|
34
55
|
end
|
data/test/test_languages.rb
CHANGED
data/test/test_loggable.rb
CHANGED
data/test/test_logger.rb
CHANGED
data/test/test_node.rb
CHANGED
data/test/test_page.rb
CHANGED
data/test/test_path.rb
CHANGED
@@ -1,6 +1,11 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
1
3
|
require 'test/unit'
|
2
4
|
require 'helper'
|
3
5
|
require 'webgen/source'
|
6
|
+
require 'tmpdir'
|
7
|
+
require 'fileutils'
|
8
|
+
require 'rbconfig'
|
4
9
|
|
5
10
|
class TestSourceFileSystemPath < Test::Unit::TestCase
|
6
11
|
|
@@ -56,4 +61,16 @@ class TestSourceFileSystem < Test::Unit::TestCase
|
|
56
61
|
assert(source.paths.include?(Webgen::Path.new('/source/filesystem.rb')))
|
57
62
|
end
|
58
63
|
|
64
|
+
def test_handling_of_invalid_link
|
65
|
+
return if Config::CONFIG['arch'].include?('mswin32')
|
66
|
+
dir = File.join(Dir.tmpdir, 'webgen-link-test')
|
67
|
+
FileUtils.mkdir_p(dir)
|
68
|
+
FileUtils.touch(File.join(dir, 'test'))
|
69
|
+
File.symlink('non-existing-file', File.join(dir, 'invalid-link'))
|
70
|
+
source = Webgen::Source::FileSystem.new(dir, '/t*')
|
71
|
+
assert(source.paths.length == 1)
|
72
|
+
ensure
|
73
|
+
FileUtils.rm_rf(dir) if dir
|
74
|
+
end
|
75
|
+
|
59
76
|
end
|