merb-gen 0.9.8 → 0.9.9
Sign up to get free protection for your applications and to get access to all the features.
- data/README +6 -3
- data/Rakefile +6 -4
- data/bin/merb-gen +1 -23
- data/lib/generators/controller.rb +4 -2
- data/lib/generators/helper.rb +0 -5
- data/lib/generators/merb/merb_core.rb +95 -0
- data/lib/generators/merb/merb_flat.rb +70 -69
- data/lib/generators/merb/merb_stack.rb +110 -0
- data/lib/generators/merb/merb_very_flat.rb +61 -64
- data/lib/generators/merb_plugin.rb +5 -0
- data/lib/generators/model.rb +5 -2
- data/lib/generators/resource.rb +7 -2
- data/lib/generators/resource_controller.rb +4 -4
- data/lib/generators/templates/application/common/Rakefile +2 -6
- data/lib/generators/templates/application/common/doc.thor +149 -0
- data/lib/generators/templates/application/common/dothtaccess +17 -0
- data/lib/generators/templates/application/common/jquery.js +32 -0
- data/lib/generators/templates/application/common/merb.thor +1550 -861
- data/lib/generators/templates/application/{merb → merb_core}/app/controllers/application.rb +0 -0
- data/lib/generators/templates/application/{merb → merb_core}/app/controllers/exceptions.rb +0 -0
- data/lib/generators/templates/application/{merb → merb_core}/app/helpers/global_helpers.rb +0 -0
- data/lib/generators/templates/application/{merb → merb_core}/app/views/exceptions/internal_server_error.html.erb +0 -0
- data/lib/generators/templates/application/{merb → merb_core}/app/views/exceptions/not_acceptable.html.erb +0 -0
- data/lib/generators/templates/application/{merb → merb_core}/app/views/exceptions/not_found.html.erb +0 -0
- data/lib/generators/templates/application/{merb → merb_core}/autotest/discover.rb +0 -0
- data/lib/generators/templates/application/{merb → merb_core}/autotest/merb.rb +0 -0
- data/lib/generators/templates/application/{merb → merb_core}/autotest/merb_rspec.rb +0 -0
- data/lib/generators/templates/application/{merb → merb_core}/config/environments/development.rb +7 -2
- data/lib/generators/templates/application/{merb → merb_core}/config/environments/production.rb +5 -2
- data/lib/generators/templates/application/{merb → merb_core}/config/environments/rake.rb +6 -2
- data/lib/generators/templates/application/merb_core/config/environments/staging.rb +10 -0
- data/lib/generators/templates/application/merb_core/config/environments/test.rb +12 -0
- data/lib/generators/templates/application/{merb → merb_core}/config/init.rb +6 -6
- data/lib/generators/templates/application/{merb → merb_core}/config/rack.rb +0 -0
- data/lib/generators/templates/application/{merb → merb_core}/config/router.rb +0 -0
- data/lib/generators/templates/application/merb_core/doc/rdoc/generators/merb_generator.rb +1362 -0
- data/lib/generators/templates/application/merb_core/doc/rdoc/generators/template/merb/api_grease.js +640 -0
- data/lib/generators/templates/application/merb_core/doc/rdoc/generators/template/merb/index.html.erb +37 -0
- data/lib/generators/templates/application/merb_core/doc/rdoc/generators/template/merb/merb.css +252 -0
- data/lib/generators/templates/application/merb_core/doc/rdoc/generators/template/merb/merb.rb +351 -0
- data/lib/generators/templates/application/merb_core/doc/rdoc/generators/template/merb/merb_doc_styles.css +492 -0
- data/lib/generators/templates/application/merb_core/doc/rdoc/generators/template/merb/prototype.js +2515 -0
- data/lib/generators/templates/application/{merb/app/models → merb_core/lib}/merb/session.rb +0 -0
- data/lib/generators/templates/application/{merb → merb_core}/public/favicon.ico +0 -0
- data/lib/generators/templates/application/{merb → merb_core}/public/images/merb.jpg +0 -0
- data/lib/generators/templates/application/merb_core/public/javascripts/application.js +1 -0
- data/lib/generators/templates/application/{merb → merb_core}/public/merb.fcgi +0 -0
- data/lib/generators/templates/application/{merb → merb_core}/public/robots.txt +0 -0
- data/lib/generators/templates/application/{merb → merb_core}/public/stylesheets/master.css +0 -0
- data/lib/generators/templates/application/{merb → merb_core}/spec/spec.opts +0 -0
- data/lib/generators/templates/application/{merb → merb_core}/spec/spec_helper.rb +0 -0
- data/lib/generators/templates/application/{merb → merb_core}/test/test_helper.rb +0 -0
- data/lib/generators/templates/application/merb_flat/application.rbt +1 -1
- data/lib/generators/templates/application/merb_flat/config/init.rb +8 -3
- data/lib/generators/templates/application/merb_plugin/LICENSE +1 -1
- data/lib/generators/templates/application/merb_stack/app/controllers/application.rb +2 -0
- data/lib/generators/templates/application/merb_stack/app/controllers/exceptions.rb +13 -0
- data/lib/generators/templates/application/merb_stack/app/helpers/global_helpers.rb +5 -0
- data/lib/generators/templates/application/merb_stack/app/models/user.rb +17 -0
- data/lib/generators/templates/application/merb_stack/app/views/exceptions/internal_server_error.html.erb +216 -0
- data/lib/generators/templates/application/merb_stack/app/views/exceptions/not_acceptable.html.erb +63 -0
- data/lib/generators/templates/application/merb_stack/app/views/exceptions/not_found.html.erb +47 -0
- data/lib/generators/templates/application/merb_stack/autotest/discover.rb +1 -0
- data/lib/generators/templates/application/merb_stack/autotest/merb.rb +149 -0
- data/lib/generators/templates/application/merb_stack/autotest/merb_rspec.rb +165 -0
- data/lib/generators/templates/application/merb_stack/config/database.yml +33 -0
- data/lib/generators/templates/application/merb_stack/config/dependencies.rb +15 -0
- data/lib/generators/templates/application/merb_stack/config/environments/development.rb +15 -0
- data/lib/generators/templates/application/merb_stack/config/environments/production.rb +10 -0
- data/lib/generators/templates/application/merb_stack/config/environments/rake.rb +11 -0
- data/lib/generators/templates/application/merb_stack/config/environments/staging.rb +10 -0
- data/lib/generators/templates/application/merb_stack/config/environments/test.rb +12 -0
- data/lib/generators/templates/application/merb_stack/config/init.rb +24 -0
- data/lib/generators/templates/application/merb_stack/config/rack.rb +12 -0
- data/lib/generators/templates/application/merb_stack/config/router.rb +44 -0
- data/lib/generators/templates/application/merb_stack/doc/rdoc/generators/merb_generator.rb +1362 -0
- data/lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/api_grease.js +640 -0
- data/lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/index.html.erb +37 -0
- data/lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/merb.css +252 -0
- data/lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/merb.rb +351 -0
- data/lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/merb_doc_styles.css +492 -0
- data/lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/prototype.js +2515 -0
- data/lib/generators/templates/application/merb_stack/merb/merb-auth/setup.rb +44 -0
- data/lib/generators/templates/application/merb_stack/merb/merb-auth/strategies.rb +11 -0
- data/lib/generators/templates/application/merb_stack/merb/session/session.rb +9 -0
- data/lib/generators/templates/application/merb_stack/public/favicon.ico +0 -0
- data/lib/generators/templates/application/merb_stack/public/images/merb.jpg +0 -0
- data/lib/generators/templates/application/merb_stack/public/javascripts/application.js +1 -0
- data/lib/generators/templates/application/merb_stack/public/merb.fcgi +22 -0
- data/lib/generators/templates/application/merb_stack/public/robots.txt +5 -0
- data/lib/generators/templates/application/merb_stack/public/stylesheets/master.css +119 -0
- data/lib/generators/templates/application/merb_stack/spec/spec.opts +0 -0
- data/lib/generators/templates/application/merb_stack/spec/spec_helper.rb +20 -0
- data/lib/generators/templates/application/merb_stack/test/test_helper.rb +19 -0
- data/lib/generators/templates/application/merb_very_flat/application.rbt +11 -5
- data/lib/generators/templates/component/layout/app/views/layout/%file_name%.html.erb +1 -0
- data/lib/generators/templates/component/resource_controller/spec/requests/%file_name%_spec.rb +53 -0
- data/lib/merb-gen/app_generator.rb +13 -0
- data/lib/merb-gen/generator.rb +36 -1
- data/lib/merb-gen/named_generator.rb +5 -2
- data/lib/merb-gen.rb +6 -8
- data/spec/controller_spec.rb +0 -20
- data/spec/{merb_full_spec.rb → merb_core_spec.rb} +11 -3
- data/spec/merb_stack_spec.rb +47 -0
- data/spec/part_controller_spec.rb +0 -39
- data/spec/resource_controller_spec.rb +1 -35
- data/spec/spec_helper.rb +4 -2
- metadata +133 -111
- data/lib/generators/merb/merb_full.rb +0 -85
- data/lib/generators/merb.rb +0 -24
- data/lib/generators/templates/application/merb/config/environments/staging.rb +0 -7
- data/lib/generators/templates/application/merb/config/environments/test.rb +0 -7
- data/lib/generators/templates/component/helper/spec/helpers/%file_name%_helper_spec.rb +0 -5
- data/lib/generators/templates/component/resource_controller/spec/controllers/%file_name%_spec.rb +0 -7
- data/spec/helper_spec.rb +0 -43
- data/spec/merb_spec.rb +0 -20
data/lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/merb.css
ADDED
@@ -0,0 +1,252 @@
|
|
1
|
+
html, body, div, span, applet, object, iframe,h1, h2, h3, h4, h5, h6, p, blockquote, pre,a, abbr, acronym, address, big, cite, code,del, dfn, em, font, img, ins, kbd, q, s, samp,small, strike, strong, sub, sup, tt, var,dl, dt, dd, ol, ul, li,fieldset, form, label, legend,table, caption, tbody, tfoot, thead, tr, th, td {
|
2
|
+
margin: 0;
|
3
|
+
padding: 0;
|
4
|
+
border: 0;
|
5
|
+
font-weight: inherit;
|
6
|
+
font-style: inherit;
|
7
|
+
font-size: 100%;
|
8
|
+
font-family: inherit;
|
9
|
+
vertical-align: baseline; }
|
10
|
+
|
11
|
+
/* GENERAL RULES */
|
12
|
+
|
13
|
+
body {
|
14
|
+
background: #000 url(../img/body.gif) repeat-x bottom center;
|
15
|
+
color: #000;
|
16
|
+
font: normal 12px "Lucida Grande", "Arial", sans-serif;
|
17
|
+
line-height: 1;
|
18
|
+
}
|
19
|
+
ul {list-style-type: none;}
|
20
|
+
#content_full ul.revisions{list-style-type: disc;}
|
21
|
+
#content_full ul.revisions li{margin-left: 15px;padding: 3px 0;}
|
22
|
+
li a {display: block;}
|
23
|
+
#content_full ul.revisions li a{display: inline;}
|
24
|
+
strong {font-weight: bold;}
|
25
|
+
table {border-collapse: separate;border-spacing: 0; }
|
26
|
+
caption, th, td {text-align: left;font-weight: normal; }
|
27
|
+
.invisible {display: none;}
|
28
|
+
.full_width {width:100%;}
|
29
|
+
|
30
|
+
/* LAYOUT */
|
31
|
+
|
32
|
+
.wrap_to_center, #foot {
|
33
|
+
margin: 0 auto;
|
34
|
+
display: block;
|
35
|
+
width: 800px;
|
36
|
+
}
|
37
|
+
|
38
|
+
#content {width: 100%;}
|
39
|
+
|
40
|
+
#content_top {
|
41
|
+
background: #fff url(../img/content_top.gif) no-repeat top center;
|
42
|
+
float:left;
|
43
|
+
margin:25px 0px;
|
44
|
+
width:100%;
|
45
|
+
}
|
46
|
+
#content_bottom {
|
47
|
+
background: url(../img/content_bottom.gif) no-repeat bottom center;
|
48
|
+
width:100%;
|
49
|
+
float:left;
|
50
|
+
}
|
51
|
+
#content_main {
|
52
|
+
float:left;
|
53
|
+
margin: 10px 20px 20px 20px;
|
54
|
+
width:506px;
|
55
|
+
}
|
56
|
+
#content p {
|
57
|
+
line-height:17px;
|
58
|
+
}
|
59
|
+
#content_full {margin: 10px 20px 20px 20px;}
|
60
|
+
|
61
|
+
/* HEADER & NAVIGATION */
|
62
|
+
|
63
|
+
#header {
|
64
|
+
background: #1db900 url(../img/header_waves.gif) repeat-x top center;
|
65
|
+
height:74px;
|
66
|
+
width: 100%;
|
67
|
+
}
|
68
|
+
#waves {
|
69
|
+
background: url(../img/header_waves.gif)no-repeat top left;
|
70
|
+
height:74px;
|
71
|
+
width:980px;
|
72
|
+
}
|
73
|
+
#header img {margin-top:8px; float:left;}
|
74
|
+
#header a {color:#fff; text-decoration:none;}
|
75
|
+
#header a:hover {color:#000;}
|
76
|
+
ul#nav {float:right;display:block;width:43.3em;margin-top:25px;}
|
77
|
+
ul#nav li {display:block;float:left;}
|
78
|
+
ul#nav li a {display:block;float:left;margin:0px 5px;padding:6px 9px 31px 9px;}
|
79
|
+
ul#nav li a:hover {background:url(../img/header_hover.gif) repeat-x bottom center;}
|
80
|
+
ul#nav li a#active {background:url(../img/header_arrow.gif)no-repeat bottom center;}
|
81
|
+
ul#nav li.last a {margin-right:0;}
|
82
|
+
|
83
|
+
/* TEXT FORMATTING */
|
84
|
+
|
85
|
+
h1 {
|
86
|
+
border-bottom:2px solid #ccc;
|
87
|
+
color:#000;
|
88
|
+
font:bold 28px "Arial" sans-serif;
|
89
|
+
letter-spacing:1px;
|
90
|
+
margin:20px 0px;
|
91
|
+
text-align:left;
|
92
|
+
width:100%;
|
93
|
+
}
|
94
|
+
h1.home {
|
95
|
+
border:0;
|
96
|
+
color:#fff;
|
97
|
+
font-size:36px;
|
98
|
+
margin:20px 0px;
|
99
|
+
text-align:center;
|
100
|
+
}
|
101
|
+
h2 {
|
102
|
+
color:#7aad00;
|
103
|
+
font:bold 22px "Lucida Grande" sans-serif;
|
104
|
+
margin:10px 0px;
|
105
|
+
}
|
106
|
+
h3 {
|
107
|
+
font:bold 16px "Lucida Grande";
|
108
|
+
margin:10px 0px;
|
109
|
+
}
|
110
|
+
#content a {color:#d7ff00;}
|
111
|
+
#content a:hover {background:#d7ff00;color:#000;}
|
112
|
+
#content_main ul {margin:10px 0px;}
|
113
|
+
#content_main ul li {
|
114
|
+
background: url(../img/li.gif) no-repeat left center;
|
115
|
+
padding: 4px 4px 4px 16px;
|
116
|
+
font-weight:bold;
|
117
|
+
}
|
118
|
+
p {margin-bottom:12px;}
|
119
|
+
#content_main a,#content_full a {color:#11b716;font-weight:bold;}
|
120
|
+
#content_main a:hover,#content_full a:hover {background:#22d716;}
|
121
|
+
pre {
|
122
|
+
background:#222;
|
123
|
+
color:#fff;
|
124
|
+
font:12px "Courier" serif;
|
125
|
+
line-height:18px;
|
126
|
+
padding: 12px;
|
127
|
+
margin-bottom: 10px;
|
128
|
+
}
|
129
|
+
code {
|
130
|
+
font:bold 12px "Courier" serif;
|
131
|
+
}
|
132
|
+
pre code {font-weight:normal;}
|
133
|
+
|
134
|
+
/* SIDEBAR FOR CONTENT */
|
135
|
+
|
136
|
+
#content_sidebar {
|
137
|
+
float: left;
|
138
|
+
margin: 20px 20px 15px 10px;
|
139
|
+
width: 224px;
|
140
|
+
}
|
141
|
+
.sidebar_top {
|
142
|
+
background:#868686 url(../img/sidebar_top.gif) no-repeat top center;
|
143
|
+
margin-bottom:12px;
|
144
|
+
width:224px;
|
145
|
+
}
|
146
|
+
dl.sidebar_bottom {
|
147
|
+
background: url(../img/sidebar_bottom.gif) no-repeat bottom center;
|
148
|
+
padding:12px;
|
149
|
+
}
|
150
|
+
dl.sidebar_bottom dt {
|
151
|
+
color:#fff;
|
152
|
+
font:bold 14px "Lucida Grande" sans-serif;
|
153
|
+
margin-bottom:6px;
|
154
|
+
}
|
155
|
+
dl.sidebar_bottom dd {padding:3px 0px;}
|
156
|
+
#content_sidebar p {padding:10px 0px;}
|
157
|
+
p#rss a {
|
158
|
+
background: url(../img/rss.gif) no-repeat left center;
|
159
|
+
color:#000;
|
160
|
+
font:bold 14px "Lucida Grande";
|
161
|
+
padding: 8px 6px 8px 34px;
|
162
|
+
text-decoration:none;
|
163
|
+
}
|
164
|
+
p#rss a:hover {
|
165
|
+
background: url(../img/rss.gif) no-repeat left center;
|
166
|
+
background-color:#fff;
|
167
|
+
text-decoration:underline;
|
168
|
+
}
|
169
|
+
|
170
|
+
/* FOOTER */
|
171
|
+
|
172
|
+
#footer {background:#444; clear:both;}
|
173
|
+
#footer p {padding:12px; color:#999; margin:0; text-align:center;}
|
174
|
+
|
175
|
+
/* FEATURES PAGE */
|
176
|
+
.feature {
|
177
|
+
background-repeat:no-repeat;
|
178
|
+
background-position:top left;
|
179
|
+
border-bottom:2px solid #ccc;
|
180
|
+
padding-left:150px;
|
181
|
+
}
|
182
|
+
div#speed {background-image: url(../img/feature_speed.gif);}
|
183
|
+
div#light {background-image: url(../img/feature_light.gif);}
|
184
|
+
div#power {background-image: url(../img/feature_power.gif);}
|
185
|
+
|
186
|
+
.quicklinks_top {
|
187
|
+
background:#868686 url(../img/quicklinks_top.gif) no-repeat top center;
|
188
|
+
float:right;
|
189
|
+
margin-bottom:12px;
|
190
|
+
width:169px;
|
191
|
+
}
|
192
|
+
ul.quicklinks_bottom {
|
193
|
+
background: url(../img/quicklinks_bottom.gif) no-repeat bottom center;
|
194
|
+
padding:12px;
|
195
|
+
}
|
196
|
+
ul.quicklinks_bottom li {
|
197
|
+
display:block;
|
198
|
+
padding:3px 0px;
|
199
|
+
}
|
200
|
+
#content_full ul.quicklinks_bottom li a{
|
201
|
+
color:#d7ff00;
|
202
|
+
display:inline;
|
203
|
+
}
|
204
|
+
#content_full ul.quicklinks_bottom li a:hover {
|
205
|
+
background:#d7ff00;
|
206
|
+
color:#000;
|
207
|
+
}
|
208
|
+
|
209
|
+
/* DOCUMENTATION PAGE */
|
210
|
+
.sub-framework {
|
211
|
+
border-bottom:2px solid #ccc;
|
212
|
+
margin-bottom: 20px;
|
213
|
+
padding-bottom: 10px;
|
214
|
+
}
|
215
|
+
|
216
|
+
|
217
|
+
/* ICONS FOR HOMEPAGE */
|
218
|
+
|
219
|
+
#icons_top {
|
220
|
+
background: url(../img/icons_top.gif) no-repeat top center;
|
221
|
+
float:left;
|
222
|
+
width:800px;
|
223
|
+
}
|
224
|
+
#icons_bottom {
|
225
|
+
background: url(../img/icons_bottom.gif) no-repeat bottom center;
|
226
|
+
float:left;
|
227
|
+
width:800px;
|
228
|
+
}
|
229
|
+
#icons_top dl {
|
230
|
+
color:#fff;
|
231
|
+
float:left;
|
232
|
+
width: 224px;
|
233
|
+
padding: 15px 20px;
|
234
|
+
}
|
235
|
+
#icons_top dt {
|
236
|
+
background-repeat:no-repeat;
|
237
|
+
background-position:center 2.5em;
|
238
|
+
color:#35d726;
|
239
|
+
font:bold 18px 'Lucida Grande' sans-serif;
|
240
|
+
padding: 6px 6px 150px 6px;
|
241
|
+
text-align:center;
|
242
|
+
}
|
243
|
+
#icons_top dd {
|
244
|
+
font: 11px "Lucida Grande";
|
245
|
+
line-height:18px;
|
246
|
+
text-align:center;
|
247
|
+
}
|
248
|
+
dl#speed, dl#light {border-right:1px solid #444;}
|
249
|
+
dl#light, dl#power {border-left:1px solid #000;}
|
250
|
+
dl#speed dt {background-image: url(../img/icon_speed.gif);}
|
251
|
+
dl#light dt {background-image: url(../img/icon_light.gif);}
|
252
|
+
dl#power dt {background-image: url(../img/icon_power.gif);}
|
data/lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/merb.rb
ADDED
@@ -0,0 +1,351 @@
|
|
1
|
+
module RDoc
|
2
|
+
module Page
|
3
|
+
|
4
|
+
STYLE = File.read(File.join(File.dirname(__FILE__), 'merb_doc_styles.css'))
|
5
|
+
FONTS = ""
|
6
|
+
|
7
|
+
###################################################################
|
8
|
+
|
9
|
+
CLASS_PAGE = <<HTML
|
10
|
+
<div id="%class_seq%">
|
11
|
+
<div class='banner'>
|
12
|
+
<span class="file-title-prefix">%classmod%</span><br />%full_name%<br/>
|
13
|
+
In:
|
14
|
+
START:infiles
|
15
|
+
<a href="#" onclick="jsHref('%full_path_url%');">%full_path%</a>
|
16
|
+
IF:cvsurl
|
17
|
+
(<a href="#" onclick="jsHref('%cvsurl%');">CVS</a>)
|
18
|
+
ENDIF:cvsurl
|
19
|
+
END:infiles
|
20
|
+
|
21
|
+
IF:parent
|
22
|
+
Parent:
|
23
|
+
IF:par_url
|
24
|
+
<a href="#" onclick="jsHref('%par_url%');">
|
25
|
+
ENDIF:par_url
|
26
|
+
%parent%
|
27
|
+
IF:par_url
|
28
|
+
</a>
|
29
|
+
ENDIF:par_url
|
30
|
+
ENDIF:parent
|
31
|
+
</div>
|
32
|
+
HTML
|
33
|
+
|
34
|
+
###################################################################
|
35
|
+
|
36
|
+
METHOD_LIST = <<HTML
|
37
|
+
<div id="content">
|
38
|
+
IF:diagram
|
39
|
+
<table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center">
|
40
|
+
%diagram%
|
41
|
+
</td></tr></table>
|
42
|
+
ENDIF:diagram
|
43
|
+
|
44
|
+
IF:description
|
45
|
+
<div class="description">%description%</div>
|
46
|
+
ENDIF:description
|
47
|
+
|
48
|
+
IF:requires
|
49
|
+
<div class="sectiontitle">Required Files</div>
|
50
|
+
<ul>
|
51
|
+
START:requires
|
52
|
+
<li><a href="#" onclick="jsHref('%href%');">%name%</a></li>
|
53
|
+
END:requires
|
54
|
+
</ul>
|
55
|
+
ENDIF:requires
|
56
|
+
|
57
|
+
IF:toc
|
58
|
+
<div class="sectiontitle">Contents</div>
|
59
|
+
<ul>
|
60
|
+
START:toc
|
61
|
+
<li><a href="#" onclick="jsHref('%href%');">%secname%</a></li>
|
62
|
+
END:toc
|
63
|
+
</ul>
|
64
|
+
ENDIF:toc
|
65
|
+
|
66
|
+
IF:methods
|
67
|
+
<div class="sectiontitle">Methods</div>
|
68
|
+
<ul>
|
69
|
+
START:methods
|
70
|
+
<li><a href="index.html?a=%href%&name=%name%" >%name%</a></li>
|
71
|
+
END:methods
|
72
|
+
</ul>
|
73
|
+
ENDIF:methods
|
74
|
+
|
75
|
+
IF:includes
|
76
|
+
<div class="sectiontitle">Included Modules</div>
|
77
|
+
<ul>
|
78
|
+
START:includes
|
79
|
+
<li><a href="#" onclick="jsHref('%href%');">%name%</a></li>
|
80
|
+
END:includes
|
81
|
+
</ul>
|
82
|
+
ENDIF:includes
|
83
|
+
|
84
|
+
START:sections
|
85
|
+
IF:sectitle
|
86
|
+
<div class="sectiontitle"><a href="%secsequence%">%sectitle%</a></div>
|
87
|
+
IF:seccomment
|
88
|
+
<div class="description">
|
89
|
+
%seccomment%
|
90
|
+
</div>
|
91
|
+
ENDIF:seccomment
|
92
|
+
ENDIF:sectitle
|
93
|
+
|
94
|
+
IF:classlist
|
95
|
+
<div class="sectiontitle">Classes and Modules</div>
|
96
|
+
%classlist%
|
97
|
+
ENDIF:classlist
|
98
|
+
|
99
|
+
IF:constants
|
100
|
+
<div class="sectiontitle">Constants</div>
|
101
|
+
<table border='0' cellpadding='5'>
|
102
|
+
START:constants
|
103
|
+
<tr valign='top'>
|
104
|
+
<td class="attr-name">%name%</td>
|
105
|
+
<td>=</td>
|
106
|
+
<td class="attr-value">%value%</td>
|
107
|
+
</tr>
|
108
|
+
IF:desc
|
109
|
+
<tr valign='top'>
|
110
|
+
<td> </td>
|
111
|
+
<td colspan="2" class="attr-desc">%desc%</td>
|
112
|
+
</tr>
|
113
|
+
ENDIF:desc
|
114
|
+
END:constants
|
115
|
+
</table>
|
116
|
+
ENDIF:constants
|
117
|
+
|
118
|
+
IF:attributes
|
119
|
+
<div class="sectiontitle">Attributes</div>
|
120
|
+
<table border='0' cellpadding='5'>
|
121
|
+
START:attributes
|
122
|
+
<tr valign='top'>
|
123
|
+
<td class='attr-rw'>
|
124
|
+
IF:rw
|
125
|
+
[%rw%]
|
126
|
+
ENDIF:rw
|
127
|
+
</td>
|
128
|
+
<td class='attr-name'>%name%</td>
|
129
|
+
<td class='attr-desc'>%a_desc%</td>
|
130
|
+
</tr>
|
131
|
+
END:attributes
|
132
|
+
</table>
|
133
|
+
ENDIF:attributes
|
134
|
+
|
135
|
+
IF:method_list
|
136
|
+
START:method_list
|
137
|
+
IF:methods
|
138
|
+
<div class="sectiontitle">%type% %category% methods</div>
|
139
|
+
START:methods
|
140
|
+
<div id="%m_seq%" class="method">
|
141
|
+
<div id="%m_seq%_title" class="title">
|
142
|
+
IF:callseq
|
143
|
+
<b>%callseq%</b>
|
144
|
+
ENDIF:callseq
|
145
|
+
IFNOT:callseq
|
146
|
+
<b>%name%</b>%params%
|
147
|
+
ENDIF:callseq
|
148
|
+
IF:codeurl
|
149
|
+
[ <a href="javascript:openCode('%codeurl%')">source</a> ]
|
150
|
+
ENDIF:codeurl
|
151
|
+
</div>
|
152
|
+
IF:m_desc
|
153
|
+
<div class="description">
|
154
|
+
%m_desc%
|
155
|
+
</div>
|
156
|
+
ENDIF:m_desc
|
157
|
+
IF:aka
|
158
|
+
<div class="aka">
|
159
|
+
This method is also aliased as
|
160
|
+
START:aka
|
161
|
+
<a href="index.html?a=%aref%&name=%name%">%name%</a>
|
162
|
+
END:aka
|
163
|
+
</div>
|
164
|
+
ENDIF:aka
|
165
|
+
IF:sourcecode
|
166
|
+
<div class="sourcecode">
|
167
|
+
<p class="source-link">[ <a href="javascript:toggleSource('%aref%_source')" id="l_%aref%_source">show source</a> ]</p>
|
168
|
+
<div id="%aref%_source" class="dyn-source">
|
169
|
+
<pre>
|
170
|
+
%sourcecode%
|
171
|
+
</pre>
|
172
|
+
</div>
|
173
|
+
</div>
|
174
|
+
ENDIF:sourcecode
|
175
|
+
</div>
|
176
|
+
END:methods
|
177
|
+
ENDIF:methods
|
178
|
+
END:method_list
|
179
|
+
ENDIF:method_list
|
180
|
+
END:sections
|
181
|
+
</div>
|
182
|
+
HTML
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
BODY = <<ENDBODY
|
188
|
+
!INCLUDE! <!-- banner header -->
|
189
|
+
|
190
|
+
<div id="bodyContent" >
|
191
|
+
#{METHOD_LIST}
|
192
|
+
</div>
|
193
|
+
|
194
|
+
ENDBODY
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
SRC_BODY = <<ENDSRCBODY
|
199
|
+
!INCLUDE! <!-- banner header -->
|
200
|
+
|
201
|
+
<div id="bodyContent" >
|
202
|
+
<h2>Source Code</h2>
|
203
|
+
<pre>%file_source_code%</pre>
|
204
|
+
</div>
|
205
|
+
ENDSRCBODY
|
206
|
+
|
207
|
+
|
208
|
+
###################### File Page ##########################
|
209
|
+
FILE_PAGE = <<HTML
|
210
|
+
<div id="fileHeader">
|
211
|
+
<h1>%short_name%</h1>
|
212
|
+
<table class="header-table">
|
213
|
+
<tr class="top-aligned-row">
|
214
|
+
<td><strong>Path:</strong></td>
|
215
|
+
<td>%full_path%
|
216
|
+
IF:cvsurl
|
217
|
+
(<a href="%cvsurl%"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
|
218
|
+
ENDIF:cvsurl
|
219
|
+
</td>
|
220
|
+
</tr>
|
221
|
+
<tr class="top-aligned-row">
|
222
|
+
<td><strong>Last Update:</strong></td>
|
223
|
+
<td>%dtm_modified%</td>
|
224
|
+
</tr>
|
225
|
+
</table>
|
226
|
+
</div>
|
227
|
+
HTML
|
228
|
+
|
229
|
+
|
230
|
+
#### This is not used but kept for historical purposes
|
231
|
+
########################## Source code ##########################
|
232
|
+
# Separate page onlye
|
233
|
+
|
234
|
+
SRC_PAGE = <<HTML
|
235
|
+
<html>
|
236
|
+
<head><title>%title%</title>
|
237
|
+
<meta http-equiv="Content-Type" content="text/html; charset=%charset%">
|
238
|
+
<style>
|
239
|
+
.ruby-comment { color: green; font-style: italic }
|
240
|
+
.ruby-constant { color: #4433aa; font-weight: bold; }
|
241
|
+
.ruby-identifier { color: #222222; }
|
242
|
+
.ruby-ivar { color: #2233dd; }
|
243
|
+
.ruby-keyword { color: #3333FF; font-weight: bold }
|
244
|
+
.ruby-node { color: #777777; }
|
245
|
+
.ruby-operator { color: #111111; }
|
246
|
+
.ruby-regexp { color: #662222; }
|
247
|
+
.ruby-value { color: #662222; font-style: italic }
|
248
|
+
.kw { color: #3333FF; font-weight: bold }
|
249
|
+
.cmt { color: green; font-style: italic }
|
250
|
+
.str { color: #662222; font-style: italic }
|
251
|
+
.re { color: #662222; }
|
252
|
+
</style>
|
253
|
+
</head>
|
254
|
+
<body bgcolor="white">
|
255
|
+
<pre>%code%</pre>
|
256
|
+
</body>
|
257
|
+
</html>
|
258
|
+
HTML
|
259
|
+
|
260
|
+
########################### source page body ###################
|
261
|
+
|
262
|
+
SCR_CODE_BODY = <<HTML
|
263
|
+
<div id="source">
|
264
|
+
%source_code%
|
265
|
+
</div>
|
266
|
+
|
267
|
+
HTML
|
268
|
+
|
269
|
+
########################## Index ################################
|
270
|
+
|
271
|
+
FR_INDEX_BODY = <<HTML
|
272
|
+
!INCLUDE!
|
273
|
+
HTML
|
274
|
+
|
275
|
+
FILE_INDEX = <<HTML
|
276
|
+
<ul>
|
277
|
+
START:entries
|
278
|
+
<li><a id="%seq_id%_link" href="index.html?a=%seq_id%&name=%name%" onclick="loadIndexContent('%href%','%seq_id%','%name%', '%scope%');">%name%</a><small>%scope%</small></li>
|
279
|
+
END:entries
|
280
|
+
</ul>
|
281
|
+
HTML
|
282
|
+
|
283
|
+
CLASS_INDEX = FILE_INDEX
|
284
|
+
METHOD_INDEX = FILE_INDEX
|
285
|
+
|
286
|
+
INDEX = <<HTML
|
287
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
288
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
289
|
+
|
290
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
291
|
+
<head>
|
292
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
293
|
+
<meta name="description" content="A nifty way to interact with the Merb API" />
|
294
|
+
<meta name="author" content="created by Brian Chamberlain. You can contact me using 'blchamberlain' on the gmail." />
|
295
|
+
<meta name="keywords" content="merb, ruby, purple, monkey, dishwasher" />
|
296
|
+
<title>Merb | %title% API Documentation</title>
|
297
|
+
<link rel="stylesheet" href="http://merbivore.com/documentation/stylesheet.css" type="text/css" media="screen" />
|
298
|
+
<script type="text/javascript" src="http://merbivore.com/documentation/prototype.js" ></script>
|
299
|
+
<script type="text/javascript" src="http://merbivore.com/documentation/api_grease.js" ></script>
|
300
|
+
</head>
|
301
|
+
<body onload="setupPage();">
|
302
|
+
<ul id="groupType">
|
303
|
+
<li>methods</li>
|
304
|
+
<li>classes</li>
|
305
|
+
<li>files</li>
|
306
|
+
<li id="loadingStatus" style="display:none;"> loading...</li>
|
307
|
+
</ul>
|
308
|
+
<div id="listFrame">
|
309
|
+
<div id="listSearch">
|
310
|
+
<form id="searchForm" method="get" action="#" onsubmit="return false">
|
311
|
+
<input type="text" name="searchText" id="searchTextField" size="30" autocomplete="off" />
|
312
|
+
</form>
|
313
|
+
</div>
|
314
|
+
<div id="listScroller">
|
315
|
+
Loading via ajax... this could take a sec.
|
316
|
+
</div>
|
317
|
+
</div>
|
318
|
+
<div id="browserBar">
|
319
|
+
<span id="browserBarInfo">%title% README</span>
|
320
|
+
</div>
|
321
|
+
<div id="rdocContent">
|
322
|
+
%content%
|
323
|
+
</div>
|
324
|
+
<div id="floater">
|
325
|
+
<strong>Documentation for %title% </strong><a href="#" onmouseover="$('tips').show();" onmouseout="$('tips').hide();">usage tips</a>
|
326
|
+
<div id="tips" style="position:absolute;width:350px;top:15px;right:20px;padding:5px;border:1px solid #333;background-color:#fafafa;display:none;">
|
327
|
+
<p><strong>Some tips</strong>
|
328
|
+
<ul>
|
329
|
+
<li> Up/Down keys move through the search list</li>
|
330
|
+
<li> Return/enter key loads selected item</li>
|
331
|
+
<li> Want to use this RDOC template for your own project? Check out <br /> http://rubyforge.org/projects/jaxdoc</li>
|
332
|
+
</ul>
|
333
|
+
</p>
|
334
|
+
</div>
|
335
|
+
<div id="blowOutListBox" style="display:none;"> </div>
|
336
|
+
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
|
337
|
+
</script>
|
338
|
+
<script type="text/javascript">
|
339
|
+
_uacct = "UA-3085184-1";
|
340
|
+
urchinTracker();
|
341
|
+
</script>
|
342
|
+
</body>
|
343
|
+
</html>
|
344
|
+
HTML
|
345
|
+
|
346
|
+
API_GREASE_JS = File.read(File.join(File.dirname(__FILE__), 'api_grease.js'))
|
347
|
+
|
348
|
+
PROTOTYPE_JS = File.read(File.join(File.dirname(__FILE__), 'prototype.js'))
|
349
|
+
end
|
350
|
+
end
|
351
|
+
|