rake 12.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +7 -0
  2. data/CONTRIBUTING.rdoc +43 -0
  3. data/Gemfile +3 -0
  4. data/History.rdoc +2344 -0
  5. data/MIT-LICENSE +21 -0
  6. data/README.rdoc +156 -0
  7. data/Rakefile +41 -0
  8. data/azure-pipelines.yml +11 -0
  9. data/bin/bundle +105 -0
  10. data/bin/console +7 -0
  11. data/bin/rake +29 -0
  12. data/bin/rdoc +29 -0
  13. data/bin/rubocop +29 -0
  14. data/bin/setup +6 -0
  15. data/doc/command_line_usage.rdoc +158 -0
  16. data/doc/example/Rakefile1 +38 -0
  17. data/doc/example/Rakefile2 +35 -0
  18. data/doc/example/a.c +6 -0
  19. data/doc/example/b.c +6 -0
  20. data/doc/example/main.c +11 -0
  21. data/doc/glossary.rdoc +42 -0
  22. data/doc/jamis.rb +592 -0
  23. data/doc/proto_rake.rdoc +127 -0
  24. data/doc/rake.1 +156 -0
  25. data/doc/rakefile.rdoc +622 -0
  26. data/doc/rational.rdoc +151 -0
  27. data/exe/rake +27 -0
  28. data/lib/rake.rb +71 -0
  29. data/lib/rake/application.rb +824 -0
  30. data/lib/rake/backtrace.rb +24 -0
  31. data/lib/rake/clean.rb +78 -0
  32. data/lib/rake/cloneable.rb +17 -0
  33. data/lib/rake/cpu_counter.rb +107 -0
  34. data/lib/rake/default_loader.rb +15 -0
  35. data/lib/rake/dsl_definition.rb +195 -0
  36. data/lib/rake/early_time.rb +22 -0
  37. data/lib/rake/ext/core.rb +26 -0
  38. data/lib/rake/ext/string.rb +176 -0
  39. data/lib/rake/file_creation_task.rb +25 -0
  40. data/lib/rake/file_list.rb +435 -0
  41. data/lib/rake/file_task.rb +54 -0
  42. data/lib/rake/file_utils.rb +137 -0
  43. data/lib/rake/file_utils_ext.rb +145 -0
  44. data/lib/rake/invocation_chain.rb +57 -0
  45. data/lib/rake/invocation_exception_mixin.rb +17 -0
  46. data/lib/rake/late_time.rb +18 -0
  47. data/lib/rake/linked_list.rb +112 -0
  48. data/lib/rake/loaders/makefile.rb +54 -0
  49. data/lib/rake/multi_task.rb +14 -0
  50. data/lib/rake/name_space.rb +38 -0
  51. data/lib/rake/packagetask.rb +207 -0
  52. data/lib/rake/phony.rb +16 -0
  53. data/lib/rake/private_reader.rb +21 -0
  54. data/lib/rake/promise.rb +100 -0
  55. data/lib/rake/pseudo_status.rb +30 -0
  56. data/lib/rake/rake_module.rb +67 -0
  57. data/lib/rake/rake_test_loader.rb +27 -0
  58. data/lib/rake/rule_recursion_overflow_error.rb +20 -0
  59. data/lib/rake/scope.rb +43 -0
  60. data/lib/rake/task.rb +413 -0
  61. data/lib/rake/task_argument_error.rb +8 -0
  62. data/lib/rake/task_arguments.rb +109 -0
  63. data/lib/rake/task_manager.rb +324 -0
  64. data/lib/rake/tasklib.rb +12 -0
  65. data/lib/rake/testtask.rb +224 -0
  66. data/lib/rake/thread_history_display.rb +49 -0
  67. data/lib/rake/thread_pool.rb +163 -0
  68. data/lib/rake/trace_output.rb +23 -0
  69. data/lib/rake/version.rb +10 -0
  70. data/lib/rake/win32.rb +51 -0
  71. data/rake.gemspec +42 -0
  72. metadata +199 -0
