sdoc_local_editor 0.3.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/.gitignore +3 -0
  2. data/.rake_tasks~ +20 -0
  3. data/LICENSE +110 -0
  4. data/README.rdoc +37 -0
  5. data/Rakefile +12 -0
  6. data/bin/sdoc_local_editor +27 -0
  7. data/bin/sdoc_local_editor_merge +24 -0
  8. data/lib/rdoc/discover.rb +5 -0
  9. data/lib/rdoc/generator/template/merge/index.rhtml +14 -0
  10. data/lib/rdoc/generator/template/rails/_context.rhtml +210 -0
  11. data/lib/rdoc/generator/template/rails/_head.rhtml +7 -0
  12. data/lib/rdoc/generator/template/rails/class.rhtml +39 -0
  13. data/lib/rdoc/generator/template/rails/file.rhtml +37 -0
  14. data/lib/rdoc/generator/template/rails/index.rhtml +13 -0
  15. data/lib/rdoc/generator/template/rails/resources/apple-touch-icon.png +0 -0
  16. data/lib/rdoc/generator/template/rails/resources/css/github.css +129 -0
  17. data/lib/rdoc/generator/template/rails/resources/css/main.css +346 -0
  18. data/lib/rdoc/generator/template/rails/resources/css/panel.css +389 -0
  19. data/lib/rdoc/generator/template/rails/resources/css/reset.css +48 -0
  20. data/lib/rdoc/generator/template/rails/resources/favicon.ico +0 -0
  21. data/lib/rdoc/generator/template/rails/resources/i/arrows.png +0 -0
  22. data/lib/rdoc/generator/template/rails/resources/i/results_bg.png +0 -0
  23. data/lib/rdoc/generator/template/rails/resources/i/tree_bg.png +0 -0
  24. data/lib/rdoc/generator/template/rails/resources/js/highlight.pack.js +1 -0
  25. data/lib/rdoc/generator/template/rails/resources/js/jquery-1.3.2.min.js +19 -0
  26. data/lib/rdoc/generator/template/rails/resources/js/jquery-effect.js +593 -0
  27. data/lib/rdoc/generator/template/rails/resources/js/main.js +20 -0
  28. data/lib/rdoc/generator/template/rails/resources/js/searchdoc.js +441 -0
  29. data/lib/rdoc/generator/template/rails/resources/panel/index.html +73 -0
  30. data/lib/rdoc/generator/template/rails/se_index.rhtml +8 -0
  31. data/lib/rdoc/generator/template/sdoc/_context.rhtml +221 -0
  32. data/lib/rdoc/generator/template/sdoc/_head.rhtml +7 -0
  33. data/lib/rdoc/generator/template/sdoc/class.rhtml +39 -0
  34. data/lib/rdoc/generator/template/sdoc/file.rhtml +29 -0
  35. data/lib/rdoc/generator/template/sdoc/index.rhtml +13 -0
  36. data/lib/rdoc/generator/template/sdoc/resources/apple-touch-icon.png +0 -0
  37. data/lib/rdoc/generator/template/sdoc/resources/css/github.css +129 -0
  38. data/lib/rdoc/generator/template/sdoc/resources/css/main.css +333 -0
  39. data/lib/rdoc/generator/template/sdoc/resources/css/panel.css +384 -0
  40. data/lib/rdoc/generator/template/sdoc/resources/css/reset.css +48 -0
  41. data/lib/rdoc/generator/template/sdoc/resources/favicon.ico +0 -0
  42. data/lib/rdoc/generator/template/sdoc/resources/i/arrows.png +0 -0
  43. data/lib/rdoc/generator/template/sdoc/resources/i/results_bg.png +0 -0
  44. data/lib/rdoc/generator/template/sdoc/resources/i/tree_bg.png +0 -0
  45. data/lib/rdoc/generator/template/sdoc/resources/js/highlight.pack.js +1 -0
  46. data/lib/rdoc/generator/template/sdoc/resources/js/jquery-1.3.2.min.js +19 -0
  47. data/lib/rdoc/generator/template/sdoc/resources/js/jquery-effect.js +593 -0
  48. data/lib/rdoc/generator/template/sdoc/resources/js/main.js +24 -0
  49. data/lib/rdoc/generator/template/sdoc/resources/js/searchdoc.js +442 -0
  50. data/lib/rdoc/generator/template/sdoc/resources/panel/index.html +73 -0
  51. data/lib/rdoc/generator/template/sdoc/se_index.rhtml +8 -0
  52. data/lib/sdoc_local_editor.rb +9 -0
  53. data/lib/sdoc_local_editor/generator.rb +418 -0
  54. data/lib/sdoc_local_editor/github.rb +61 -0
  55. data/lib/sdoc_local_editor/helpers.rb +26 -0
  56. data/lib/sdoc_local_editor/merge.rb +223 -0
  57. data/lib/sdoc_local_editor/templatable.rb +60 -0
  58. data/sdoc_local_editor.gemspec +31 -0
  59. metadata +139 -0
