jfish 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +7 -0
  2. data/.document +3 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE +26 -0
  5. data/README.md +57 -0
  6. data/README.rdoc +19 -0
  7. data/Rakefile +11 -0
  8. data/VERSION +1 -0
  9. data/jfish.gemspec +38 -0
  10. data/lib/jfish.rb +720 -0
  11. data/lib/template/jfish/_footer.rhtml +5 -0
  12. data/lib/template/jfish/_head.rhtml +16 -0
  13. data/lib/template/jfish/_sidebar_VCS_info.rhtml +18 -0
  14. data/lib/template/jfish/_sidebar_classes.rhtml +9 -0
  15. data/lib/template/jfish/_sidebar_extends.rhtml +16 -0
  16. data/lib/template/jfish/_sidebar_in_files.rhtml +8 -0
  17. data/lib/template/jfish/_sidebar_includes.rhtml +16 -0
  18. data/lib/template/jfish/_sidebar_installed.rhtml +14 -0
  19. data/lib/template/jfish/_sidebar_methods.rhtml +12 -0
  20. data/lib/template/jfish/_sidebar_navigation.rhtml +10 -0
  21. data/lib/template/jfish/_sidebar_pages.rhtml +12 -0
  22. data/lib/template/jfish/_sidebar_parent.rhtml +10 -0
  23. data/lib/template/jfish/_sidebar_search.rhtml +10 -0
  24. data/lib/template/jfish/_sidebar_sections.rhtml +10 -0
  25. data/lib/template/jfish/_sidebar_table_of_contents.rhtml +19 -0
  26. data/lib/template/jfish/class.rhtml +179 -0
  27. data/lib/template/jfish/images/add.png +0 -0
  28. data/lib/template/jfish/images/arrow_up.png +0 -0
  29. data/lib/template/jfish/images/brick.png +0 -0
  30. data/lib/template/jfish/images/brick_link.png +0 -0
  31. data/lib/template/jfish/images/bug.png +0 -0
  32. data/lib/template/jfish/images/bullet_black.png +0 -0
  33. data/lib/template/jfish/images/bullet_toggle_minus.png +0 -0
  34. data/lib/template/jfish/images/bullet_toggle_plus.png +0 -0
  35. data/lib/template/jfish/images/date.png +0 -0
  36. data/lib/template/jfish/images/delete.png +0 -0
  37. data/lib/template/jfish/images/find.png +0 -0
  38. data/lib/template/jfish/images/loadingAnimation.gif +0 -0
  39. data/lib/template/jfish/images/logo.png +0 -0
  40. data/lib/template/jfish/images/macFFBgHack.png +0 -0
  41. data/lib/template/jfish/images/package.png +0 -0
  42. data/lib/template/jfish/images/page_green.png +0 -0
  43. data/lib/template/jfish/images/page_white_text.png +0 -0
  44. data/lib/template/jfish/images/page_white_width.png +0 -0
  45. data/lib/template/jfish/images/plugin.png +0 -0
  46. data/lib/template/jfish/images/ruby.png +0 -0
  47. data/lib/template/jfish/images/tag_blue.png +0 -0
  48. data/lib/template/jfish/images/tag_green.png +0 -0
  49. data/lib/template/jfish/images/transparent.png +0 -0
  50. data/lib/template/jfish/images/wrench.png +0 -0
  51. data/lib/template/jfish/images/wrench_orange.png +0 -0
  52. data/lib/template/jfish/images/zoom.png +0 -0
  53. data/lib/template/jfish/index.rhtml +19 -0
  54. data/lib/template/jfish/js/darkfish.js +155 -0
  55. data/lib/template/jfish/js/jquery.js +18 -0
  56. data/lib/template/jfish/js/search.js +94 -0
  57. data/lib/template/jfish/page.rhtml +18 -0
  58. data/lib/template/jfish/rdoc.css +557 -0
  59. data/lib/template/jfish/servlet_not_found.rhtml +18 -0
  60. data/lib/template/jfish/servlet_root.rhtml +37 -0
  61. data/lib/template/jfish/table_of_contents.rhtml +55 -0
  62. metadata +135 -0
