vcs 0.1 → 0.2.148
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +17 -3
- data/bin/vcs +57 -34
- data/doc/jamis.rb +564 -0
- data/ruby_ex/abstract.rb +254 -0
- data/ruby_ex/abstract_node.rb +85 -0
- data/ruby_ex/algorithms/simulated_annealing.rb +140 -0
- data/ruby_ex/array_each_pair.rb +18 -0
- data/ruby_ex/ask.rb +101 -0
- data/ruby_ex/attributed_class.rb +302 -0
- data/ruby_ex/cache.rb +373 -0
- data/ruby_ex/checkout.rb +12 -0
- data/ruby_ex/choose.rb +271 -0
- data/ruby_ex/commands.rb +18 -0
- data/ruby_ex/commands/command.rb +401 -0
- data/ruby_ex/commands/datas.rb +16 -0
- data/ruby_ex/commands/datas/data.rb +33 -0
- data/ruby_ex/commands/datas/factory.rb +66 -0
- data/ruby_ex/commands/factory.rb +66 -0
- data/ruby_ex/commands/helpers.rb +67 -0
- data/ruby_ex/commands/pipe.rb +64 -0
- data/ruby_ex/commands/runners.rb +17 -0
- data/ruby_ex/commands/runners/exec.rb +49 -0
- data/ruby_ex/commands/runners/fork.rb +97 -0
- data/ruby_ex/commands/runners/runner.rb +107 -0
- data/ruby_ex/commands/seq.rb +27 -0
- data/ruby_ex/config_file.rb +96 -0
- data/ruby_ex/const_regexp.rb +59 -0
- data/ruby_ex/daemon.rb +134 -0
- data/ruby_ex/diff.rb +667 -0
- data/ruby_ex/dlogger.rb +62 -0
- data/ruby_ex/drb/dispatcher.rb +252 -0
- data/ruby_ex/drb/dispatcher_server_test.rb +29 -0
- data/ruby_ex/drb/drb_observable.rb +97 -0
- data/ruby_ex/drb/drb_observable_pool.rb +27 -0
- data/ruby_ex/drb/drb_service.rb +43 -0
- data/ruby_ex/drb/drb_undumped_attributes.rb +55 -0
- data/ruby_ex/drb/drb_undumped_indexed_object.rb +54 -0
- data/ruby_ex/drb/insecure_protected_methods.rb +103 -0
- data/ruby_ex/drb/session_client_test.rb +40 -0
- data/ruby_ex/drb/session_manager.rb +246 -0
- data/ruby_ex/drb/session_server.rb +53 -0
- data/ruby_ex/dtime.rb +143 -0
- data/ruby_ex/dumpable_proc.rb +63 -0
- data/ruby_ex/exception.rb +32 -0
- data/ruby_ex/filetype.rb +229 -0
- data/ruby_ex/fileutils_ex.rb +44 -0
- data/ruby_ex/fold.rb +58 -0
- data/ruby_ex/generate_id.rb +44 -0
- data/ruby_ex/hookable.rb +262 -0
- data/ruby_ex/hooker.rb +54 -0
- data/ruby_ex/inactive_timeout.rb +137 -0
- data/ruby_ex/indexed_node.rb +66 -0
- data/ruby_ex/io_marshal.rb +100 -0
- data/ruby_ex/ioo.rb +194 -0
- data/ruby_ex/labeled_node.rb +63 -0
- data/ruby_ex/logger_observer.rb +23 -0
- data/ruby_ex/md5sum.rb +66 -0
- data/ruby_ex/mktemp.rb +208 -0
- data/ruby_ex/module/attr_once.rb +36 -0
- data/ruby_ex/module/autoload_tree.rb +75 -0
- data/ruby_ex/module/hierarchy.rb +335 -0
- data/ruby_ex/module/instance_method_visibility.rb +73 -0
- data/ruby_ex/module_ex.rb +11 -0
- data/ruby_ex/node.rb +80 -0
- data/ruby_ex/object_monitor.rb +145 -0
- data/ruby_ex/object_monitor_activity.rb +33 -0
- data/ruby_ex/observable.rb +140 -0
- data/ruby_ex/observable_pool.rb +293 -0
- data/ruby_ex/orderedhash.rb +252 -0
- data/ruby_ex/pathname_ex.rb +152 -0
- data/ruby_ex/pp_hierarchy.rb +29 -0
- data/ruby_ex/pseudo_cache.rb +190 -0
- data/ruby_ex/queue.rb +56 -0
- data/ruby_ex/random_generators.rb +25 -0
- data/ruby_ex/random_generators/random_generator.rb +31 -0
- data/ruby_ex/random_generators/ruby.rb +23 -0
- data/ruby_ex/safe_eval.rb +348 -0
- data/ruby_ex/sendmail.rb +215 -0
- data/ruby_ex/service_manager.rb +121 -0
- data/ruby_ex/session/administrable.rb +120 -0
- data/ruby_ex/session/client.rb +153 -0
- data/ruby_ex/session/const.rb +18 -0
- data/ruby_ex/session/dispatcher.rb +184 -0
- data/ruby_ex/session/error.rb +21 -0
- data/ruby_ex/session/fetchable.rb +57 -0
- data/ruby_ex/session/fetcher.rb +62 -0
- data/ruby_ex/session/hookable.rb +26 -0
- data/ruby_ex/session/profile.rb +110 -0
- data/ruby_ex/session/server.rb +582 -0
- data/ruby_ex/session/test/administrable_test.rb +337 -0
- data/ruby_ex/session/test/basic_test.rb +523 -0
- data/ruby_ex/session/test/dispatcher_test.rb +409 -0
- data/ruby_ex/session/test/fetchable_test.rb +119 -0
- data/ruby_ex/session/test/sub_server_test.rb +188 -0
- data/ruby_ex/shuffle.rb +30 -0
- data/ruby_ex/spring.rb +136 -0
- data/ruby_ex/spring_set.rb +137 -0
- data/ruby_ex/string_ex.rb +28 -0
- data/ruby_ex/symtbl.rb +106 -0
- data/ruby_ex/synflow.rb +474 -0
- data/ruby_ex/test/unit/ui/yaml/testrunner.rb +164 -0
- data/ruby_ex/thread_mutex.rb +10 -0
- data/ruby_ex/timeout_ex.rb +81 -0
- data/ruby_ex/top_down.rb +73 -0
- data/ruby_ex/trace.rb +26 -0
- data/ruby_ex/uri/druby.rb +81 -0
- data/ruby_ex/uri/file.rb +65 -0
- data/ruby_ex/uri/ftp_ex.rb +37 -0
- data/ruby_ex/uri/http_ex.rb +43 -0
- data/ruby_ex/uri/ssh.rb +92 -0
- data/ruby_ex/uri/svn.rb +118 -0
- data/ruby_ex/uri_ex.rb +45 -0
- data/ruby_ex/verbose_object.rb +30 -0
- data/ruby_ex/version.rb +66 -0
- data/ruby_ex/yaml/basenode_ext.rb +63 -0
- data/ruby_ex/yaml/chop_header.rb +23 -0
- data/ruby_ex/yaml/transform.rb +449 -0
- data/ruby_ex/yaml/yregexpath.rb +76 -0
- data/src/changelog.rb +28 -18
- data/src/conflict.rb +20 -0
- data/src/diff.rb +18 -0
- data/src/diffstat.rb +9 -3
- data/src/last_changed_date.rb +18 -0
- data/src/mail.rb +33 -65
- data/src/message.rb +15 -9
- data/src/mycommit.rb +29 -14
- data/src/news.rb +24 -3
- data/src/status.rb +17 -0
- data/src/svn.rb +2 -2
- data/src/vcs.rb +24 -3
- metadata +124 -5
- data/lrdetools.rb +0 -12
data/Rakefile
CHANGED
@@ -2,15 +2,17 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'rake/testtask'
|
4
4
|
require 'rake/packagetask'
|
5
|
+
require 'rake/rdoctask'
|
5
6
|
require 'rake/gempackagetask'
|
6
7
|
require 'rake/contrib/rubyforgepublisher'
|
7
8
|
|
8
|
-
PKG_VERSION =
|
9
|
+
PKG_VERSION = "0.2.#{`vcs-svn rev`.chomp}"
|
9
10
|
|
10
11
|
PKG_FILES = FileList[*%w"
|
11
12
|
src/**/*.rb
|
13
|
+
ruby_ex/**/*.rb
|
12
14
|
bin/**/*
|
13
|
-
|
15
|
+
doc/**/*
|
14
16
|
[A-Z]*
|
15
17
|
"].exclude(/\b\.svn\b|\..*\.sw[op]$|~$|README/)
|
16
18
|
|
@@ -22,6 +24,18 @@ task :rubyforge do
|
|
22
24
|
Rake::RubyForgePublisher.new('vcs', 'ertai').upload
|
23
25
|
end
|
24
26
|
|
27
|
+
|
28
|
+
Rake::RDocTask.new('doc') do |rdoc|
|
29
|
+
rdoc.title = 'Vcs -- A wrapper over any version control system'
|
30
|
+
rdoc.template = 'kilmer'
|
31
|
+
#rdoc.template = 'doc/jamis'
|
32
|
+
rdoc.options << '--line-numbers' << '--inline-source'
|
33
|
+
#rdoc.rdoc_files.add('src/vcs.rb', 'src/**/*.rb')
|
34
|
+
rdoc.rdoc_files.add('src/**/*.rb')
|
35
|
+
#rdoc.main =
|
36
|
+
end
|
37
|
+
|
38
|
+
|
25
39
|
# The Gem specification
|
26
40
|
spec = Gem::Specification.new do |s|
|
27
41
|
s.platform = Gem::Platform::RUBY
|
@@ -42,7 +56,7 @@ spec = Gem::Specification.new do |s|
|
|
42
56
|
s.require_path = 'src'
|
43
57
|
s.autorequire = 'vcs'
|
44
58
|
|
45
|
-
s.has_rdoc =
|
59
|
+
s.has_rdoc = true
|
46
60
|
s.author = 'Nicolas Pouillard'
|
47
61
|
s.email = 'ertai@lrde.epita.fr'
|
48
62
|
s.homepage = 'https://svn.lrde.epita.fr/svn/lrdetools/trunk/vcs/'
|
data/bin/vcs
CHANGED
@@ -14,31 +14,44 @@
|
|
14
14
|
require 'pathname'
|
15
15
|
require 'logger'
|
16
16
|
require 'optparse'
|
17
|
+
require 'set'
|
17
18
|
|
18
|
-
|
19
|
-
REV="$Rev$".sub(/LastChangedRevision:\s+/, '').to_i
|
20
|
-
rescue
|
21
|
-
REV=-1
|
22
|
-
end
|
23
|
-
|
19
|
+
VCS_VERSION = '0.2.148'
|
24
20
|
VCS_PATH = Pathname.new(__FILE__).expand_path
|
25
21
|
VCS_DIR, VCS = VCS_PATH.split
|
26
22
|
SRC = VCS_DIR + '..' + 'src'
|
23
|
+
RUBY_EX = VCS_DIR + '..' + 'ruby_ex'
|
27
24
|
$: << SRC.to_s
|
28
|
-
$: <<
|
25
|
+
$: << RUBY_EX.to_s
|
26
|
+
|
27
|
+
dir = Pathname.pwd
|
28
|
+
while not dir.root? and not (vcs_dir = dir + 'vcs').exist?
|
29
|
+
dir = dir + '..'
|
30
|
+
end
|
31
|
+
$: << vcs_dir
|
29
32
|
|
30
33
|
LOG = Logger.new(STDOUT)
|
31
|
-
|
34
|
+
if severity = ENV['VCS_SEVERITY']
|
35
|
+
LOG.level = Logger.const_get(severity.upcase)
|
36
|
+
else
|
37
|
+
LOG.level = Logger::INFO
|
38
|
+
end
|
32
39
|
def LOG.format_message(severity, timestamp, msg, progname)
|
33
40
|
progname += ': ' unless progname.nil? or progname.empty?
|
34
41
|
"#{VCS}: #{progname}#{severity.downcase}: #{msg}\n"
|
35
42
|
end
|
36
43
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
44
|
+
Pathname.glob("{#{SRC}/**,#{vcs_dir}}/*.rb") do |file|
|
45
|
+
LOG.debug { file.basename.to_s }
|
46
|
+
begin
|
47
|
+
require file.basename.to_s
|
48
|
+
rescue LoadError => ex
|
49
|
+
begin
|
50
|
+
require file.to_s
|
51
|
+
rescue
|
52
|
+
raise ex
|
53
|
+
end
|
54
|
+
end
|
42
55
|
end
|
43
56
|
|
44
57
|
ALL_VCS_NAMES = []
|
@@ -80,6 +93,13 @@ OPTS = OptionParser.new do |opts|
|
|
80
93
|
exit
|
81
94
|
end
|
82
95
|
|
96
|
+
opts.on('-C', '--[no-]check', 'Check your vcs configuration') do |check|
|
97
|
+
if check
|
98
|
+
Vcs.new('').call_conf_checkers
|
99
|
+
exit
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
83
103
|
opts.on('-d', '--debug LEVEL', Integer, 'Set debug level') do |anInteger|
|
84
104
|
$debug = anInteger
|
85
105
|
end
|
@@ -90,7 +110,7 @@ OPTS = OptionParser.new do |opts|
|
|
90
110
|
end
|
91
111
|
|
92
112
|
opts.on_tail('--version', 'Show version') do
|
93
|
-
STDOUT.puts "Vcs
|
113
|
+
STDOUT.puts "Vcs version: #{VCS_VERSION}"
|
94
114
|
exit
|
95
115
|
end
|
96
116
|
|
@@ -113,27 +133,30 @@ end
|
|
113
133
|
FULL_EMAIL = "#{FULLNAME} <#{EMAIL}>"
|
114
134
|
|
115
135
|
def main
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
136
|
+
vcs = nil
|
137
|
+
begin
|
138
|
+
OPTS.parse!(ARGV)
|
139
|
+
unless OPTIONS.has_key? :vcs_type
|
140
|
+
STDERR.puts OPTS
|
141
|
+
STDERR.puts "\nSpecify at least a Vcs type, or use a wrapped command\n" +
|
142
|
+
'like svn, cvs, prcs in the vcs bin directory.'
|
143
|
+
exit
|
144
|
+
end
|
145
|
+
vcs = ALL_VCS_BY_NAME[OPTIONS[:vcs_type]].new
|
146
|
+
|
147
|
+
if ARGV.empty?
|
148
|
+
meth = :help!
|
149
|
+
else
|
150
|
+
meth = ARGV.shift.sub(/([^!])$/, '\1!')
|
151
|
+
end
|
124
152
|
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
153
|
+
vcs.send(meth, *ARGV)
|
154
|
+
|
155
|
+
rescue Exception
|
156
|
+
vcs.call_handlers unless vcs.nil?
|
157
|
+
LOG.debug { raise }
|
158
|
+
LOG.error $!.to_s.sub(/\.$/, '') unless $!.to_s == 'exit'
|
129
159
|
end
|
130
|
-
|
131
|
-
vcs.send(meth, *ARGV)
|
132
160
|
end
|
133
161
|
|
134
|
-
|
135
|
-
main()
|
136
|
-
rescue Exception
|
137
|
-
raise if $debug > 0
|
138
|
-
LOG.error $!.to_s.sub(/\.$/, '') unless $!.to_s == 'exit'
|
139
|
-
end
|
162
|
+
main()
|
data/doc/jamis.rb
ADDED
@@ -0,0 +1,564 @@
|
|
1
|
+
module RDoc
|
2
|
+
module Page
|
3
|
+
|
4
|
+
FONTS = "\"Bitstream Vera Sans\", Verdana, Arial, Helvetica, sans-serif"
|
5
|
+
|
6
|
+
STYLE = <<CSS
|
7
|
+
a {
|
8
|
+
color: #00F;
|
9
|
+
text-decoration: none;
|
10
|
+
}
|
11
|
+
|
12
|
+
a:hover {
|
13
|
+
color: #77F;
|
14
|
+
text-decoration: underline;
|
15
|
+
}
|
16
|
+
|
17
|
+
body, td, p {
|
18
|
+
font-family: %fonts%;
|
19
|
+
background: #FFF;
|
20
|
+
color: #000;
|
21
|
+
margin: 0px;
|
22
|
+
font-size: small;
|
23
|
+
}
|
24
|
+
|
25
|
+
#content {
|
26
|
+
margin: 2em;
|
27
|
+
}
|
28
|
+
|
29
|
+
#description p {
|
30
|
+
margin-bottom: 0.5em;
|
31
|
+
}
|
32
|
+
|
33
|
+
.sectiontitle {
|
34
|
+
margin-top: 1em;
|
35
|
+
margin-bottom: 1em;
|
36
|
+
padding: 0.5em;
|
37
|
+
padding-left: 2em;
|
38
|
+
background: #005;
|
39
|
+
color: #FFF;
|
40
|
+
font-weight: bold;
|
41
|
+
border: 1px dotted black;
|
42
|
+
}
|
43
|
+
|
44
|
+
.attr-rw {
|
45
|
+
padding-left: 1em;
|
46
|
+
padding-right: 1em;
|
47
|
+
text-align: center;
|
48
|
+
color: #055;
|
49
|
+
}
|
50
|
+
|
51
|
+
.attr-name {
|
52
|
+
font-weight: bold;
|
53
|
+
}
|
54
|
+
|
55
|
+
.attr-desc {
|
56
|
+
}
|
57
|
+
|
58
|
+
.attr-value {
|
59
|
+
font-family: monospace;
|
60
|
+
}
|
61
|
+
|
62
|
+
.file-title-prefix {
|
63
|
+
font-size: large;
|
64
|
+
}
|
65
|
+
|
66
|
+
.file-title {
|
67
|
+
font-size: large;
|
68
|
+
font-weight: bold;
|
69
|
+
background: #005;
|
70
|
+
color: #FFF;
|
71
|
+
}
|
72
|
+
|
73
|
+
.banner {
|
74
|
+
background: #005;
|
75
|
+
color: #FFF;
|
76
|
+
border: 1px solid black;
|
77
|
+
padding: 1em;
|
78
|
+
}
|
79
|
+
|
80
|
+
.banner td {
|
81
|
+
background: transparent;
|
82
|
+
color: #FFF;
|
83
|
+
}
|
84
|
+
|
85
|
+
h1 a, h2 a, .sectiontitle a, .banner a {
|
86
|
+
color: #FF0;
|
87
|
+
}
|
88
|
+
|
89
|
+
h1 a:hover, h2 a:hover, .sectiontitle a:hover, .banner a:hover {
|
90
|
+
color: #FF7;
|
91
|
+
}
|
92
|
+
|
93
|
+
.dyn-source {
|
94
|
+
display: none;
|
95
|
+
background: #FFE;
|
96
|
+
color: #000;
|
97
|
+
border: 1px dotted black;
|
98
|
+
margin: 0.5em 2em 0.5em 2em;
|
99
|
+
padding: 0.5em;
|
100
|
+
}
|
101
|
+
|
102
|
+
.dyn-source .cmt {
|
103
|
+
color: #00F;
|
104
|
+
font-style: italic;
|
105
|
+
}
|
106
|
+
|
107
|
+
.dyn-source .kw {
|
108
|
+
color: #070;
|
109
|
+
font-weight: bold;
|
110
|
+
}
|
111
|
+
|
112
|
+
.method {
|
113
|
+
margin-left: 1em;
|
114
|
+
margin-right: 1em;
|
115
|
+
margin-bottom: 1em;
|
116
|
+
}
|
117
|
+
|
118
|
+
.description pre {
|
119
|
+
padding: 0.5em;
|
120
|
+
border: 1px dotted black;
|
121
|
+
background: #FFE;
|
122
|
+
}
|
123
|
+
|
124
|
+
.method .title {
|
125
|
+
font-family: monospace;
|
126
|
+
font-size: large;
|
127
|
+
border-bottom: 1px dashed black;
|
128
|
+
margin-bottom: 0.3em;
|
129
|
+
padding-bottom: 0.1em;
|
130
|
+
}
|
131
|
+
|
132
|
+
.method .description, .method .sourcecode {
|
133
|
+
margin-left: 1em;
|
134
|
+
}
|
135
|
+
|
136
|
+
.description p, .sourcecode p {
|
137
|
+
margin-bottom: 0.5em;
|
138
|
+
}
|
139
|
+
|
140
|
+
.method .sourcecode p.source-link {
|
141
|
+
text-indent: 0em;
|
142
|
+
margin-top: 0.5em;
|
143
|
+
}
|
144
|
+
|
145
|
+
.method .aka {
|
146
|
+
margin-top: 0.3em;
|
147
|
+
margin-left: 1em;
|
148
|
+
font-style: italic;
|
149
|
+
text-indent: 2em;
|
150
|
+
}
|
151
|
+
|
152
|
+
h1 {
|
153
|
+
padding: 1em;
|
154
|
+
border: 1px solid black;
|
155
|
+
font-size: x-large;
|
156
|
+
font-weight: bold;
|
157
|
+
color: #FFF;
|
158
|
+
background: #007;
|
159
|
+
}
|
160
|
+
|
161
|
+
h2 {
|
162
|
+
padding: 0.5em 1em 0.5em 1em;
|
163
|
+
border: 1px solid black;
|
164
|
+
font-size: large;
|
165
|
+
font-weight: bold;
|
166
|
+
color: #FFF;
|
167
|
+
background: #009;
|
168
|
+
}
|
169
|
+
|
170
|
+
h3, h4, h5, h6 {
|
171
|
+
padding: 0.2em 1em 0.2em 1em;
|
172
|
+
border: 1px dashed black;
|
173
|
+
color: #000;
|
174
|
+
background: #AAF;
|
175
|
+
}
|
176
|
+
|
177
|
+
.sourcecode > pre {
|
178
|
+
padding: 0.5em;
|
179
|
+
border: 1px dotted black;
|
180
|
+
background: #FFE;
|
181
|
+
}
|
182
|
+
|
183
|
+
CSS
|
184
|
+
|
185
|
+
BODY = <<HTML
|
186
|
+
<html>
|
187
|
+
<head>
|
188
|
+
<title>%title%</title>
|
189
|
+
<meta http-equiv="Content-Type" content="text/html; charset=%charset%" />
|
190
|
+
<link rel="stylesheet" href="%style_url%" type="text/css" media="screen" />
|
191
|
+
|
192
|
+
<script type="text/javascript" language="JavaScript">
|
193
|
+
<!--
|
194
|
+
function toggleSource( id )
|
195
|
+
{
|
196
|
+
var elem
|
197
|
+
var link
|
198
|
+
|
199
|
+
if( document.all )
|
200
|
+
{
|
201
|
+
elem = eval( "document.all." + id )
|
202
|
+
link = eval( "document.all.l_" + id )
|
203
|
+
}
|
204
|
+
else
|
205
|
+
{
|
206
|
+
elem = document.getElementById( id )
|
207
|
+
link = document.getElementById( "l_" + id )
|
208
|
+
}
|
209
|
+
|
210
|
+
if( elem.style.display == "block" )
|
211
|
+
{
|
212
|
+
elem.style.display = "none"
|
213
|
+
link.innerHTML = "show source"
|
214
|
+
}
|
215
|
+
else
|
216
|
+
{
|
217
|
+
elem.style.display = "block"
|
218
|
+
link.innerHTML = "hide source"
|
219
|
+
}
|
220
|
+
}
|
221
|
+
|
222
|
+
function openCode( url )
|
223
|
+
{
|
224
|
+
window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
|
225
|
+
}
|
226
|
+
//-->
|
227
|
+
</script>
|
228
|
+
</head>
|
229
|
+
|
230
|
+
<body>
|
231
|
+
!INCLUDE! <!-- banner header -->
|
232
|
+
|
233
|
+
<div id="content">
|
234
|
+
IF:diagram
|
235
|
+
<table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center">
|
236
|
+
%diagram%
|
237
|
+
</td></tr></table>
|
238
|
+
ENDIF:diagram
|
239
|
+
|
240
|
+
IF:description
|
241
|
+
<div class="description">%description%</div>
|
242
|
+
ENDIF:description
|
243
|
+
|
244
|
+
IF:requires
|
245
|
+
<div class="sectiontitle">Required Files</div>
|
246
|
+
<ul>
|
247
|
+
START:requires
|
248
|
+
<li>HREF:aref:name:</li>
|
249
|
+
END:requires
|
250
|
+
</ul>
|
251
|
+
ENDIF:requires
|
252
|
+
|
253
|
+
IF:methods
|
254
|
+
<div class="sectiontitle">Methods</div>
|
255
|
+
<ul>
|
256
|
+
START:methods
|
257
|
+
<li>HREF:aref:name:</li>
|
258
|
+
END:methods
|
259
|
+
</ul>
|
260
|
+
ENDIF:methods
|
261
|
+
|
262
|
+
IF:constants
|
263
|
+
<div class="sectiontitle">Constants</div>
|
264
|
+
<table border='0' cellpadding='5'>
|
265
|
+
START:constants
|
266
|
+
<tr valign='top'>
|
267
|
+
<td class="attr-name">%name%</td>
|
268
|
+
<td>=</td>
|
269
|
+
<td class="attr-value">%value%</td>
|
270
|
+
</tr>
|
271
|
+
IF:desc
|
272
|
+
<tr valign='top'>
|
273
|
+
<td> </td>
|
274
|
+
<td colspan="2" class="attr-desc">%desc%</td>
|
275
|
+
</tr>
|
276
|
+
ENDIF:desc
|
277
|
+
END:constants
|
278
|
+
</table>
|
279
|
+
ENDIF:constants
|
280
|
+
|
281
|
+
IF:attributes
|
282
|
+
<div class="sectiontitle">Attributes</div>
|
283
|
+
<table border='0' cellpadding='5'>
|
284
|
+
START:attributes
|
285
|
+
<tr valign='top'>
|
286
|
+
<td class='attr-rw'>
|
287
|
+
IF:rw
|
288
|
+
[%rw%]
|
289
|
+
ENDIF:rw
|
290
|
+
</td>
|
291
|
+
<td class='attr-name'>%name%</td>
|
292
|
+
<td class='attr-desc'>%a_desc%</td>
|
293
|
+
</tr>
|
294
|
+
END:attributes
|
295
|
+
</table>
|
296
|
+
ENDIF:attributes
|
297
|
+
|
298
|
+
IF:classlist
|
299
|
+
<div class="sectiontitle">Classes and Modules</div>
|
300
|
+
%classlist%
|
301
|
+
ENDIF:classlist
|
302
|
+
|
303
|
+
!INCLUDE! <!-- method descriptions -->
|
304
|
+
|
305
|
+
</div>
|
306
|
+
</body>
|
307
|
+
</html>
|
308
|
+
HTML
|
309
|
+
|
310
|
+
FILE_PAGE = <<HTML
|
311
|
+
<table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'>
|
312
|
+
<tr><td>
|
313
|
+
<table width="100%" border='0' cellpadding='0' cellspacing='0'><tr>
|
314
|
+
<td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />%short_name%</td>
|
315
|
+
<td align="right">
|
316
|
+
<table border='0' cellspacing="0" cellpadding="2">
|
317
|
+
<tr>
|
318
|
+
<td>Path:</td>
|
319
|
+
<td>%full_path%
|
320
|
+
IF:cvsurl
|
321
|
+
(<a href="%cvsurl%">CVS</a>)
|
322
|
+
ENDIF:cvsurl
|
323
|
+
</td>
|
324
|
+
</tr>
|
325
|
+
<tr>
|
326
|
+
<td>Modified:</td>
|
327
|
+
<td>%dtm_modified%</td>
|
328
|
+
</tr>
|
329
|
+
</table>
|
330
|
+
</td></tr>
|
331
|
+
</table>
|
332
|
+
</td></tr>
|
333
|
+
</table><br>
|
334
|
+
HTML
|
335
|
+
|
336
|
+
###################################################################
|
337
|
+
|
338
|
+
CLASS_PAGE = <<HTML
|
339
|
+
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
340
|
+
<td class="file-title"><span class="file-title-prefix">%classmod%</span><br />%full_name%</td>
|
341
|
+
<td align="right">
|
342
|
+
<table cellspacing=0 cellpadding=2>
|
343
|
+
<tr valign="top">
|
344
|
+
<td>In:</td>
|
345
|
+
<td>
|
346
|
+
START:infiles
|
347
|
+
HREF:full_path_url:full_path:
|
348
|
+
IF:cvsurl
|
349
|
+
(<a href="%cvsurl%">CVS</a>)
|
350
|
+
ENDIF:cvsurl
|
351
|
+
END:infiles
|
352
|
+
</td>
|
353
|
+
</tr>
|
354
|
+
IF:parent
|
355
|
+
<tr>
|
356
|
+
<td>Parent:</td>
|
357
|
+
<td>
|
358
|
+
IF:par_url
|
359
|
+
<a href="%par_url%">
|
360
|
+
ENDIF:par_url
|
361
|
+
%parent%
|
362
|
+
IF:par_url
|
363
|
+
</a>
|
364
|
+
ENDIF:par_url
|
365
|
+
</td>
|
366
|
+
</tr>
|
367
|
+
ENDIF:parent
|
368
|
+
</table>
|
369
|
+
</td>
|
370
|
+
</tr>
|
371
|
+
</table>
|
372
|
+
HTML
|
373
|
+
|
374
|
+
###################################################################
|
375
|
+
|
376
|
+
METHOD_LIST = <<HTML
|
377
|
+
IF:includes
|
378
|
+
<div class="sectiontitle">Included Modules</div>
|
379
|
+
<ul>
|
380
|
+
START:includes
|
381
|
+
<li>HREF:aref:name:</li>
|
382
|
+
END:includes
|
383
|
+
</ul>
|
384
|
+
ENDIF:includes
|
385
|
+
|
386
|
+
IF:method_list
|
387
|
+
START:method_list
|
388
|
+
IF:methods
|
389
|
+
<div class="sectiontitle">%type% %category% methods</div>
|
390
|
+
START:methods
|
391
|
+
<div class="method">
|
392
|
+
<div class="title">
|
393
|
+
IF:callseq
|
394
|
+
<a name="%aref%"></a><b>%callseq%</b>
|
395
|
+
ENDIF:callseq
|
396
|
+
IFNOT:callseq
|
397
|
+
<a name="%aref%"></a><b>%name%</b>%params%
|
398
|
+
ENDIF:callseq
|
399
|
+
IF:codeurl
|
400
|
+
[ <a href="javascript:openCode('%codeurl%')">source</a> ]
|
401
|
+
ENDIF:codeurl
|
402
|
+
</div>
|
403
|
+
IF:m_desc
|
404
|
+
<div class="description">
|
405
|
+
%m_desc%
|
406
|
+
</div>
|
407
|
+
ENDIF:m_desc
|
408
|
+
IF:aka
|
409
|
+
<div class="aka">
|
410
|
+
This method is also aliased as
|
411
|
+
START:aka
|
412
|
+
<a href="%aref%">%name%</a>
|
413
|
+
END:aka
|
414
|
+
</div>
|
415
|
+
ENDIF:aka
|
416
|
+
IF:sourcecode
|
417
|
+
<div class="sourcecode">
|
418
|
+
<p class="source-link">[ <a href="javascript:toggleSource('%aref%-source')" id="l_%aref%-source">show source</a> ]</p>
|
419
|
+
<div id="%aref%-source" class="dyn-source">
|
420
|
+
<pre>
|
421
|
+
%sourcecode%
|
422
|
+
</pre>
|
423
|
+
</div>
|
424
|
+
</div>
|
425
|
+
ENDIF:sourcecode
|
426
|
+
</div>
|
427
|
+
END:methods
|
428
|
+
ENDIF:methods
|
429
|
+
END:method_list
|
430
|
+
ENDIF:method_list
|
431
|
+
HTML
|
432
|
+
|
433
|
+
=begin
|
434
|
+
=end
|
435
|
+
|
436
|
+
########################## Source code ##########################
|
437
|
+
|
438
|
+
SRC_PAGE = <<HTML
|
439
|
+
<html>
|
440
|
+
<head><title>%title%</title>
|
441
|
+
<meta http-equiv="Content-Type" content="text/html; charset=%charset%">
|
442
|
+
<style>
|
443
|
+
.ruby-comment { color: green; font-style: italic }
|
444
|
+
.ruby-constant { color: #4433aa; font-weight: bold; }
|
445
|
+
.ruby-identifier { color: #222222; }
|
446
|
+
.ruby-ivar { color: #2233dd; }
|
447
|
+
.ruby-keyword { color: #3333FF; font-weight: bold }
|
448
|
+
.ruby-node { color: #777777; }
|
449
|
+
.ruby-operator { color: #111111; }
|
450
|
+
.ruby-regexp { color: #662222; }
|
451
|
+
.ruby-value { color: #662222; font-style: italic }
|
452
|
+
.kw { color: #3333FF; font-weight: bold }
|
453
|
+
.cmt { color: green; font-style: italic }
|
454
|
+
.str { color: #662222; font-style: italic }
|
455
|
+
.re { color: #662222; }
|
456
|
+
</style>
|
457
|
+
</head>
|
458
|
+
<body bgcolor="white">
|
459
|
+
<pre>%code%</pre>
|
460
|
+
</body>
|
461
|
+
</html>
|
462
|
+
HTML
|
463
|
+
|
464
|
+
########################## Index ################################
|
465
|
+
|
466
|
+
FR_INDEX_BODY = <<HTML
|
467
|
+
!INCLUDE!
|
468
|
+
HTML
|
469
|
+
|
470
|
+
FILE_INDEX = <<HTML
|
471
|
+
<html>
|
472
|
+
<head>
|
473
|
+
<meta http-equiv="Content-Type" content="text/html; charset=%charset%">
|
474
|
+
<style>
|
475
|
+
<!--
|
476
|
+
body {
|
477
|
+
background-color: #EEE;
|
478
|
+
font-family: #{FONTS};
|
479
|
+
color: #000;
|
480
|
+
margin: 0px;
|
481
|
+
}
|
482
|
+
.banner {
|
483
|
+
background: #005;
|
484
|
+
color: #FFF;
|
485
|
+
padding: 0.2em;
|
486
|
+
font-size: small;
|
487
|
+
font-weight: bold;
|
488
|
+
text-align: center;
|
489
|
+
}
|
490
|
+
.entries {
|
491
|
+
margin: 0.25em 1em 0 1em;
|
492
|
+
font-size: x-small;
|
493
|
+
}
|
494
|
+
a {
|
495
|
+
color: #00F;
|
496
|
+
text-decoration: none;
|
497
|
+
}
|
498
|
+
a:hover {
|
499
|
+
color: #77F;
|
500
|
+
text-decoration: underline;
|
501
|
+
}
|
502
|
+
-->
|
503
|
+
</style>
|
504
|
+
<base target="docwin">
|
505
|
+
</head>
|
506
|
+
<body>
|
507
|
+
<div class="banner">%list_title%</div>
|
508
|
+
<div class="entries">
|
509
|
+
START:entries
|
510
|
+
<a href="%href%">%name%</a><br>
|
511
|
+
END:entries
|
512
|
+
</div>
|
513
|
+
</body></html>
|
514
|
+
HTML
|
515
|
+
|
516
|
+
CLASS_INDEX = FILE_INDEX
|
517
|
+
METHOD_INDEX = FILE_INDEX
|
518
|
+
|
519
|
+
INDEX = <<HTML
|
520
|
+
<html>
|
521
|
+
<head>
|
522
|
+
<title>%title%</title>
|
523
|
+
<meta http-equiv="Content-Type" content="text/html; charset=%charset%">
|
524
|
+
</head>
|
525
|
+
|
526
|
+
<frameset cols="20%,*">
|
527
|
+
<frameset rows="15%,35%,50%">
|
528
|
+
<frame src="fr_file_index.html" title="Files" name="Files" />
|
529
|
+
<frame src="fr_class_index.html" name="Classes" />
|
530
|
+
<frame src="fr_method_index.html" name="Methods" />
|
531
|
+
</frameset>
|
532
|
+
IF:inline_source
|
533
|
+
<frame src="%initial_page%" name="docwin">
|
534
|
+
ENDIF:inline_source
|
535
|
+
IFNOT:inline_source
|
536
|
+
<frameset rows="80%,20%">
|
537
|
+
<frame src="%initial_page%" name="docwin">
|
538
|
+
<frame src="blank.html" name="source">
|
539
|
+
</frameset>
|
540
|
+
ENDIF:inline_source
|
541
|
+
<noframes>
|
542
|
+
<body bgcolor="white">
|
543
|
+
Click <a href="html/index.html">here</a> for a non-frames
|
544
|
+
version of this page.
|
545
|
+
</body>
|
546
|
+
</noframes>
|
547
|
+
</frameset>
|
548
|
+
|
549
|
+
</html>
|
550
|
+
HTML
|
551
|
+
|
552
|
+
# and a blank page to use as a target
|
553
|
+
BLANK = %{
|
554
|
+
<html><body bgcolor="white"></body></html>
|
555
|
+
}
|
556
|
+
|
557
|
+
def write_extra_pages
|
558
|
+
template = TemplatePage.new(BLANK)
|
559
|
+
File.open("blank.html", "w") { |f| template.write_html_on(f, {}) }
|
560
|
+
end
|
561
|
+
|
562
|
+
end
|
563
|
+
end
|
564
|
+
|