prepor-erlapi 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. data/.document +5 -0
  2. data/.gitignore +5 -0
  3. data/LICENSE +20 -0
  4. data/README.rdoc +15 -0
  5. data/Rakefile +56 -0
  6. data/VERSION +1 -0
  7. data/bin/erlapi +26 -0
  8. data/erlapi.gemspec +138 -0
  9. data/lib/erlapi/generator/shtml.rb +353 -0
  10. data/lib/erlapi/generator/template/direct/_context.rhtml +172 -0
  11. data/lib/erlapi/generator/template/direct/class.rhtml +40 -0
  12. data/lib/erlapi/generator/template/direct/file.rhtml +30 -0
  13. data/lib/erlapi/generator/template/direct/index.rhtml +14 -0
  14. data/lib/erlapi/generator/template/direct/resources/apple-touch-icon.png +0 -0
  15. data/lib/erlapi/generator/template/direct/resources/css/main.css +263 -0
  16. data/lib/erlapi/generator/template/direct/resources/css/panel.css +383 -0
  17. data/lib/erlapi/generator/template/direct/resources/css/reset.css +53 -0
  18. data/lib/erlapi/generator/template/direct/resources/favicon.ico +0 -0
  19. data/lib/erlapi/generator/template/direct/resources/i/arrows.png +0 -0
  20. data/lib/erlapi/generator/template/direct/resources/i/results_bg.png +0 -0
  21. data/lib/erlapi/generator/template/direct/resources/i/tree_bg.png +0 -0
  22. data/lib/erlapi/generator/template/direct/resources/js/jquery-1.3.2.min.js +19 -0
  23. data/lib/erlapi/generator/template/direct/resources/js/jquery-effect.js +593 -0
  24. data/lib/erlapi/generator/template/direct/resources/js/main.js +22 -0
  25. data/lib/erlapi/generator/template/direct/resources/js/searchdoc.js +628 -0
  26. data/lib/erlapi/generator/template/direct/resources/panel/index.html +71 -0
  27. data/lib/erlapi/generator/template/merge/index.rhtml +14 -0
  28. data/lib/erlapi/generator/template/shtml/_context.rhtml +164 -0
  29. data/lib/erlapi/generator/template/shtml/class.rhtml +46 -0
  30. data/lib/erlapi/generator/template/shtml/file.rhtml +37 -0
  31. data/lib/erlapi/generator/template/shtml/index.rhtml +14 -0
  32. data/lib/erlapi/generator/template/shtml/resources/apple-touch-icon.png +0 -0
  33. data/lib/erlapi/generator/template/shtml/resources/css/main.css +191 -0
  34. data/lib/erlapi/generator/template/shtml/resources/css/panel.css +383 -0
  35. data/lib/erlapi/generator/template/shtml/resources/css/reset.css +53 -0
  36. data/lib/erlapi/generator/template/shtml/resources/favicon.ico +0 -0
  37. data/lib/erlapi/generator/template/shtml/resources/i/arrows.png +0 -0
  38. data/lib/erlapi/generator/template/shtml/resources/i/results_bg.png +0 -0
  39. data/lib/erlapi/generator/template/shtml/resources/i/tree_bg.png +0 -0
  40. data/lib/erlapi/generator/template/shtml/resources/js/jquery-1.3.2.min.js +19 -0
  41. data/lib/erlapi/generator/template/shtml/resources/js/main.js +34 -0
  42. data/lib/erlapi/generator/template/shtml/resources/js/searchdoc.js +628 -0
  43. data/lib/erlapi/generator/template/shtml/resources/panel/index.html +71 -0
  44. data/lib/erlapi/generator.rb +194 -0
  45. data/lib/erlapi/helpers.rb +26 -0
  46. data/lib/erlapi/merge.rb +217 -0
  47. data/lib/erlapi/parser.rb +134 -0
  48. data/lib/erlapi/shtml.rb +351 -0
  49. data/lib/erlapi/templatable.rb +51 -0
  50. data/lib/erlapi/templates/html/direct/_context.rhtml +172 -0
  51. data/lib/erlapi/templates/html/direct/class.rhtml +40 -0
  52. data/lib/erlapi/templates/html/direct/file.rhtml +30 -0
  53. data/lib/erlapi/templates/html/direct/index.rhtml +14 -0
  54. data/lib/erlapi/templates/html/direct/resources/apple-touch-icon.png +0 -0
  55. data/lib/erlapi/templates/html/direct/resources/css/main.css +263 -0
  56. data/lib/erlapi/templates/html/direct/resources/css/panel.css +383 -0
  57. data/lib/erlapi/templates/html/direct/resources/css/reset.css +53 -0
  58. data/lib/erlapi/templates/html/direct/resources/favicon.ico +0 -0
  59. data/lib/erlapi/templates/html/direct/resources/i/arrows.png +0 -0
  60. data/lib/erlapi/templates/html/direct/resources/i/results_bg.png +0 -0
  61. data/lib/erlapi/templates/html/direct/resources/i/tree_bg.png +0 -0
  62. data/lib/erlapi/templates/html/direct/resources/js/jquery-1.3.2.min.js +19 -0
  63. data/lib/erlapi/templates/html/direct/resources/js/jquery-effect.js +593 -0
  64. data/lib/erlapi/templates/html/direct/resources/js/main.js +22 -0
  65. data/lib/erlapi/templates/html/direct/resources/js/searchdoc.js +628 -0
  66. data/lib/erlapi/templates/html/direct/resources/panel/index.html +71 -0
  67. data/lib/erlapi/templates/html/merge/index.rhtml +14 -0
  68. data/lib/erlapi/templates/html/shtml/_context.rhtml +63 -0
  69. data/lib/erlapi/templates/html/shtml/class.rhtml +25 -0
  70. data/lib/erlapi/templates/html/shtml/file.rhtml +37 -0
  71. data/lib/erlapi/templates/html/shtml/index.rhtml +14 -0
  72. data/lib/erlapi/templates/html/shtml/resources/apple-touch-icon.png +0 -0
  73. data/lib/erlapi/templates/html/shtml/resources/css/main.css +263 -0
  74. data/lib/erlapi/templates/html/shtml/resources/css/panel.css +383 -0
  75. data/lib/erlapi/templates/html/shtml/resources/css/reset.css +53 -0
  76. data/lib/erlapi/templates/html/shtml/resources/favicon.ico +0 -0
  77. data/lib/erlapi/templates/html/shtml/resources/i/arrows.png +0 -0
  78. data/lib/erlapi/templates/html/shtml/resources/i/results_bg.png +0 -0
  79. data/lib/erlapi/templates/html/shtml/resources/i/tree_bg.png +0 -0
  80. data/lib/erlapi/templates/html/shtml/resources/js/jquery-1.3.2.min.js +19 -0
  81. data/lib/erlapi/templates/html/shtml/resources/js/jquery-effect.js +593 -0
  82. data/lib/erlapi/templates/html/shtml/resources/js/main.js +22 -0
  83. data/lib/erlapi/templates/html/shtml/resources/js/searchdoc.js +620 -0
  84. data/lib/erlapi/templates/html/shtml/resources/panel/index.html +71 -0
  85. data/lib/erlapi/templates/html/shtml/resources copy/apple-touch-icon.png +0 -0
  86. data/lib/erlapi/templates/html/shtml/resources copy/css/main.css +195 -0
  87. data/lib/erlapi/templates/html/shtml/resources copy/css/panel.css +383 -0
  88. data/lib/erlapi/templates/html/shtml/resources copy/css/reset.css +53 -0
  89. data/lib/erlapi/templates/html/shtml/resources copy/favicon.ico +0 -0
  90. data/lib/erlapi/templates/html/shtml/resources copy/i/arrows.png +0 -0
  91. data/lib/erlapi/templates/html/shtml/resources copy/i/results_bg.png +0 -0
  92. data/lib/erlapi/templates/html/shtml/resources copy/i/tree_bg.png +0 -0
  93. data/lib/erlapi/templates/html/shtml/resources copy/js/jquery-1.3.2.min.js +19 -0
  94. data/lib/erlapi/templates/html/shtml/resources copy/js/main.js +34 -0
  95. data/lib/erlapi/templates/html/shtml/resources copy/js/searchdoc.js +628 -0
  96. data/lib/erlapi/templates/html/shtml/resources copy/panel/index.html +71 -0
  97. data/lib/erlapi.rb +38 -0
  98. data/test/erlapi_test.rb +7 -0
  99. data/test/test_helper.rb +10 -0
  100. metadata +154 -0
