yard 0.9.28 → 0.9.29

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of yard might be problematic. Click here for more details.

Files changed (215) hide show
  1. checksums.yaml +4 -4
  2. data/LEGAL +29 -1
  3. data/lib/yard/autoload.rb +2 -1
  4. data/lib/yard/cli/command.rb +1 -1
  5. data/lib/yard/cli/yardoc.rb +1 -1
  6. data/lib/yard/code_objects/base.rb +4 -1
  7. data/lib/yard/docstring_parser.rb +1 -1
  8. data/lib/yard/handlers/ruby/attribute_handler.rb +1 -1
  9. data/lib/yard/handlers/ruby/legacy/attribute_handler.rb +1 -1
  10. data/lib/yard/handlers/ruby/mixin_handler.rb +13 -6
  11. data/lib/yard/i18n/locale.rb +1 -1
  12. data/lib/yard/i18n/message.rb +2 -2
  13. data/lib/yard/i18n/messages.rb +1 -1
  14. data/lib/yard/i18n/pot_generator.rb +1 -1
  15. data/lib/yard/options.rb +1 -1
  16. data/lib/yard/parser/ruby/ruby_parser.rb +8 -2
  17. data/lib/yard/registry_resolver.rb +2 -1
  18. data/lib/yard/server/commands/base.rb +1 -1
  19. data/lib/yard/server/http_utils.rb +512 -0
  20. data/lib/yard/server/rack_adapter.rb +24 -12
  21. data/lib/yard/tags/tag.rb +2 -2
  22. data/lib/yard/tags/types_explainer.rb +1 -1
  23. data/lib/yard/templates/helpers/html_helper.rb +1 -1
  24. data/lib/yard/version.rb +1 -1
  25. metadata +5 -208
  26. data/.dockerignore +0 -2
  27. data/.gitattributes +0 -4
  28. data/.github/FUNDING.yml +0 -3
  29. data/.github/ISSUE_TEMPLATE.md +0 -33
  30. data/.github/PULL_REQUEST_TEMPLATE.md +0 -12
  31. data/.github/workflows/ci.yml +0 -30
  32. data/.github/workflows/gem.yml +0 -19
  33. data/.gitignore +0 -14
  34. data/.rspec +0 -2
  35. data/.rubocop.yml +0 -112
  36. data/.yardopts +0 -26
  37. data/.yardopts_guide +0 -19
  38. data/.yardopts_i18n +0 -23
  39. data/CHANGELOG.md +0 -836
  40. data/CODE_OF_CONDUCT.md +0 -15
  41. data/CONTRIBUTING.md +0 -140
  42. data/Dockerfile.samus +0 -28
  43. data/Gemfile +0 -34
  44. data/Rakefile +0 -36
  45. data/SECURITY.md +0 -26
  46. data/benchmarks/builtins_vs_eval.rb +0 -24
  47. data/benchmarks/concat_vs_join.rb +0 -13
  48. data/benchmarks/erb_vs_erubis.rb +0 -54
  49. data/benchmarks/format_args.rb +0 -47
  50. data/benchmarks/generation.rb +0 -38
  51. data/benchmarks/marshal_vs_dbm.rb +0 -64
  52. data/benchmarks/parsing.rb +0 -46
  53. data/benchmarks/pathname_vs_string.rb +0 -51
  54. data/benchmarks/rdoc_vs_yardoc.rb +0 -11
  55. data/benchmarks/registry_store_types.rb +0 -49
  56. data/benchmarks/ri_vs_yri.rb +0 -19
  57. data/benchmarks/ripper_parser.rb +0 -13
  58. data/benchmarks/splat_vs_flatten.rb +0 -13
  59. data/benchmarks/template_erb.rb +0 -23
  60. data/benchmarks/template_format.rb +0 -7
  61. data/benchmarks/template_profile.rb +0 -18
  62. data/benchmarks/yri_cache.rb +0 -20
  63. data/docs/CodeObjects.md +0 -115
  64. data/docs/GettingStarted.md +0 -679
  65. data/docs/Handlers.md +0 -152
  66. data/docs/Overview.md +0 -61
  67. data/docs/Parser.md +0 -191
  68. data/docs/Tags.md +0 -283
  69. data/docs/TagsArch.md +0 -123
  70. data/docs/Templates.md +0 -496
  71. data/docs/WhatsNew.md +0 -1245
  72. data/docs/images/code-objects-class-diagram.png +0 -0
  73. data/docs/images/handlers-class-diagram.png +0 -0
  74. data/docs/images/overview-class-diagram.png +0 -0
  75. data/docs/images/parser-class-diagram.png +0 -0
  76. data/docs/images/tags-class-diagram.png +0 -0
  77. data/docs/templates/default/fulldoc/html/full_list_tag.erb +0 -9
  78. data/docs/templates/default/fulldoc/html/setup.rb +0 -6
  79. data/docs/templates/default/layout/html/setup.rb +0 -9
  80. data/docs/templates/default/layout/html/tag_list.erb +0 -11
  81. data/docs/templates/default/yard_tags/html/list.erb +0 -18
  82. data/docs/templates/default/yard_tags/html/setup.rb +0 -26
  83. data/docs/templates/plugin.rb +0 -70
  84. data/po/ja.po +0 -31108
  85. data/samus.json +0 -49
  86. data/tasks/prepare_tag.rake +0 -45
  87. data/tasks/update_error_map.rake +0 -53
  88. data/templates/default/class/dot/setup.rb +0 -7
  89. data/templates/default/class/dot/superklass.erb +0 -3
  90. data/templates/default/class/html/constructor_details.erb +0 -8
  91. data/templates/default/class/html/setup.rb +0 -2
  92. data/templates/default/class/html/subclasses.erb +0 -4
  93. data/templates/default/class/setup.rb +0 -36
  94. data/templates/default/class/text/setup.rb +0 -12
  95. data/templates/default/class/text/subclasses.erb +0 -5
  96. data/templates/default/constant/text/header.erb +0 -11
  97. data/templates/default/constant/text/setup.rb +0 -4
  98. data/templates/default/docstring/html/abstract.erb +0 -4
  99. data/templates/default/docstring/html/deprecated.erb +0 -1
  100. data/templates/default/docstring/html/index.erb +0 -5
  101. data/templates/default/docstring/html/note.erb +0 -6
  102. data/templates/default/docstring/html/private.erb +0 -4
  103. data/templates/default/docstring/html/returns_void.erb +0 -1
  104. data/templates/default/docstring/html/text.erb +0 -1
  105. data/templates/default/docstring/html/todo.erb +0 -6
  106. data/templates/default/docstring/setup.rb +0 -52
  107. data/templates/default/docstring/text/abstract.erb +0 -2
  108. data/templates/default/docstring/text/deprecated.erb +0 -2
  109. data/templates/default/docstring/text/index.erb +0 -2
  110. data/templates/default/docstring/text/note.erb +0 -4
  111. data/templates/default/docstring/text/private.erb +0 -2
  112. data/templates/default/docstring/text/returns_void.erb +0 -1
  113. data/templates/default/docstring/text/text.erb +0 -1
  114. data/templates/default/docstring/text/todo.erb +0 -4
  115. data/templates/default/fulldoc/html/css/common.css +0 -1
  116. data/templates/default/fulldoc/html/css/full_list.css +0 -58
  117. data/templates/default/fulldoc/html/css/style.css +0 -497
  118. data/templates/default/fulldoc/html/frames.erb +0 -17
  119. data/templates/default/fulldoc/html/full_list.erb +0 -37
  120. data/templates/default/fulldoc/html/full_list_class.erb +0 -2
  121. data/templates/default/fulldoc/html/full_list_file.erb +0 -7
  122. data/templates/default/fulldoc/html/full_list_method.erb +0 -10
  123. data/templates/default/fulldoc/html/js/app.js +0 -314
  124. data/templates/default/fulldoc/html/js/full_list.js +0 -216
  125. data/templates/default/fulldoc/html/js/jquery.js +0 -4
  126. data/templates/default/fulldoc/html/setup.rb +0 -241
  127. data/templates/default/layout/dot/header.erb +0 -6
  128. data/templates/default/layout/dot/setup.rb +0 -15
  129. data/templates/default/layout/html/breadcrumb.erb +0 -11
  130. data/templates/default/layout/html/files.erb +0 -11
  131. data/templates/default/layout/html/footer.erb +0 -5
  132. data/templates/default/layout/html/headers.erb +0 -15
  133. data/templates/default/layout/html/index.erb +0 -2
  134. data/templates/default/layout/html/layout.erb +0 -24
  135. data/templates/default/layout/html/listing.erb +0 -4
  136. data/templates/default/layout/html/objects.erb +0 -32
  137. data/templates/default/layout/html/script_setup.erb +0 -4
  138. data/templates/default/layout/html/search.erb +0 -13
  139. data/templates/default/layout/html/setup.rb +0 -89
  140. data/templates/default/method/html/header.erb +0 -17
  141. data/templates/default/method/setup.rb +0 -4
  142. data/templates/default/method/text/header.erb +0 -1
  143. data/templates/default/method_details/html/header.erb +0 -3
  144. data/templates/default/method_details/html/method_signature.erb +0 -25
  145. data/templates/default/method_details/html/source.erb +0 -10
  146. data/templates/default/method_details/setup.rb +0 -11
  147. data/templates/default/method_details/text/header.erb +0 -10
  148. data/templates/default/method_details/text/method_signature.erb +0 -12
  149. data/templates/default/method_details/text/setup.rb +0 -11
  150. data/templates/default/module/dot/child.erb +0 -1
  151. data/templates/default/module/dot/dependencies.erb +0 -3
  152. data/templates/default/module/dot/header.erb +0 -6
  153. data/templates/default/module/dot/info.erb +0 -14
  154. data/templates/default/module/dot/setup.rb +0 -15
  155. data/templates/default/module/html/attribute_details.erb +0 -10
  156. data/templates/default/module/html/attribute_summary.erb +0 -8
  157. data/templates/default/module/html/box_info.erb +0 -43
  158. data/templates/default/module/html/children.erb +0 -8
  159. data/templates/default/module/html/constant_summary.erb +0 -17
  160. data/templates/default/module/html/defines.erb +0 -3
  161. data/templates/default/module/html/header.erb +0 -5
  162. data/templates/default/module/html/inherited_attributes.erb +0 -14
  163. data/templates/default/module/html/inherited_constants.erb +0 -8
  164. data/templates/default/module/html/inherited_methods.erb +0 -19
  165. data/templates/default/module/html/item_summary.erb +0 -40
  166. data/templates/default/module/html/method_details_list.erb +0 -9
  167. data/templates/default/module/html/method_summary.erb +0 -14
  168. data/templates/default/module/html/methodmissing.erb +0 -12
  169. data/templates/default/module/html/pre_docstring.erb +0 -1
  170. data/templates/default/module/setup.rb +0 -167
  171. data/templates/default/module/text/children.erb +0 -10
  172. data/templates/default/module/text/class_meths_list.erb +0 -8
  173. data/templates/default/module/text/extends.erb +0 -8
  174. data/templates/default/module/text/header.erb +0 -7
  175. data/templates/default/module/text/includes.erb +0 -8
  176. data/templates/default/module/text/instance_meths_list.erb +0 -8
  177. data/templates/default/module/text/setup.rb +0 -13
  178. data/templates/default/onefile/html/files.erb +0 -5
  179. data/templates/default/onefile/html/headers.erb +0 -6
  180. data/templates/default/onefile/html/layout.erb +0 -17
  181. data/templates/default/onefile/html/readme.erb +0 -3
  182. data/templates/default/onefile/html/setup.rb +0 -62
  183. data/templates/default/root/dot/child.erb +0 -3
  184. data/templates/default/root/dot/setup.rb +0 -6
  185. data/templates/default/root/html/setup.rb +0 -2
  186. data/templates/default/tags/html/example.erb +0 -11
  187. data/templates/default/tags/html/index.erb +0 -3
  188. data/templates/default/tags/html/option.erb +0 -24
  189. data/templates/default/tags/html/overload.erb +0 -14
  190. data/templates/default/tags/html/see.erb +0 -8
  191. data/templates/default/tags/html/tag.erb +0 -20
  192. data/templates/default/tags/setup.rb +0 -57
  193. data/templates/default/tags/text/example.erb +0 -12
  194. data/templates/default/tags/text/index.erb +0 -1
  195. data/templates/default/tags/text/option.erb +0 -20
  196. data/templates/default/tags/text/overload.erb +0 -19
  197. data/templates/default/tags/text/see.erb +0 -11
  198. data/templates/default/tags/text/tag.erb +0 -13
  199. data/templates/guide/class/html/setup.rb +0 -2
  200. data/templates/guide/docstring/html/setup.rb +0 -2
  201. data/templates/guide/fulldoc/html/css/style.css +0 -108
  202. data/templates/guide/fulldoc/html/js/app.js +0 -33
  203. data/templates/guide/fulldoc/html/setup.rb +0 -74
  204. data/templates/guide/layout/html/layout.erb +0 -81
  205. data/templates/guide/layout/html/setup.rb +0 -25
  206. data/templates/guide/method/html/header.erb +0 -18
  207. data/templates/guide/method/html/setup.rb +0 -22
  208. data/templates/guide/module/html/header.erb +0 -7
  209. data/templates/guide/module/html/method_list.erb +0 -5
  210. data/templates/guide/module/html/setup.rb +0 -27
  211. data/templates/guide/onefile/html/files.erb +0 -4
  212. data/templates/guide/onefile/html/setup.rb +0 -6
  213. data/templates/guide/onefile/html/toc.erb +0 -3
  214. data/templates/guide/tags/html/setup.rb +0 -9
  215. data/yard.gemspec +0 -25
