hanna_gudao 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +10 -0
- data/Gemfile.lock +22 -0
- data/LICENSE +19 -0
- data/README.rdoc +81 -0
- data/Rakefile +39 -0
- data/VERSION +1 -0
- data/hanna_gudao.gemspec +80 -0
- data/lib/hanna_gudao/template_files/class_index.haml +3 -0
- data/lib/hanna_gudao/template_files/file_index.haml +12 -0
- data/lib/hanna_gudao/template_files/index.haml +11 -0
- data/lib/hanna_gudao/template_files/layout.haml +34 -0
- data/lib/hanna_gudao/template_files/method_index.haml +15 -0
- data/lib/hanna_gudao/template_files/method_list.haml +56 -0
- data/lib/hanna_gudao/template_files/method_search.js +63 -0
- data/lib/hanna_gudao/template_files/page.haml +45 -0
- data/lib/hanna_gudao/template_files/prototype-1.6.0.3.js +4320 -0
- data/lib/hanna_gudao/template_files/sections.haml +88 -0
- data/lib/hanna_gudao/template_files/styles.sass +355 -0
- data/lib/hanna_gudao.rb +322 -0
- data/lib/rdoc/discover.rb +1 -0
- metadata +164 -0
@@ -0,0 +1,88 @@
|
|
1
|
+
- unless values[:entry].classes_and_modules.empty?
|
2
|
+
#class-list
|
3
|
+
%h2 Classes and Modules
|
4
|
+
%ol
|
5
|
+
- (values[:entry].modules.sort + values[:entry].classes.sort).each do |mod|
|
6
|
+
%li= link_to mod.full_name, values[:entry].aref_to(mod.path)
|
7
|
+
|
8
|
+
- values[:sections].sort_by{|s, h| s.title.to_s}.each do |section, h|
|
9
|
+
- constants, attributes, alias_types, method_types = h.values_at(:constants, :attributes, :alias_types, :method_types)
|
10
|
+
#section
|
11
|
+
- if section.title.to_s != ''
|
12
|
+
%h2
|
13
|
+
%a{ :name =>section.aref }= section.title
|
14
|
+
- if section.comment
|
15
|
+
.section-comment= section.description
|
16
|
+
|
17
|
+
- unless constants.empty?
|
18
|
+
#constants-list
|
19
|
+
%h2 Constants
|
20
|
+
.name-list
|
21
|
+
%table{ :summary => "Constants" }
|
22
|
+
- constants.each do |const|
|
23
|
+
%tr.top-aligned-row.context-row
|
24
|
+
%td.context-item-name= const.name
|
25
|
+
%td =
|
26
|
+
%td.context-item-value= const.value
|
27
|
+
- if const.description then
|
28
|
+
%td
|
29
|
+
%td.context-item-desc= const.description
|
30
|
+
|
31
|
+
- unless alias_types.empty?
|
32
|
+
- alias_types.each do |type, aliases|
|
33
|
+
#aliases-list
|
34
|
+
%h2 #{type} Aliases
|
35
|
+
.name-list
|
36
|
+
%table{ :summary => "#{type} Aliases" }
|
37
|
+
- aliases.each do |alia|
|
38
|
+
%tr.top-aligned-row.context-row
|
39
|
+
%td.context-item-name= alia.name
|
40
|
+
%td ->
|
41
|
+
%td.context-item-value= link_to alia.is_alias_for.name, "##{alia.is_alias_for.aref}"
|
42
|
+
- unless alia.description.empty?
|
43
|
+
%td.context-item-desc= alia.description
|
44
|
+
|
45
|
+
- unless attributes.empty?
|
46
|
+
#attribute-list
|
47
|
+
%h2.section-bar Attributes
|
48
|
+
.name-list
|
49
|
+
%table
|
50
|
+
- attributes.each do |attrib|
|
51
|
+
%tr.top-aligned-row.context-row
|
52
|
+
%td.context-item-name
|
53
|
+
%a{:name => attrib.aref}=attrib.name
|
54
|
+
%td.context-item-value= attrib.rw ? "[#{attrib.rw}]" : ' '
|
55
|
+
%td.context-item-desc~ sanitize_code_blocks(attrib.description)
|
56
|
+
|
57
|
+
- unless method_types.empty?
|
58
|
+
#methods
|
59
|
+
- method_types.each do |type, list|
|
60
|
+
- unless list.empty?
|
61
|
+
%h2== #{type} methods
|
62
|
+
|
63
|
+
- list.each do |method|
|
64
|
+
.method{ :id => "method-#{method.aref}", :class => "#{type.gsub(/\s+/, '-')}".downcase }
|
65
|
+
%a{ :name => method.aref }
|
66
|
+
.synopsis
|
67
|
+
- method_html = capture_haml do
|
68
|
+
- if method.call_seq
|
69
|
+
%span.name
|
70
|
+
- method.call_seq.split(/\r?\n/).each do |seq|
|
71
|
+
%div=seq
|
72
|
+
- else
|
73
|
+
%span.name= method.name
|
74
|
+
%span.arguments= method.params
|
75
|
+
-#- if method[:codeurl]
|
76
|
+
-#%a.method-signature{ :href => method[:codeurl], :onclick => "popupCode(this.href); return false", :target => "Code" }
|
77
|
+
-#= method_html
|
78
|
+
-#- else
|
79
|
+
= method_html
|
80
|
+
- if method.description
|
81
|
+
.description
|
82
|
+
~ sanitize_code_blocks method.description
|
83
|
+
- if method.markup_code
|
84
|
+
.source
|
85
|
+
- name = "#{method.aref}-source"
|
86
|
+
%a.source-toggle{ :href => "#", :onclick => "toggleCode('#{name}'); return false" }
|
87
|
+
[show source]
|
88
|
+
~ "<pre id='#{name}'>#{method.markup_code}</pre>"
|
@@ -0,0 +1,355 @@
|
|
1
|
+
$title_font: Georgia, serif
|
2
|
+
$body_font: unquote("Lucida Grande"), Verdana, Arial, Helvetica, sans-serif
|
3
|
+
$code_font_family: Monaco, unquote("DejaVu Sans Mono"), unquote("Bitstream Vera Sans Mono"), unquote("Courier New"), monospace
|
4
|
+
$code_font_size: 14px
|
5
|
+
$code_font: $code_font_size $code_font_family
|
6
|
+
|
7
|
+
$light_link: #336699
|
8
|
+
$link: $light_link - 40
|
9
|
+
$light_text: #666666
|
10
|
+
$dark_blue_text: #0e3062
|
11
|
+
|
12
|
+
html, body
|
13
|
+
height: 100%
|
14
|
+
|
15
|
+
body
|
16
|
+
font-family: $body_font
|
17
|
+
font-size: 90%
|
18
|
+
margin: 0
|
19
|
+
padding: 0
|
20
|
+
background: white
|
21
|
+
color: black
|
22
|
+
|
23
|
+
#wrapper
|
24
|
+
min-height: 100%
|
25
|
+
height: auto !important
|
26
|
+
height: 100%
|
27
|
+
margin: 0 auto -43px
|
28
|
+
|
29
|
+
#footer-push
|
30
|
+
height: 43px
|
31
|
+
|
32
|
+
div.header, #footer
|
33
|
+
background: #eeeeee
|
34
|
+
|
35
|
+
#footer
|
36
|
+
border-top: 1px solid silver
|
37
|
+
margin-top: 12px
|
38
|
+
padding: 0 2em
|
39
|
+
line-height: 30px
|
40
|
+
text-align: center
|
41
|
+
font-variant: small-caps
|
42
|
+
font-size: 95%
|
43
|
+
|
44
|
+
// self-clearing
|
45
|
+
.clearing
|
46
|
+
&:after
|
47
|
+
content: "."
|
48
|
+
visibility: hidden
|
49
|
+
height: 0
|
50
|
+
display: block
|
51
|
+
clear: both
|
52
|
+
* html &
|
53
|
+
height: 1px
|
54
|
+
*:first-child + html
|
55
|
+
overflow: hidden
|
56
|
+
|
57
|
+
h1, h2, h3, h4, h5, h6
|
58
|
+
margin: 0
|
59
|
+
font-weight: normal
|
60
|
+
|
61
|
+
a
|
62
|
+
color: $link
|
63
|
+
&:hover
|
64
|
+
background: $light_link
|
65
|
+
text-decoration: none
|
66
|
+
color: #eeeeff
|
67
|
+
|
68
|
+
#diagram
|
69
|
+
img
|
70
|
+
border: 0
|
71
|
+
|
72
|
+
#description, .method .description, .header
|
73
|
+
a
|
74
|
+
color: $light_link
|
75
|
+
&:hover
|
76
|
+
color: #eeeeee
|
77
|
+
h1, h2, h3, h4, h5, h6
|
78
|
+
a
|
79
|
+
color: $link
|
80
|
+
|
81
|
+
ol
|
82
|
+
margin: 0
|
83
|
+
padding: 0
|
84
|
+
list-style: none
|
85
|
+
li
|
86
|
+
margin-left: 0
|
87
|
+
white-space: nowrap
|
88
|
+
&.other
|
89
|
+
display: none
|
90
|
+
|
91
|
+
ol.expanded li.other
|
92
|
+
display: list-item
|
93
|
+
|
94
|
+
table
|
95
|
+
margin-bottom: 1em
|
96
|
+
font-size: 1em
|
97
|
+
border-collapse: collapse
|
98
|
+
td, th
|
99
|
+
padding: 0.4em 0.8em
|
100
|
+
thead
|
101
|
+
background-color: #e8e8e8
|
102
|
+
th
|
103
|
+
font-variant: small-caps
|
104
|
+
color: $light_text
|
105
|
+
tr
|
106
|
+
border-bottom: 1px solid silver
|
107
|
+
|
108
|
+
#index, div.header
|
109
|
+
a.show
|
110
|
+
text-decoration: underline
|
111
|
+
font-style: italic
|
112
|
+
color: $light_text
|
113
|
+
&:after
|
114
|
+
content: " ..."
|
115
|
+
&:hover
|
116
|
+
color: black
|
117
|
+
background: #ffffee
|
118
|
+
|
119
|
+
#index
|
120
|
+
font: 85% / 1.2 Arial, Helvetica, sans-serif
|
121
|
+
a
|
122
|
+
text-decoration: none
|
123
|
+
h1
|
124
|
+
padding: 0.2em 0.5em 0.1em
|
125
|
+
background: #cccccc
|
126
|
+
font: unquote("small-caps 1.2em") $title_font
|
127
|
+
color: #333333
|
128
|
+
border-bottom: 1px solid gray
|
129
|
+
form
|
130
|
+
margin: 0
|
131
|
+
padding: 0
|
132
|
+
input
|
133
|
+
margin: 0.4em 3px 0 0.4em
|
134
|
+
width: 80%
|
135
|
+
#search.untouched
|
136
|
+
color: #777777
|
137
|
+
.clear_button
|
138
|
+
-moz-border-radius: 7px
|
139
|
+
-webkit-border-radius: 7px
|
140
|
+
background: #aaaaaa
|
141
|
+
color: white
|
142
|
+
padding: 0 5px 1px 5px
|
143
|
+
cursor: pointer
|
144
|
+
ol
|
145
|
+
padding: 0.4em 0.5em
|
146
|
+
li
|
147
|
+
white-space: nowrap
|
148
|
+
#index-entries li a
|
149
|
+
padding: 1px 2px
|
150
|
+
#index-entries.classes
|
151
|
+
font-size: 1.1em
|
152
|
+
ol
|
153
|
+
padding: 0
|
154
|
+
span.nodoc
|
155
|
+
display: none
|
156
|
+
span.nodoc, a
|
157
|
+
font-weight: bold
|
158
|
+
.parent
|
159
|
+
font-weight: normal
|
160
|
+
#index-entries.methods, #search-results.methods
|
161
|
+
li
|
162
|
+
margin-bottom: 0.2em
|
163
|
+
a
|
164
|
+
.method_name
|
165
|
+
margin-right: 0.25em
|
166
|
+
.module_name
|
167
|
+
color: #666666
|
168
|
+
&:hover .module_name
|
169
|
+
color: #dddddd
|
170
|
+
|
171
|
+
#attribute-list
|
172
|
+
.context-item-name
|
173
|
+
font-weight: bold
|
174
|
+
|
175
|
+
div.header
|
176
|
+
font-size: 80%
|
177
|
+
padding: 0.5em 2%
|
178
|
+
font-family: Arial, Helvetica, sans-serif
|
179
|
+
border-bottom: 1px solid silver
|
180
|
+
.name
|
181
|
+
font-size: 1.6em
|
182
|
+
font-family: $title_font
|
183
|
+
.type
|
184
|
+
color: $light_text
|
185
|
+
font-size: 80%
|
186
|
+
font-variant: small-caps
|
187
|
+
h1.name
|
188
|
+
font-size: 2.2em
|
189
|
+
.paths, .last-update, .parent
|
190
|
+
color: $light_text
|
191
|
+
.last-update .datetime
|
192
|
+
color: $light_text - 30
|
193
|
+
.parent
|
194
|
+
margin-top: 0.3em
|
195
|
+
strong
|
196
|
+
font-weight: normal
|
197
|
+
color: $light_text - 30
|
198
|
+
|
199
|
+
#content
|
200
|
+
padding: 12px 2%
|
201
|
+
div.class &
|
202
|
+
position: relative
|
203
|
+
width: 72%
|
204
|
+
pre, .method .synopsis
|
205
|
+
font: $code_font
|
206
|
+
pre
|
207
|
+
color: black
|
208
|
+
background: #eeeeee
|
209
|
+
border: 1px solid silver
|
210
|
+
padding: 0.5em 0.8em
|
211
|
+
overflow: auto
|
212
|
+
p, li, dl
|
213
|
+
code, tt
|
214
|
+
font: $code_font
|
215
|
+
background: #ffffe3
|
216
|
+
padding: 2px 3px
|
217
|
+
line-height: 1.4
|
218
|
+
h1, h2, h3, h4, h5, h6
|
219
|
+
code, tt
|
220
|
+
font-size: 1.1em
|
221
|
+
#text
|
222
|
+
position: relative
|
223
|
+
#description
|
224
|
+
// :max-width 60em
|
225
|
+
p
|
226
|
+
margin-top: 0.5em
|
227
|
+
h1, h2, h3, h4, h5, h6
|
228
|
+
font-family: $title_font
|
229
|
+
h1
|
230
|
+
font-size: 2.2em
|
231
|
+
margin-bottom: 0.2em
|
232
|
+
border-bottom: 3px double #d8d8d8
|
233
|
+
padding-bottom: 0.1em
|
234
|
+
h2
|
235
|
+
font-size: 1.8em
|
236
|
+
color: $dark_blue_text
|
237
|
+
margin: 0.8em 0 0.3em 0
|
238
|
+
h3
|
239
|
+
font-size: 1.6em
|
240
|
+
margin: 0.8em 0 0.3em 0
|
241
|
+
color: $light_text
|
242
|
+
h4
|
243
|
+
font-size: 1.4em
|
244
|
+
margin: 0.8em 0 0.3em 0
|
245
|
+
h5
|
246
|
+
font-size: 1.2em
|
247
|
+
margin: 0.8em 0 0.3em 0
|
248
|
+
color: $dark_blue_text
|
249
|
+
h6
|
250
|
+
font-size: 1em
|
251
|
+
margin: 0.8em 0 0.3em 0
|
252
|
+
color: $light_text
|
253
|
+
#description, .method .description
|
254
|
+
ul, ol
|
255
|
+
margin: 0.8em 0
|
256
|
+
padding-left: 1.5em
|
257
|
+
ol
|
258
|
+
list-style: decimal
|
259
|
+
li
|
260
|
+
white-space: normal
|
261
|
+
|
262
|
+
#method-list
|
263
|
+
position: absolute
|
264
|
+
top: 0px
|
265
|
+
right: -33%
|
266
|
+
width: 28%
|
267
|
+
background: #eeeeee
|
268
|
+
border: 1px solid silver
|
269
|
+
padding: 0.4em 1%
|
270
|
+
overflow: hidden
|
271
|
+
h2
|
272
|
+
font-size: 1.3em
|
273
|
+
h3
|
274
|
+
font-variant: small-caps
|
275
|
+
text-transform: capitalize
|
276
|
+
font-family: $title_font
|
277
|
+
color: #666666
|
278
|
+
font-size: 1.1em
|
279
|
+
ol
|
280
|
+
padding: 0 0 0.5em 0.5em
|
281
|
+
|
282
|
+
#context
|
283
|
+
border-top: 1px dashed silver
|
284
|
+
margin-top: 1em
|
285
|
+
margin-bottom: 1em
|
286
|
+
|
287
|
+
#context, #section
|
288
|
+
h2
|
289
|
+
font: unquote("small-caps 1.2em") $title_font
|
290
|
+
color: #444444
|
291
|
+
margin: 1em 0 0.2em 0
|
292
|
+
|
293
|
+
#methods
|
294
|
+
.method
|
295
|
+
border: 1px solid silver
|
296
|
+
margin-top: 0.5em
|
297
|
+
background: #eeeeee
|
298
|
+
.synopsis
|
299
|
+
color: black
|
300
|
+
background: silver
|
301
|
+
padding: 0.2em 1em
|
302
|
+
.name
|
303
|
+
font-weight: bold
|
304
|
+
a
|
305
|
+
text-decoration: none
|
306
|
+
.description
|
307
|
+
padding: 0 1em
|
308
|
+
pre
|
309
|
+
background: #f8f8f8
|
310
|
+
.source
|
311
|
+
margin: 0.5em 0
|
312
|
+
.source-toggle
|
313
|
+
font-size: 85%
|
314
|
+
margin-left: 1em
|
315
|
+
.public-class
|
316
|
+
background: #ffffe4
|
317
|
+
.public-instance .synopsis
|
318
|
+
color: #eeeeee
|
319
|
+
background: $light_link
|
320
|
+
|
321
|
+
#content .method .source pre
|
322
|
+
background: #262626
|
323
|
+
color: #ffdead
|
324
|
+
margin: 1em
|
325
|
+
padding: 0.5em
|
326
|
+
border: 1px dashed #999999
|
327
|
+
overflow: auto
|
328
|
+
.ruby-constant
|
329
|
+
color: #7fffd4
|
330
|
+
background: transparent
|
331
|
+
.ruby-keyword
|
332
|
+
color: aqua
|
333
|
+
background: transparent
|
334
|
+
.ruby-ivar
|
335
|
+
color: #eedd82
|
336
|
+
background: transparent
|
337
|
+
.ruby-operator
|
338
|
+
color: #00ffee
|
339
|
+
background: transparent
|
340
|
+
.ruby-identifier
|
341
|
+
color: #ffdead
|
342
|
+
background: transparent
|
343
|
+
.ruby-node
|
344
|
+
color: #ffa07a
|
345
|
+
background: transparent
|
346
|
+
.ruby-comment
|
347
|
+
color: #b22222
|
348
|
+
font-weight: bold
|
349
|
+
background: transparent
|
350
|
+
.ruby-regexp
|
351
|
+
color: #ffa07a
|
352
|
+
background: transparent
|
353
|
+
.ruby-value
|
354
|
+
color: #7fffd4
|
355
|
+
background: transparent
|