yard 0.9.38 → 0.9.43

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.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +50 -1
  3. data/README.md +18 -21
  4. data/docs/GettingStarted.md +41 -15
  5. data/docs/Parser.md +17 -42
  6. data/docs/Tags.md +5 -5
  7. data/docs/WhatsNew.md +59 -7
  8. data/docs/templates/default/yard_tags/html/setup.rb +1 -1
  9. data/lib/yard/autoload.rb +17 -0
  10. data/lib/yard/cli/diff.rb +7 -2
  11. data/lib/yard/code_objects/proxy.rb +1 -1
  12. data/lib/yard/handlers/processor.rb +1 -0
  13. data/lib/yard/handlers/rbs/attribute_handler.rb +79 -0
  14. data/lib/yard/handlers/rbs/base.rb +38 -0
  15. data/lib/yard/handlers/rbs/constant_handler.rb +18 -0
  16. data/lib/yard/handlers/rbs/method_handler.rb +327 -0
  17. data/lib/yard/handlers/rbs/mixin_handler.rb +20 -0
  18. data/lib/yard/handlers/rbs/namespace_handler.rb +26 -0
  19. data/lib/yard/handlers/ruby/attribute_handler.rb +7 -4
  20. data/lib/yard/handlers/ruby/constant_handler.rb +1 -0
  21. data/lib/yard/i18n/locale.rb +1 -1
  22. data/lib/yard/i18n/pot_generator.rb +1 -1
  23. data/lib/yard/parser/rbs/rbs_parser.rb +325 -0
  24. data/lib/yard/parser/rbs/statement.rb +75 -0
  25. data/lib/yard/parser/ruby/legacy/irb/slex.rb +19 -1
  26. data/lib/yard/parser/ruby/ruby_parser.rb +55 -3
  27. data/lib/yard/parser/source_parser.rb +3 -2
  28. data/lib/yard/registry_resolver.rb +7 -0
  29. data/lib/yard/rubygems/specification.rb +1 -1
  30. data/lib/yard/server/commands/base.rb +1 -1
  31. data/lib/yard/server/library_version.rb +1 -1
  32. data/lib/yard/server/templates/default/fulldoc/html/css/custom.css +168 -88
  33. data/lib/yard/server/templates/default/fulldoc/html/js/autocomplete.js +203 -12
  34. data/lib/yard/server/templates/default/layout/html/breadcrumb.erb +1 -17
  35. data/lib/yard/server/templates/default/method_details/html/permalink.erb +4 -2
  36. data/lib/yard/server/templates/doc_server/library_list/html/headers.erb +3 -3
  37. data/lib/yard/server/templates/doc_server/library_list/html/library_list.erb +2 -3
  38. data/lib/yard/server/templates/doc_server/processing/html/processing.erb +22 -16
  39. data/lib/yard/tags/directives.rb +7 -0
  40. data/lib/yard/tags/library.rb +3 -3
  41. data/lib/yard/tags/types_explainer.rb +2 -1
  42. data/lib/yard/templates/helpers/base_helper.rb +1 -1
  43. data/lib/yard/templates/helpers/html_helper.rb +16 -5
  44. data/lib/yard/templates/helpers/html_syntax_highlight_helper.rb +6 -1
  45. data/lib/yard/templates/helpers/markup/hybrid_markdown.rb +2147 -0
  46. data/lib/yard/templates/helpers/markup_helper.rb +4 -2
  47. data/lib/yard/version.rb +1 -1
  48. data/po/ja.po +82 -82
  49. data/templates/default/fulldoc/html/css/common.css +1 -1
  50. data/templates/default/fulldoc/html/css/full_list.css +201 -53
  51. data/templates/default/fulldoc/html/css/style.css +988 -389
  52. data/templates/default/fulldoc/html/full_list.erb +4 -4
  53. data/templates/default/fulldoc/html/js/app.js +801 -395
  54. data/templates/default/fulldoc/html/js/full_list.js +332 -242
  55. data/templates/default/layout/html/headers.erb +1 -1
  56. data/templates/default/layout/html/layout.erb +3 -1
  57. data/templates/default/method/html/header.erb +3 -3
  58. data/templates/default/module/html/defines.erb +3 -3
  59. data/templates/default/module/html/inherited_methods.erb +1 -0
  60. data/templates/default/module/html/method_summary.erb +8 -0
  61. data/templates/default/module/setup.rb +20 -0
  62. data/templates/default/onefile/html/layout.erb +3 -4
  63. data/templates/guide/fulldoc/html/css/style.css +347 -97
  64. data/templates/guide/fulldoc/html/js/app.js +61 -33
  65. data/templates/guide/layout/html/layout.erb +69 -72
  66. metadata +14 -4
@@ -1,81 +1,78 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
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
- <script type="text/javascript">
7
- $(function() {
8
- $('.object_link').each(function() {
9
- $(this).html($(this).find('a').html())
10
- });
11
- });
12
- $(function() {
13
- generateTOC();
14
- if ($('#toc li').size() == 0) {
15
- $('#sidebar h2.toc').hide();
16
- }
17
- })
18
- </script>
5
+ <script type="text/javascript">
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
+ });
11
+ generateTOC();
12
+ if (document.querySelectorAll('#toc li').length === 0) {
13
+ document.querySelector('#sidebar h2.toc').style.display = 'none';
14
+ }
15
+ });
16
+ </script>
19
17
  </head>