@@ -1,108 +0,0 @@
1
- body { color: #3e4349; font-family: Georgia, serif; font-size: 17px; margin: 0; }
2
- h1, h2, h3, h4, h5, h6 { font-weight: normal; color: #000; font-family: Georgia, serif; }
3
- h1 { color: #040; }
4
- h2 { color: #060; }
5
- h3 { color: #070; }
6
- h4 { color: #080; }
7
- h5 { color: #090; }
8
- #sidebar h2 { color: #2f2; }
9
- strong { color: #000; }
10
- .object_link, tt, code { font-family: 'Consolas', 'BitStream Vera Sans Mono', monospace; font-size: 14px; }
11
- .method_header .path, .module_header .path { font-family: 'Consolas', 'BitStream Vera Sans Mono', monospace; }
12
- .method_header .path.space, .module_header .path.space { padding-left: 5px; }
13
- .method_header { font-size: 0.95em; }
14
- .method_body { margin-left: 2em; }
15
- .tags h3, .tags h4 { font-size: 0.9em; font-weight: bold; color: #3e4349; }
16
- .tags .param .name { font-style: italic; }
17
- .tags .option .name { font-family: monospace; color: #000; font-size: 0.8em; }
18
- .tags .option .type, .tags .param .type { font-size: 10px; vertical-align: super; }
19
- .tags .option .type tt, .tags .param .type tt,
20
- .tags .option .type tt .object_link, .tags .param .type tt .object_link { font-size: 10px; }
21
- .module_methods { margin-left: 2em; }
22
- .method_header .since, .module_header .since { font-size: 0.75em; color: #888; vertical-align: super; }
23
- ul { list-style: square; }
24
- .inline { display: inline; }
25
- .inline p:first-child { display: inline; }
26
- .inline p { font-family: Georgia, serif; font-size: 16px; color: #3e4349; }
27
- #filecontents table, .docstring table { border-collapse: collapse; }
28
- #filecontents table th, #filecontents table td,
29
- .docstring table th, .docstring table td { border: 1px solid #ccc; padding: 8px; padding-right: 17px; }
30
- #filecontents table tr:nth-child(odd),
31
- .docstring table tr:nth-child(odd) { background: #eee; }
32
- #filecontents table tr:nth-child(even),
33
- .docstring table tr:nth-child(even) { background: #fff; }
34
- #filecontents table th, .docstring table th { background: #fff; }
35
- .docstring .note { margin: 1em 0; }
36
- .docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; }
37
- .docstring h1 { font-size: 1.2em; }
38
- .docstring h2 { font-size: 1.1em; }
39
- .docstring h3 { font-size: 1.1em; }
40
- .docstring h4 { font-size: 1.0em; font-weight: bold; }
41
- .docstring h5 { font-size: 1.0em; font-weight: bold; }
42
- .docstring h6 { font-size: 1.0em; font-weight: bold; }
43
- #filecontents strong { font-weight: normal; color: #000; }
44
- .readonly { font-size: 0.75em; color: #888; vertical-align: super; }
45
- .rdoc-term { padding-right: 25px; font-weight: bold; }
46
- .rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; }
47
-
48
- #page { width: 940px; margin: 0px auto; }
49
- #top_nav { background: #7d0; padding: 8px 12px; }
50
- #inner_nav { width: 940px; margin: 0px auto; }
51
- #inner_nav a { border: 0; text-decoration: none; color: #777; }
52
- #inner_nav a:hover { color: #222; }
53
- #top_nav .links { display: block; float: right; }
54
- #content { margin-left: 30px; width: 660px; float: left; }
55
- #sidebar { float: left; width: 200px; float: left; padding: 18px 10px; padding-top: 0; }
56
- #sidebar h2 { font-weight: 100; color: #3e4349; font-size: 1.45em; }
57
- #sidebar ol { padding-left: 16px; margin-left: 0; list-style: square; }
58
- #sidebar a { color: #468; text-decoration: none; }
59
- #sidebar a:hover { color: #000; background: #8e0; padding: 4px; }
60
- #sidebar ol.top { padding-left: 0; margin-left: 0; list-style: none; }
61
- #sidebar a { font-size: 0.9em; }
62
- #footer { margin: 0 auto; width: 940px; text-align: center; margin-top: 30px; padding: 20px 0; color: #888; font-size: 0.8em; border-top: 1px dotted #bbb; }
63
- #footer a { color: #444; }
64
- #links strong { font-size: 0.95em; font-weight: normal; color: #000; }
65
-
66
- a { color: #268; text-decoration: none; }
67
- a:hover { color: #6ae; }
68
-
69
- /* syntax highlighting */
70
- .source_code { display: none; padding: 3px 8px; border-left: 8px solid #ddd; margin-top: 5px; }
71
- #filecontents pre.code, .docstring pre.code, .source_code pre { font-family: monospace; }
72
- #filecontents pre.code, .docstring pre.code { display: block; }
73
- .source_code .lines { padding-right: 12px; color: #555; text-align: right; }
74
- #filecontents pre.code, .docstring pre.code,
75
- .tags pre.example {
76
- font-size: 0.9em;
77
- padding: 7px 30px;
78
- margin: 15px -30px;
79
- margin-left: -30px;
80
- background: #eee;
81
- line-height: 1.3em;
82
- font-family: 'Consolas', 'BitStream Vera Sans Mono', monospace;
83
- }
84
- pre.code { color: #3e4349; }
85
- pre.code .info.file { color: #555; }
86
- pre.code .val { color: #036A07; }
87
- pre.code .tstring_content,
88
- pre.code .heredoc_beg, pre.code .heredoc_end,
89
- pre.code .qwords_beg, pre.code .qwords_end,
90
- pre.code .tstring, pre.code .dstring { color: #036A07; }
91
- pre.code .fid, pre.code .rubyid_new, pre.code .rubyid_to_s,
92
- pre.code .rubyid_to_sym, pre.code .rubyid_to_f,
93
- pre.code .dot + pre.code .id,
94
- pre.code .rubyid_to_i pre.code .rubyid_each { color: #0085FF; }
95
- pre.code .comment { color: #0066FF; }
96
- pre.code .const, pre.code .constant { color: #585CF6; }
97
- pre.code .symbol { color: #C5060B; }
98
- pre.code .kw,
99
- pre.code .label,
100
- pre.code .rubyid_require,
101
- pre.code .rubyid_extend,
102
- pre.code .rubyid_include { color: #0000FF; }
103
- pre.code .ivar { color: #318495; }
104
- pre.code .gvar,
105
- pre.code .rubyid_backref,
106
- pre.code .rubyid_nth_ref { color: #6D79DE; }
107
- pre.code .regexp, .dregexp { color: #036A07; }
108
- pre.code a { border-bottom: 1px dotted #bbf; }
@@ -1,33 +0,0 @@
1
- function generateTOC() {
2
- if ($('#filecontents').length == 0) return;
3
- var _toc = $('<ol class="top"></ol>');
4
- var show = false;
5
- var toc = _toc;
6
- var counter = 0;
7
- var tags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
8
- for (i in tags) { tags[i] = '#filecontents > ' + tags[i] }
9
- var lastTag = parseInt(tags[0][1]);
10
- $(tags.join(', ')).each(function() {
11
- if (this.id == "filecontents") return;
12
- show = true;
13
- var thisTag = parseInt(this.tagName[1]);
14
- if (this.id.length == 0) {
15
- var proposedId = $(this).text().replace(/[^a-z0-9-]/ig, '_');
16
- if ($('#' + proposedId).length > 0) proposedId += counter++;
17
- this.id = proposedId;
18
- }
19
- if (thisTag > lastTag) {
20
- for (var i = 0; i < thisTag - lastTag; i++) {
21
- var tmp = $('<ol/>'); toc.append(tmp); toc = tmp;
22
- }
23
- }
24
- if (thisTag < lastTag) {
25
- for (var i = 0; i < lastTag - thisTag; i++) toc = toc.parent();
26
- }
27
- toc.append('<li><a href="#' + this.id + '">' + $(this).text() + '</a></li>');
28
- lastTag = thisTag;
29
- });
30
- if (!show) return;
31
- $('#toc').append()
32
- $('#toc').append(_toc);
33
- }
@@ -1,74 +0,0 @@
1
- # frozen_string_literal: true
2
- include T('default/fulldoc/html')
3
-
4
- module OverrideFileLinks
5
- def resolve_links(text)
6
- result = ''
7
- log.enter_level(Logger::ERROR) { result = super }
8
- result
9
- end
10
-
11
- def url_for(object, *args)
12
- if CodeObjects::ExtraFileObject === object && object == options.readme
13
- 'index.html'
14
- else
15
- super
16
- end
17
- end
18
- end
19
-
20
- Template.extra_includes << OverrideFileLinks
21
-
22
- def init
23
- class << options.serializer
24
- define_method(:serialized_path) do |object|
25
- if CodeObjects::ExtraFileObject === object
26
- super(object).sub(/^file\./, '').downcase
27
- else
28
- super(object)
29
- end
30
- end
31
- end if options.serializer
32
-
33
- return serialize_onefile if options.onefile
34
-
35
- generate_assets
36
- options.delete(:objects)
37
- options.files.each {|file| serialize_file(file) }
38
- serialize_file(options.readme) if options.readme
39
- end
40
-
41
- def generate_assets
42
- %w(js/jquery.js js/app.js css/style.css css/common.css).each do |file|
43
- asset(file, file(file, true))
44
- end
45
- end
46
-
47
- def serialize_file(file)
48
- index = options.files.index(file)
49
- outfile = file.name.downcase + '.html'
50
- options.file = file
51
- if file.attributes[:namespace]
52
- options.object = Registry.at(file.attributes[:namespace])
53
- end
54
- options.object ||= Registry.root
55
-
56
- if file == options.readme
57
- serialize_index(options)
58
- else
59
- serialize_index(options) if !options.readme && index == 0
60
- Templates::Engine.with_serializer(outfile, options.serializer) do
61
- T('layout').run(options)
62
- end
63
- end
64
- options.delete(:file)
65
- end
66
-
67
- def serialize_onefile
68
- layout = Object.new.extend(T('layout'))
69
- options.css_data = layout.stylesheets.map {|sheet| file(sheet, true) }.join("\n")
70
- options.js_data = layout.javascripts.map {|script| file(script, true) }.join("")
71
- Templates::Engine.with_serializer('onefile.html', options.serializer) do
72
- T('onefile').run(options)
73
- end
74
- end
@@ -1,81 +0,0 @@
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">
4
- <head>
5
- <%= 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>
19
- </head>
20
- <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,
27
- link_file('index.html', '&uarr;'),
28
- @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>
79
- <%= erb(:footer) %>
80
- </body>
81
- </html>
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
- include T('default/layout/html')
3
-
4
- def init
5
- super
6
-
7
- @topfile = options.readme
8
- if options.files
9
- if @topfile
10
- @toptitle = @topfile.attributes[:title] || "Documentation Overview"
11
- end
12
- @page_title = @file == options.readme ? options.title : @file.title
13
-
14
- index = options.files.index(@file)
15
- if index
16
- @prevfile = index > 0 ? (options.files[index - 1] || options.readme) : nil
17
- @nextfile = options.files[index + 1]
18
- end
19
- end
20
- end
21
-
22
- def diskfile
23
- options.including_object = @object
24
- super
25
- end
@@ -1,18 +0,0 @@
1
- <div class="method_header">
2
- <% if options.in_module %>
3
- <% if object.constructor? %>
4
- <em>self.</em><span class="path"><strong>new</strong></span><big>(</big><%= format_args(object) %><big>)</big> <%= format_block(object) %>
5
- <% else %>
6
- <em><%= object.scope == :class ? 'self.' : '' %></em><span class="path"><strong><%= object.is_attribute? ? object.name.to_s.sub(/=$/, '') : object.name %></strong></span><% if object.is_attribute? %>
7
- <% rw = object.attr_info %>
8
- <% if rw && rw[:read] && !rw[:write] %><span class="readonly">readonly</span>
9
- <% elsif rw && !rw[:read] && rw[:write] %><span class="writeonly">writeonly</span>
10
- <% end %>
11
- <% else %><big>(</big><%= format_args(object) %><big>)</big> <%= format_block(object) %><% end %>
12
- <% end %>
13
- <% else %>
14
- <em>def</em> <span class="path space"><%= options.including_object.relative_path(object.namespace) %><big><%= object.send(:sep) %></big><strong><%= object.name %></strong></span><big>(</big><%= format_args(object) %><big>)</big> <%= format_block(object) %>
15
- <% end %>
16
- <% if object.has_tag?(:since) && object.namespace.tag(:since) != object.tag(:since) %><span class="since">since <%= object.tag(:since).text %></span><% end %>
17
- </div>
18
- <div class="method_body"><%= yieldall %></div>
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
- def init
3
- sections :header, [T('docstring')]
4
- end
5
-
6
- def format_args(object)
7
- return if object.parameters.nil?
8
- params = object.parameters
9
- if object.has_tag?(:yield) || object.has_tag?(:yieldparam)
10
- params.reject! do |param|
11
- param[0].to_s[0, 1] == "&" &&
12
- !object.tags(:param).any? {|t| t.name == param[0][1..-1] }
13
- end
14
- end
15
-
16
- if params.empty?
17
- ""
18
- else
19
- args = params.map {|n, v| v ? "<em>#{h n}</em> = #{h v}" : "<em>" + n.to_s + "</em>" }.join(", ")
20
- args
21
- end
22
- end
@@ -1,7 +0,0 @@
1
- <div class='module_header'>
2
- <em><%= object.type %></em> <span class="path"><%= object.namespace == Registry.root ? '' : object.namespace.path + '::' %><strong><%= object.name %></strong></span>
3
- <% if object.has_tag?(:since) %><span class="since">since <%= object.tag(:since).text %></span><% end %>
4
- </div>
5
- <div class="module_methods">
6
- <%= yieldall %>
7
- </div>
@@ -1,5 +0,0 @@
1
- <div class="module_methods">
2
- <% @meths.each_with_index do |meth, i| %>
3
- <%= yieldall(:object => meth, :index => i, :in_module => true) %>
4
- <% end %>
5
- </div>
@@ -1,27 +0,0 @@
1
- # frozen_string_literal: true
2
- include Helpers::ModuleHelper
3
-
4
- def init
5
- sections :header, [T('docstring')], :method_list, [T('method')]
6
- end
7
-
8
- def method_list
9
- @meths = object.meths(:inherited => false, :included => false)
10
- cons = @meths.find(&:constructor?)
11
- @meths = @meths.reject {|meth| special_method?(meth) }
12
- @meths = sort_listing(prune_method_listing(@meths, false))
13
- @meths.unshift(cons) if cons
14
- erb(:method_list)
15
- end
16
-
17
- def sort_listing(list)
18
- list.sort_by {|o| [o.scope.to_s, o.name.to_s.downcase] }
19
- end
20
-
21
- def special_method?(meth)
22
- return true if meth.writer? && meth.attr_info[:read]
23
- return true if meth.name(true) == 'new'
24
- return true if meth.name(true) == '#method_missing'
25
- return true if meth.constructor?
26
- false
27
- end
@@ -1,4 +0,0 @@
1
- <% @files.each do |file| %>
2
- <% @file = file %>
3
- <%= diskfile %>
4
- <% end %>
@@ -1,6 +0,0 @@
1
- # frozen_string_literal: true
2
- include T('default/onefile/html')
3
-
4
- def init
5
- sections :layout, [:toc, :files]
6
- end
@@ -1,3 +0,0 @@
1
- <h1><%= @title %></h1>
2
- <h2>Table of Contents</h2>
3
- <div id="toc" class="one-file"></div>
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
- include T('default/tags/html')
3
-
4
- def init
5
- super
6
- [:since, :see, :return].each do |section|
7
- sections[:index].delete(section)
8
- end
9
- end
data/yard.gemspec DELETED
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
- require File.expand_path('../lib/yard/version', __FILE__)
3
-
4
- Gem::Specification.new do |s|
5
- s.name = "yard"
6
- s.summary = "Documentation tool for consistent and usable documentation in Ruby."
7
- s.description = <<-eof
8
- YARD is a documentation generation tool for the Ruby programming language.
9
- It enables the user to generate consistent, usable documentation that can be
10
- exported to a number of formats very easily, and also supports extending for
11
- custom Ruby constructs such as custom class level definitions.
12
- eof
13
- s.version = YARD::VERSION
14
- s.author = "Loren Segal"
15
- s.email = "lsegal@soen.ca"
16
- s.homepage = "http://yardoc.org"
17
- s.platform = Gem::Platform::RUBY
18
- s.files = `git ls-files`.strip.split(/\s+/).reject {|f| f.match(%r{^spec/}) }
19
- s.require_paths = ['lib']
20
- s.executables = ['yard', 'yardoc', 'yri']
21
- s.license = 'MIT' if s.respond_to?(:license=)
22
- s.metadata['yard.run'] = 'yri'
23
-
24
- s.add_runtime_dependency 'webrick', '~> 1.7.0'
25
- end