yard 0.9.39 → 0.9.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -1
- data/README.md +18 -21
- data/docs/GettingStarted.md +41 -15
- data/docs/Tags.md +5 -5
- data/docs/WhatsNew.md +59 -7
- data/docs/templates/default/yard_tags/html/setup.rb +1 -1
- data/lib/yard/autoload.rb +17 -0
- data/lib/yard/cli/diff.rb +7 -2
- data/lib/yard/code_objects/proxy.rb +1 -1
- data/lib/yard/handlers/processor.rb +1 -0
- data/lib/yard/handlers/rbs/attribute_handler.rb +43 -0
- data/lib/yard/handlers/rbs/base.rb +38 -0
- data/lib/yard/handlers/rbs/constant_handler.rb +18 -0
- data/lib/yard/handlers/rbs/method_handler.rb +327 -0
- data/lib/yard/handlers/rbs/mixin_handler.rb +20 -0
- data/lib/yard/handlers/rbs/namespace_handler.rb +26 -0
- data/lib/yard/handlers/ruby/attribute_handler.rb +7 -4
- data/lib/yard/handlers/ruby/constant_handler.rb +1 -0
- data/lib/yard/i18n/locale.rb +1 -1
- data/lib/yard/i18n/pot_generator.rb +1 -1
- data/lib/yard/parser/rbs/rbs_parser.rb +325 -0
- data/lib/yard/parser/rbs/statement.rb +75 -0
- data/lib/yard/parser/ruby/ruby_parser.rb +51 -1
- data/lib/yard/parser/source_parser.rb +3 -2
- data/lib/yard/registry_resolver.rb +7 -0
- data/lib/yard/server/library_version.rb +1 -1
- data/lib/yard/server/templates/default/fulldoc/html/js/autocomplete.js +208 -12
- data/lib/yard/server/templates/default/layout/html/breadcrumb.erb +1 -17
- data/lib/yard/server/templates/default/method_details/html/permalink.erb +4 -2
- data/lib/yard/server/templates/doc_server/library_list/html/headers.erb +3 -3
- data/lib/yard/server/templates/doc_server/library_list/html/library_list.erb +2 -3
- data/lib/yard/server/templates/doc_server/processing/html/processing.erb +22 -16
- data/lib/yard/tags/directives.rb +7 -0
- data/lib/yard/tags/library.rb +3 -3
- data/lib/yard/tags/types_explainer.rb +2 -1
- data/lib/yard/templates/helpers/base_helper.rb +1 -1
- data/lib/yard/templates/helpers/html_helper.rb +15 -4
- data/lib/yard/templates/helpers/html_syntax_highlight_helper.rb +6 -1
- data/lib/yard/templates/helpers/markup/hybrid_markdown.rb +2125 -0
- data/lib/yard/templates/helpers/markup_helper.rb +4 -2
- data/lib/yard/version.rb +1 -1
- data/po/ja.po +82 -82
- data/templates/default/fulldoc/html/full_list.erb +4 -4
- data/templates/default/fulldoc/html/js/app.js +503 -319
- data/templates/default/fulldoc/html/js/full_list.js +310 -213
- data/templates/default/layout/html/headers.erb +1 -1
- data/templates/default/method/html/header.erb +3 -3
- data/templates/default/module/html/defines.erb +3 -3
- data/templates/default/module/html/inherited_methods.erb +1 -0
- data/templates/default/module/html/method_summary.erb +8 -0
- data/templates/default/module/setup.rb +20 -0
- data/templates/default/onefile/html/layout.erb +3 -4
- data/templates/guide/fulldoc/html/js/app.js +57 -26
- data/templates/guide/layout/html/layout.erb +9 -11
- metadata +13 -4
|
@@ -1,33 +1,64 @@
|
|
|
1
1
|
function generateTOC() {
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
2
|
+
var fileContents = document.getElementById("filecontents");
|
|
3
|
+
var tocRoot = document.getElementById("toc");
|
|
4
|
+
var topLevel = document.createElement("ol");
|
|
5
|
+
var currentList = topLevel;
|
|
6
|
+
var lastLevel = 1;
|
|
7
|
+
var currentItem = null;
|
|
6
8
|
var counter = 0;
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
var headings;
|
|
10
|
+
var hasEntries = false;
|
|
11
|
+
|
|
12
|
+
if (!fileContents || !tocRoot) return;
|
|
13
|
+
|
|
14
|
+
topLevel.className = "top";
|
|
15
|
+
headings = fileContents.querySelectorAll(
|
|
16
|
+
":scope > h1, :scope > h2, :scope > h3, :scope > h4, :scope > h5, :scope > h6"
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
Array.prototype.forEach.call(headings, function(heading) {
|
|
20
|
+
var level;
|
|
21
|
+
var item;
|
|
22
|
+
var link;
|
|
23
|
+
|
|
24
|
+
if (heading.id === "filecontents") return;
|
|
25
|
+
hasEntries = true;
|
|
26
|
+
level = parseInt(heading.tagName.substring(1), 10);
|
|
27
|
+
|
|
28
|
+
if (!heading.id) {
|
|
29
|
+
var proposedId = heading.textContent.replace(/[^a-z0-9-]/gi, "_");
|
|
30
|
+
if (document.getElementById(proposedId)) proposedId += counter++;
|
|
31
|
+
heading.id = proposedId;
|
|
18
32
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
33
|
+
|
|
34
|
+
if (level > lastLevel) {
|
|
35
|
+
while (level > lastLevel) {
|
|
36
|
+
if (!currentItem) {
|
|
37
|
+
currentItem = document.createElement("li");
|
|
38
|
+
currentList.appendChild(currentItem);
|
|
39
|
+
}
|
|
40
|
+
var nestedList = document.createElement("ol");
|
|
41
|
+
currentItem.appendChild(nestedList);
|
|
42
|
+
currentList = nestedList;
|
|
43
|
+
currentItem = null;
|
|
44
|
+
lastLevel += 1;
|
|
45
|
+
}
|
|
46
|
+
} else if (level < lastLevel) {
|
|
47
|
+
while (level < lastLevel && currentList.parentElement) {
|
|
48
|
+
currentList = currentList.parentElement.parentElement;
|
|
49
|
+
lastLevel -= 1;
|
|
22
50
|
}
|
|
23
51
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
52
|
+
|
|
53
|
+
item = document.createElement("li");
|
|
54
|
+
link = document.createElement("a");
|
|
55
|
+
link.href = "#" + heading.id;
|
|
56
|
+
link.textContent = heading.textContent;
|
|
57
|
+
item.appendChild(link);
|
|
58
|
+
currentList.appendChild(item);
|
|
59
|
+
currentItem = item;
|
|
29
60
|
});
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
61
|
+
|
|
62
|
+
if (!hasEntries) return;
|
|
63
|
+
tocRoot.appendChild(topLevel);
|
|
33
64
|
}
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
<!DOCTYPE html
|
|
2
|
-
|
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
4
3
|
<head>
|
|
5
4
|
<%= erb(:headers) %>
|
|
6
5
|
<script type="text/javascript">
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
document.addEventListener("DOMContentLoaded", function() {
|
|
7
|
+
Array.prototype.forEach.call(document.querySelectorAll('.object_link'), function(node) {
|
|
8
|
+
var link = node.querySelector('a');
|
|
9
|
+
if (link) node.innerHTML = link.innerHTML;
|
|
10
10
|
});
|
|
11
|
-
});
|
|
12
|
-
$(function() {
|
|
13
11
|
generateTOC();
|
|
14
|
-
if (
|
|
15
|
-
|
|
12
|
+
if (document.querySelectorAll('#toc li').length === 0) {
|
|
13
|
+
document.querySelector('#sidebar h2.toc').style.display = 'none';
|
|
16
14
|
}
|
|
17
|
-
})
|
|
15
|
+
});
|
|
18
16
|
</script>
|
|
19
17
|
</head>
|
|
20
18
|
<body>
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: yard
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.40
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Loren Segal
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-04-
|
|
11
|
+
date: 2026-04-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: |2
|
|
14
14
|
YARD is a documentation generation tool for the Ruby programming language.
|
|
@@ -115,6 +115,12 @@ files:
|
|
|
115
115
|
- lib/yard/handlers/c/symbol_handler.rb
|
|
116
116
|
- lib/yard/handlers/common/method_handler.rb
|
|
117
117
|
- lib/yard/handlers/processor.rb
|
|
118
|
+
- lib/yard/handlers/rbs/attribute_handler.rb
|
|
119
|
+
- lib/yard/handlers/rbs/base.rb
|
|
120
|
+
- lib/yard/handlers/rbs/constant_handler.rb
|
|
121
|
+
- lib/yard/handlers/rbs/method_handler.rb
|
|
122
|
+
- lib/yard/handlers/rbs/mixin_handler.rb
|
|
123
|
+
- lib/yard/handlers/rbs/namespace_handler.rb
|
|
118
124
|
- lib/yard/handlers/ruby/alias_handler.rb
|
|
119
125
|
- lib/yard/handlers/ruby/attribute_handler.rb
|
|
120
126
|
- lib/yard/handlers/ruby/base.rb
|
|
@@ -171,6 +177,8 @@ files:
|
|
|
171
177
|
- lib/yard/parser/c/c_parser.rb
|
|
172
178
|
- lib/yard/parser/c/comment_parser.rb
|
|
173
179
|
- lib/yard/parser/c/statement.rb
|
|
180
|
+
- lib/yard/parser/rbs/rbs_parser.rb
|
|
181
|
+
- lib/yard/parser/rbs/statement.rb
|
|
174
182
|
- lib/yard/parser/ruby/ast_node.rb
|
|
175
183
|
- lib/yard/parser/ruby/legacy/irb/slex.rb
|
|
176
184
|
- lib/yard/parser/ruby/legacy/ruby_lex.rb
|
|
@@ -253,6 +261,7 @@ files:
|
|
|
253
261
|
- lib/yard/templates/helpers/filter_helper.rb
|
|
254
262
|
- lib/yard/templates/helpers/html_helper.rb
|
|
255
263
|
- lib/yard/templates/helpers/html_syntax_highlight_helper.rb
|
|
264
|
+
- lib/yard/templates/helpers/markup/hybrid_markdown.rb
|
|
256
265
|
- lib/yard/templates/helpers/markup/rdoc_markdown.rb
|
|
257
266
|
- lib/yard/templates/helpers/markup/rdoc_markup.rb
|
|
258
267
|
- lib/yard/templates/helpers/markup_helper.rb
|
|
@@ -393,7 +402,7 @@ files:
|
|
|
393
402
|
- templates/guide/onefile/html/setup.rb
|
|
394
403
|
- templates/guide/onefile/html/toc.erb
|
|
395
404
|
- templates/guide/tags/html/setup.rb
|
|
396
|
-
homepage:
|
|
405
|
+
homepage: https://yardoc.org
|
|
397
406
|
licenses:
|
|
398
407
|
- MIT
|
|
399
408
|
metadata:
|
|
@@ -407,7 +416,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
407
416
|
requirements:
|
|
408
417
|
- - ">="
|
|
409
418
|
- !ruby/object:Gem::Version
|
|
410
|
-
version:
|
|
419
|
+
version: 1.8.7
|
|
411
420
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
412
421
|
requirements:
|
|
413
422
|
- - ">="
|