rote 0.3.0.2 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CONTRIBUTORS +1 -0
- data/DONE +6 -0
- data/LICENSE +1 -1
- data/README +10 -3
- data/Rakefile +1 -3
- data/TODO +18 -11
- data/doc/pages/guide/index.html +291 -87
- data/doc/res/stylesheets/normal.css +46 -4
- data/lib/rote.rb +2 -2
- data/lib/rote/app.rb +1 -1
- data/lib/rote/cache.rb +144 -0
- data/lib/rote/filters.rb +20 -4
- data/lib/rote/filters/base.rb +1 -1
- data/lib/rote/filters/bluecloth.rb +40 -0
- data/lib/rote/filters/eval.rb +58 -0
- data/lib/rote/filters/exec.rb +42 -0
- data/lib/rote/filters/rdoc.rb +1 -1
- data/lib/rote/filters/redcloth.rb +11 -9
- data/lib/rote/filters/syntax.rb +1 -1
- data/lib/rote/filters/tidy.rb +1 -1
- data/lib/rote/filters/toc.rb +1 -1
- data/lib/rote/format.rb +1 -1
- data/lib/rote/format/html.rb +1 -1
- data/lib/rote/page.rb +68 -41
- data/lib/rote/project/Rakefile +4 -5
- data/lib/rote/rotetasks.rb +1 -1
- data/test/layouts/nestme.rb +2 -0
- data/test/layouts/nestme.txt +1 -0
- data/test/pages/nestedlayout.rb +5 -0
- data/test/pages/nestedlayout.txt +1 -0
- data/test/test_cache.rb +67 -0
- data/test/{test_formatting.rb → test_filters.rb} +82 -4
- data/test/test_html_page.rb +1 -5
- data/test/test_page.rb +26 -8
- metadata +13 -8
- data/test/pages/markdown.txt +0 -8
- data/test/pages/rdoc.txt +0 -6
- data/test/pages/textile.rb +0 -3
- data/test/pages/textile.txt +0 -1
data/test/test_html_page.rb
CHANGED
data/test/test_page.rb
CHANGED
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
require 'rubygems'
|
3
|
-
rescue LoadError
|
4
|
-
nil
|
5
|
-
end
|
1
|
+
$LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__),'../lib'))
|
6
2
|
|
7
3
|
require 'test/unit'
|
8
4
|
require 'rote/page'
|
@@ -82,6 +78,22 @@ module Rote
|
|
82
78
|
assert_equal 'simple.txt', p.layout_name
|
83
79
|
end
|
84
80
|
|
81
|
+
def test_layout_names
|
82
|
+
p = new_test_page('justtext')
|
83
|
+
assert p.layout_names.empty?
|
84
|
+
|
85
|
+
p = new_test_page('withcode')
|
86
|
+
assert_equal ['simple.txt'], p.layout_names
|
87
|
+
|
88
|
+
p = new_test_page('nestedlayout')
|
89
|
+
assert_equal ['nestme.txt'], p.layout_names
|
90
|
+
|
91
|
+
# Rendering loads the layout code, which adds the
|
92
|
+
# rest of the layouts
|
93
|
+
p.render
|
94
|
+
assert_equal ['nestme.txt', 'simple.txt'], p.layout_names
|
95
|
+
end
|
96
|
+
|
85
97
|
def test_template_filename
|
86
98
|
p = new_test_page('justtext')
|
87
99
|
assert_equal 'test/pages/justtext.txt', p.template_filename
|
@@ -142,6 +154,11 @@ module Rote
|
|
142
154
|
assert_equal 'layout some text and some other text for a change.', t
|
143
155
|
end
|
144
156
|
|
157
|
+
def test_render_layout_code
|
158
|
+
t = new_test_page('nestedlayout').render.chomp
|
159
|
+
assert_equal "layout this: 'some text and some other text' for a change.", t
|
160
|
+
end
|
161
|
+
|
145
162
|
############## broken render #################
|
146
163
|
def test_render_switch_layout_freeze
|
147
164
|
p = new_test_page('withcode')
|
@@ -150,9 +167,10 @@ module Rote
|
|
150
167
|
assert_nil p.layout_text
|
151
168
|
|
152
169
|
p.layout(nil)
|
153
|
-
assert_nil p.layout_text
|
154
|
-
|
155
|
-
assert_equal 'some text and some other text', p.render.chomp
|
170
|
+
assert_nil p.layout_text
|
171
|
+
|
172
|
+
assert_equal 'layout some text and some other text for a change.', p.render.chomp
|
173
|
+
assert p.instance_eval { @layout_code_works }
|
156
174
|
|
157
175
|
begin
|
158
176
|
p.layout('simple')
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: rote
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.3.
|
7
|
-
date:
|
6
|
+
version: 0.3.2
|
7
|
+
date: 2006-01-05 00:00:00 +00:00
|
8
8
|
summary: Adds template-based doc support to Rake.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -12,7 +12,7 @@ email: ross@roscopeco.co.uk
|
|
12
12
|
homepage: http://rote.rubyforge.org
|
13
13
|
rubyforge_project: rote
|
14
14
|
description: Rote is a set of Rake task libraries and utilities that enable easy rendering of textual documentation formats (like HTML) for websites and offline documentation.
|
15
|
-
autorequire:
|
15
|
+
autorequire:
|
16
16
|
default_executable: rote
|
17
17
|
bindir: bin
|
18
18
|
has_rdoc: true
|
@@ -39,6 +39,7 @@ files:
|
|
39
39
|
- lib/rote.rb
|
40
40
|
- lib/rote/rotetasks.rb
|
41
41
|
- lib/rote/page.rb
|
42
|
+
- lib/rote/cache.rb
|
42
43
|
- lib/rote/app.rb
|
43
44
|
- lib/rote/filters.rb
|
44
45
|
- lib/rote/format.rb
|
@@ -46,11 +47,14 @@ files:
|
|
46
47
|
- lib/rote/project/doc/pages/index.rb
|
47
48
|
- lib/rote/format/html.rb
|
48
49
|
- lib/rote/filters/rdoc.rb
|
50
|
+
- lib/rote/filters/eval.rb
|
49
51
|
- lib/rote/filters/base.rb
|
50
52
|
- lib/rote/filters/syntax.rb
|
51
53
|
- lib/rote/filters/redcloth.rb
|
54
|
+
- lib/rote/filters/exec.rb
|
52
55
|
- lib/rote/filters/toc.rb
|
53
56
|
- lib/rote/filters/tidy.rb
|
57
|
+
- lib/rote/filters/bluecloth.rb
|
54
58
|
- lib/rote/builtin.rf
|
55
59
|
- lib/rote/project/Rakefile
|
56
60
|
- lib/rote/project/doc
|
@@ -62,7 +66,8 @@ files:
|
|
62
66
|
- lib/rote/project/doc/res/images/rote-tiny.png
|
63
67
|
- lib/rote/project/doc/pages/index.thtml
|
64
68
|
- lib/rote/project/doc/layouts/normal.thtml
|
65
|
-
- test/
|
69
|
+
- test/test_filters.rb
|
70
|
+
- test/test_cache.rb
|
66
71
|
- test/test_page.rb
|
67
72
|
- test/pages
|
68
73
|
- test/test_html_page.rb
|
@@ -70,18 +75,18 @@ files:
|
|
70
75
|
- test/gem_tests.rb
|
71
76
|
- test/pages/samedir.txt
|
72
77
|
- test/pages/baselayout.txt
|
73
|
-
- test/pages/
|
74
|
-
- test/pages/rdoc.txt
|
78
|
+
- test/pages/nestedlayout.rb
|
75
79
|
- test/pages/badlayout.rb
|
76
80
|
- test/pages/samedir.rb
|
77
81
|
- test/pages/COMMON.rb
|
78
|
-
- test/pages/textile.rb
|
79
82
|
- test/pages/custext.txt
|
80
|
-
- test/pages/textile.txt
|
81
83
|
- test/pages/withcode.rb
|
82
84
|
- test/pages/justtext.txt
|
83
85
|
- test/pages/badlayout.txt
|
86
|
+
- test/pages/nestedlayout.txt
|
84
87
|
- test/pages/withcode.txt
|
88
|
+
- test/layouts/nestme.rb
|
89
|
+
- test/layouts/nestme.txt
|
85
90
|
- test/layouts/simple.rb
|
86
91
|
- test/layouts/withext.ext
|
87
92
|
- test/layouts/simple.txt
|
data/test/pages/markdown.txt
DELETED
data/test/pages/rdoc.txt
DELETED
data/test/pages/textile.rb
DELETED
data/test/pages/textile.txt
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
*This* is a _simple_ test of "Textile":http://www.textism.org/tools/textile formatting.
|