@@ -0,0 +1,14 @@
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=utf-8"/>
7
+
8
+ <title><%= @title %></title>
9
+ </head>
10
+ <frameset cols="300,*" frameborder="1" border="1" bordercolor="#666666" framespacing="1">
11
+ <frame src="panel/index.html" title="Search" name="panel" />
12
+ <frame src="<%= index_path %>" name="docwin" />
13
+ </frameset>
14
+ </html>
@@ -0,0 +1,63 @@
1
+ <div id="content">
2
+ <% unless (desc = context.desc).empty? %>
3
+ <div class="description"><%= desc %></div>
4
+ <% end %>
5
+
6
+ <% sections = context.sections.select { |section| section.name } %>
7
+ <% unless sections.empty? %>
8
+ <div class="sectiontitle">Contents</div>
9
+ <ul>
10
+ <% sections.each do |section| %>
11
+ <li><a href="#"><%= h section.name %></a></li>
12
+ <% end %>
13
+ </ul>
14
+ <% end %>
15
+
16
+ <%
17
+ list = context.funcs
18
+ %>
19
+ <% unless list.empty? %>
20
+ <div class="sectiontitle">Functions</div>
21
+ <ul>
22
+ <% list.sort{ |a, b| a.short_name <=> b.short_name }.each do |func| %>
23
+ <li><a href="#<%= func.ref %>"><%= func.names.first %></a></li>
24
+ <% end %>
25
+ </ul>
26
+ <% end %>
27
+
28
+ <% sections.each do |section| %>
29
+ <div class="sectiontitle"><%= h section.name %></div>
30
+ <% unless (description = section.desc).empty? %>
31
+ <div class="description">
32
+ <%= description %>
33
+ </div>
34
+ <% end %>
35
+ <% end %>
36
+ <div class="sectiontitle">Exports</div>
37
+ <% context.funcs.each do |func|
38
+ %>
39
+ <div class="method">
40
+ <div class="title">
41
+ <a name="<%= func.ref %>"></a><b><%= func.names.join('<br/>') %></b>
42
+ </div>
43
+
44
+ <% unless func.types.empty? %>
45
+ <div class="func_types">
46
+ Types:
47
+ <p>
48
+ <%= func.types %>
49
+ </p>
50
+ </div>
51
+ <% end %>
52
+ <% unless (description = func.desc).empty? %>
53
+ <div class="description">
54
+ <%= description %>
55
+ </div>
56
+ <% end %>
57
+
58
+ </div>
59
+ <% end %>
60
+
61
+
62
+
63
+ </div>
@@ -0,0 +1,25 @@
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 mod.title %></title>
7
+ <meta http-equiv="Content-Type" content="text/html; charset=<%= @options.charset %>" />
8
+ <link rel="stylesheet" href="<%= "css/main.css" %>" type="text/css" media="screen" />
9
+ <script src="<%= "js/main.js" %>" type="text/javascript" charset="utf-8"></script>
10
+ </head>
11
+
12
+ <body>
13
+ <table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'>
14
+ <tr>
15
+ <td class="file-title"><span class="file-title-prefix">Module</span><br /><%= h mod.title %></td>
16
+ <td align="right">
17
+
18
+ </td>
19
+ </tr>
20
+ </table>
21
+ <div id="bodyContent">
22
+ <%= include_template '_context.rhtml', {:context => mod } %>
23
+ </div>
24
+ </body>
25
+ </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
+ <link rel="stylesheet" href="<%= "#{rel_prefix}/css/main.css" %>" type="text/css" media="screen" />
9
+ <script src="<%= "#{rel_prefix}/js/main.js" %>" type="text/javascript" charset="utf-8"></script>
10
+ </head>
11
+
12
+ <body>
13
+ <table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'>
14
+ <tr><td>
15
+ <table width="100%" border='0' cellpadding='0' cellspacing='0'><tr>
16
+ <td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br /><%= h file.name %></td>
17
+ <td align="right">
18
+ <table border='0' cellspacing="0" cellpadding="2">
19
+ <tr>
20
+ <td>Path:</td>
21
+ <td><%= h file.relative_name %></td>
22
+ </tr>
23
+ <tr>
24
+ <td>Modified:</td>
25
+ <td><%= file.file_stat.mtime %></td>
26
+ </tr>
27
+ </table>
28
+ </td></tr>
29
+ </table>
30
+ </td></tr>
31
+ </table><br />
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,14 @@
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
+
8
+ <title><%= @options.title %></title>
9
+ </head>
10
+ <frameset cols="300,*" frameborder="1" border="1" bordercolor="#666666" framespacing="1">
11
+ <frame src="panel/index.html" title="Search" name="panel" />
12
+ <frame src="<%= index_path %>" name="docwin" />
13
+ </frameset>
14
+ </html>
@@ -0,0 +1,263 @@
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 {
11
+ color: #00F;
12
+ text-decoration: none;
13
+ }
14
+
15
+ a:hover {
16
+ color: #333;
17
+ background: #FE8;
18
+ }
19
+
20
+ p {
21
+ margin-bottom: 1em;
22
+ }
23
+
24
+ h1 {
25
+ font-size: 2.1em;
26
+ font-weight: normal;
27
+ line-height: 1.2em;
28
+ margin: 1.4em 0 0.7em 0;
29
+ }
30
+
31
+ h2 {
32
+ font-size: 1.6em;
33
+ margin: 1.8em 0 0.8em 0;
34
+ font-weight: normal;
35
+ line-height: 1.2em;
36
+ }
37
+
38
+ h3 {
39
+ font-size: 1.4em;
40
+ color:#555;
41
+ margin: 1.4em 0 0.7em 0;
42
+ font-weight: normal;
43
+ }
44
+
45
+ h4 {
46
+ margin: 1.4em 0 0.5em 0;
47
+ font-size: 1em;
48
+ }
49
+
50
+ .clear
51
+ {
52
+ clear: both;
53
+ width: 0; height: 0;
54
+ }
55
+
56
+ dt
57
+ {
58
+ margin-bottom: 0.3em;
59
+ font-weight: bold;
60
+ }
61
+
62
+ dd
63
+ {
64
+ margin-left: 2em;
65
+ margin-bottom: 1em;
66
+ }
67
+
68
+ dd p
69
+ {
70
+ margin-top: 0.6em;
71
+ }
72
+
73
+ li
74
+ {
75
+ margin: 0 0 0.5em 2em;
76
+ }
77
+
78
+ ul li
79
+ {
80
+ list-style: disc;
81
+ }
82
+
83
+ ol li
84
+ {
85
+ list-style: decimal;
86
+ }
87
+
88
+ .banner
89
+ {
90
+ background: #EDF3FE;
91
+ border-bottom: 1px solid #ccc;
92
+ padding: 1em 2em 0.5em 2em;
93
+ }
94
+ .banner h1
95
+ {
96
+ font-size: 1.2em;
97
+ margin: 0;
98
+ }
99
+
100
+ .banner h1 .type
101
+ {
102
+ font-size: 0.833em;
103
+ display:block;
104
+ }
105
+
106
+ .banner h1 .type,
107
+ .banner h1 .parent
108
+ {
109
+ color: #666;
110
+ }
111
+
112
+ .banner ul
113
+ {
114
+ margin-top: 0.3em;
115
+ margin-bottom: 0;
116
+ font-size: 0.85em;
117
+ }
118
+
119
+ .banner li
120
+ {
121
+ list-style: none;
122
+ margin-left: 0;
123
+ margin-bottom: 0;
124
+ }
125
+
126
+ pre
127
+ {
128
+ margin-bottom: 1em;
129
+ }
130
+
131
+ .methods dt
132
+ {
133
+ width: 1em;
134
+ font-size: 1.5em;
135
+ color:#AAA;
136
+ position: absolute;
137
+ font-weight: normal;
138
+ margin: 0;
139
+ }
140
+
141
+ .methods dd
142
+ {
143
+ margin-left: 2.5em;
144
+ min-height: 1.8em;
145
+ -height: 1.8em;
146
+ padding-bottom: 0.8em;
147
+ }
148
+
149
+
150
+ .methods ul li
151
+ {
152
+ margin-right: 0.7em;
153
+ margin-left: 0;
154
+ list-style: none;
155
+ display: inline;
156
+ }
157
+
158
+ #content {
159
+ margin: 2em;
160
+ margin-left: 3.5em;
161
+ margin-right: 3.5em;
162
+ }
163
+
164
+
165
+ .sectiontitle {
166
+ margin-top: 2em;
167
+ margin-bottom: 1.3em;
168
+ margin-left: -1.2em;
169
+ font-size: 1.2em;
170
+ padding: 0 0 0.25em 0;
171
+ font-weight: bold;
172
+ border-bottom: 1px solid #000;
173
+ }
174
+
175
+ .attr-rw {
176
+ padding-right: 1em;
177
+ text-align: center;
178
+ color: #055;
179
+ }
180
+
181
+ .attr-name {
182
+ font-weight: bold;
183
+ padding-right: 1em;
184
+ }
185
+
186
+ .attr-desc {
187
+ }
188
+
189
+ tt {
190
+ font-size: 1.15em;
191
+ }
192
+
193
+ .attr-value {
194
+ font-family: monospace;
195
+ padding-left: 1em;
196
+ font-size: 1.15em;
197
+ }
198
+
199
+ .dyn-source {
200
+ display: none;
201
+ background: #fffde8;
202
+ color: #000;
203
+ border: #ffe0bb dotted 1px;
204
+ margin: 0.5em 2em 0.5em 0;
205
+ padding: 0.5em;
206
+ }
207
+
208
+ .dyn-source .cmt {
209
+ color: #00F;
210
+ font-style: italic;
211
+ }
212
+
213
+ .dyn-source .kw {
214
+ color: #070;
215
+ font-weight: bold;
216
+ }
217
+
218
+ .description pre {
219
+ padding: 0.5em;
220
+ border: #ffe0bb dotted 1px;
221
+ background: #fffde8;
222
+ }
223
+
224
+ .method {
225
+ margin-bottom: 2em;
226
+ }
227
+ .method .description,
228
+ .method .sourcecode
229
+ {
230
+ margin-left: 1.2em;
231
+ }
232
+ .method h4
233
+ {
234
+ border-bottom: 1px dotted #999;
235
+ padding: 0 0 0.2em 0;
236
+ margin-bottom: 0.8em;
237
+ font-size: 1.1em;
238
+ color:#333;
239
+ }
240
+ .method .title {
241
+ border-bottom: 1px dotted #666;
242
+ padding: 0 0 0.15em 0;
243
+ margin: 0 0 0.5em 0;
244
+ font-size: 1.2em;
245
+ line-height: 1.25em;
246
+ }
247
+
248
+ .method .sourcecode p.source-link {
249
+ text-indent: 0em;
250
+ margin-top: 0.5em;
251
+ }
252
+
253
+ .method .aka {
254
+ margin-top: 0.3em;
255
+ margin-left: 1em;
256
+ font-style: italic;
257
+ text-indent: 2em;
258
+ }
259
+
260
+ .method .source-link
261
+ {
262
+ font-size: 0.85em;
263
+ }