@@ -0,0 +1,158 @@
1
+ = Rake Command Line Usage
2
+
3
+ Rake is invoked from the command line using:
4
+
5
+ % rake [options ...] [VAR=VALUE ...] [targets ...]
6
+
7
+ Options are:
8
+
9
+ [<tt><em>name</em>=<em>value</em></tt>]
10
+ Set the environment variable <em>name</em> to <em>value</em>
11
+ during the execution of the <b>rake</b> command. You can access
12
+ the value by using ENV['<em>name</em>'].
13
+
14
+ [<tt>--all</tt> (-A)]
15
+ Used in combination with the -T and -D options, will force
16
+ those options to show all the tasks, even the ones without comments.
17
+
18
+ [<tt>--backtrace</tt>{=_output_} (-n)]
19
+ Enable a full backtrace (i.e. like --trace, but without the task
20
+ tracing details). The _output_ parameter is optional, but if
21
+ specified it controls where the backtrace output is sent. If
22
+ _output_ is <tt>stdout</tt>, then backtrace output is directed to
23
+ standard output. If _output_ is <tt>stderr</tt>, or if it is
24
+ missing, then the backtrace output is sent to standard error.
25
+
26
+ [<tt>--comments</tt>]
27
+ Used in combination with the -W options to force the output to
28
+ contain commented options only. This is the reverse of
29
+ <tt>--all</tt>.
30
+
31
+ [<tt>--describe</tt> _pattern_ (-D)]
32
+ Describe the tasks (matching optional PATTERN), then exit.
33
+
34
+ [<tt>--dry-run</tt> (-n)]
35
+ Do a dry run. Print the tasks invoked and executed, but do not
36
+ actually execute any of the actions.
37
+
38
+ [<tt>--execute</tt> _code_ (-e)]
39
+ Execute some Ruby code and exit.
40
+
41
+ [<tt>--execute-print</tt> _code_ (-p)]
42
+ Execute some Ruby code, print the result, and exit.
43
+
44
+ [<tt>--execute-continue</tt> _code_ (-E)]
45
+ Execute some Ruby code, then continue with normal task processing.
46
+
47
+ [<tt>--help</tt> (-H)]
48
+ Display some help text and exit.
49
+
50
+ [<tt>--jobs</tt> _number_ (-j)]
51
+
52
+ Specifies the maximum number of concurrent threads allowed. Rake
53
+ will allocate threads as needed up to this maximum number.
54
+
55
+ If omitted, Rake will attempt to estimate the number of CPUs on
56
+ the system and add 4 to that number.
57
+
58
+ The concurrent threads are used to execute the <tt>multitask</tt>
59
+ prerequisites. Also see the <tt>-m</tt> option which turns all
60
+ tasks into multitasks.
61
+
62
+ Sample values:
63
+ (no -j) : Allow up to (# of CPUs + 4) number of threads
64
+ --jobs : Allow unlimited number of threads
65
+ --jobs=1 : Allow only one thread (the main thread)
66
+ --jobs=16 : Allow up to 16 concurrent threads
67
+
68
+ [<tt>--job-stats</tt> _level_]
69
+
70
+ Display job statistics at the completion of the run. By default,
71
+ this will display the requested number of active threads (from the
72
+ -j options) and the maximum number of threads in play at any given
73
+ time.
74
+
75
+ If the optional _level_ is <tt>history</tt>, then a complete trace
76
+ of task history will be displayed on standard output.
77
+
78
+ [<tt>--libdir</tt> _directory_ (-I)]
79
+ Add _directory_ to the list of directories searched for require.
80
+
81
+ [<tt>--multitask</tt> (-m)]
82
+ Treat all tasks as multitasks. ('make/drake' semantics)
83
+
84
+ [<tt>--nosearch</tt> (-N)]
85
+ Do not search for a Rakefile in parent directories.
86
+
87
+ [<tt>--prereqs</tt> (-P)]
88
+ Display a list of all tasks and their immediate prerequisites.
89
+
90
+ [<tt>--quiet</tt> (-q)]
91
+ Do not echo commands from FileUtils.
92
+
93
+ [<tt>--rakefile</tt> _filename_ (-f)]
94
+ Use _filename_ as the name of the rakefile. The default rakefile
95
+ names are +rakefile+ and +Rakefile+ (with +rakefile+ taking
96
+ precedence). If the rakefile is not found in the current
97
+ directory, +rake+ will search parent directories for a match. The
98
+ directory where the Rakefile is found will become the current
99
+ directory for the actions executed in the Rakefile.
100
+
101
+ [<tt>--rakelibdir</tt> _rakelibdir_ (-R)]
102
+ Auto-import any .rake files in RAKELIBDIR. (default is 'rakelib')
103
+
104
+ [<tt>--require</tt> _name_ (-r)]
105
+ Require _name_ before executing the Rakefile.
106
+
107
+ [<tt>--rules</tt>]
108
+ Trace the rules resolution.
109
+
110
+ [<tt>--silent (-s)</tt>]
111
+ Like --quiet, but also suppresses the 'in directory' announcement.
112
+
113
+ [<tt>--suppress-backtrace _pattern_ </tt>]
114
+ Line matching the regular expression _pattern_ will be removed
115
+ from the backtrace output. Note that the --backtrace option is the
116
+ full backtrace without these lines suppressed.
117
+
118
+ [<tt>--system</tt> (-g)]
119
+ Use the system wide (global) rakefiles. The project Rakefile is
120
+ ignored. By default, the system wide rakefiles are used only if no
121
+ project Rakefile is found. On Unix-like system, the system wide
122
+ rake files are located in $HOME/.rake. On a windows system they
123
+ are stored in $APPDATA/Rake.
124
+
125
+ [<tt>--no-system</tt> (-G)]
126
+ Use the project level Rakefile, ignoring the system-wide (global)
127
+ rakefiles.
128
+
129
+ [<tt>--tasks</tt> <em>pattern</em> (-T)]
130
+ Display a list of the major tasks and their comments. Comments
131
+ are defined using the "desc" command. If a pattern is given, then
132
+ only tasks matching the pattern are displayed.
133
+
134
+ [<tt>--trace</tt>{=_output_} (-t)]
135
+ Turn on invoke/execute tracing. Also enable full backtrace on
136
+ errors. The _output_ parameter is optional, but if specified it
137
+ controls where the trace output is sent. If _output_ is
138
+ <tt>stdout</tt>, then trace output is directed to standard output.
139
+ If _output_ is <tt>stderr</tt>, or if it is missing, then trace
140
+ output is sent to standard error.
141
+
142
+ [<tt>--verbose</tt> (-v)]
143
+ Echo the Sys commands to standard output.
144
+
145
+ [<tt>--version</tt> (-V)]
146
+ Display the program version and exit.
147
+
148
+ [<tt>--where</tt> <em>pattern</em> (-W)]
149
+ Display tasks that match <em>pattern</em> and the file and line
150
+ number where the task is defined. By default this option will
151
+ display all tasks, not just the tasks that have descriptions.
152
+
153
+ [<tt>--no-deprecation-warnings</tt> (-X)]
154
+ Do not display the deprecation warnings.
155
+
156
+ In addition, any command line option of the form
157
+ <em>VAR</em>=<em>VALUE</em> will be added to the environment hash
158
+ <tt>ENV</tt> and may be tested in the Rakefile.
@@ -0,0 +1,38 @@
1
+ # Example Rakefile -*- ruby -*-
2
+
3
+ task :default => [:main]
4
+
5
+ file "a.o" => ["a.c"] do |t|
6
+ src = t.name.sub(/\.o$/, '.c')
7
+ sh "gcc #{src} -c -o #{t.name}"
8
+ end
9
+
10
+ file "b.o" => ["b.c"] do |t|
11
+ src = t.name.sub(/\.o$/, '.c')
12
+ sh "gcc #{src} -c -o #{t.name}"
13
+ end
14
+
15
+ file "main.o" => ["main.c"] do |t|
16
+ src = t.name.sub(/\.o$/, '.c')
17
+ sh "gcc #{src} -c -o #{t.name}"
18
+ end
19
+
20
+ OBJFILES = ["a.o", "b.o", "main.o"]
21
+ task :obj => OBJFILES
22
+
23
+ file "main" => OBJFILES do |t|
24
+ sh "gcc -o #{t.name} main.o a.o b.o"
25
+ end
26
+
27
+ task :clean do
28
+ rm_f FileList['*.o']
29
+ Dir['*~'].each { |fn| rm_f fn }
30
+ end
31
+
32
+ task :clobber => [:clean] do
33
+ rm_f "main"
34
+ end
35
+
36
+ task :run => ["main"] do
37
+ sh "./main"
38
+ end
@@ -0,0 +1,35 @@
1
+ # Example Rakefile -*- ruby -*-
2
+ # Using the power of Ruby
3
+
4
+ task :default => [:main]
5
+
6
+ def ext(fn, newext)
7
+ fn.sub(/\.[^.]+$/, newext)
8
+ end
9
+
10
+ SRCFILES = Dir['*.c']
11
+ OBJFILES = SRCFILES.collect { |fn| ext(fn,".o") }
12
+
13
+ OBJFILES.each do |objfile|
14
+ srcfile = ext(objfile, ".c")
15
+ file objfile => [srcfile] do |t|
16
+ sh "gcc #{srcfile} -c -o #{t.name}"
17
+ end
18
+ end
19
+
20
+ file "main" => OBJFILES do |t|
21
+ sh "gcc -o #{t.name} main.o a.o b.o"
22
+ end
23
+
24
+ task :clean do
25
+ rm_f FileList['*.o']
26
+ Dir['*~'].each { |fn| rm_f fn }
27
+ end
28
+
29
+ task :clobber => [:clean] do
30
+ rm_f "main"
31
+ end
32
+
33
+ task :run => ["main"] do
34
+ sh "./main"
35
+ end
@@ -0,0 +1,6 @@
1
+ #include <stdio.h>
2
+
3
+ void a()
4
+ {
5
+ printf ("In function a\n");
6
+ }
@@ -0,0 +1,6 @@
1
+ #include <stdio.h>
2
+
3
+ void b()
4
+ {
5
+ printf ("In function b\n");
6
+ }
@@ -0,0 +1,11 @@
1
+ #include <stdio.h>
2
+
3
+ extern void a();
4
+ extern void b();
5
+
6
+ int main ()
7
+ {
8
+ a();
9
+ b();
10
+ return 0;
11
+ }
@@ -0,0 +1,42 @@
1
+ = Glossary
2
+
3
+ action ::
4
+ Code to be executed in order to perform a task. Actions in a Rakefile are
5
+ specified in a code block. (Usually delimited by +do+/+end+ pairs.)
6
+
7
+ execute ::
8
+ When a task is executed, all of its actions are performed in the order they
9
+ were defined. Note that, unlike <tt>invoke</tt>, <tt>execute</tt> always
10
+ executes the actions (without invoking or executing the prerequisites).
11
+
12
+ file task (Rake::FileTask) ::
13
+ A file task is a task whose purpose is to create a file (which has the same
14
+ name as the task). When invoked, a file task will only execute if one or
15
+ more of the following conditions are true.
16
+
17
+ 1. The associated file does not exist.
18
+ 2. A prerequisite has a later time stamp than the existing file.
19
+
20
+ Because normal Tasks always have the current time as timestamp, a FileTask
21
+ that has a normal Task prerequisite will always execute.
22
+
23
+ invoke ::
24
+ When a task is invoked, first we check to see if it has been invoked before.
25
+ If it has been, then nothing else is done. If this is the first time it has
26
+ been invoked, then we invoke each of its prerequisites. Finally, we check
27
+ to see if we need to execute the actions of this task by calling
28
+ Rake::Task#needed?. If the task is needed, we execute its actions.
29
+
30
+ NOTE: Prerequisites are still invoked even if the task is not needed.
31
+
32
+ prerequisites ::
33
+ Every task has a (possibly empty) set of prerequisites. A prerequisite P to
34
+ Task T is itself a task that must be invoked before Task T.
35
+
36
+ rule ::
37
+ A rule is a recipe for synthesizing a task when no task is explicitly
38
+ defined. Rules generally synthesize file tasks.
39
+
40
+ task (Rake::Task) ::
41
+ The basic unit of work in a Rakefile. A task has a name, a set of
42
+ prerequisites, and a list of actions to be performed.
@@ -0,0 +1,592 @@
1
+ # frozen_string_literal: true
2
+ module RDoc
3
+ module Page
4
+
5
+ FONTS = "\"Bitstream Vera Sans\", Verdana, Arial, Helvetica, sans-serif"
6
+
7
+ STYLE = <<CSS
8
+ a {
9
+ color: #00F;
10
+ text-decoration: none;
11
+ }
12
+
13
+ a:hover {
14
+ color: #77F;
15
+ text-decoration: underline;
16
+ }
17
+
18
+ body, td, p {
19
+ font-family: %fonts%;
20
+ background: #FFF;
21
+ color: #000;
22
+ margin: 0px;
23
+ font-size: small;
24
+ }
25
+
26
+ #content {
27
+ margin: 2em;
28
+ }
29
+
30
+ #description p {
31
+ margin-bottom: 0.5em;
32
+ }
33
+
34
+ .sectiontitle {
35
+ margin-top: 1em;
36
+ margin-bottom: 1em;
37
+ padding: 0.5em;
38
+ padding-left: 2em;
39
+ background: #005;
40
+ color: #FFF;
41
+ font-weight: bold;
42
+ border: 1px dotted black;
43
+ }
44
+
45
+ .attr-rw {
46
+ padding-left: 1em;
47
+ padding-right: 1em;
48
+ text-align: center;
49
+ color: #055;
50
+ }
51
+
52
+ .attr-name {
53
+ font-weight: bold;
54
+ }
55
+
56
+ .attr-desc {
57
+ }
58
+
59
+ .attr-value {
60
+ font-family: monospace;
61
+ }
62
+
63
+ .file-title-prefix {
64
+ font-size: large;
65
+ }
66
+
67
+ .file-title {
68
+ font-size: large;
69
+ font-weight: bold;
70
+ background: #005;
71
+ color: #FFF;
72
+ }
73
+
74
+ .banner {
75
+ background: #005;
76
+ color: #FFF;
77
+ border: 1px solid black;
78
+ padding: 1em;
79
+ }
80
+
81
+ .banner td {
82
+ background: transparent;
83
+ color: #FFF;
84
+ }
85
+
86
+ h1 a, h2 a, .sectiontitle a, .banner a {
87
+ color: #FF0;
88
+ }
89
+
90
+ h1 a:hover, h2 a:hover, .sectiontitle a:hover, .banner a:hover {
91
+ color: #FF7;
92
+ }
93
+
94
+ .dyn-source {
95
+ display: none;
96
+ background: #FFE;
97
+ color: #000;
98
+ border: 1px dotted black;
99
+ margin: 0.5em 2em 0.5em 2em;
100
+ padding: 0.5em;
101
+ }
102
+
103
+ .dyn-source .cmt {
104
+ color: #00F;
105
+ font-style: italic;
106
+ }
107
+
108
+ .dyn-source .kw {
109
+ color: #070;
110
+ font-weight: bold;
111
+ }
112
+
113
+ .method {
114
+ margin-left: 1em;
115
+ margin-right: 1em;
116
+ margin-bottom: 1em;
117
+ }
118
+
119
+ .description pre {
120
+ padding: 0.5em;
121
+ border: 1px dotted black;
122
+ background: #FFE;
123
+ }
124
+
125
+ .method .title {
126
+ font-family: monospace;
127
+ font-size: large;
128
+ border-bottom: 1px dashed black;
129
+ margin-bottom: 0.3em;
130
+ padding-bottom: 0.1em;
131
+ }
132
+
133
+ .method .description, .method .sourcecode {
134
+ margin-left: 1em;
135
+ }
136
+
137
+ .description p, .sourcecode p {
138
+ margin-bottom: 0.5em;
139
+ }
140
+
141
+ .method .sourcecode p.source-link {
142
+ text-indent: 0em;
143
+ margin-top: 0.5em;
144
+ }
145
+
146
+ .method .aka {
147
+ margin-top: 0.3em;
148
+ margin-left: 1em;
149
+ font-style: italic;
150
+ text-indent: 2em;
151
+ }
152
+
153
+ h1 {
154
+ padding: 1em;
155
+ border: 1px solid black;
156
+ font-size: x-large;
157
+ font-weight: bold;
158
+ color: #FFF;
159
+ background: #007;
160
+ }
161
+
162
+ h2 {
163
+ padding: 0.5em 1em 0.5em 1em;
164
+ border: 1px solid black;
165
+ font-size: large;
166
+ font-weight: bold;
167
+ color: #FFF;
168
+ background: #009;
169
+ }
170
+
171
+ h3, h4, h5, h6 {
172
+ padding: 0.2em 1em 0.2em 1em;
173
+ border: 1px dashed black;
174
+ color: #000;
175
+ background: #AAF;
176
+ }
177
+
178
+ .sourcecode > pre {
179
+ padding: 0.5em;
180
+ border: 1px dotted black;
181
+ background: #FFE;
182
+ }
183
+
184
+ CSS
185
+
186
+ XHTML_PREAMBLE = %{<?xml version="1.0" encoding="%charset%"?>
187
+ <!DOCTYPE html
188
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
189
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
190
+ }
191
+
192
+ HEADER = XHTML_PREAMBLE + <<ENDHEADER
193
+ <html>
194
+ <head>
195
+ <title>%title%</title>
196
+ <meta http-equiv="Content-Type" content="text/html; charset=%charset%" />
197
+ <link rel="stylesheet" href="%style_url%" type="text/css" media="screen" />
198
+
199
+ <script language="JavaScript" type="text/javascript">
200
+ // <![CDATA[
201
+
202
+ function toggleSource( id )
203
+ {
204
+ var elem
205
+ var link
206
+
207
+ if( document.getElementById )
208
+ {
209
+ elem = document.getElementById( id )
210
+ link = document.getElementById( "l_" + id )
211
+ }
212
+ else if ( document.all )
213
+ {
214
+ elem = eval( "document.all." + id )
215
+ link = eval( "document.all.l_" + id )
216
+ }
217
+ else
218
+ return false;
219
+
220
+ if( elem.style.display == "block" )
221
+ {
222
+ elem.style.display = "none"
223
+ link.innerHTML = "show source"
224
+ }
225
+ else
226
+ {
227
+ elem.style.display = "block"
228
+ link.innerHTML = "hide source"
229
+ }
230
+ }
231
+
232
+ function openCode( url )
233
+ {
234
+ window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
235
+ }
236
+ // ]]>
237
+ </script>
238
+ </head>
239
+
240
+ <body>
241
+ ENDHEADER
242
+
243
+ FILE_PAGE = <<HTML
244
+ <table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'>
245
+ <tr><td>
246
+ <table width="100%" border='0' cellpadding='0' cellspacing='0'><tr>
247
+ <td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />%short_name%</td>
248
+ <td align="right">
249
+ <table border='0' cellspacing="0" cellpadding="2">
250
+ <tr>
251
+ <td>Path:</td>
252
+ <td>%full_path%
253
+ IF:cvsurl
254
+ &nbsp;(<a href="%cvsurl%">CVS</a>)
255
+ ENDIF:cvsurl
256
+ </td>
257
+ </tr>
258
+ <tr>
259
+ <td>Modified:</td>
260
+ <td>%dtm_modified%</td>
261
+ </tr>
262
+ </table>
263
+ </td></tr>
264
+ </table>
265
+ </td></tr>
266
+ </table><br>
267
+ HTML
268
+
269
+ ###################################################################
270
+
271
+ CLASS_PAGE = <<HTML
272
+ <table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
273
+ <td class="file-title"><span class="file-title-prefix">%classmod%</span><br />%full_name%</td>
274
+ <td align="right">
275
+ <table cellspacing=0 cellpadding=2>
276
+ <tr valign="top">
277
+ <td>In:</td>
278
+ <td>
279
+ START:infiles
280
+ HREF:full_path_url:full_path:
281
+ IF:cvsurl
282
+ &nbsp;(<a href="%cvsurl%">CVS</a>)
283
+ ENDIF:cvsurl
284
+ END:infiles
285
+ </td>
286
+ </tr>
287
+ IF:parent
288
+ <tr>
289
+ <td>Parent:</td>
290
+ <td>
291
+ IF:par_url
292
+ <a href="%par_url%">
293
+ ENDIF:par_url
294
+ %parent%
295
+ IF:par_url
296
+ </a>
297
+ ENDIF:par_url
298
+ </td>
299
+ </tr>
300
+ ENDIF:parent
301
+ </table>
302
+ </td>
303
+ </tr>
304
+ </table>
305
+ HTML
306
+
307
+ ###################################################################
308
+
309
+ METHOD_LIST = <<HTML
310
+ <div id="content">
311
+ IF:diagram
312
+ <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center">
313
+ %diagram%
314
+ </td></tr></table>
315
+ ENDIF:diagram
316
+
317
+ IF:description
318
+ <div class="description">%description%</div>
319
+ ENDIF:description
320
+
321
+ IF:requires
322
+ <div class="sectiontitle">Required Files</div>
323
+ <ul>
324
+ START:requires
325
+ <li>HREF:aref:name:</li>
326
+ END:requires
327
+ </ul>
328
+ ENDIF:requires
329
+
330
+ IF:toc
331
+ <div class="sectiontitle">Contents</div>
332
+ <ul>
333
+ START:toc
334
+ <li><a href="#%href%">%secname%</a></li>
335
+ END:toc
336
+ </ul>
337
+ ENDIF:toc
338
+
339
+ IF:methods
340
+ <div class="sectiontitle">Methods</div>
341
+ <ul>
342
+ START:methods
343
+ <li>HREF:aref:name:</li>
344
+ END:methods
345
+ </ul>
346
+ ENDIF:methods
347
+
348
+ IF:includes
349
+ <div class="sectiontitle">Included Modules</div>
350
+ <ul>
351
+ START:includes
352
+ <li>HREF:aref:name:</li>
353
+ END:includes
354
+ </ul>
355
+ ENDIF:includes
356
+
357
+ START:sections
358
+ IF:sectitle
359
+ <div class="sectiontitle"><a nem="%secsequence%">%sectitle%</a></div>
360
+ IF:seccomment
361
+ <div class="description">
362
+ %seccomment%
363
+ </div>
364
+ ENDIF:seccomment
365
+ ENDIF:sectitle
366
+
367
+ IF:classlist
368
+ <div class="sectiontitle">Classes and Modules</div>
369
+ %classlist%
370
+ ENDIF:classlist
371
+
372
+ IF:constants
373
+ <div class="sectiontitle">Constants</div>
374
+ <table border='0' cellpadding='5'>
375
+ START:constants
376
+ <tr valign='top'>
377
+ <td class="attr-name">%name%</td>
378
+ <td>=</td>
379
+ <td class="attr-value">%value%</td>
380
+ </tr>
381
+ IF:desc
382
+ <tr valign='top'>
383
+ <td>&nbsp;</td>
384
+ <td colspan="2" class="attr-desc">%desc%</td>
385
+ </tr>
386
+ ENDIF:desc
387
+ END:constants
388
+ </table>
389
+ ENDIF:constants
390
+
391
+ IF:attributes
392
+ <div class="sectiontitle">Attributes</div>
393
+ <table border='0' cellpadding='5'>
394
+ START:attributes
395
+ <tr valign='top'>
396
+ <td class='attr-rw'>
397
+ IF:rw
398
+ [%rw%]
399
+ ENDIF:rw
400
+ </td>
401
+ <td class='attr-name'>%name%</td>
402
+ <td class='attr-desc'>%a_desc%</td>
403
+ </tr>
404
+ END:attributes
405
+ </table>
406
+ ENDIF:attributes
407
+
408
+ IF:method_list
409
+ START:method_list
410
+ IF:methods
411
+ <div class="sectiontitle">%type% %category% methods</div>
412
+ START:methods
413
+ <div class="method">
414
+ <div class="title">
415
+ IF:callseq
416
+ <a name="%aref%"></a><b>%callseq%</b>
417
+ ENDIF:callseq
418
+ IFNOT:callseq
419
+ <a name="%aref%"></a><b>%name%</b>%params%
420
+ ENDIF:callseq
421
+ IF:codeurl
422
+ [ <a href="javascript:openCode('%codeurl%')">source</a> ]
423
+ ENDIF:codeurl
424
+ </div>
425
+ IF:m_desc
426
+ <div class="description">
427
+ %m_desc%
428
+ </div>
429
+ ENDIF:m_desc
430
+ IF:aka
431
+ <div class="aka">
432
+ This method is also aliased as
433
+ START:aka
434
+ <a href="%aref%">%name%</a>
435
+ END:aka
436
+ </div>
437
+ ENDIF:aka
438
+ IF:sourcecode
439
+ <div class="sourcecode">
440
+ <p class="source-link">[ <a href="javascript:toggleSource('%aref%_source')" id="l_%aref%_source">show source</a> ]</p>
441
+ <div id="%aref%_source" class="dyn-source">
442
+ <pre>
443
+ %sourcecode%
444
+ </pre>
445
+ </div>
446
+ </div>
447
+ ENDIF:sourcecode
448
+ </div>
449
+ END:methods
450
+ ENDIF:methods
451
+ END:method_list
452
+ ENDIF:method_list
453
+ END:sections
454
+ </div>
455
+ HTML
456
+
457
+ FOOTER = <<ENDFOOTER
458
+ </body>
459
+ </html>
460
+ ENDFOOTER
461
+
462
+ BODY = HEADER + <<ENDBODY
463
+ !INCLUDE! <!-- banner header -->
464
+
465
+ <div id="bodyContent">
466
+ #{METHOD_LIST}
467
+ </div>
468
+
469
+ #{FOOTER}
470
+ ENDBODY
471
+
472
+ ########################## Source code ##########################
473
+
474
+ SRC_PAGE = XHTML_PREAMBLE + <<HTML
475
+ <html>
476
+ <head><title>%title%</title>
477
+ <meta http-equiv="Content-Type" content="text/html; charset=%charset%">
478
+ <style>
479
+ .ruby-comment { color: green; font-style: italic }
480
+ .ruby-constant { color: #4433aa; font-weight: bold; }
481
+ .ruby-identifier { color: #222222; }
482
+ .ruby-ivar { color: #2233dd; }
483
+ .ruby-keyword { color: #3333FF; font-weight: bold }
484
+ .ruby-node { color: #777777; }
485
+ .ruby-operator { color: #111111; }
486
+ .ruby-regexp { color: #662222; }
487
+ .ruby-value { color: #662222; font-style: italic }
488
+ .kw { color: #3333FF; font-weight: bold }
489
+ .cmt { color: green; font-style: italic }
490
+ .str { color: #662222; font-style: italic }
491
+ .re { color: #662222; }
492
+ </style>
493
+ </head>
494
+ <body bgcolor="white">
495
+ <pre>%code%</pre>
496
+ </body>
497
+ </html>
498
+ HTML
499
+
500
+ ########################## Index ################################
501
+
502
+ FR_INDEX_BODY = <<HTML
503
+ !INCLUDE!
504
+ HTML
505
+
506
+ FILE_INDEX = XHTML_PREAMBLE + <<HTML
507
+ <html>
508
+ <head>
509
+ <meta http-equiv="Content-Type" content="text/html; charset=%charset%">
510
+ <style>
511
+ <!--
512
+ body {
513
+ background-color: #EEE;
514
+ font-family: #{FONTS};
515
+ color: #000;
516
+ margin: 0px;
517
+ }
518
+ .banner {
519
+ background: #005;
520
+ color: #FFF;
521
+ padding: 0.2em;
522
+ font-size: small;
523
+ font-weight: bold;
524
+ text-align: center;
525
+ }
526
+ .entries {
527
+ margin: 0.25em 1em 0 1em;
528
+ font-size: x-small;
529
+ }
530
+ a {
531
+ color: #00F;
532
+ text-decoration: none;
533
+ white-space: nowrap;
534
+ }
535
+ a:hover {
536
+ color: #77F;
537
+ text-decoration: underline;
538
+ }
539
+ -->
540
+ </style>
541
+ <base target="docwin">
542
+ </head>
543
+ <body>
544
+ <div class="banner">%list_title%</div>
545
+ <div class="entries">
546
+ START:entries
547
+ <a href="%href%">%name%</a><br>
548
+ END:entries
549
+ </div>
550
+ </body></html>
551
+ HTML
552
+
553
+ CLASS_INDEX = FILE_INDEX
554
+ METHOD_INDEX = FILE_INDEX
555
+
556
+ INDEX = XHTML_PREAMBLE + <<HTML
557
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
558
+ <head>
559
+ <title>%title%</title>
560
+ <meta http-equiv="Content-Type" content="text/html; charset=%charset%">
561
+ </head>
562
+
563
+ <frameset cols="20%,*">
564
+ <frameset rows="15%,35%,50%">
565
+ <frame src="fr_file_index.html" title="Files" name="Files" />
566
+ <frame src="fr_class_index.html" name="Classes" />
567
+ <frame src="fr_method_index.html" name="Methods" />
568
+ </frameset>
569
+ IF:inline_source
570
+ <frame src="%initial_page%" name="docwin">
571
+ ENDIF:inline_source
572
+ IFNOT:inline_source
573
+ <frameset rows="80%,20%">
574
+ <frame src="%initial_page%" name="docwin">
575
+ <frame src="blank.html" name="source">
576
+ </frameset>
577
+ ENDIF:inline_source
578
+ <noframes>
579
+ <body bgcolor="white">
580
+ Click <a href="html/index.html">here</a> for a non-frames
581
+ version of this page.
582
+ </body>
583
+ </noframes>
584
+ </frameset>
585
+
586
+ </html>
587
+ HTML
588
+
589
+ end
590
+ end
591
+
592
+