20
18
  <body>
21
- <div id="top_nav">
22
- <div id="inner_nav">
23
- <% if options.readme != options.file && options.title %>
24
- <span class="title"><strong><%= options.title %></strong>: <%= @page_title %></span>
25
- <small class="links">
26
- <% links = [@prevfile ? link_file(@prevfile, '&larr;') : nil,
19
+ <div id="top_nav">
20
+ <div id="inner_nav">
21
+ <% if options.readme != options.file && options.title %>
22
+ <span class="title"><strong><%= options.title %></strong>: <%= @page_title %></span>
23
+ <small class="links">
24
+ <% links = [@prevfile ? link_file(@prevfile, '&larr;') : nil,
27
25
  link_file('index.html', '&uarr;'),
28
26
  @nextfile ? link_file(@nextfile, '&rarr;') : nil].compact %>
29
- <%= links.join(" ") %>
30
- </small>
31
- <% end %>
32
- </div>
33
- </div>
34
- <div id="page">
35
- <div id="sidebar">
36
- <h2 class="toc">Table Of Contents</h2>
37
- <div id="toc"></div>
38
-
39
- <% if options.readme != options.file %>
40
- <h2>Related Topics</h2>
41
- <div id="links">
42
- <ol class="top">
43
- <% if options.readme %>
44
- <li><%= link_file("index.html", "Documentation Overview") %></li>
45
- <% end %>
46
- <ol>
47
- <% if @prevfile %>
48
- <li>
49
- <strong>Previous:</strong>
50
- <%= link_file(@prevfile) %>
51
- </li>
52
- <% end %>
53
- <% if @nextfile %>
54
- <li>
55
- <strong>Next:</strong>
56
- <%= link_file(@nextfile) %>
57
- </li>
58
- <% end %>
59
- </ol>
60
- </ol>
61
- </div>
62
- <% else %>
63
- <h2>List of Topics</h2>
64
- <div id="links">
65
- <ol class="top">
66
- <li><a href="#">Documentation Overview</a></li>
67
- <ol>
68
- <% options.files.each do |file| %>
69
- <li><%= link_file(file.filename, file.title) %></li>
70
- <% end %>
71
- </ol>
72
- </ol>
73
- </div>
74
- <% end %>
75
- </div>
76
- <div id="content"><%= yieldall %></div>
77
- </div>
78
- <div style="clear:both"></div>
27
+ <%= links.join(" ") %>
28
+ </small>
29
+ <% end %>
30
+ </div>
31
+ </div>
32
+ <div id="page">
33
+ <div id="sidebar">
34
+ <h2 class="toc">Table Of Contents</h2>
35
+ <div id="toc"></div>
36
+ <% if options.readme != options.file %>
37
+ <h2>Related Topics</h2>
38
+ <div id="links">
39
+ <ol class="top">
40
+ <% if options.readme %>
41
+ <li><%= link_file("index.html", "Documentation Overview") %></li>
42
+ <% end %>
43
+ <ol>
44
+ <% if @prevfile %>
45
+ <li>
46
+ <strong>Previous:</strong>
47
+ <%= link_file(@prevfile) %>
48
+ </li>
49
+ <% end %>
50
+ <% if @nextfile %>
51
+ <li>
52
+ <strong>Next:</strong>
53
+ <%= link_file(@nextfile) %>
54
+ </li>
55
+ <% end %>
56
+ </ol>
57
+ </ol>
58
+ </div>
59
+ <% else %>
60
+ <h2>List of Topics</h2>
61
+ <div id="links">
62
+ <ol class="top">
63
+ <li><a href="#">Documentation Overview</a></li>
64
+ <ol>
65
+ <% options.files.each do |file| %>
66
+ <li><%= link_file(file.filename, file.title) %></li>
67
+ <% end %>
68
+ </ol>
69
+ </ol>
70
+ </div>
71
+ <% end %>
72
+ </div>
73
+ <div id="content"><%= yieldall %></div>
74
+ </div>
75
+ <div style="clear:both"></div>
79
76
  <%= erb(:footer) %>
80
77
  </body>
81
78
  </html>
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.38
4
+ version: 0.9.43
5
5
  platform: ruby
6
6
  authors:
7
7
  - Loren Segal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-12-05 00:00:00.000000000 Z
11
+ date: 2026-04-18 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,11 +402,12 @@ 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: http://yardoc.org
405
+ homepage: https://yardoc.org
397
406
  licenses:
398
407
  - MIT
399
408
  metadata:
400
409
  yard.run: yri
410
+ changelog_uri: https://rubydoc.info/gems/yard/file/CHANGELOG.md
401
411
  post_install_message:
402
412
  rdoc_options: []
403
413
  require_paths:
@@ -406,7 +416,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
406
416
  requirements:
407
417
  - - ">="
408
418
  - !ruby/object:Gem::Version
409
- version: '0'
419
+ version: 1.8.7
410
420
  required_rubygems_version: !ruby/object:Gem::Requirement
411
421
  requirements:
412
422
  - - ">="