@@ -0,0 +1,557 @@
1
+ /*
2
+ * "JFish" Rdoc CSS
3
+ * $Id: rdoc.css 54 2009-01-27 01:09:48Z deveiant $
4
+ *
5
+ * Author: Michael Granger <ged@FaerieMUD.org>
6
+ *
7
+ */
8
+
9
+ /* Base Green is: #BADA55 */
10
+
11
+ * { padding: 0; margin: 0; }
12
+
13
+ body {
14
+ background: #514f53;
15
+ font: 16px "Helvetica Neue", Helvetica, Tahoma, sans-serif;
16
+ color:#fff5f8;
17
+ margin-left: 40px;
18
+ }
19
+ body.file-popup {
20
+ font-size: 90%;
21
+ margin-left: 0;
22
+ }
23
+
24
+ h1 {
25
+ font-size: 245%;
26
+ color: #BADA55;
27
+ }
28
+ h2,h3,h4 { margin-top: 1.5em; }
29
+
30
+ :link,
31
+ :visited {
32
+ color: #BADA55;
33
+ text-decoration: none;
34
+ }
35
+ :link:hover,
36
+ :visited:hover {
37
+ border-bottom: 1px dotted #BADA55;
38
+ }
39
+
40
+ pre {
41
+ background: #ddd;
42
+ padding: 0.5em 0;
43
+ }
44
+
45
+ #logo{
46
+ padding:0 0 15px 0;
47
+ }
48
+
49
+ #logo a,#logo a img{
50
+ border:none;
51
+ outline:none;
52
+ text-decoration:none;
53
+ }
54
+
55
+ /* @group Generic Classes */
56
+
57
+ .home-description{
58
+ padding-top:60px;
59
+ }
60
+
61
+ .initially-hidden {
62
+ display: none;
63
+ }
64
+
65
+ #search-field {
66
+ width: 98%;
67
+ background: #eee;
68
+ border: none;
69
+ height: 1.5em;
70
+ -webkit-border-radius: 4px;
71
+ }
72
+ #search-field:focus {
73
+ background: #f1edba;
74
+ }
75
+ #search-field:-moz-placeholder,
76
+ #search-field::-webkit-input-placeholder {
77
+ font-weight: bold;
78
+ color: #efe5e8;
79
+ }
80
+
81
+ .missing-docs {
82
+ font-size: 120%;
83
+ background: white url(images/wrench_orange.png) no-repeat 4px center;
84
+ color: #666;
85
+ line-height: 2em;
86
+ border: 1px solid #d00;
87
+ opacity: 1;
88
+ padding-left: 20px;
89
+ text-indent: 24px;
90
+ letter-spacing: 3px;
91
+ font-weight: bold;
92
+ -webkit-border-radius: 5px;
93
+ -moz-border-radius: 5px;
94
+ }
95
+
96
+ .target-section {
97
+ border: 2px solid #dcce90;
98
+ border-left-width: 8px;
99
+ padding: 0 1em;
100
+ background: #fff3c2;
101
+ }
102
+
103
+ /* @end */
104
+
105
+ /* @group Index Page, Standalone file pages */
106
+ .indexpage ul {
107
+ line-height: 160%;
108
+ list-style: none;
109
+ }
110
+ .indexpage ul :link,
111
+ .indexpage ul :visited {
112
+ font-size: 16px;
113
+ }
114
+
115
+ .indexpage li {
116
+ padding-left: 20px;
117
+ }
118
+
119
+ .indexpage ul > li {
120
+ background: url(images/bullet_black.png) no-repeat left 4px;
121
+ }
122
+ .indexpage li.method {
123
+ background: url(images/plugin.png) no-repeat left 4px;
124
+ }
125
+ .indexpage li.module {
126
+ background: url(images/package.png) no-repeat left 4px;
127
+ }
128
+ .indexpage li.class {
129
+ background: url(images/ruby.png) no-repeat left 4px;
130
+ }
131
+ .indexpage li.file {
132
+ background: url(images/page_white_text.png) no-repeat left 4px;
133
+ }
134
+ .indexpage li li {
135
+ background: url(images/tag_blue.png) no-repeat left 4px;
136
+ }
137
+ .indexpage li .toc-toggle {
138
+ width: 16px;
139
+ height: 16px;
140
+ background: url(images/add.png) no-repeat;
141
+ }
142
+
143
+ .indexpage li .toc-toggle.open {
144
+ background: url(images/delete.png) no-repeat;
145
+ }
146
+
147
+ /* @end */
148
+
149
+ /* @group Top-Level Structure */
150
+
151
+ #metadata {
152
+ float: left;
153
+ width: 260px;
154
+ }
155
+
156
+ #documentation {
157
+ margin: 2em 1em 5em 300px;
158
+ min-width: 340px;
159
+ }
160
+
161
+ #validator-badges {
162
+ clear: both;
163
+ margin: 1em 1em 2em;
164
+ font-size: smaller;
165
+ }
166
+
167
+ /* @end */
168
+
169
+ /* @group Metadata Section */
170
+ #metadata .section {
171
+ background-color: #353338;
172
+ -moz-border-radius: 5px;
173
+ -webkit-border-radius: 5px;
174
+ border: 1px solid #aaa;
175
+ margin: 0 8px 8px;
176
+ font-size: 90%;
177
+ overflow: hidden;
178
+ }
179
+ #metadata h3.section-header {
180
+ margin: 0;
181
+ padding: 6px 8px;
182
+ background: #666;
183
+ color: #efe5e8;
184
+ -moz-border-radius-topleft: 4px;
185
+ -moz-border-radius-topright: 4px;
186
+ -webkit-border-top-left-radius: 4px;
187
+ -webkit-border-top-right-radius: 4px;
188
+ border-bottom: 1px solid #aaa;
189
+ }
190
+ #metadata #home-section h3.section-header {
191
+ border-bottom: 0;
192
+ }
193
+
194
+ #metadata ul,
195
+ #metadata dl,
196
+ #metadata p {
197
+ padding: 8px;
198
+ list-style: none;
199
+ }
200
+
201
+ #file-metadata {
202
+ margin-top: 2em;
203
+ }
204
+
205
+ #file-metadata ul {
206
+ padding-left: 28px;
207
+ list-style-image: url(images/page_green.png);
208
+ }
209
+
210
+ dl.svninfo {
211
+ color: #efe5e8;
212
+ margin: 0;
213
+ }
214
+ dl.svninfo dt {
215
+ font-weight: bold;
216
+ }
217
+
218
+ ul.link-list li {
219
+ white-space: nowrap;
220
+ }
221
+ ul.link-list .type {
222
+ font-size: 8px;
223
+ text-transform: uppercase;
224
+ color: white;
225
+ background: #969696;
226
+ padding: 2px 4px;
227
+ -webkit-border-radius: 5px;
228
+ }
229
+
230
+ /* @end */
231
+
232
+ /* @group Class Metadata Section */
233
+ #class-metadata {
234
+ margin-top: 2em;
235
+ }
236
+ /* @end */
237
+
238
+ /* @group Project Metadata Section */
239
+ #project-metadata {
240
+ margin-top: 2em;
241
+ }
242
+
243
+ #project-metadata .section {
244
+ border: 1px solid #aaa;
245
+ }
246
+ #project-metadata h3.section-header {
247
+ border-bottom: 1px solid #aaa;
248
+ position: relative;
249
+ }
250
+
251
+ #project-metadata form {
252
+ color: #777;
253
+ background: #666;
254
+ }
255
+
256
+ /* @end */
257
+
258
+ /* @group Documentation Section */
259
+ .description {
260
+ font-size: 100%;
261
+ color: #fff5f8;
262
+ }
263
+
264
+ .description p {
265
+ margin: 1em 0.4em;
266
+ }
267
+
268
+ .description li p {
269
+ margin: 0;
270
+ }
271
+
272
+ .description ol,
273
+ .description ul {
274
+ margin-left: 1.5em;
275
+ }
276
+ .description ol li,
277
+ .description ul li {
278
+ line-height: 1.4em;
279
+ }
280
+
281
+ .note-list {
282
+ margin: 8px 0;
283
+ }
284
+
285
+ .label-list {
286
+ margin: 8px 1.5em;
287
+ border: 1px solid #666;
288
+ }
289
+ .description .label-list {
290
+ font-size: 14px;
291
+ }
292
+
293
+ .note-list dt {
294
+ font-weight: bold;
295
+ }
296
+ .note-list dd {
297
+ padding: 0 12px;
298
+ }
299
+
300
+ .label-list dt {
301
+ padding: 2px 4px;
302
+ font-weight: bold;
303
+ background: #ddd;
304
+ }
305
+ .label-list dd {
306
+ padding: 2px 12px;
307
+ }
308
+ .label-list dd + dt,
309
+ .note-list dd + dt {
310
+ margin-top: 0.7em;
311
+ }
312
+
313
+ #documentation .section {
314
+ font-size: 90%;
315
+ }
316
+
317
+ #documentation h2.section-header {
318
+ margin-top: 1em;
319
+ padding: 0.25em 0.5em;
320
+ background: #666;
321
+ color: #fff5f8;
322
+ font-size: 175%;
323
+ border: 1px solid #bbb;
324
+ -moz-border-radius: 3px;
325
+ -webkit-border-radius: 3px;
326
+ }
327
+
328
+ .documentation-section-title {
329
+ position: relative;
330
+ }
331
+ .documentation-section-title .section-click-top {
332
+ position: absolute;
333
+ top: 6px;
334
+ right: 12px;
335
+ font-size: 10px;
336
+ color: #9b9877;
337
+ visibility: hidden;
338
+ padding-right: 0.5px;
339
+ }
340
+
341
+ .documentation-section-title:hover .section-click-top {
342
+ visibility: visible;
343
+ }
344
+
345
+ #documentation h3.section-header {
346
+ margin-top: 1em;
347
+ padding: 0.25em 0.5em;
348
+ background-color: #353338;
349
+ color: #fff5f8;
350
+ font-size: 150%;
351
+ border: 1px solid #bbb;
352
+ -moz-border-radius: 3px;
353
+ -webkit-border-radius: 3px;
354
+ }
355
+
356
+ #constants-list > dl,
357
+ #attributes-list > dl {
358
+ margin: 1em 0 2em;
359
+ border: 0;
360
+ }
361
+ #constants-list > dl dt,
362
+ #attributes-list > dl dt {
363
+ padding-left: 0;
364
+ font-weight: bold;
365
+ font-family: Monaco, "Andale Mono";
366
+ background: inherit;
367
+ }
368
+ #constants-list > dl dt a,
369
+ #attributes-list > dl dt a {
370
+ color: inherit;
371
+ }
372
+ #constants-list > dl dd,
373
+ #attributes-list > dl dd {
374
+ margin: 0 0 1em 0;
375
+ padding: 0;
376
+ color: #efe5e8;
377
+ }
378
+
379
+ .documentation-section h2 {
380
+ position: relative;
381
+ }
382
+
383
+ .documentation-section h2 a {
384
+ position: absolute;
385
+ top: 8px;
386
+ right: 10px;
387
+ font-size: 12px;
388
+ color: #9b9877;
389
+ visibility: hidden;
390
+ }
391
+
392
+ .documentation-section h2:hover a {
393
+ visibility: visible;
394
+ }
395
+
396
+ /* @group Method Details */
397
+
398
+ #documentation .method-source-code {
399
+ display: none;
400
+ }
401
+
402
+ #documentation .method-detail {
403
+ margin: 0.5em 0;
404
+ padding: 0.5em 0;
405
+ cursor: pointer;
406
+ }
407
+ #documentation .method-detail:hover {
408
+ background-color: #5A7A05;
409
+ }
410
+ #documentation .method-heading {
411
+ position: relative;
412
+ padding: 2px 4px 0 20px;
413
+ font-size: 125%;
414
+ font-weight: bold;
415
+ color: #fff5f8;
416
+ background: url(images/brick.png) no-repeat left bottom;
417
+ }
418
+ #documentation .method-heading :link,
419
+ #documentation .method-heading :visited {
420
+ color: inherit;
421
+ }
422
+ #documentation .method-click-advice {
423
+ position: absolute;
424
+ top: 2px;
425
+ right: 5px;
426
+ font-size: 10px;
427
+ color: #9b9877;
428
+ visibility: hidden;
429
+ padding-right: 20px;
430
+ line-height: 20px;
431
+ background: url(images/zoom.png) no-repeat right top;
432
+ }
433
+ #documentation .method-heading:hover .method-click-advice {
434
+ visibility: visible;
435
+ }
436
+
437
+ #documentation .method-alias .method-heading {
438
+ color: #efe5e8;
439
+ background: url(images/brick_link.png) no-repeat left bottom;
440
+ }
441
+
442
+ #documentation .method-description,
443
+ #documentation .aliases {
444
+ margin: 0 20px;
445
+ color: #efe5e8;
446
+ }
447
+
448
+ #documentation .method-description p,
449
+ #documentation .aliases p {
450
+ line-height: 1.2em;
451
+ }
452
+
453
+ #documentation .aliases {
454
+ padding-top: 4px;
455
+ font-style: italic;
456
+ cursor: default;
457
+ }
458
+ #documentation .method-description p {
459
+ margin-bottom: 0.5em;
460
+ }
461
+ #documentation .method-description ul {
462
+ margin-left: 1.5em;
463
+ }
464
+ pre {
465
+ margin: 0.5em 0;
466
+ }
467
+
468
+ #documentation .attribute-method-heading {
469
+ background: url(images/tag_green.png) no-repeat left bottom;
470
+ }
471
+ #documentation #attribute-method-details .method-detail:hover {
472
+ background-color: transparent;
473
+ cursor: default;
474
+ }
475
+ #documentation .attribute-access-type {
476
+ font-size: 60%;
477
+ text-transform: uppercase;
478
+ vertical-align: super;
479
+ padding: 0 2px;
480
+ }
481
+ /* @end */
482
+
483
+ /* @end */
484
+
485
+ /* @group Source Code */
486
+
487
+ pre {
488
+ overflow: auto;
489
+ background: #262626;
490
+ color: white;
491
+ border: 1px dashed #999;
492
+ padding: 0.5em;
493
+ }
494
+
495
+ .description pre {
496
+ margin: 0 0.4em;
497
+ }
498
+
499
+ .ruby-constant { color: #7fffd4; background: transparent; }
500
+ .ruby-keyword { color: #00ffff; background: transparent; }
501
+ .ruby-ivar { color: #eedd82; background: transparent; }
502
+ .ruby-operator { color: #00ffee; background: transparent; }
503
+ .ruby-identifier { color: #ffdead; background: transparent; }
504
+ .ruby-node { color: #ffa07a; background: transparent; }
505
+ .ruby-comment { color: #dc0000; font-weight: bold; background: transparent; }
506
+ .ruby-regexp { color: #ffa07a; background: transparent; }
507
+ .ruby-value { color: #7fffd4; background: transparent; }
508
+
509
+ /* @end */
510
+
511
+
512
+ /* @group search results */
513
+ #search-results h1 {
514
+ font-size: 1em;
515
+ font-weight: normal;
516
+ text-shadow: none;
517
+ }
518
+
519
+ #search-results .current {
520
+ background: #666;
521
+ border-bottom: 1px solid transparent;
522
+ }
523
+
524
+ #search-results li {
525
+ list-style: none;
526
+ border-bottom: 1px solid #aaa;
527
+ -moz-border-radius: 4px;
528
+ -webkit-border-radius: 4px;
529
+ border-radius: 4px;
530
+ margin-bottom: 0.5em;
531
+ }
532
+
533
+ #search-results li:last-child {
534
+ border-bottom: none;
535
+ margin-bottom: 0;
536
+ }
537
+
538
+ #search-results li p {
539
+ padding: 0;
540
+ margin: 0.5em;
541
+ }
542
+
543
+ #search-results .search-namespace {
544
+ font-weight: bold;
545
+ }
546
+
547
+ #search-results li em {
548
+ background: yellow;
549
+ font-style: normal;
550
+ }
551
+
552
+ #search-results pre {
553
+ margin: 0.5em;
554
+ }
555
+
556
+ /* @end */
557
+
@@ -0,0 +1,18 @@
1
+ <body>
2
+ <nav id="metadata">
3
+ <%= render '_sidebar_navigation.rhtml' %>
4
+
5
+ <%= render '_sidebar_search.rhtml' %>
6
+
7
+ <div id="project-metadata">
8
+ <%= render '_sidebar_pages.rhtml' %>
9
+ <%= render '_sidebar_classes.rhtml' %>
10
+ </div>
11
+ </nav>
12
+
13
+ <div id="documentation" class="description">
14
+ <h1>Not Found</h1>
15
+
16
+ <p>The page <kbd><%=h path %></kbd> was not found
17
+ </div>
18
+
@@ -0,0 +1,37 @@
1
+ <body>
2
+ <nav id="metadata">
3
+ <%= render '_sidebar_search.rhtml' %>
4
+
5
+ <%= render '_sidebar_installed.rhtml' %>
6
+ </nav>
7
+
8
+ <div id="documentation" class="description">
9
+ <h1>Local RDoc Documentation</h1>
10
+
11
+ <p>Here you can browse local documentation from the ruby standard library and
12
+ your installed gems.
13
+
14
+ <% gems = installed.select { |_, _, _, type,| type == :gem } %>
15
+ <% missing = gems.reject { |_, _, exists,| exists } %>
16
+ <% unless missing.empty? then %>
17
+ <h2>Missing Gem Documentation</h2>
18
+
19
+ <p>You are missing documentation for some of your installed gems.
20
+ You can install missing documentation for gems by running
21
+ <kbd>gem rdoc --all</kbd>. After installing the missing documentation you
22
+ only need to reload this page. The newly created documentation will
23
+ automatically appear.
24
+
25
+ <p>You can also install documentation for a specific gem by running one of
26
+ the following commands.
27
+
28
+ <ul>
29
+ <% names = missing.map { |name,| name.sub(/-([^-]*)$/, '') }.uniq %>
30
+ <% names.each do |name| %>
31
+ <li><kbd>gem rdoc <%=h name %></kbd>
32
+ <% end %>
33
+ </ul>
34
+ <% end %>
35
+
36
+ </div>
37
+
@@ -0,0 +1,55 @@
1
+ <body class="indexpage">
2
+ <h1><%= h @title %></h1>
3
+
4
+ <% simple_files = @files.select { |f| f.text? } %>
5
+ <% unless simple_files.empty? then %>
6
+ <h2>Pages</h2>
7
+ <ul>
8
+ <% simple_files.sort.each do |file| %>
9
+ <li class="file">
10
+ <a href="<%= file.path %>"><%= h file.page_name %></a>
11
+ <%
12
+ # HACK table_of_contents should not exist on Document
13
+ table = file.parse(file.comment).table_of_contents
14
+ unless table.empty? then %>
15
+ <img class="toc-toggle" src="images/transparent.png" alt="" title="toggle headings">
16
+ <ul class="initially-hidden">
17
+ <% table.each do |heading| %>
18
+ <li><a href="<%= file.path %>#<%= heading.aref %>"><%= heading.plain_html %></a>
19
+ <% end %>
20
+ </ul>
21
+ <% end %>
22
+ </li>
23
+ <% end %>
24
+ </ul>
25
+ <% end %>
26
+
27
+ <h2 id="classes">Classes/Modules</h2>
28
+ <ul>
29
+ <% @modsort.each do |klass| %>
30
+ <li class="<%= klass.type %>">
31
+ <a href="<%= klass.path %>"><%= klass.full_name %></a>
32
+ <% table = []
33
+ table.concat klass.parse(klass.comment_location).table_of_contents
34
+ table.concat klass.section_contents
35
+
36
+ unless table.empty? then %>
37
+ <img class="toc-toggle" src="images/transparent.png" alt="" title="toggle headings">
38
+ <ul class="initially-hidden">
39
+ <% table.each do |item| %>
40
+ <li><a href="<%= klass.path %>#<%= item.aref %>"><%= item.plain_html %></a>
41
+ <% end %>
42
+ </ul>
43
+ <% end %>
44
+ </li>
45
+ <% end %>
46
+ </ul>
47
+
48
+ <h2 id="methods">Methods</h2>
49
+ <ul>
50
+ <% @store.all_classes_and_modules.map do |mod|
51
+ mod.method_list
52
+ end.flatten.sort.each do |method| %>
53
+ <li class="method"><a href="<%= method.path %>"><%= method.pretty_name %> &mdash; <%= method.parent.full_name %></a>
54
+ <% end %>
55
+ </ul>