@@ -0,0 +1,7 @@
1
+ <link rel="stylesheet" href="<%= "#{rel_prefix}/css/reset.css" %>" type="text/css" media="screen" />
2
+ <link rel="stylesheet" href="<%= "#{rel_prefix}/css/main.css" %>" type="text/css" media="screen" />
3
+ <link rel="stylesheet" href="<%= "#{rel_prefix}/css/github.css" %>" type="text/css" media="screen" />
4
+ <script src="<%= "#{rel_prefix}/js/jquery-1.3.2.min.js" %>" type="text/javascript" charset="utf-8"></script>
5
+ <script src="<%= "#{rel_prefix}/js/jquery-effect.js" %>" type="text/javascript" charset="utf-8"></script>
6
+ <script src="<%= "#{rel_prefix}/js/main.js" %>" type="text/javascript" charset="utf-8"></script>
7
+ <script src="<%= "#{rel_prefix}/js/highlight.pack.js" %>" type="text/javascript" charset="utf-8"></script>
@@ -0,0 +1,39 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <title><%= h klass.full_name %></title>
7
+ <meta http-equiv="Content-Type" content="text/html; charset=<%= @options.charset %>" />
8
+ <%= include_template '_head.rhtml', {:rel_prefix => rel_prefix} %>
9
+ </head>
10
+
11
+ <body>
12
+ <div class="banner">
13
+ <% if ENV['HORO_PROJECT_NAME'] %>
14
+ <span><%= ERB::Util.html_escape(ENV['HORO_PROJECT_NAME']) %> <%= ERB::Util.html_escape(ENV['HORO_PROJECT_VERSION']) %></span><br />
15
+ <% end %>
16
+ <h1>
17
+ <span class="type"><%= klass.module? ? 'Module' : 'Class' %></span>
18
+ <%= h klass.full_name %>
19
+ <% if klass.type == 'class' %>
20
+ <span class="parent">&lt;
21
+ <% if String === klass.superclass %>
22
+ <%= klass.superclass %>
23
+ <% elsif !klass.superclass.nil? %>
24
+ <a href="<%= klass.aref_to klass.superclass.path %>"><%= h klass.superclass.full_name %></a>
25
+ <% end %>
26
+ </span>
27
+ <% end %>
28
+ </h1>
29
+ <ul class="files">
30
+ <% klass.in_files.each do |file| %>
31
+ <li><a href="<%= "#{rel_prefix}/#{h file.path}" %>"><%= h file.absolute_name %></a></li>
32
+ <% end %>
33
+ </ul>
34
+ </div>
35
+ <div id="bodyContent">
36
+ <%= include_template '_context.rhtml', {:context => klass, :rel_prefix => rel_prefix} %>
37
+ </div>
38
+ </body>
39
+ </html>
@@ -0,0 +1,37 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <title><%= h file.name %></title>
7
+ <meta http-equiv="Content-Type" content="text/html; charset=<%= @options.charset %>" />
8
+ <%= include_template '_head.rhtml', {:rel_prefix => rel_prefix} %>
9
+ </head>
10
+
11
+ <body>
12
+ <div class="banner">
13
+ <% if ENV['HORO_PROJECT_NAME'] %>
14
+ <span><%= ERB::Util.html_escape(ENV['HORO_PROJECT_NAME']) %> <%= ERB::Util.html_escape(ENV['HORO_PROJECT_VERSION']) %></span><br />
15
+ <% end %>
16
+ <h1>
17
+ <%= h file.name %>
18
+ </h1>
19
+ <ul class="files">
20
+ <%
21
+ github = github_url(file.relative_name) if options.github
22
+ %>
23
+ <li>
24
+ <%= h file.relative_name %>
25
+ <% if github %>
26
+ <a href="<%= github %>" target="_blank" class="github_url">on GitHub</a>
27
+ <% end %>
28
+ </li>
29
+ <li>Last modified: <%= file.file_stat.mtime %></li>
30
+ </ul>
31
+ </div>
32
+
33
+ <div id="bodyContent">
34
+ <%= include_template '_context.rhtml', {:context => file, :rel_prefix => rel_prefix} %>
35
+ </div>
36
+ </body>
37
+ </html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html
2
+ PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta http-equiv="Content-Type" content="text/html; charset=<%= @options.charset %>" />
7
+ <title><%= @options.title %></title>
8
+ </head>
9
+ <frameset cols="300,*" frameborder="1" border="1" bordercolor="#999999" framespacing="1">
10
+ <frame src="panel/index.html" title="Search" name="panel" />
11
+ <frame src="<%= index_path %>" name="docwin" />
12
+ </frameset>
13
+ </html>
@@ -0,0 +1,129 @@
1
+ /*
2
+
3
+ github.com style (c) Vasily Polovnyov <vast@whiteants.net>
4
+
5
+ */
6
+
7
+ pre code {
8
+ display: block; padding: 0.5em;
9
+ color: #000;
10
+ background: #f8f8ff
11
+ }
12
+
13
+ pre .comment,
14
+ pre .template_comment,
15
+ pre .diff .header,
16
+ pre .javadoc {
17
+ color: #998;
18
+ font-style: italic
19
+ }
20
+
21
+ pre .keyword,
22
+ pre .css .rule .keyword,
23
+ pre .winutils,
24
+ pre .javascript .title,
25
+ pre .lisp .title,
26
+ pre .subst {
27
+ color: #000;
28
+ font-weight: bold
29
+ }
30
+
31
+ pre .number,
32
+ pre .hexcolor {
33
+ color: #40a070
34
+ }
35
+
36
+ pre .string,
37
+ pre .tag .value,
38
+ pre .phpdoc,
39
+ pre .tex .formula {
40
+ color: #d14
41
+ }
42
+
43
+ pre .title,
44
+ pre .id {
45
+ color: #900;
46
+ font-weight: bold
47
+ }
48
+
49
+ pre .javascript .title,
50
+ pre .lisp .title,
51
+ pre .subst {
52
+ font-weight: normal
53
+ }
54
+
55
+ pre .class .title,
56
+ pre .haskell .label,
57
+ pre .tex .command {
58
+ color: #458;
59
+ font-weight: bold
60
+ }
61
+
62
+ pre .tag,
63
+ pre .tag .title,
64
+ pre .rules .property,
65
+ pre .django .tag .keyword {
66
+ color: #000080;
67
+ font-weight: normal
68
+ }
69
+
70
+ pre .attribute,
71
+ pre .variable,
72
+ pre .instancevar,
73
+ pre .lisp .body {
74
+ color: #008080
75
+ }
76
+
77
+ pre .regexp {
78
+ color: #009926
79
+ }
80
+
81
+ pre .class {
82
+ color: #458;
83
+ font-weight: bold
84
+ }
85
+
86
+ pre .symbol,
87
+ pre .ruby .symbol .string,
88
+ pre .ruby .symbol .keyword,
89
+ pre .ruby .symbol .keymethods,
90
+ pre .lisp .keyword,
91
+ pre .tex .special,
92
+ pre .input_number {
93
+ color: #990073
94
+ }
95
+
96
+ pre .builtin,
97
+ pre .built_in,
98
+ pre .lisp .title {
99
+ color: #0086b3
100
+ }
101
+
102
+ pre .preprocessor,
103
+ pre .pi,
104
+ pre .doctype,
105
+ pre .shebang,
106
+ pre .cdata {
107
+ color: #999;
108
+ font-weight: bold
109
+ }
110
+
111
+ pre .deletion {
112
+ background: #fdd
113
+ }
114
+
115
+ pre .addition {
116
+ background: #dfd
117
+ }
118
+
119
+ pre .diff .change {
120
+ background: #0086b3
121
+ }
122
+
123
+ pre .chunk {
124
+ color: #aaa
125
+ }
126
+
127
+ pre .tex .formula {
128
+ opacity: 0.5;
129
+ }
@@ -0,0 +1,346 @@
1
+ body {
2
+ font-family: "Helvetica Neue", Arial, sans-serif;
3
+ background: #FFF;
4
+ color: #000;
5
+ margin: 0px;
6
+ font-size: 0.82em;
7
+ line-height: 1.25em;
8
+ }
9
+
10
+ a:link, a:active, a:visited, a:hover {
11
+ color: #980905;
12
+ text-decoration: none;
13
+ }
14
+
15
+ a:hover, .banner a:hover {
16
+ color: #333;
17
+ background: #FE8;
18
+ }
19
+
20
+ h1 a, h2 a, .banner a {
21
+ color: #fff;
22
+ }
23
+
24
+ h1 a:hover, h2 a:hover {
25
+ color: #fff;
26
+ }
27
+
28
+ p {
29
+ margin-bottom: 1em;
30
+ }
31
+
32
+ h1 {
33
+ font-size: 2.1em;
34
+ font-weight: normal;
35
+ line-height: 1.2em;
36
+ margin: 1.4em 0 0.7em 0;
37
+ }
38
+
39
+ h2 {
40
+ font-size: 1.6em;
41
+ margin: 1.8em 0 0.8em 0;
42
+ font-weight: normal;
43
+ line-height: 1.2em;
44
+ }
45
+
46
+ h3 {
47
+ font-size: 1.4em;
48
+ color:#555;
49
+ margin: 1.4em 0 0.7em 0;
50
+ font-weight: normal;
51
+ }
52
+
53
+ h4 {
54
+ margin: 1.4em 0 0.5em 0;
55
+ font-size: 1em;
56
+ }
57
+
58
+ table
59
+ {
60
+ margin-bottom: 1em;
61
+ }
62
+
63
+ td, th
64
+ {
65
+ padding: 0 0.7em 0.3em 0;
66
+ }
67
+
68
+ th
69
+ {
70
+ font-weight: bold;
71
+ }
72
+
73
+ .clear
74
+ {
75
+ clear: both;
76
+ width: 0; height: 0;
77
+ }
78
+
79
+ dt
80
+ {
81
+ margin-bottom: 0.3em;
82
+ font-weight: bold;
83
+ }
84
+
85
+ dd
86
+ {
87
+ margin-left: 2em;
88
+ margin-bottom: 1em;
89
+ }
90
+
91
+ dd p
92
+ {
93
+ margin-top: 0.6em;
94
+ }
95
+
96
+ li
97
+ {
98
+ margin: 0 0 0.5em 2em;
99
+ }
100
+
101
+ ul li
102
+ {
103
+ list-style: disc;
104
+ }
105
+
106
+ ol li
107
+ {
108
+ list-style: decimal;
109
+ }
110
+
111
+ .banner
112
+ {
113
+ background: #C52F24;
114
+ color: #FFF;
115
+ border: 1px solid #980905;
116
+ padding: 1em;
117
+ }
118
+ .banner h1
119
+ {
120
+ font-size: 1.2em;
121
+ margin: 0;
122
+ }
123
+
124
+ .banner h1 .type
125
+ {
126
+ font-size: 0.833em;
127
+ display:block;
128
+ }
129
+
130
+ .banner h1 .type,
131
+ .banner h1 .parent
132
+ {
133
+ color: #CCC;
134
+ }
135
+
136
+ .banner ul
137
+ {
138
+ margin-top: 0.3em;
139
+ margin-bottom: 0;
140
+ font-size: 0.85em;
141
+ }
142
+
143
+ .banner li
144
+ {
145
+ list-style: none;
146
+ margin-left: 0;
147
+ margin-bottom: 0;
148
+ }
149
+
150
+ .banner .github_url {
151
+ color: #CCC;
152
+ }
153
+
154
+ pre
155
+ {
156
+ margin-bottom: 1em;
157
+ }
158
+
159
+ .methods dt
160
+ {
161
+ width: 1em;
162
+ font-size: 1.5em;
163
+ color:#AAA;
164
+ position: absolute;
165
+ font-weight: normal;
166
+ margin: 0;
167
+ }
168
+
169
+ .methods dd
170
+ {
171
+ margin-left: 2.5em;
172
+ min-height: 1.8em;
173
+ -height: 1.8em;
174
+ padding-bottom: 0.8em;
175
+ }
176
+
177
+
178
+ .methods ul li
179
+ {
180
+ margin-right: 0.7em;
181
+ margin-left: 0;
182
+ list-style: none;
183
+ display: inline;
184
+ }
185
+
186
+ #content {
187
+ margin: 2em;
188
+ margin-left: 3.5em;
189
+ margin-right: 3.5em;
190
+ }
191
+
192
+
193
+ .sectiontitle {
194
+ margin-top: 2em;
195
+ margin-bottom: 1.3em;
196
+ margin-left: -1.2em;
197
+ font-size: 1.2em;
198
+ padding: 0 0 0.25em 0;
199
+ font-weight: bold;
200
+ border-bottom: 1px solid #000;
201
+ }
202
+
203
+ .contenttitle {
204
+ margin-top: 4em;
205
+ margin-bottom: 1.3em;
206
+ margin-left: -0.9em;
207
+ font-size: 1.6em;
208
+ padding: 0 0 0.25em 0;
209
+ font-weight: bold;
210
+ }
211
+
212
+ .attr-rw {
213
+ padding-right: 1em;
214
+ text-align: center;
215
+ color: #055;
216
+ }
217
+
218
+ .attr-name {
219
+ font-weight: bold;
220
+ padding-right: 1em;
221
+ }
222
+
223
+ .attr-desc {
224
+ }
225
+
226
+ tt {
227
+ font-size: 1.15em;
228
+ }
229
+
230
+ .attr-value {
231
+ font-family: monospace;
232
+ padding-left: 1em;
233
+ font-size: 1.15em;
234
+ }
235
+
236
+ .dyn-source {
237
+ display: none;
238
+ background: #fffde8;
239
+ color: #000;
240
+ border: #ffe0bb dotted 1px;
241
+ margin: 0.5em 2em 0.5em 0;
242
+ padding: 0.5em;
243
+ }
244
+
245
+ .dyn-source .cmt {
246
+ color: #00F;
247
+ font-style: italic;
248
+ }
249
+
250
+ .dyn-source .kw {
251
+ color: #070;
252
+ font-weight: bold;
253
+ }
254
+
255
+ .description pre {
256
+ padding: 0.5em;
257
+ border: #ffe0bb dotted 1px;
258
+ background: #fffde8;
259
+ }
260
+
261
+ .method {
262
+ margin-bottom: 2em;
263
+ }
264
+ .method .description,
265
+ .method .sourcecode
266
+ {
267
+ margin-left: 1.2em;
268
+ }
269
+ .method h4
270
+ {
271
+ border-bottom: 1px dotted #999;
272
+ padding: 0 0 0.2em 0;
273
+ margin-bottom: 0.8em;
274
+ font-size: 1.1em;
275
+ color:#333;
276
+ }
277
+ .method .method-title {
278
+ border-bottom: 1px dotted #666;
279
+ padding: 0 0 0.15em 0;
280
+ margin: 0 0 0.5em 0;
281
+ font-size: 1.2em;
282
+ line-height: 1.25em;
283
+ position: relative;
284
+ }
285
+
286
+ .method .method-title a.permalink {
287
+ position: absolute;
288
+ font-size: 0.75em;
289
+ right: 0;
290
+ }
291
+
292
+ .method .sourcecode p.source-link {
293
+ text-indent: 0em;
294
+ margin-top: 0.5em;
295
+ }
296
+
297
+ .method .aka {
298
+ margin-top: 0.3em;
299
+ margin-left: 1em;
300
+ font-style: italic;
301
+ text-indent: 2em;
302
+ }
303
+
304
+ .method .source-link
305
+ {
306
+ font-size: 0.85em;
307
+ }
308
+
309
+ .ruby-constant {
310
+ color: teal;
311
+ }
312
+ .ruby-keyword {
313
+ color: #000;
314
+ font-weight: bold
315
+ }
316
+ .ruby-title {
317
+ color: #900;
318
+ font-weight: bold;
319
+ }
320
+ .ruby-ivar {
321
+ color: teal;
322
+ }
323
+ .ruby-operator {
324
+ color: #000;
325
+ font-weight: bold
326
+ }
327
+ .ruby-identifier {
328
+ color: #000;
329
+ }
330
+ .ruby-string,
331
+ .ruby-node {
332
+ color: #D14;
333
+ }
334
+ .ruby-comment {
335
+ color: #998;
336
+ font-style: italic;
337
+ }
338
+ .ruby-regexp {
339
+ color: #009926;
340
+ }
341
+ .ruby-value {
342
+ color: #990073;
343
+ }
344
+ .ruby-number {
345
+ color: #40A070;
346
+ }