yard 0.9.26 → 0.9.37
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +104 -8
- data/LEGAL +29 -1
- data/LICENSE +1 -1
- data/README.md +9 -2
- data/docs/Tags.md +1 -1
- data/docs/WhatsNew.md +2 -2
- data/lib/yard/autoload.rb +3 -1
- data/lib/yard/cli/command.rb +1 -1
- data/lib/yard/cli/stats.rb +4 -1
- data/lib/yard/cli/yardoc.rb +5 -3
- data/lib/yard/code_objects/base.rb +5 -1
- data/lib/yard/code_objects/macro_object.rb +0 -1
- data/lib/yard/config.rb +5 -1
- data/lib/yard/docstring_parser.rb +1 -2
- data/lib/yard/handlers/processor.rb +0 -1
- data/lib/yard/handlers/ruby/attribute_handler.rb +1 -1
- data/lib/yard/handlers/ruby/legacy/attribute_handler.rb +1 -1
- data/lib/yard/handlers/ruby/method_handler.rb +2 -2
- data/lib/yard/handlers/ruby/mixin_handler.rb +15 -6
- data/lib/yard/handlers/ruby/module_function_handler.rb +15 -3
- data/lib/yard/handlers/ruby/visibility_handler.rb +13 -1
- data/lib/yard/i18n/locale.rb +1 -1
- data/lib/yard/i18n/message.rb +2 -2
- data/lib/yard/i18n/messages.rb +1 -1
- data/lib/yard/i18n/pot_generator.rb +1 -1
- data/lib/yard/logging.rb +116 -61
- data/lib/yard/open_struct.rb +67 -0
- data/lib/yard/options.rb +1 -1
- data/lib/yard/parser/ruby/ast_node.rb +9 -2
- data/lib/yard/parser/ruby/legacy/ruby_lex.rb +19 -4
- data/lib/yard/parser/ruby/ruby_parser.rb +9 -3
- data/lib/yard/parser/source_parser.rb +4 -5
- data/lib/yard/registry_resolver.rb +2 -1
- data/lib/yard/server/commands/base.rb +1 -1
- data/lib/yard/server/commands/library_command.rb +9 -9
- data/lib/yard/server/commands/static_file_helpers.rb +1 -2
- data/lib/yard/server/http_utils.rb +512 -0
- data/lib/yard/server/rack_adapter.rb +13 -5
- data/lib/yard/tags/default_factory.rb +1 -0
- data/lib/yard/tags/directives.rb +10 -2
- data/lib/yard/tags/tag.rb +3 -2
- data/lib/yard/tags/types_explainer.rb +1 -1
- data/lib/yard/templates/engine.rb +0 -1
- data/lib/yard/templates/helpers/html_helper.rb +5 -2
- data/lib/yard/templates/helpers/markup_helper.rb +2 -1
- data/lib/yard/templates/helpers/method_helper.rb +3 -1
- data/lib/yard/templates/template.rb +3 -1
- data/lib/yard/templates/template_options.rb +0 -1
- data/lib/yard/version.rb +1 -1
- data/lib/yard.rb +6 -0
- data/po/ja.po +19 -19
- data/templates/default/fulldoc/html/css/full_list.css +3 -3
- data/templates/default/fulldoc/html/css/style.css +6 -0
- data/templates/default/fulldoc/html/frames.erb +9 -4
- data/templates/default/fulldoc/html/full_list.erb +5 -2
- data/templates/default/fulldoc/html/js/app.js +294 -264
- data/templates/default/fulldoc/html/js/full_list.js +30 -4
- data/templates/default/fulldoc/html/setup.rb +10 -2
- data/templates/default/layout/html/footer.erb +1 -1
- data/templates/default/onefile/html/headers.erb +2 -0
- data/templates/default/tags/html/example.erb +2 -2
- data/templates/default/tags/html/option.erb +1 -1
- metadata +5 -41
- data/.dockerignore +0 -2
- data/.gitattributes +0 -4
- data/.github/FUNDING.yml +0 -3
- data/.github/ISSUE_TEMPLATE.md +0 -33
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -12
- data/.github/workflows/ci.yml +0 -42
- data/.github/workflows/gem.yml +0 -27
- data/.gitignore +0 -14
- data/.rspec +0 -2
- data/.rubocop.yml +0 -112
- data/.travis.yml +0 -49
- data/CODE_OF_CONDUCT.md +0 -15
- data/CONTRIBUTING.md +0 -140
- data/Dockerfile.samus +0 -28
- data/Gemfile +0 -33
- data/Rakefile +0 -39
- data/SECURITY.md +0 -26
- data/benchmarks/builtins_vs_eval.rb +0 -24
- data/benchmarks/concat_vs_join.rb +0 -13
- data/benchmarks/erb_vs_erubis.rb +0 -54
- data/benchmarks/format_args.rb +0 -47
- data/benchmarks/generation.rb +0 -38
- data/benchmarks/marshal_vs_dbm.rb +0 -64
- data/benchmarks/parsing.rb +0 -46
- data/benchmarks/pathname_vs_string.rb +0 -51
- data/benchmarks/rdoc_vs_yardoc.rb +0 -11
- data/benchmarks/registry_store_types.rb +0 -49
- data/benchmarks/ri_vs_yri.rb +0 -19
- data/benchmarks/ripper_parser.rb +0 -13
- data/benchmarks/splat_vs_flatten.rb +0 -13
- data/benchmarks/template_erb.rb +0 -23
- data/benchmarks/template_format.rb +0 -7
- data/benchmarks/template_profile.rb +0 -18
- data/benchmarks/yri_cache.rb +0 -20
- data/samus.json +0 -49
- data/tasks/update_error_map.rake +0 -53
- data/yard.gemspec +0 -23
data/lib/yard/version.rb
CHANGED
data/lib/yard.rb
CHANGED
@@ -48,6 +48,12 @@ module YARD
|
|
48
48
|
|
49
49
|
# @return [Boolean] whether YARD is being run in Ruby 2.0
|
50
50
|
def self.ruby2?; @ruby2 ||= (RUBY_VERSION >= '2.0.0') end
|
51
|
+
|
52
|
+
# @return [Boolean] whether YARD is being run in Ruby 3.0
|
53
|
+
def self.ruby3?; @ruby3 ||= (RUBY_VERSION >= '3.0.0') end
|
54
|
+
|
55
|
+
# @return [Boolean] whether YARD is being run in Ruby 3.1
|
56
|
+
def self.ruby31?; @ruby31 ||= (RUBY_VERSION >= '3.1.0') end
|
51
57
|
end
|
52
58
|
|
53
59
|
# Keep track of Ruby version for compatibility code
|
data/po/ja.po
CHANGED
@@ -1501,7 +1501,7 @@ msgstr ""
|
|
1501
1501
|
"これらのオブジェクトはツリー構造のように振る舞い、これらの直接の子全てのリストを維持している。\n"
|
1502
1502
|
"namespaceではない全てのオブジェクトは単純にベースクラスのサブクラスである。\n"
|
1503
1503
|
"{YARD::CodeObjects::RootObject RootObject} は\n"
|
1504
|
-
"特別な `NamespaceObject` ともいえ、Rubyの中のトップレベル
|
1504
|
+
"特別な `NamespaceObject` ともいえ、Rubyの中のトップレベルnamespaceを参照する。\n"
|
1505
1505
|
"パラメータとして namespace オブジェクトを受け入れるメソッドは、\n"
|
1506
1506
|
"root オブジェクト用のショートカットとして `:root` シンボルも受け入れる。"
|
1507
1507
|
|
@@ -6175,7 +6175,7 @@ msgstr ""
|
|
6175
6175
|
"'default/class'から自動的に継承する。\n"
|
6176
6176
|
"そして 'default/class/setup.rb' の中に定義されるもの全ては、\n"
|
6177
6177
|
"'default/class/html/setup.rb' によって上書きされることも意味する。\n"
|
6178
|
-
"(yard/lib以下の話ではなくyard/
|
6178
|
+
"(yard/lib以下の話ではなくyard/templates以下の話)"
|
6179
6179
|
|
6180
6180
|
#: ../docs/Templates.md:200
|
6181
6181
|
msgid ""
|
@@ -7124,7 +7124,7 @@ msgstr "#### Rubyのコードを解析する為の新しい `@!parse` ディレ
|
|
7124
7124
|
#: ../docs/WhatsNew.md:87
|
7125
7125
|
msgid ""
|
7126
7126
|
"A new {tag:!parse} directive was added that allows a developer to have\n"
|
7127
|
-
"YARD parse code that might not necessarily be
|
7127
|
+
"YARD parse code that might not necessarily be parsable in its original\n"
|
7128
7128
|
"form. This is useful when using `instance_eval` and other dynamic\n"
|
7129
7129
|
"meta-programming techniques to define methods or perform functionality.\n"
|
7130
7130
|
"For instance, a common case of the \"self.included\" callback in module\n"
|
@@ -9452,7 +9452,7 @@ msgid ""
|
|
9452
9452
|
msgstr ""
|
9453
9453
|
"1. **新しいテンプレートエンジンとテンプレート**\n"
|
9454
9454
|
"2. **yardoc `--query` 引数**\n"
|
9455
|
-
"3. **Greatly
|
9455
|
+
"3. **Greatly expanded API ドキュメント**\n"
|
9456
9456
|
"4. **新しいプラグインのサポート**\n"
|
9457
9457
|
"5. **新しいタグ(@abstract, @private)**\n"
|
9458
9458
|
"6. **デフォルトのrake taskは`rake yard`コマンドになった**"
|
@@ -9607,7 +9607,7 @@ msgid ""
|
|
9607
9607
|
"This tag exists so that you can create a query (`--query !@private`) to\n"
|
9608
9608
|
"ignore all of these private objects in your documentation. You can also\n"
|
9609
9609
|
"use the new `--no-private` switch, which is a shortcut to the "
|
9610
|
-
"
|
9610
|
+
"aforementioned\n"
|
9611
9611
|
"query. You can read more about the new tags in the {file:docs/GettingStarted."
|
9612
9612
|
"md}\n"
|
9613
9613
|
"guide."
|
@@ -9816,7 +9816,7 @@ msgid ""
|
|
9816
9816
|
" # @overload def to_html(html, autolink = true)\n"
|
9817
9817
|
" # This docstring describes the specific overload only.\n"
|
9818
9818
|
" # @param [String] html the HTML\n"
|
9819
|
-
" # @param [Boolean] autolink whether or not to
|
9819
|
+
" # @param [Boolean] autolink whether or not to automatically link\n"
|
9820
9820
|
" # URL references\n"
|
9821
9821
|
" # @overload def to_html(html, opts = {})\n"
|
9822
9822
|
" # @param [String] html the HTML\n"
|
@@ -9828,7 +9828,7 @@ msgstr ""
|
|
9828
9828
|
" # @overload def to_html(html, autolink = true)\n"
|
9829
9829
|
" # This docstring describes the specific overload only.\n"
|
9830
9830
|
" # @param [String] html the HTML\n"
|
9831
|
-
" # @param [Boolean] autolink whether or not to
|
9831
|
+
" # @param [Boolean] autolink whether or not to automatically link\n"
|
9832
9832
|
" # URL references\n"
|
9833
9833
|
" # @overload def to_html(html, opts = {})\n"
|
9834
9834
|
" # @param [String] html the HTML\n"
|
@@ -11513,7 +11513,7 @@ msgstr ""
|
|
11513
11513
|
|
11514
11514
|
# @param [Hash, nil] checksums
|
11515
11515
|
#: ../lib/yard/cli/yardoc.rb:340
|
11516
|
-
msgid "if supplied, a list of
|
11516
|
+
msgid "if supplied, a list of checksums for files."
|
11517
11517
|
msgstr "提供する場合は、ファイルの為のチェックサムのリスト"
|
11518
11518
|
|
11519
11519
|
# @param [Hash, nil]
|
@@ -15746,7 +15746,7 @@ msgstr ""
|
|
15746
15746
|
# YARD::DocstringParser
|
15747
15747
|
#: ../lib/yard/docstring_parser.rb:11
|
15748
15748
|
msgid ""
|
15749
|
-
"The DocstringParser can be subclassed and
|
15749
|
+
"The DocstringParser can be subclassed and substituted during parsing by\n"
|
15750
15750
|
"setting the {Docstring.default_parser} attribute with the name of the\n"
|
15751
15751
|
"subclass. This allows developers to change the way docstrings are\n"
|
15752
15752
|
"parsed, allowing for completely different docstring syntaxes."
|
@@ -18512,7 +18512,7 @@ msgstr "翻訳目標のメッセージ"
|
|
18512
18512
|
# @return [String]
|
18513
18513
|
#: ../lib/yard/i18n/locale.rb:45
|
18514
18514
|
msgid ""
|
18515
|
-
"translated message. If
|
18515
|
+
"translated message. If translation isn't\n"
|
18516
18516
|
"registered, the +message+ is returned."
|
18517
18517
|
msgstr ""
|
18518
18518
|
|
@@ -18525,7 +18525,7 @@ msgstr ""
|
|
18525
18525
|
|
18526
18526
|
# @param tag_name
|
18527
18527
|
#: ../lib/yard/i18n/message.rb:11
|
18528
|
-
msgid "the message ID of the
|
18528
|
+
msgid "the message ID of the translation target message."
|
18529
18529
|
msgstr "翻訳目標のメッセージのメッセージID"
|
18530
18530
|
|
18531
18531
|
# @param [Fixnum, nil] line
|
@@ -18545,7 +18545,7 @@ msgstr "メッセージ用のコメントのグループ"
|
|
18545
18545
|
|
18546
18546
|
# YARD::Handlers::Processor#initialize
|
18547
18547
|
#: ../lib/yard/i18n/message.rb:21
|
18548
|
-
msgid "Creates a
|
18548
|
+
msgid "Creates a translate target message for message ID +id+."
|
18549
18549
|
msgstr "メッセージID +id+ 用の翻訳目標のメッセージを作成する"
|
18550
18550
|
|
18551
18551
|
# @return [Tag]
|
@@ -18652,7 +18652,7 @@ msgstr ""
|
|
18652
18652
|
# YARD::I18n::Messages#register
|
18653
18653
|
#: ../lib/yard/i18n/messages.rb:31
|
18654
18654
|
msgid ""
|
18655
|
-
"Registers a {Message}, the
|
18655
|
+
"Registers a {Message}, the message ID of which is +id+. If\n"
|
18656
18656
|
"corresponding +Message+ is already registered, the previously\n"
|
18657
18657
|
"registered object is returned."
|
18658
18658
|
msgstr ""
|
@@ -18876,7 +18876,7 @@ msgstr ""
|
|
18876
18876
|
msgid ""
|
18877
18877
|
"Locations of the +Message+ are used to generate the reference\n"
|
18878
18878
|
"line that is started with \"#: \". +relative_base_path+ passed\n"
|
18879
|
-
"when the
|
18879
|
+
"when the generator is created is prepended to each path in location."
|
18880
18880
|
msgstr ""
|
18881
18881
|
|
18882
18882
|
# YARD::I18n::PotGenerator#generate
|
@@ -19475,7 +19475,7 @@ msgstr "tag|example|ハッシュ構文を用いたオプションの設定"
|
|
19475
19475
|
|
19476
19476
|
# @param [Hash] options
|
19477
19477
|
#: ../lib/yard/options.rb:99
|
19478
|
-
msgid "the
|
19478
|
+
msgid "the option to set"
|
19479
19479
|
msgstr "設定するためのオプション"
|
19480
19480
|
|
19481
19481
|
# @param [Object] value
|
@@ -23736,7 +23736,7 @@ msgid ""
|
|
23736
23736
|
" def run\n"
|
23737
23737
|
" self.body = 'ERROR! The System is down!'\n"
|
23738
23738
|
" self.status = 500\n"
|
23739
|
-
" self.headers['
|
23739
|
+
" self.headers['Content-Type'] = 'text/plain'\n"
|
23740
23740
|
" end\n"
|
23741
23741
|
"end"
|
23742
23742
|
msgstr ""
|
@@ -27892,7 +27892,7 @@ msgstr "任意のタイトルとして、リンクに表示する"
|
|
27892
27892
|
#: ../lib/yard/templates/helpers/base_helper.rb:143
|
27893
27893
|
#: ../lib/yard/templates/helpers/html_helper.rb:220
|
27894
27894
|
msgid "Links to an extra file"
|
27895
|
-
msgstr "
|
27895
|
+
msgstr "extraファイルにリンクする"
|
27896
27896
|
|
27897
27897
|
# @param [String] anchor
|
27898
27898
|
#: ../lib/yard/templates/helpers/base_helper.rb:149
|
@@ -30096,7 +30096,7 @@ msgstr "解析された式"
|
|
30096
30096
|
#~ "{Library.default_factory}."
|
30097
30097
|
#~ msgstr ""
|
30098
30098
|
#~ "次の事に留意する。\n"
|
30099
|
-
#~ "+
|
30099
|
+
#~ "+tag_factory+ は、タグを解析する為に利用されるfactoryオブジェクトとな"
|
30100
30100
|
#~ "る。\n"
|
30101
30101
|
#~ "この値は{DefaultFactory}クラスがデフォルトとなり、\n"
|
30102
30102
|
#~ "{Library.default_factory}を変更する事によって設定できる。"
|
@@ -31067,7 +31067,7 @@ msgstr "解析された式"
|
|
31067
31067
|
|
31068
31068
|
#~ msgid ""
|
31069
31069
|
#~ "* **Domain Specific Language (DSL)**: In the context of Ruby, a DSL is a "
|
31070
|
-
#~ "
|
31070
|
+
#~ "language\n"
|
31071
31071
|
#~ " optimized for a specific domain (problem) but represented using Ruby "
|
31072
31072
|
#~ "syntax."
|
31073
31073
|
#~ msgstr ""
|
@@ -20,8 +20,8 @@ h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; }
|
|
20
20
|
#content.insearch #noresults { margin-left: 7px; }
|
21
21
|
li.collapsed ul { display: none; }
|
22
22
|
li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; }
|
23
|
-
li.collapsed a.toggle {
|
24
|
-
li { color: #
|
23
|
+
li.collapsed a.toggle { cursor: default; background-position: top left; }
|
24
|
+
li { color: #666; cursor: pointer; }
|
25
25
|
li.deprecated { text-decoration: line-through; font-style: italic; }
|
26
26
|
li.odd { background: #f0f0f0; }
|
27
27
|
li.even { background: #fafafa; }
|
@@ -47,7 +47,7 @@ li small { display: block; font-size: 0.8em; }
|
|
47
47
|
li small:before { content: ""; }
|
48
48
|
li small:after { content: ""; }
|
49
49
|
li small.search_info { display: none; }
|
50
|
-
#search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #
|
50
|
+
#search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #666; padding-left: 0; padding-right: 24px; }
|
51
51
|
#content.insearch #search { background-position: center right; }
|
52
52
|
#search input { width: 110px; }
|
53
53
|
|
@@ -82,6 +82,11 @@ body {
|
|
82
82
|
#search { display: none; }
|
83
83
|
}
|
84
84
|
|
85
|
+
@media (max-width: 320px) {
|
86
|
+
body { height: 100%; overflow: hidden; overflow-wrap: break-word; }
|
87
|
+
#main { height: 100%; overflow: auto; }
|
88
|
+
}
|
89
|
+
|
85
90
|
#main img { max-width: 100%; }
|
86
91
|
h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; }
|
87
92
|
h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; }
|
@@ -106,6 +111,7 @@ h2 small a {
|
|
106
111
|
position: relative;
|
107
112
|
padding: 2px 7px;
|
108
113
|
}
|
114
|
+
a { font-weight: 550; }
|
109
115
|
.clear { clear: both; }
|
110
116
|
.inline { display: inline; }
|
111
117
|
.inline p:first-child { display: inline; }
|
@@ -5,10 +5,15 @@
|
|
5
5
|
<title><%= options.title %></title>
|
6
6
|
</head>
|
7
7
|
<script type="text/javascript">
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
var mainUrl = '<%= url_for_main %>';
|
9
|
+
try {
|
10
|
+
var match = decodeURIComponent(window.location.hash).match(/^#!(.+)/);
|
11
|
+
var name = match ? match[1] : mainUrl;
|
12
|
+
var url = new URL(name, location.href);
|
13
|
+
window.top.location.replace(url.origin === location.origin ? name : mainUrl);
|
14
|
+
} catch (e) {
|
15
|
+
window.top.location.replace(mainUrl);
|
16
|
+
}
|
12
17
|
</script>
|
13
18
|
<noscript>
|
14
19
|
<h1>Oops!</h1>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
|
-
<html
|
2
|
+
<html <%= "lang=\"#{html_lang}\"" unless html_lang.nil? %>>
|
3
3
|
<head>
|
4
4
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
5
5
|
<meta charset="<%= charset %>" />
|
@@ -26,7 +26,10 @@
|
|
26
26
|
<% end %>
|
27
27
|
</div>
|
28
28
|
|
29
|
-
<div id="search">
|
29
|
+
<div id="search">
|
30
|
+
<label for="search-class">Search:</label>
|
31
|
+
<input id="search-class" type="text" />
|
32
|
+
</div>
|
30
33
|
</div>
|
31
34
|
|
32
35
|
<ul id="full_list" class="<%= @list_class || @list_type %>">
|