kinetic_sdk 5.0.25 → 5.0.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/gems/{yard-0.9.25 → yard-0.9.36}/CHANGELOG.md +97 -8
- data/gems/{yard-0.9.25 → yard-0.9.36}/LEGAL +29 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/LICENSE +1 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/README.md +1 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/docs/Tags.md +1 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/docs/WhatsNew.md +2 -2
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/autoload.rb +2 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/cli/command.rb +1 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/cli/stats.rb +4 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/cli/yardoc.rb +5 -3
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/code_objects/base.rb +5 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/code_objects/method_object.rb +1 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/config.rb +5 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/docstring_parser.rb +1 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/c/base.rb +164 -164
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/attribute_handler.rb +1 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/legacy/attribute_handler.rb +1 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/method_handler.rb +2 -2
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/mixin_handler.rb +19 -7
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/module_function_handler.rb +15 -3
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/i18n/locale.rb +1 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/i18n/message.rb +2 -2
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/i18n/messages.rb +1 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/i18n/pot_generator.rb +1 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/options.rb +1 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/parser/ruby/ast_node.rb +9 -2
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/parser/ruby/ruby_parser.rb +9 -3
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/parser/source_parser.rb +3 -4
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/registry_resolver.rb +2 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/commands/base.rb +3 -3
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/commands/library_command.rb +9 -9
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/commands/static_file_helpers.rb +1 -2
- data/gems/yard-0.9.36/lib/yard/server/http_utils.rb +512 -0
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/rack_adapter.rb +13 -5
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/tags/directives.rb +10 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/tags/tag.rb +2 -2
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/tags/types_explainer.rb +1 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/templates/helpers/html_helper.rb +5 -2
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/templates/helpers/markup_helper.rb +2 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/templates/helpers/method_helper.rb +3 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/templates/section.rb +1 -3
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/templates/template.rb +3 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/version.rb +1 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard.rb +6 -0
- data/gems/{yard-0.9.25 → yard-0.9.36}/po/ja.po +19 -19
- data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/fulldoc/html/css/style.css +1 -0
- data/gems/yard-0.9.36/templates/default/fulldoc/html/frames.erb +22 -0
- data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/layout/html/footer.erb +1 -1
- data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/tags/html/option.erb +1 -1
- data/kinetic_sdk.gemspec +1 -1
- data/lib/kinetic_sdk/version.rb +1 -1
- metadata +369 -394
- data/gems/yard-0.9.25/CODE_OF_CONDUCT.md +0 -15
- data/gems/yard-0.9.25/CONTRIBUTING.md +0 -140
- data/gems/yard-0.9.25/Dockerfile.samus +0 -28
- data/gems/yard-0.9.25/Gemfile +0 -32
- data/gems/yard-0.9.25/Rakefile +0 -39
- data/gems/yard-0.9.25/SECURITY.md +0 -26
- data/gems/yard-0.9.25/benchmarks/builtins_vs_eval.rb +0 -24
- data/gems/yard-0.9.25/benchmarks/concat_vs_join.rb +0 -13
- data/gems/yard-0.9.25/benchmarks/erb_vs_erubis.rb +0 -54
- data/gems/yard-0.9.25/benchmarks/format_args.rb +0 -47
- data/gems/yard-0.9.25/benchmarks/generation.rb +0 -38
- data/gems/yard-0.9.25/benchmarks/marshal_vs_dbm.rb +0 -64
- data/gems/yard-0.9.25/benchmarks/parsing.rb +0 -46
- data/gems/yard-0.9.25/benchmarks/pathname_vs_string.rb +0 -51
- data/gems/yard-0.9.25/benchmarks/rdoc_vs_yardoc.rb +0 -11
- data/gems/yard-0.9.25/benchmarks/registry_store_types.rb +0 -49
- data/gems/yard-0.9.25/benchmarks/ri_vs_yri.rb +0 -19
- data/gems/yard-0.9.25/benchmarks/ripper_parser.rb +0 -13
- data/gems/yard-0.9.25/benchmarks/splat_vs_flatten.rb +0 -13
- data/gems/yard-0.9.25/benchmarks/template_erb.rb +0 -23
- data/gems/yard-0.9.25/benchmarks/template_format.rb +0 -7
- data/gems/yard-0.9.25/benchmarks/template_profile.rb +0 -18
- data/gems/yard-0.9.25/benchmarks/yri_cache.rb +0 -20
- data/gems/yard-0.9.25/samus.json +0 -80
- data/gems/yard-0.9.25/tasks/update_error_map.rake +0 -53
- data/gems/yard-0.9.25/templates/default/fulldoc/html/frames.erb +0 -17
- data/gems/yard-0.9.25/yard.gemspec +0 -24
- /data/gems/{yard-0.9.25 → yard-0.9.36}/bin/yard +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/bin/yardoc +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/bin/yri +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/docs/CodeObjects.md +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/docs/GettingStarted.md +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/docs/Handlers.md +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/docs/Overview.md +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/docs/Parser.md +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/docs/TagsArch.md +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/docs/Templates.md +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/docs/images/code-objects-class-diagram.png +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/docs/images/handlers-class-diagram.png +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/docs/images/overview-class-diagram.png +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/docs/images/parser-class-diagram.png +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/docs/images/tags-class-diagram.png +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/docs/templates/default/fulldoc/html/full_list_tag.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/docs/templates/default/fulldoc/html/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/docs/templates/default/layout/html/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/docs/templates/default/layout/html/tag_list.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/docs/templates/default/yard_tags/html/list.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/docs/templates/default/yard_tags/html/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/docs/templates/plugin.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/rubygems_plugin.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/cli/command_parser.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/cli/config.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/cli/diff.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/cli/display.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/cli/gems.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/cli/graph.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/cli/help.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/cli/i18n.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/cli/list.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/cli/markup_types.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/cli/server.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/cli/yardopts_command.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/cli/yri.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/code_objects/class_object.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/code_objects/class_variable_object.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/code_objects/constant_object.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/code_objects/extended_method_object.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/code_objects/extra_file_object.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/code_objects/macro_object.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/code_objects/module_object.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/code_objects/namespace_mapper.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/code_objects/namespace_object.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/code_objects/proxy.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/code_objects/root_object.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/core_ext/array.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/core_ext/file.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/core_ext/hash.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/core_ext/insertion.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/core_ext/module.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/core_ext/string.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/core_ext/symbol_hash.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/docstring.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/gem_index.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/globals.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/base.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/c/alias_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/c/attribute_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/c/class_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/c/constant_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/c/handler_methods.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/c/init_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/c/method_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/c/mixin_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/c/module_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/c/override_comment_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/c/path_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/c/struct_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/c/symbol_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/common/method_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/processor.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/alias_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/base.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/class_condition_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/class_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/class_variable_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/comment_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/constant_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/decorator_handler_methods.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/dsl_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/dsl_handler_methods.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/exception_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/extend_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/legacy/alias_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/legacy/base.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/legacy/class_condition_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/legacy/class_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/legacy/class_variable_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/legacy/comment_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/legacy/constant_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/legacy/dsl_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/legacy/exception_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/legacy/extend_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/legacy/method_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/legacy/mixin_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/legacy/module_function_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/legacy/module_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/legacy/private_class_method_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/legacy/private_constant_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/legacy/visibility_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/legacy/yield_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/method_condition_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/module_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/private_class_method_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/private_constant_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/public_class_method_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/struct_handler_methods.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/visibility_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/handlers/ruby/yield_handler.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/i18n/po_parser.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/i18n/text.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/logging.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/parser/base.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/parser/c/c_parser.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/parser/c/comment_parser.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/parser/c/statement.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/parser/ruby/legacy/irb/slex.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/parser/ruby/legacy/ruby_lex.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/parser/ruby/legacy/ruby_parser.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/parser/ruby/legacy/statement.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/parser/ruby/legacy/statement_list.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/parser/ruby/legacy/token_list.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/parser/ruby/token_resolver.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/rake/yardoc_task.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/registry.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/registry_store.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/rubygems/backports/LICENSE.txt +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/rubygems/backports/MIT.txt +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/rubygems/backports/gem.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/rubygems/backports/source_index.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/rubygems/backports.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/rubygems/doc_manager.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/rubygems/hook.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/rubygems/specification.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/serializers/base.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/serializers/file_system_serializer.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/serializers/process_serializer.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/serializers/stdout_serializer.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/serializers/yardoc_serializer.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/adapter.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/commands/display_file_command.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/commands/display_object_command.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/commands/frames_command.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/commands/library_index_command.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/commands/list_command.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/commands/root_request_command.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/commands/search_command.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/commands/static_file_command.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/doc_server_helper.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/doc_server_serializer.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/library_version.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/router.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/static_caching.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/templates/default/fulldoc/html/css/custom.css +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/templates/default/fulldoc/html/images/processing.gif +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/templates/default/fulldoc/html/js/autocomplete.js +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/templates/default/layout/html/breadcrumb.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/templates/default/layout/html/script_setup.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/templates/default/layout/html/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/templates/default/method_details/html/permalink.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/templates/default/method_details/html/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/templates/doc_server/library_list/html/headers.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/templates/doc_server/library_list/html/library_list.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/templates/doc_server/library_list/html/listing.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/templates/doc_server/library_list/html/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/templates/doc_server/library_list/html/title.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/templates/doc_server/processing/html/processing.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/templates/doc_server/processing/html/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/templates/doc_server/search/html/search.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/templates/doc_server/search/html/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server/webrick_adapter.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/server.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/tags/default_factory.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/tags/default_tag.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/tags/library.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/tags/option_tag.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/tags/overload_tag.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/tags/ref_tag.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/tags/ref_tag_list.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/tags/tag_format_error.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/templates/engine.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/templates/erb_cache.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/templates/helpers/base_helper.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/templates/helpers/filter_helper.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/templates/helpers/html_syntax_highlight_helper.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/templates/helpers/markup/rdoc_markdown.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/templates/helpers/markup/rdoc_markup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/templates/helpers/module_helper.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/templates/helpers/text_helper.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/templates/helpers/uml_helper.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/templates/template_options.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/lib/yard/verifier.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/class/dot/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/class/dot/superklass.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/class/html/constructor_details.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/class/html/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/class/html/subclasses.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/class/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/class/text/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/class/text/subclasses.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/constant/text/header.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/constant/text/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/docstring/html/abstract.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/docstring/html/deprecated.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/docstring/html/index.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/docstring/html/note.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/docstring/html/private.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/docstring/html/returns_void.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/docstring/html/text.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/docstring/html/todo.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/docstring/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/docstring/text/abstract.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/docstring/text/deprecated.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/docstring/text/index.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/docstring/text/note.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/docstring/text/private.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/docstring/text/returns_void.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/docstring/text/text.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/docstring/text/todo.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/fulldoc/html/css/common.css +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/fulldoc/html/css/full_list.css +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/fulldoc/html/full_list.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/fulldoc/html/full_list_class.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/fulldoc/html/full_list_file.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/fulldoc/html/full_list_method.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/fulldoc/html/js/app.js +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/fulldoc/html/js/full_list.js +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/fulldoc/html/js/jquery.js +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/fulldoc/html/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/layout/dot/header.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/layout/dot/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/layout/html/breadcrumb.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/layout/html/files.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/layout/html/headers.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/layout/html/index.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/layout/html/layout.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/layout/html/listing.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/layout/html/objects.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/layout/html/script_setup.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/layout/html/search.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/layout/html/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/method/html/header.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/method/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/method/text/header.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/method_details/html/header.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/method_details/html/method_signature.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/method_details/html/source.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/method_details/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/method_details/text/header.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/method_details/text/method_signature.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/method_details/text/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/dot/child.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/dot/dependencies.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/dot/header.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/dot/info.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/dot/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/html/attribute_details.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/html/attribute_summary.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/html/box_info.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/html/children.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/html/constant_summary.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/html/defines.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/html/header.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/html/inherited_attributes.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/html/inherited_constants.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/html/inherited_methods.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/html/item_summary.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/html/method_details_list.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/html/method_summary.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/html/methodmissing.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/html/pre_docstring.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/text/children.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/text/class_meths_list.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/text/extends.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/text/header.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/text/includes.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/text/instance_meths_list.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/module/text/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/onefile/html/files.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/onefile/html/headers.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/onefile/html/layout.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/onefile/html/readme.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/onefile/html/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/root/dot/child.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/root/dot/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/root/html/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/tags/html/example.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/tags/html/index.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/tags/html/overload.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/tags/html/see.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/tags/html/tag.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/tags/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/tags/text/example.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/tags/text/index.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/tags/text/option.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/tags/text/overload.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/tags/text/see.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/default/tags/text/tag.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/guide/class/html/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/guide/docstring/html/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/guide/fulldoc/html/css/style.css +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/guide/fulldoc/html/js/app.js +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/guide/fulldoc/html/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/guide/layout/html/layout.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/guide/layout/html/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/guide/method/html/header.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/guide/method/html/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/guide/module/html/header.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/guide/module/html/method_list.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/guide/module/html/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/guide/onefile/html/files.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/guide/onefile/html/setup.rb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/guide/onefile/html/toc.erb +0 -0
- /data/gems/{yard-0.9.25 → yard-0.9.36}/templates/guide/tags/html/setup.rb +0 -0
@@ -31,7 +31,7 @@ module YARD
|
|
31
31
|
# @abstract
|
32
32
|
class LibraryCommand < Base
|
33
33
|
begin
|
34
|
-
Process.fork {
|
34
|
+
Process.fork { }
|
35
35
|
CAN_FORK = true
|
36
36
|
rescue Exception # rubocop:disable Lint/RescueException
|
37
37
|
CAN_FORK = false
|
@@ -94,16 +94,16 @@ module YARD
|
|
94
94
|
end
|
95
95
|
|
96
96
|
def call_with_fork(request, &block)
|
97
|
-
reader, writer
|
97
|
+
IO.pipe(:binmode => true) do |reader, writer|
|
98
|
+
fork do
|
99
|
+
log.debug "[pid=#{Process.pid}] fork serving: #{request.path}"
|
100
|
+
reader.close
|
101
|
+
writer.print(Marshal.dump(call_without_fork(request, &block)))
|
102
|
+
end
|
98
103
|
|
99
|
-
|
100
|
-
|
101
|
-
reader.close
|
102
|
-
writer.print(Marshal.dump(call_without_fork(request, &block)))
|
104
|
+
writer.close
|
105
|
+
Marshal.load(reader.read)
|
103
106
|
end
|
104
|
-
|
105
|
-
writer.close
|
106
|
-
Marshal.load(reader.read)
|
107
107
|
end
|
108
108
|
|
109
109
|
def can_fork?
|
@@ -1,5 +1,4 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
require 'webrick/httputils'
|
3
2
|
|
4
3
|
module YARD
|
5
4
|
module Server
|
@@ -7,7 +6,7 @@ module YARD
|
|
7
6
|
# Include this module to get access to {#static_template_file?}
|
8
7
|
# and {favicon?} helpers.
|
9
8
|
module StaticFileHelpers
|
10
|
-
include
|
9
|
+
include Server::HTTPUtils
|
11
10
|
|
12
11
|
# Serves an empty favicon.
|
13
12
|
# @raise [FinishRequest] finalizes an empty body if the path matches
|
@@ -0,0 +1,512 @@
|
|
1
|
+
# frozen_string_literal: false
|
2
|
+
#
|
3
|
+
# httputils.rb -- HTTPUtils Module
|
4
|
+
#
|
5
|
+
# Author: IPR -- Internet Programming with Ruby -- writers
|
6
|
+
# Copyright (c) 2000, 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou
|
7
|
+
# Copyright (c) 2002 Internet Programming with Ruby writers. All rights
|
8
|
+
# reserved.
|
9
|
+
#
|
10
|
+
# $IPR: httputils.rb,v 1.34 2003/06/05 21:34:08 gotoyuzo Exp $
|
11
|
+
|
12
|
+
require 'socket'
|
13
|
+
require 'tempfile'
|
14
|
+
|
15
|
+
module YARD::Server
|
16
|
+
CR = "\x0d" # :nodoc:
|
17
|
+
LF = "\x0a" # :nodoc:
|
18
|
+
CRLF = "\x0d\x0a" # :nodoc:
|
19
|
+
|
20
|
+
##
|
21
|
+
# HTTPUtils provides utility methods for working with the HTTP protocol.
|
22
|
+
#
|
23
|
+
# This module is generally used internally by WEBrick
|
24
|
+
|
25
|
+
module HTTPUtils
|
26
|
+
|
27
|
+
##
|
28
|
+
# Normalizes a request path. Raises an exception if the path cannot be
|
29
|
+
# normalized.
|
30
|
+
|
31
|
+
def normalize_path(path)
|
32
|
+
raise "abnormal path `#{path}'" if path[0] != ?/
|
33
|
+
ret = path.dup
|
34
|
+
|
35
|
+
ret.gsub!(%r{/+}o, '/') # // => /
|
36
|
+
while ret.sub!(%r'/\.(?:/|\Z)', '/'); end # /. => /
|
37
|
+
while ret.sub!(%r'/(?!\.\./)[^/]+/\.\.(?:/|\Z)', '/'); end # /foo/.. => /foo
|
38
|
+
|
39
|
+
raise "abnormal path `#{path}'" if %r{/\.\.(/|\Z)} =~ ret
|
40
|
+
ret
|
41
|
+
end
|
42
|
+
module_function :normalize_path
|
43
|
+
|
44
|
+
##
|
45
|
+
# Default mime types
|
46
|
+
|
47
|
+
DefaultMimeTypes = {
|
48
|
+
"ai" => "application/postscript",
|
49
|
+
"asc" => "text/plain",
|
50
|
+
"avi" => "video/x-msvideo",
|
51
|
+
"bin" => "application/octet-stream",
|
52
|
+
"bmp" => "image/bmp",
|
53
|
+
"class" => "application/octet-stream",
|
54
|
+
"cer" => "application/pkix-cert",
|
55
|
+
"crl" => "application/pkix-crl",
|
56
|
+
"crt" => "application/x-x509-ca-cert",
|
57
|
+
#"crl" => "application/x-pkcs7-crl",
|
58
|
+
"css" => "text/css",
|
59
|
+
"dms" => "application/octet-stream",
|
60
|
+
"doc" => "application/msword",
|
61
|
+
"dvi" => "application/x-dvi",
|
62
|
+
"eps" => "application/postscript",
|
63
|
+
"etx" => "text/x-setext",
|
64
|
+
"exe" => "application/octet-stream",
|
65
|
+
"gif" => "image/gif",
|
66
|
+
"htm" => "text/html",
|
67
|
+
"html" => "text/html",
|
68
|
+
"jpe" => "image/jpeg",
|
69
|
+
"jpeg" => "image/jpeg",
|
70
|
+
"jpg" => "image/jpeg",
|
71
|
+
"js" => "application/javascript",
|
72
|
+
"json" => "application/json",
|
73
|
+
"lha" => "application/octet-stream",
|
74
|
+
"lzh" => "application/octet-stream",
|
75
|
+
"mjs" => "application/javascript",
|
76
|
+
"mov" => "video/quicktime",
|
77
|
+
"mpe" => "video/mpeg",
|
78
|
+
"mpeg" => "video/mpeg",
|
79
|
+
"mpg" => "video/mpeg",
|
80
|
+
"pbm" => "image/x-portable-bitmap",
|
81
|
+
"pdf" => "application/pdf",
|
82
|
+
"pgm" => "image/x-portable-graymap",
|
83
|
+
"png" => "image/png",
|
84
|
+
"pnm" => "image/x-portable-anymap",
|
85
|
+
"ppm" => "image/x-portable-pixmap",
|
86
|
+
"ppt" => "application/vnd.ms-powerpoint",
|
87
|
+
"ps" => "application/postscript",
|
88
|
+
"qt" => "video/quicktime",
|
89
|
+
"ras" => "image/x-cmu-raster",
|
90
|
+
"rb" => "text/plain",
|
91
|
+
"rd" => "text/plain",
|
92
|
+
"rtf" => "application/rtf",
|
93
|
+
"sgm" => "text/sgml",
|
94
|
+
"sgml" => "text/sgml",
|
95
|
+
"svg" => "image/svg+xml",
|
96
|
+
"tif" => "image/tiff",
|
97
|
+
"tiff" => "image/tiff",
|
98
|
+
"txt" => "text/plain",
|
99
|
+
"wasm" => "application/wasm",
|
100
|
+
"xbm" => "image/x-xbitmap",
|
101
|
+
"xhtml" => "text/html",
|
102
|
+
"xls" => "application/vnd.ms-excel",
|
103
|
+
"xml" => "text/xml",
|
104
|
+
"xpm" => "image/x-xpixmap",
|
105
|
+
"xwd" => "image/x-xwindowdump",
|
106
|
+
"zip" => "application/zip",
|
107
|
+
}
|
108
|
+
|
109
|
+
##
|
110
|
+
# Loads Apache-compatible mime.types in +file+.
|
111
|
+
|
112
|
+
def load_mime_types(file)
|
113
|
+
# note: +file+ may be a "| command" for now; some people may
|
114
|
+
# rely on this, but currently we do not use this method by default.
|
115
|
+
open(file){ |io|
|
116
|
+
hash = Hash.new
|
117
|
+
io.each{ |line|
|
118
|
+
next if /^#/ =~ line
|
119
|
+
line.chomp!
|
120
|
+
mimetype, ext0 = line.split(/\s+/, 2)
|
121
|
+
next unless ext0
|
122
|
+
next if ext0.empty?
|
123
|
+
ext0.split(/\s+/).each{ |ext| hash[ext] = mimetype }
|
124
|
+
}
|
125
|
+
hash
|
126
|
+
}
|
127
|
+
end
|
128
|
+
module_function :load_mime_types
|
129
|
+
|
130
|
+
##
|
131
|
+
# Returns the mime type of +filename+ from the list in +mime_tab+. If no
|
132
|
+
# mime type was found application/octet-stream is returned.
|
133
|
+
|
134
|
+
def mime_type(filename, mime_tab)
|
135
|
+
suffix1 = (/\.(\w+)$/ =~ filename && $1.downcase)
|
136
|
+
suffix2 = (/\.(\w+)\.[\w\-]+$/ =~ filename && $1.downcase)
|
137
|
+
mime_tab[suffix1] || mime_tab[suffix2] || "application/octet-stream"
|
138
|
+
end
|
139
|
+
module_function :mime_type
|
140
|
+
|
141
|
+
##
|
142
|
+
# Parses an HTTP header +raw+ into a hash of header fields with an Array
|
143
|
+
# of values.
|
144
|
+
|
145
|
+
def parse_header(raw)
|
146
|
+
header = Hash.new([].freeze)
|
147
|
+
field = nil
|
148
|
+
raw.each_line{|line|
|
149
|
+
case line
|
150
|
+
when /^([A-Za-z0-9!\#$%&'*+\-.^_`|~]+):\s*(.*?)\s*\z/om
|
151
|
+
field, value = $1, $2
|
152
|
+
field.downcase!
|
153
|
+
header[field] = [] unless header.has_key?(field)
|
154
|
+
header[field] << value
|
155
|
+
when /^\s+(.*?)\s*\z/om
|
156
|
+
value = $1
|
157
|
+
unless field
|
158
|
+
raise HTTPStatus::BadRequest, "bad header '#{line}'."
|
159
|
+
end
|
160
|
+
header[field][-1] << " " << value
|
161
|
+
else
|
162
|
+
raise HTTPStatus::BadRequest, "bad header '#{line}'."
|
163
|
+
end
|
164
|
+
}
|
165
|
+
header.each{|key, values|
|
166
|
+
values.each(&:strip!)
|
167
|
+
}
|
168
|
+
header
|
169
|
+
end
|
170
|
+
module_function :parse_header
|
171
|
+
|
172
|
+
##
|
173
|
+
# Splits a header value +str+ according to HTTP specification.
|
174
|
+
|
175
|
+
def split_header_value(str)
|
176
|
+
str.scan(%r'\G((?:"(?:\\.|[^"])+?"|[^",]+)+)
|
177
|
+
(?:,\s*|\Z)'xn).flatten
|
178
|
+
end
|
179
|
+
module_function :split_header_value
|
180
|
+
|
181
|
+
##
|
182
|
+
# Parses a Range header value +ranges_specifier+
|
183
|
+
|
184
|
+
def parse_range_header(ranges_specifier)
|
185
|
+
if /^bytes=(.*)/ =~ ranges_specifier
|
186
|
+
byte_range_set = split_header_value($1)
|
187
|
+
byte_range_set.collect{|range_spec|
|
188
|
+
case range_spec
|
189
|
+
when /^(\d+)-(\d+)/ then $1.to_i .. $2.to_i
|
190
|
+
when /^(\d+)-/ then $1.to_i .. -1
|
191
|
+
when /^-(\d+)/ then -($1.to_i) .. -1
|
192
|
+
else return nil
|
193
|
+
end
|
194
|
+
}
|
195
|
+
end
|
196
|
+
end
|
197
|
+
module_function :parse_range_header
|
198
|
+
|
199
|
+
##
|
200
|
+
# Parses q values in +value+ as used in Accept headers.
|
201
|
+
|
202
|
+
def parse_qvalues(value)
|
203
|
+
tmp = []
|
204
|
+
if value
|
205
|
+
parts = value.split(/,\s*/)
|
206
|
+
parts.each {|part|
|
207
|
+
if m = %r{^([^\s,]+?)(?:;\s*q=(\d+(?:\.\d+)?))?$}.match(part)
|
208
|
+
val = m[1]
|
209
|
+
q = (m[2] or 1).to_f
|
210
|
+
tmp.push([val, q])
|
211
|
+
end
|
212
|
+
}
|
213
|
+
tmp = tmp.sort_by{|val, q| -q}
|
214
|
+
tmp.collect!{|val, q| val}
|
215
|
+
end
|
216
|
+
return tmp
|
217
|
+
end
|
218
|
+
module_function :parse_qvalues
|
219
|
+
|
220
|
+
##
|
221
|
+
# Removes quotes and escapes from +str+
|
222
|
+
|
223
|
+
def dequote(str)
|
224
|
+
ret = (/\A"(.*)"\Z/ =~ str) ? $1 : str.dup
|
225
|
+
ret.gsub!(/\\(.)/, "\\1")
|
226
|
+
ret
|
227
|
+
end
|
228
|
+
module_function :dequote
|
229
|
+
|
230
|
+
##
|
231
|
+
# Quotes and escapes quotes in +str+
|
232
|
+
|
233
|
+
def quote(str)
|
234
|
+
'"' << str.gsub(/[\\\"]/o, "\\\1") << '"'
|
235
|
+
end
|
236
|
+
module_function :quote
|
237
|
+
|
238
|
+
##
|
239
|
+
# Stores multipart form data. FormData objects are created when
|
240
|
+
# WEBrick::HTTPUtils.parse_form_data is called.
|
241
|
+
|
242
|
+
class FormData < String
|
243
|
+
EmptyRawHeader = [].freeze # :nodoc:
|
244
|
+
EmptyHeader = {}.freeze # :nodoc:
|
245
|
+
|
246
|
+
##
|
247
|
+
# The name of the form data part
|
248
|
+
|
249
|
+
attr_accessor :name
|
250
|
+
|
251
|
+
##
|
252
|
+
# The filename of the form data part
|
253
|
+
|
254
|
+
attr_accessor :filename
|
255
|
+
|
256
|
+
attr_accessor :next_data # :nodoc:
|
257
|
+
protected :next_data
|
258
|
+
|
259
|
+
##
|
260
|
+
# Creates a new FormData object.
|
261
|
+
#
|
262
|
+
# +args+ is an Array of form data entries. One FormData will be created
|
263
|
+
# for each entry.
|
264
|
+
#
|
265
|
+
# This is called by WEBrick::HTTPUtils.parse_form_data for you
|
266
|
+
|
267
|
+
def initialize(*args)
|
268
|
+
@name = @filename = @next_data = nil
|
269
|
+
if args.empty?
|
270
|
+
@raw_header = []
|
271
|
+
@header = nil
|
272
|
+
super("")
|
273
|
+
else
|
274
|
+
@raw_header = EmptyRawHeader
|
275
|
+
@header = EmptyHeader
|
276
|
+
super(args.shift)
|
277
|
+
unless args.empty?
|
278
|
+
@next_data = self.class.new(*args)
|
279
|
+
end
|
280
|
+
end
|
281
|
+
end
|
282
|
+
|
283
|
+
##
|
284
|
+
# Retrieves the header at the first entry in +key+
|
285
|
+
|
286
|
+
def [](*key)
|
287
|
+
begin
|
288
|
+
@header[key[0].downcase].join(", ")
|
289
|
+
rescue StandardError, NameError
|
290
|
+
super
|
291
|
+
end
|
292
|
+
end
|
293
|
+
|
294
|
+
##
|
295
|
+
# Adds +str+ to this FormData which may be the body, a header or a
|
296
|
+
# header entry.
|
297
|
+
#
|
298
|
+
# This is called by WEBrick::HTTPUtils.parse_form_data for you
|
299
|
+
|
300
|
+
def <<(str)
|
301
|
+
if @header
|
302
|
+
super
|
303
|
+
elsif str == CRLF
|
304
|
+
@header = HTTPUtils::parse_header(@raw_header.join)
|
305
|
+
if cd = self['content-disposition']
|
306
|
+
if /\s+name="(.*?)"/ =~ cd then @name = $1 end
|
307
|
+
if /\s+filename="(.*?)"/ =~ cd then @filename = $1 end
|
308
|
+
end
|
309
|
+
else
|
310
|
+
@raw_header << str
|
311
|
+
end
|
312
|
+
self
|
313
|
+
end
|
314
|
+
|
315
|
+
##
|
316
|
+
# Adds +data+ at the end of the chain of entries
|
317
|
+
#
|
318
|
+
# This is called by WEBrick::HTTPUtils.parse_form_data for you.
|
319
|
+
|
320
|
+
def append_data(data)
|
321
|
+
tmp = self
|
322
|
+
while tmp
|
323
|
+
unless tmp.next_data
|
324
|
+
tmp.next_data = data
|
325
|
+
break
|
326
|
+
end
|
327
|
+
tmp = tmp.next_data
|
328
|
+
end
|
329
|
+
self
|
330
|
+
end
|
331
|
+
|
332
|
+
##
|
333
|
+
# Yields each entry in this FormData
|
334
|
+
|
335
|
+
def each_data
|
336
|
+
tmp = self
|
337
|
+
while tmp
|
338
|
+
next_data = tmp.next_data
|
339
|
+
yield(tmp)
|
340
|
+
tmp = next_data
|
341
|
+
end
|
342
|
+
end
|
343
|
+
|
344
|
+
##
|
345
|
+
# Returns all the FormData as an Array
|
346
|
+
|
347
|
+
def list
|
348
|
+
ret = []
|
349
|
+
each_data{|data|
|
350
|
+
ret << data.to_s
|
351
|
+
}
|
352
|
+
ret
|
353
|
+
end
|
354
|
+
|
355
|
+
##
|
356
|
+
# A FormData will behave like an Array
|
357
|
+
|
358
|
+
alias :to_ary :list
|
359
|
+
|
360
|
+
##
|
361
|
+
# This FormData's body
|
362
|
+
|
363
|
+
def to_s
|
364
|
+
String.new(self)
|
365
|
+
end
|
366
|
+
end
|
367
|
+
|
368
|
+
##
|
369
|
+
# Parses the query component of a URI in +str+
|
370
|
+
|
371
|
+
def parse_query(str)
|
372
|
+
query = Hash.new
|
373
|
+
if str
|
374
|
+
str.split(/[&;]/).each{|x|
|
375
|
+
next if x.empty?
|
376
|
+
key, val = x.split(/=/,2)
|
377
|
+
key = unescape_form(key)
|
378
|
+
val = unescape_form(val.to_s)
|
379
|
+
val = FormData.new(val)
|
380
|
+
val.name = key
|
381
|
+
if query.has_key?(key)
|
382
|
+
query[key].append_data(val)
|
383
|
+
next
|
384
|
+
end
|
385
|
+
query[key] = val
|
386
|
+
}
|
387
|
+
end
|
388
|
+
query
|
389
|
+
end
|
390
|
+
module_function :parse_query
|
391
|
+
|
392
|
+
##
|
393
|
+
# Parses form data in +io+ with the given +boundary+
|
394
|
+
|
395
|
+
def parse_form_data(io, boundary)
|
396
|
+
boundary_regexp = /\A--#{Regexp.quote(boundary)}(--)?#{CRLF}\z/
|
397
|
+
form_data = Hash.new
|
398
|
+
return form_data unless io
|
399
|
+
data = nil
|
400
|
+
io.each_line{|line|
|
401
|
+
if boundary_regexp =~ line
|
402
|
+
if data
|
403
|
+
data.chop!
|
404
|
+
key = data.name
|
405
|
+
if form_data.has_key?(key)
|
406
|
+
form_data[key].append_data(data)
|
407
|
+
else
|
408
|
+
form_data[key] = data
|
409
|
+
end
|
410
|
+
end
|
411
|
+
data = FormData.new
|
412
|
+
next
|
413
|
+
else
|
414
|
+
if data
|
415
|
+
data << line
|
416
|
+
end
|
417
|
+
end
|
418
|
+
}
|
419
|
+
return form_data
|
420
|
+
end
|
421
|
+
module_function :parse_form_data
|
422
|
+
|
423
|
+
#####
|
424
|
+
|
425
|
+
reserved = ';/?:@&=+$,'
|
426
|
+
num = '0123456789'
|
427
|
+
lowalpha = 'abcdefghijklmnopqrstuvwxyz'
|
428
|
+
upalpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
429
|
+
mark = '-_.!~*\'()'
|
430
|
+
unreserved = num + lowalpha + upalpha + mark
|
431
|
+
control = (0x0..0x1f).collect{|c| c.chr }.join + "\x7f"
|
432
|
+
space = " "
|
433
|
+
delims = '<>#%"'
|
434
|
+
unwise = '{}|\\^[]`'
|
435
|
+
nonascii = (0x80..0xff).collect{|c| c.chr }.join
|
436
|
+
|
437
|
+
module_function
|
438
|
+
|
439
|
+
# :stopdoc:
|
440
|
+
|
441
|
+
def _make_regex(str) /([#{Regexp.escape(str)}])/n end
|
442
|
+
def _make_regex!(str) /([^#{Regexp.escape(str)}])/n end
|
443
|
+
def _escape(str, regex)
|
444
|
+
str = str.b
|
445
|
+
str.gsub!(regex) {"%%%02X" % $1.ord}
|
446
|
+
# %-escaped string should contain US-ASCII only
|
447
|
+
str.force_encoding(Encoding::US_ASCII)
|
448
|
+
end
|
449
|
+
def _unescape(str, regex)
|
450
|
+
str = str.b
|
451
|
+
str.gsub!(regex) {$1.hex.chr}
|
452
|
+
# encoding of %-unescaped string is unknown
|
453
|
+
str
|
454
|
+
end
|
455
|
+
|
456
|
+
UNESCAPED = _make_regex(control+space+delims+unwise+nonascii)
|
457
|
+
UNESCAPED_FORM = _make_regex(reserved+control+delims+unwise+nonascii)
|
458
|
+
NONASCII = _make_regex(nonascii)
|
459
|
+
ESCAPED = /%([0-9a-fA-F]{2})/
|
460
|
+
UNESCAPED_PCHAR = _make_regex!(unreserved+":@&=+$,")
|
461
|
+
|
462
|
+
# :startdoc:
|
463
|
+
|
464
|
+
##
|
465
|
+
# Escapes HTTP reserved and unwise characters in +str+
|
466
|
+
|
467
|
+
def escape(str)
|
468
|
+
_escape(str, UNESCAPED)
|
469
|
+
end
|
470
|
+
|
471
|
+
##
|
472
|
+
# Unescapes HTTP reserved and unwise characters in +str+
|
473
|
+
|
474
|
+
def unescape(str)
|
475
|
+
_unescape(str, ESCAPED)
|
476
|
+
end
|
477
|
+
|
478
|
+
##
|
479
|
+
# Escapes form reserved characters in +str+
|
480
|
+
|
481
|
+
def escape_form(str)
|
482
|
+
ret = _escape(str, UNESCAPED_FORM)
|
483
|
+
ret.gsub!(/ /, "+")
|
484
|
+
ret
|
485
|
+
end
|
486
|
+
|
487
|
+
##
|
488
|
+
# Unescapes form reserved characters in +str+
|
489
|
+
|
490
|
+
def unescape_form(str)
|
491
|
+
_unescape(str.gsub(/\+/, " "), ESCAPED)
|
492
|
+
end
|
493
|
+
|
494
|
+
##
|
495
|
+
# Escapes path +str+
|
496
|
+
|
497
|
+
def escape_path(str)
|
498
|
+
result = ""
|
499
|
+
str.scan(%r{/([^/]*)}).each{|i|
|
500
|
+
result << "/" << _escape(i[0], UNESCAPED_PCHAR)
|
501
|
+
}
|
502
|
+
return result
|
503
|
+
end
|
504
|
+
|
505
|
+
##
|
506
|
+
# Escapes 8 bit characters in +str+
|
507
|
+
|
508
|
+
def escape8bit(str)
|
509
|
+
_escape(str, NONASCII)
|
510
|
+
end
|
511
|
+
end
|
512
|
+
end
|
@@ -1,9 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
require 'rack'
|
3
|
-
require 'webrick/httputils'
|
4
2
|
|
5
3
|
module YARD
|
6
4
|
module Server
|
5
|
+
begin
|
6
|
+
require 'rackup'
|
7
|
+
# @private
|
8
|
+
RackServer = Rackup::Server
|
9
|
+
rescue LoadError
|
10
|
+
require 'rack'
|
11
|
+
# @private
|
12
|
+
RackServer = Rack::Server
|
13
|
+
end
|
14
|
+
|
7
15
|
# This class wraps the {RackAdapter} into a Rack-compatible middleware.
|
8
16
|
# See {#initialize} for a list of options to pass via Rack's +#use+ method.
|
9
17
|
#
|
@@ -42,7 +50,7 @@ module YARD
|
|
42
50
|
|
43
51
|
# A server adapter to respond to requests using the Rack server infrastructure.
|
44
52
|
class RackAdapter < Adapter
|
45
|
-
include
|
53
|
+
include YARD::Server::HTTPUtils
|
46
54
|
|
47
55
|
# Responds to Rack requests and builds a response with the {Router}.
|
48
56
|
# @return [Array(Numeric,Hash,Array)] the Rack-style response
|
@@ -56,11 +64,11 @@ module YARD
|
|
56
64
|
[ex.message + "\n" + ex.backtrace.join("\n")]]
|
57
65
|
end
|
58
66
|
|
59
|
-
# Starts the
|
67
|
+
# Starts the Rack server. This method will pass control to the server and
|
60
68
|
# block.
|
61
69
|
# @return [void]
|
62
70
|
def start
|
63
|
-
server =
|
71
|
+
server = RackServer.new(server_options)
|
64
72
|
server.instance_variable_set("@app", self)
|
65
73
|
print_start_message(server)
|
66
74
|
server.start
|
@@ -74,6 +74,13 @@ module YARD
|
|
74
74
|
def after_parse; end
|
75
75
|
|
76
76
|
protected :parser
|
77
|
+
|
78
|
+
protected
|
79
|
+
|
80
|
+
def inside_directive?
|
81
|
+
return true if parser.state.inside_directive
|
82
|
+
parser.directives.any? { |d| d.is_a?(MethodDirective) && d.tag.text.empty? }
|
83
|
+
end
|
77
84
|
end
|
78
85
|
|
79
86
|
# Ends a group listing definition. Group definition automatically end
|
@@ -574,6 +581,8 @@ module YARD
|
|
574
581
|
if %w(class instance module).include?(tag.text)
|
575
582
|
if object.is_a?(CodeObjects::MethodObject)
|
576
583
|
object.scope = tag.text.to_sym
|
584
|
+
elsif handler && !inside_directive?
|
585
|
+
handler.scope = tag.text.to_sym
|
577
586
|
else
|
578
587
|
parser.state.scope = tag.text.to_sym
|
579
588
|
end
|
@@ -604,7 +613,7 @@ module YARD
|
|
604
613
|
if %w(public protected private).include?(tag.text)
|
605
614
|
if object.is_a?(CodeObjects::Base)
|
606
615
|
object.visibility = tag.text.to_sym
|
607
|
-
elsif handler && !
|
616
|
+
elsif handler && !inside_directive?
|
608
617
|
handler.visibility = tag.text.to_sym
|
609
618
|
else
|
610
619
|
parser.state.visibility = tag.text.to_sym
|
@@ -58,10 +58,10 @@ module YARD
|
|
58
58
|
end
|
59
59
|
|
60
60
|
# Provides a plain English summary of the type specification, or nil
|
61
|
-
# if no types are provided or
|
61
|
+
# if no types are provided or parsable.
|
62
62
|
#
|
63
63
|
# @return [String] a plain English description of the associated types
|
64
|
-
# @return [nil] if no types are provided or not
|
64
|
+
# @return [nil] if no types are provided or not parsable
|
65
65
|
def explain_types
|
66
66
|
return nil if !types || types.empty?
|
67
67
|
TypesExplainer.explain(*types)
|
@@ -78,9 +78,10 @@ module YARD
|
|
78
78
|
def html_markup_markdown(text)
|
79
79
|
# TODO: other libraries might be more complex
|
80
80
|
provider = markup_class(:markdown)
|
81
|
-
|
81
|
+
case provider.to_s
|
82
|
+
when 'RDiscount'
|
82
83
|
provider.new(text, :autolink).to_html
|
83
|
-
|
84
|
+
when 'RedcarpetCompat'
|
84
85
|
provider.new(text, :autolink,
|
85
86
|
:fenced_code,
|
86
87
|
:gh_blockcode,
|
@@ -88,6 +89,8 @@ module YARD
|
|
88
89
|
:tables,
|
89
90
|
:with_toc_data,
|
90
91
|
:no_intraemphasis).to_html
|
92
|
+
when 'CommonMarker'
|
93
|
+
CommonMarker.render_html(text, %i[DEFAULT GITHUB_PRE_LANG], %i[autolink table])
|
91
94
|
else
|
92
95
|
provider.new(text).to_html
|
93
96
|
end
|
@@ -29,7 +29,8 @@ module YARD
|
|
29
29
|
{:lib => :bluecloth, :const => 'BlueCloth'},
|
30
30
|
{:lib => :maruku, :const => 'Maruku'},
|
31
31
|
{:lib => :'rpeg-markdown', :const => 'PEGMarkdown'},
|
32
|
-
{:lib => :rdoc, :const => 'YARD::Templates::Helpers::Markup::RDocMarkdown'}
|
32
|
+
{:lib => :rdoc, :const => 'YARD::Templates::Helpers::Markup::RDocMarkdown'},
|
33
|
+
{:lib => :commonmarker, :const => 'CommonMarker'}
|
33
34
|
],
|
34
35
|
:textile => [
|
35
36
|
{:lib => :redcloth, :const => 'RedCloth'}
|
@@ -66,7 +66,9 @@ module YARD
|
|
66
66
|
|
67
67
|
# @return [String] formats source code of a constant value
|
68
68
|
def format_constant(value)
|
69
|
-
|
69
|
+
# last can return nil, so default to empty string
|
70
|
+
sp = value.split("\n").last || ""
|
71
|
+
sp = sp[/^(\s+)/, 1]
|
70
72
|
num = sp ? sp.size : 0
|
71
73
|
html_syntax_highlight value.gsub(/^\s{#{num}}/, '')
|
72
74
|
end
|