rdoc 6.1.0 → 6.3.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rdoc might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile +9 -0
- data/README.rdoc +0 -1
- data/Rakefile +12 -4
- data/lib/rdoc.rb +21 -0
- data/lib/rdoc/any_method.rb +52 -7
- data/lib/rdoc/class_module.rb +1 -1
- data/lib/rdoc/comment.rb +12 -1
- data/lib/rdoc/context.rb +10 -2
- data/lib/rdoc/context/section.rb +0 -13
- data/lib/rdoc/cross_reference.rb +4 -4
- data/lib/rdoc/erb_partial.rb +1 -1
- data/lib/rdoc/erbio.rb +2 -2
- data/lib/rdoc/generator/darkfish.rb +9 -9
- data/lib/rdoc/generator/pot.rb +3 -3
- data/lib/rdoc/generator/template/darkfish/_head.rhtml +9 -7
- data/lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml +2 -2
- data/lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml +2 -2
- data/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +7 -7
- data/lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml +2 -2
- data/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +7 -7
- data/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +6 -6
- data/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +5 -5
- data/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +5 -5
- data/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml +5 -5
- data/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +4 -4
- data/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +4 -4
- data/lib/rdoc/generator/template/darkfish/class.rhtml +44 -44
- data/lib/rdoc/generator/template/darkfish/css/rdoc.css +35 -6
- data/lib/rdoc/generator/template/darkfish/index.rhtml +3 -4
- data/lib/rdoc/generator/template/darkfish/js/darkfish.js +22 -99
- data/lib/rdoc/generator/template/darkfish/js/search.js +32 -31
- data/lib/rdoc/generator/template/darkfish/servlet_root.rhtml +15 -16
- data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +16 -16
- data/lib/rdoc/generator/template/json_index/js/navigation.js +4 -40
- data/lib/rdoc/generator/template/json_index/js/searcher.js +6 -6
- data/lib/rdoc/i18n.rb +1 -1
- data/lib/rdoc/markdown.kpeg +1 -1
- data/lib/rdoc/markdown.rb +16287 -0
- data/lib/rdoc/markdown/literals.rb +417 -0
- data/lib/rdoc/markup.rb +0 -2
- data/lib/rdoc/markup/formatter.rb +1 -1
- data/lib/rdoc/markup/parser.rb +58 -42
- data/lib/rdoc/markup/pre_process.rb +1 -1
- data/lib/rdoc/markup/regexp_handling.rb +41 -0
- data/lib/rdoc/markup/to_html.rb +19 -6
- data/lib/rdoc/markup/to_html_crossref.rb +18 -6
- data/lib/rdoc/options.rb +23 -5
- data/lib/rdoc/parser.rb +7 -7
- data/lib/rdoc/parser/c.rb +139 -183
- data/lib/rdoc/parser/ripper_state_lex.rb +2 -1
- data/lib/rdoc/parser/ruby.rb +18 -8
- data/lib/rdoc/rd/block_parser.rb +1056 -0
- data/lib/rdoc/rd/inline_parser.rb +1208 -0
- data/lib/rdoc/rdoc.rb +26 -20
- data/lib/rdoc/ri/driver.rb +9 -5
- data/lib/rdoc/ri/paths.rb +3 -17
- data/lib/rdoc/ri/task.rb +1 -1
- data/lib/rdoc/rubygems_hook.rb +2 -2
- data/lib/rdoc/servlet.rb +16 -8
- data/lib/rdoc/store.rb +6 -14
- data/lib/rdoc/task.rb +1 -1
- data/lib/rdoc/text.rb +8 -2
- data/lib/rdoc/token_stream.rb +8 -3
- data/lib/rdoc/tom_doc.rb +6 -7
- data/lib/rdoc/version.rb +1 -1
- data/man/ri.1 +247 -0
- data/rdoc.gemspec +194 -10
- metadata +10 -86
- data/.document +0 -5
- data/.gitignore +0 -14
- data/.travis.yml +0 -21
- data/appveyor.yml +0 -36
- data/lib/rdoc/generator/template/darkfish/js/jquery.js +0 -4
- data/lib/rdoc/markup/formatter_test_case.rb +0 -764
- data/lib/rdoc/markup/text_formatter_test_case.rb +0 -115
@@ -1,15 +1,15 @@
|
|
1
|
-
|
1
|
+
<%- unless klass.extends.empty? then %>
|
2
2
|
<div id="extends-section" class="nav-section">
|
3
3
|
<h3>Extended With Modules</h3>
|
4
4
|
|
5
5
|
<ul class="link-list">
|
6
|
-
|
7
|
-
|
6
|
+
<%- klass.each_extend do |ext| -%>
|
7
|
+
<%- unless String === ext.module then -%>
|
8
8
|
<li><a class="extend" href="<%= klass.aref_to ext.module.path %>"><%= ext.module.full_name %></a>
|
9
|
-
|
9
|
+
<%- else -%>
|
10
10
|
<li><span class="extend"><%= ext.name %></span>
|
11
|
-
|
12
|
-
|
11
|
+
<%- end -%>
|
12
|
+
<%- end -%>
|
13
13
|
</ul>
|
14
14
|
</div>
|
15
|
-
|
15
|
+
<%- end -%>
|
@@ -1,15 +1,15 @@
|
|
1
|
-
|
1
|
+
<%- unless klass.includes.empty? then %>
|
2
2
|
<div id="includes-section" class="nav-section">
|
3
3
|
<h3>Included Modules</h3>
|
4
4
|
|
5
5
|
<ul class="link-list">
|
6
|
-
|
7
|
-
|
6
|
+
<%- klass.each_include do |inc| -%>
|
7
|
+
<%- unless String === inc.module then -%>
|
8
8
|
<li><a class="include" href="<%= klass.aref_to inc.module.path %>"><%= inc.module.full_name %></a>
|
9
|
-
|
9
|
+
<%- else -%>
|
10
10
|
<li><span class="include"><%= inc.name %></span>
|
11
|
-
|
12
|
-
|
11
|
+
<%- end -%>
|
12
|
+
<%- end -%>
|
13
13
|
</ul>
|
14
14
|
</div>
|
15
|
-
|
15
|
+
<%- end -%>
|
@@ -2,14 +2,14 @@
|
|
2
2
|
<h3>Documentation</h3>
|
3
3
|
|
4
4
|
<ul>
|
5
|
-
|
6
|
-
|
5
|
+
<%- installed.each do |name, href, exists, type, _| -%>
|
6
|
+
<%- next if type == :extra -%>
|
7
7
|
<li class="folder">
|
8
|
-
|
8
|
+
<%- if exists then -%>
|
9
9
|
<a href="<%= href %>"><%= h name %></a>
|
10
|
-
|
10
|
+
<%- else -%>
|
11
11
|
<%= h name %>
|
12
|
-
|
13
|
-
|
12
|
+
<%- end -%>
|
13
|
+
<%- end -%>
|
14
14
|
</ul>
|
15
15
|
</div>
|
@@ -1,12 +1,12 @@
|
|
1
|
-
|
1
|
+
<%- unless klass.method_list.empty? then %>
|
2
2
|
<!-- Method Quickref -->
|
3
3
|
<div id="method-list-section" class="nav-section">
|
4
4
|
<h3>Methods</h3>
|
5
5
|
|
6
6
|
<ul class="link-list" role="directory">
|
7
|
-
|
8
|
-
<li
|
9
|
-
|
7
|
+
<%- klass.each_method do |meth| -%>
|
8
|
+
<li <%- if meth.calls_super %>class="calls-super" <%- end %>><a href="#<%= meth.aref %>"><%= meth.singleton ? '::' : '#' %><%= h meth.name -%></a>
|
9
|
+
<%- end -%>
|
10
10
|
</ul>
|
11
11
|
</div>
|
12
|
-
|
12
|
+
<%- end -%>
|
@@ -1,12 +1,12 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
<%- simple_files = @files.select { |f| f.text? } %>
|
2
|
+
<%- unless simple_files.empty? then -%>
|
3
3
|
<div id="fileindex-section" class="nav-section">
|
4
4
|
<h3>Pages</h3>
|
5
5
|
|
6
6
|
<ul class="link-list">
|
7
|
-
|
7
|
+
<%- simple_files.each do |f| -%>
|
8
8
|
<li><a href="<%= rel_prefix %>/<%= f.path %>"><%= h f.page_name %></a>
|
9
|
-
|
9
|
+
<%- end -%>
|
10
10
|
</ul>
|
11
11
|
</div>
|
12
|
-
|
12
|
+
<%- end -%>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
|
1
|
+
<%- if klass.type == 'class' then %>
|
2
2
|
<div id="parent-class-section" class="nav-section">
|
3
3
|
<h3>Parent</h3>
|
4
4
|
|
5
|
-
|
5
|
+
<%- if klass.superclass and not String === klass.superclass then -%>
|
6
6
|
<p class="link"><a href="<%= klass.aref_to klass.superclass.path %>"><%= klass.superclass.full_name %></a>
|
7
|
-
|
7
|
+
<%- else -%>
|
8
8
|
<p class="link"><%= klass.superclass %>
|
9
|
-
|
9
|
+
<%- end -%>
|
10
10
|
</div>
|
11
|
-
|
11
|
+
<%- end -%>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
|
1
|
+
<%- unless klass.sections.length == 1 then %>
|
2
2
|
<div id="sections-section" class="nav-section">
|
3
3
|
<h3>Sections</h3>
|
4
4
|
|
5
5
|
<ul class="link-list" role="directory">
|
6
|
-
|
6
|
+
<%- klass.sort_sections.each do |section| -%>
|
7
7
|
<li><a href="#<%= section.aref %>"><%= h section.title %></a></li>
|
8
|
-
|
8
|
+
<%- end -%>
|
9
9
|
</ul>
|
10
10
|
</div>
|
11
|
-
|
11
|
+
<%- end -%>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
<%- comment = if current.respond_to? :comment_location then
|
2
2
|
current.comment_location
|
3
3
|
else
|
4
4
|
current.comment
|
@@ -10,9 +10,9 @@
|
|
10
10
|
<h3>Table of Contents</h3>
|
11
11
|
|
12
12
|
<ul class="link-list" role="directory">
|
13
|
-
|
13
|
+
<%- table.each do |heading| -%>
|
14
14
|
<li><a href="#<%= heading.label current %>"><%= heading.plain_html %></a>
|
15
|
-
|
15
|
+
<%- end -%>
|
16
16
|
</ul>
|
17
17
|
</div>
|
18
|
-
|
18
|
+
<%- end -%>
|
@@ -25,9 +25,9 @@
|
|
25
25
|
<%= klass.description %>
|
26
26
|
</section>
|
27
27
|
|
28
|
-
|
28
|
+
<%- klass.each_section do |section, constants, attributes| -%>
|
29
29
|
<section id="<%= section.aref %>" class="documentation-section">
|
30
|
-
|
30
|
+
<%- if section.title then -%>
|
31
31
|
<header class="documentation-section-title">
|
32
32
|
<h2>
|
33
33
|
<%= section.title %>
|
@@ -36,39 +36,39 @@
|
|
36
36
|
<a href="#top">↑ top</a>
|
37
37
|
</span>
|
38
38
|
</header>
|
39
|
-
|
39
|
+
<%- end -%>
|
40
40
|
|
41
|
-
|
41
|
+
<%- if section.comment then -%>
|
42
42
|
<div>
|
43
43
|
<%= section.description %>
|
44
44
|
</div>
|
45
|
-
|
45
|
+
<%- end -%>
|
46
46
|
|
47
|
-
|
47
|
+
<%- unless constants.empty? then -%>
|
48
48
|
<section class="constants-list">
|
49
49
|
<header>
|
50
50
|
<h3>Constants</h3>
|
51
51
|
</header>
|
52
52
|
<dl>
|
53
|
-
|
53
|
+
<%- constants.each do |const| -%>
|
54
54
|
<dt id="<%= const.name %>"><%= const.name %>
|
55
|
-
|
55
|
+
<%- if const.comment then -%>
|
56
56
|
<dd><%= const.description.strip %>
|
57
|
-
|
57
|
+
<%- else -%>
|
58
58
|
<dd class="missing-docs">(Not documented)
|
59
|
-
|
60
|
-
|
59
|
+
<%- end -%>
|
60
|
+
<%- end -%>
|
61
61
|
</dl>
|
62
62
|
</section>
|
63
|
-
|
63
|
+
<%- end -%>
|
64
64
|
|
65
|
-
|
65
|
+
<%- unless attributes.empty? then -%>
|
66
66
|
<section class="attribute-method-details" class="method-section">
|
67
67
|
<header>
|
68
68
|
<h3>Attributes</h3>
|
69
69
|
</header>
|
70
70
|
|
71
|
-
|
71
|
+
<%- attributes.each do |attrib| -%>
|
72
72
|
<div id="<%= attrib.aref %>" class="method-detail">
|
73
73
|
<div class="method-heading attribute-method-heading">
|
74
74
|
<span class="method-name"><%= h attrib.name %></span><span
|
@@ -76,18 +76,18 @@
|
|
76
76
|
</div>
|
77
77
|
|
78
78
|
<div class="method-description">
|
79
|
-
|
79
|
+
<%- if attrib.comment then -%>
|
80
80
|
<%= attrib.description.strip %>
|
81
|
-
|
81
|
+
<%- else -%>
|
82
82
|
<p class="missing-docs">(Not documented)
|
83
|
-
|
83
|
+
<%- end -%>
|
84
84
|
</div>
|
85
85
|
</div>
|
86
|
-
|
86
|
+
<%- end -%>
|
87
87
|
</section>
|
88
|
-
|
88
|
+
<%- end -%>
|
89
89
|
|
90
|
-
|
90
|
+
<%- klass.methods_by_type(section).each do |type, visibilities|
|
91
91
|
next if visibilities.empty?
|
92
92
|
visibilities.each do |visibility, methods|
|
93
93
|
next if methods.empty? %>
|
@@ -96,38 +96,38 @@
|
|
96
96
|
<h3><%= visibility.to_s.capitalize %> <%= type.capitalize %> Methods</h3>
|
97
97
|
</header>
|
98
98
|
|
99
|
-
|
99
|
+
<%- methods.each do |method| -%>
|
100
100
|
<div id="<%= method.aref %>" class="method-detail <%= method.is_alias_for ? "method-alias" : '' %>">
|
101
|
-
|
102
|
-
|
101
|
+
<%- if (call_seq = method.call_seq) then -%>
|
102
|
+
<%- call_seq.strip.split("\n").each_with_index do |call_seq, i| -%>
|
103
103
|
<div class="method-heading">
|
104
104
|
<span class="method-callseq">
|
105
105
|
<%= h(call_seq.strip.
|
106
106
|
gsub( /^\w+\./m, '')).
|
107
107
|
gsub(/(.*)[-=]>/, '\1→') %>
|
108
108
|
</span>
|
109
|
-
|
109
|
+
<%- if i == 0 and method.token_stream then -%>
|
110
110
|
<span class="method-click-advice">click to toggle source</span>
|
111
|
-
|
111
|
+
<%- end -%>
|
112
112
|
</div>
|
113
|
-
|
114
|
-
|
113
|
+
<%- end -%>
|
114
|
+
<%- else -%>
|
115
115
|
<div class="method-heading">
|
116
116
|
<span class="method-name"><%= h method.name %></span><span
|
117
117
|
class="method-args"><%= h method.param_seq %></span>
|
118
|
-
|
118
|
+
<%- if method.token_stream then -%>
|
119
119
|
<span class="method-click-advice">click to toggle source</span>
|
120
|
-
|
120
|
+
<%- end -%>
|
121
121
|
</div>
|
122
|
-
|
122
|
+
<%- end -%>
|
123
123
|
|
124
124
|
<div class="method-description">
|
125
|
-
|
125
|
+
<%- if method.comment then -%>
|
126
126
|
<%= method.description.strip %>
|
127
|
-
|
127
|
+
<%- else -%>
|
128
128
|
<p class="missing-docs">(Not documented)
|
129
|
-
|
130
|
-
|
129
|
+
<%- end -%>
|
130
|
+
<%- if method.calls_super then -%>
|
131
131
|
<div class="method-calls-super">
|
132
132
|
Calls superclass method
|
133
133
|
<%=
|
@@ -135,16 +135,16 @@
|
|
135
135
|
method.formatter.link(method.superclass_method.full_name, method.superclass_method.full_name) : nil
|
136
136
|
%>
|
137
137
|
</div>
|
138
|
-
|
138
|
+
<%- end -%>
|
139
139
|
|
140
|
-
|
140
|
+
<%- if method.token_stream then -%>
|
141
141
|
<div class="method-source-code" id="<%= method.html_name %>-source">
|
142
142
|
<pre><%= method.markup_code %></pre>
|
143
143
|
</div>
|
144
|
-
|
144
|
+
<%- end -%>
|
145
145
|
</div>
|
146
146
|
|
147
|
-
|
147
|
+
<%- unless method.aliases.empty? then -%>
|
148
148
|
<div class="aliases">
|
149
149
|
Also aliased as: <%= method.aliases.map do |aka|
|
150
150
|
if aka.parent then # HACK lib/rexml/encodings
|
@@ -154,19 +154,19 @@
|
|
154
154
|
end
|
155
155
|
end.join ", " %>
|
156
156
|
</div>
|
157
|
-
|
157
|
+
<%- end -%>
|
158
158
|
|
159
|
-
|
159
|
+
<%- if method.is_alias_for then -%>
|
160
160
|
<div class="aliases">
|
161
161
|
Alias for: <a href="<%= klass.aref_to method.is_alias_for.path %>"><%= h method.is_alias_for.name %></a>
|
162
162
|
</div>
|
163
|
-
|
163
|
+
<%- end -%>
|
164
164
|
</div>
|
165
165
|
|
166
|
-
|
166
|
+
<%- end -%>
|
167
167
|
</section>
|
168
|
-
|
168
|
+
<%- end
|
169
169
|
end %>
|
170
170
|
</section>
|
171
|
-
|
171
|
+
<%- end -%>
|
172
172
|
</main>
|
@@ -9,6 +9,8 @@
|
|
9
9
|
/* vim: ft=css et sw=2 ts=2 sts=2 */
|
10
10
|
/* Base Green is: #6C8C22 */
|
11
11
|
|
12
|
+
.hide { display: none !important; }
|
13
|
+
|
12
14
|
* { padding: 0; margin: 0; }
|
13
15
|
|
14
16
|
body {
|
@@ -48,6 +50,16 @@ h6:hover span {
|
|
48
50
|
display: inline;
|
49
51
|
}
|
50
52
|
|
53
|
+
h1:target,
|
54
|
+
h2:target,
|
55
|
+
h3:target,
|
56
|
+
h4:target,
|
57
|
+
h5:target,
|
58
|
+
h6:target {
|
59
|
+
margin-left: -10px;
|
60
|
+
border-left: 10px solid #f1edba;
|
61
|
+
}
|
62
|
+
|
51
63
|
:link,
|
52
64
|
:visited {
|
53
65
|
color: #6C8C22;
|
@@ -62,6 +74,9 @@ h6:hover span {
|
|
62
74
|
code,
|
63
75
|
pre {
|
64
76
|
font-family: "Source Code Pro", Monaco, monospace;
|
77
|
+
background-color: rgba(27,31,35,0.05);
|
78
|
+
padding: 0em 0.2em;
|
79
|
+
border-radius: 0.2em;
|
65
80
|
}
|
66
81
|
|
67
82
|
/* @group Generic Classes */
|
@@ -91,7 +106,7 @@ pre {
|
|
91
106
|
|
92
107
|
.missing-docs {
|
93
108
|
font-size: 120%;
|
94
|
-
background: white url(images/wrench_orange.png) no-repeat 4px center;
|
109
|
+
background: white url(../images/wrench_orange.png) no-repeat 4px center;
|
95
110
|
color: #ccc;
|
96
111
|
line-height: 2em;
|
97
112
|
border: 1px solid #d00;
|
@@ -135,11 +150,11 @@ pre {
|
|
135
150
|
.table-of-contents li .toc-toggle {
|
136
151
|
width: 16px;
|
137
152
|
height: 16px;
|
138
|
-
background: url(images/add.png) no-repeat;
|
153
|
+
background: url(../images/add.png) no-repeat;
|
139
154
|
}
|
140
155
|
|
141
156
|
.table-of-contents li .toc-toggle.open {
|
142
|
-
background: url(images/delete.png) no-repeat;
|
157
|
+
background: url(../images/delete.png) no-repeat;
|
143
158
|
}
|
144
159
|
|
145
160
|
/* @end */
|
@@ -261,8 +276,13 @@ ul.link-list .type {
|
|
261
276
|
-webkit-border-radius: 5px;
|
262
277
|
}
|
263
278
|
|
279
|
+
dl.note-list dt {
|
280
|
+
float: left;
|
281
|
+
margin-right: 1em;
|
282
|
+
}
|
283
|
+
|
264
284
|
.calls-super {
|
265
|
-
background: url(images/arrow_up.png) no-repeat right center;
|
285
|
+
background: url(../images/arrow_up.png) no-repeat right center;
|
266
286
|
}
|
267
287
|
|
268
288
|
/* @end */
|
@@ -441,7 +461,16 @@ main header h3 {
|
|
441
461
|
/* @group Method Details */
|
442
462
|
|
443
463
|
main .method-source-code {
|
444
|
-
|
464
|
+
max-height: 0;
|
465
|
+
overflow: hidden;
|
466
|
+
transition-duration: 200ms;
|
467
|
+
transition-delay: 0ms;
|
468
|
+
transition-property: all;
|
469
|
+
transition-timing-function: ease-in-out;
|
470
|
+
}
|
471
|
+
|
472
|
+
main .method-source-code.active-menu {
|
473
|
+
max-height: 100vh;
|
445
474
|
}
|
446
475
|
|
447
476
|
main .method-description .method-calls-super {
|
@@ -479,7 +508,7 @@ main .method-click-advice {
|
|
479
508
|
visibility: hidden;
|
480
509
|
padding-right: 20px;
|
481
510
|
line-height: 20px;
|
482
|
-
background: url(images/zoom.png) no-repeat right top;
|
511
|
+
background: url(../images/zoom.png) no-repeat right top;
|
483
512
|
}
|
484
513
|
main .method-heading:hover .method-click-advice {
|
485
514
|
visibility: visible;
|