honeybadger 5.3.0 → 5.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/honeybadger/plugins/active_job.rb +28 -0
- data/lib/honeybadger/version.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/cucumber-9.1.0/lib/cucumber/deprecate.rb +14 -0
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/ast_lookup.rb +14 -6
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/console.rb +7 -2
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/json.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/message_builder.rb +14 -5
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/pretty.rb +6 -2
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/glue/proto_world.rb +17 -22
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/glue/registry_and_more.rb +7 -4
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/rake/task.rb +1 -5
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/runtime/for_programming_languages.rb +1 -2
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/runtime/meta_message_builder.rb +2 -2
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/runtime/user_interface.rb +2 -2
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/event.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-cucumber-expressions-17.0.1}/lib/cucumber/cucumber_expressions/argument.rb +7 -3
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-cucumber-expressions-17.0.1}/lib/cucumber/cucumber_expressions/ast.rb +24 -59
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-cucumber-expressions-17.0.1}/lib/cucumber/cucumber_expressions/combinatorial_generated_expression_factory.rb +6 -13
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-cucumber-expressions-17.0.1}/lib/cucumber/cucumber_expressions/cucumber_expression.rb +9 -11
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-cucumber-expressions-17.0.1}/lib/cucumber/cucumber_expressions/cucumber_expression_generator.rb +11 -15
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-cucumber-expressions-17.0.1}/lib/cucumber/cucumber_expressions/cucumber_expression_parser.rb +37 -53
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-cucumber-expressions-17.0.1}/lib/cucumber/cucumber_expressions/cucumber_expression_tokenizer.rb +13 -18
- data/vendor/bundle/ruby/3.2.0/gems/cucumber-cucumber-expressions-17.0.1/lib/cucumber/cucumber_expressions/errors.rb +232 -0
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-cucumber-expressions-17.0.1}/lib/cucumber/cucumber_expressions/expression_factory.rb +2 -0
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-cucumber-expressions-17.0.1}/lib/cucumber/cucumber_expressions/generated_expression.rb +2 -0
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-cucumber-expressions-17.0.1}/lib/cucumber/cucumber_expressions/group.rb +2 -0
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-cucumber-expressions-17.0.1}/lib/cucumber/cucumber_expressions/group_builder.rb +3 -1
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-cucumber-expressions-17.0.1}/lib/cucumber/cucumber_expressions/parameter_type.rb +13 -23
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-cucumber-expressions-17.0.1}/lib/cucumber/cucumber_expressions/parameter_type_matcher.rb +8 -6
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-cucumber-expressions-17.0.1}/lib/cucumber/cucumber_expressions/parameter_type_registry.rb +27 -22
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-cucumber-expressions-17.0.1}/lib/cucumber/cucumber_expressions/regular_expression.rb +3 -2
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-cucumber-expressions-17.0.1}/lib/cucumber/cucumber_expressions/tree_regexp.rb +8 -7
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-cucumber-expressions-17.0.1}/spec/cucumber/cucumber_expressions/argument_spec.rb +4 -2
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-cucumber-expressions-17.0.1}/spec/cucumber/cucumber_expressions/combinatorial_generated_expression_factory_test.rb +8 -7
- data/vendor/bundle/ruby/3.2.0/gems/cucumber-cucumber-expressions-17.0.1/spec/cucumber/cucumber_expressions/cucumber_expression_generator_spec.rb +234 -0
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-cucumber-expressions-17.0.1}/spec/cucumber/cucumber_expressions/cucumber_expression_parser_spec.rb +2 -0
- data/vendor/bundle/ruby/3.2.0/gems/cucumber-cucumber-expressions-17.0.1/spec/cucumber/cucumber_expressions/cucumber_expression_spec.rb +178 -0
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-cucumber-expressions-17.0.1}/spec/cucumber/cucumber_expressions/cucumber_expression_tokenizer_spec.rb +3 -1
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-cucumber-expressions-17.0.1}/spec/cucumber/cucumber_expressions/cucumber_expression_transformation_spec.rb +2 -0
- data/vendor/bundle/ruby/3.2.0/gems/cucumber-cucumber-expressions-17.0.1/spec/cucumber/cucumber_expressions/custom_parameter_type_spec.rb +216 -0
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-cucumber-expressions-17.0.1}/spec/cucumber/cucumber_expressions/expression_factory_spec.rb +2 -0
- data/vendor/bundle/ruby/3.2.0/gems/cucumber-cucumber-expressions-17.0.1/spec/cucumber/cucumber_expressions/parameter_type_registry_spec.rb +81 -0
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-cucumber-expressions-17.0.1}/spec/cucumber/cucumber_expressions/parameter_type_spec.rb +5 -2
- data/vendor/bundle/ruby/3.2.0/gems/cucumber-cucumber-expressions-17.0.1/spec/cucumber/cucumber_expressions/regular_expression_spec.rb +93 -0
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-cucumber-expressions-17.0.1}/spec/cucumber/cucumber_expressions/tree_regexp_spec.rb +23 -22
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-messages-21.0.1 → cucumber-messages-22.0.0}/lib/cucumber/messages.deserializers.rb +1 -0
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-messages-21.0.1 → cucumber-messages-22.0.0}/lib/cucumber/messages.dtos.rb +5 -1
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-tag-expressions-4.1.0 → cucumber-tag-expressions-5.0.6}/lib/cucumber/tag_expressions/expressions.rb +21 -2
- data/vendor/bundle/ruby/3.2.0/gems/{cucumber-tag-expressions-4.1.0 → cucumber-tag-expressions-5.0.6}/lib/cucumber/tag_expressions/parser.rb +48 -48
- data/vendor/bundle/ruby/3.2.0/gems/cucumber-tag-expressions-5.0.6/spec/errors_spec.rb +13 -0
- data/vendor/bundle/ruby/3.2.0/gems/cucumber-tag-expressions-5.0.6/spec/evaluations_spec.rb +17 -0
- data/vendor/bundle/ruby/3.2.0/gems/cucumber-tag-expressions-5.0.6/spec/parsing_spec.rb +14 -0
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/device/date_rolling_log_file.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/device/log_file.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/device/multi.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/device/null.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/device/rolling_log_file.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/device/size_rolling_log_file.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/device/writer.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/device.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/formatter/date_time_formatter.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/formatter/exception_formatter.rb +2 -2
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/formatter/id_formatter.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/formatter/inspect_formatter.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/formatter/object_formatter.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/formatter/pretty_print_formatter.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/formatter/string_formatter.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/formatter/strip_formatter.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/formatter/structured_formatter.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/formatter/truncate_formatter.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/formatter.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/log_entry.rb +2 -2
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/logger.rb +10 -6
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/rack/context.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/rack/request_id.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/rack/unit_of_work.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/rack.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/severity.rb +13 -1
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/template.rb +2 -2
- data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack.rb +2 -1
- data/vendor/bundle/ruby/3.2.0/gems/{public_suffix-5.0.3 → public_suffix-5.0.4}/lib/public_suffix/version.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/application.rb +26 -2
- data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/dsl_definition.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/file_task.rb +8 -4
- data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/file_utils.rb +0 -2
- data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/packagetask.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/task.rb +2 -2
- data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/thread_pool.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/version.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/alias.rb +111 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/anon_class.rb +10 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/any_method.rb +379 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/attr.rb +175 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/class_module.rb +801 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/code_object.rb +421 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/code_objects.rb +5 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/comment.rb +229 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/constant.rb +186 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/context/section.rb +233 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/context.rb +1264 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/cross_reference.rb +225 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/encoding.rb +131 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/erb_partial.rb +18 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/erbio.rb +37 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/extend.rb +9 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/generator/darkfish.rb +786 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/generator/json_index.rb +300 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/generator/markup.rb +159 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/generator/pot/message_extractor.rb +68 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/generator/pot/po.rb +84 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/generator/pot/po_entry.rb +141 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/generator/pot.rb +98 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/generator/ri.rb +30 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/generator.rb +51 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/ghost_method.rb +6 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/i18n/locale.rb +102 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/i18n/text.rb +126 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/i18n.rb +10 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/include.rb +9 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/known_classes.rb +74 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markdown/entities.rb +2131 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markdown/literals.rb +474 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markdown.rb +16783 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/attr_changer.rb +22 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/attr_span.rb +35 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/attribute_manager.rb +402 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/attributes.rb +70 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/blank_line.rb +27 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/block_quote.rb +14 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/document.rb +164 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/formatter.rb +265 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/hard_break.rb +31 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/heading.rb +78 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/include.rb +42 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/indented_paragraph.rb +47 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/list.rb +101 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/list_item.rb +99 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/paragraph.rb +28 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/parser.rb +581 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/pre_process.rb +298 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/raw.rb +69 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/regexp_handling.rb +40 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/rule.rb +20 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/table.rb +47 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/to_ansi.rb +93 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/to_bs.rb +77 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/to_html.rb +449 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/to_html_crossref.rb +175 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/to_html_snippet.rb +284 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/to_joined_paragraph.rb +46 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/to_label.rb +74 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/to_markdown.rb +191 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/to_rdoc.rb +344 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/to_table_of_contents.rb +88 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/to_test.rb +69 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/to_tt_only.rb +120 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup/verbatim.rb +83 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/markup.rb +235 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/meta_method.rb +6 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/method_attr.rb +418 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/mixin.rb +120 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/normal_class.rb +92 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/normal_module.rb +73 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/options.rb +1330 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/parser/c.rb +1225 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/parser/changelog.rb +334 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/parser/markdown.rb +22 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/parser/rd.rb +22 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/parser/ripper_state_lex.rb +590 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/parser/ruby.rb +2360 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/parser/ruby_tools.rb +165 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/parser/simple.rb +61 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/parser/text.rb +11 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/parser.rb +294 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/rd/block_parser.rb +1710 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/rd/inline.rb +71 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/rd/inline_parser.rb +1210 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/rd.rb +99 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/rdoc.rb +563 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/require.rb +51 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/ri/driver.rb +1513 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/ri/formatter.rb +6 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/ri/paths.rb +171 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/ri/store.rb +6 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/ri/task.rb +71 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/ri.rb +20 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/rubygems_hook.rb +248 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/servlet.rb +451 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/single_class.rb +30 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/stats/normal.rb +58 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/stats/quiet.rb +59 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/stats/verbose.rb +44 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/stats.rb +461 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/store.rb +979 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/task.rb +355 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/text.rb +312 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/token_stream.rb +118 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/tom_doc.rb +263 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/top_level.rb +288 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/version.rb +10 -0
- data/vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc.rb +201 -0
- data/vendor/bundle/ruby/3.2.0/gems/sshkit-1.21.6/lib/sshkit/version.rb +3 -0
- data/vendor/bundle/ruby/3.2.0/gems/stringio-3.1.0/ext/stringio/extconf.rb +7 -0
- metadata +478 -386
- data/vendor/bundle/ruby/3.2.0/gems/cucumber-9.0.2/lib/cucumber/deprecate.rb +0 -55
- data/vendor/bundle/ruby/3.2.0/gems/cucumber-cucumber-expressions-16.1.2/lib/cucumber/cucumber_expressions/errors.rb +0 -214
- data/vendor/bundle/ruby/3.2.0/gems/cucumber-cucumber-expressions-16.1.2/spec/cucumber/cucumber_expressions/cucumber_expression_generator_spec.rb +0 -231
- data/vendor/bundle/ruby/3.2.0/gems/cucumber-cucumber-expressions-16.1.2/spec/cucumber/cucumber_expressions/cucumber_expression_spec.rb +0 -181
- data/vendor/bundle/ruby/3.2.0/gems/cucumber-cucumber-expressions-16.1.2/spec/cucumber/cucumber_expressions/custom_parameter_type_spec.rb +0 -197
- data/vendor/bundle/ruby/3.2.0/gems/cucumber-cucumber-expressions-16.1.2/spec/cucumber/cucumber_expressions/parameter_type_registry_spec.rb +0 -86
- data/vendor/bundle/ruby/3.2.0/gems/cucumber-cucumber-expressions-16.1.2/spec/cucumber/cucumber_expressions/regular_expression_spec.rb +0 -84
- data/vendor/bundle/ruby/3.2.0/gems/cucumber-messages-21.0.1/spec/capture_warnings.rb +0 -74
- data/vendor/bundle/ruby/3.2.0/gems/cucumber-tag-expressions-4.1.0/spec/capture_warnings.rb +0 -74
- data/vendor/bundle/ruby/3.2.0/gems/cucumber-tag-expressions-4.1.0/spec/expressions_spec.rb +0 -84
- data/vendor/bundle/ruby/3.2.0/gems/cucumber-tag-expressions-4.1.0/spec/parser_spec.rb +0 -50
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-5.0.3/test/acceptance_test.rb +0 -131
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-5.0.3/test/benchmarks/bm_find.rb +0 -66
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-5.0.3/test/benchmarks/bm_find_all.rb +0 -102
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-5.0.3/test/benchmarks/bm_names.rb +0 -91
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-5.0.3/test/benchmarks/bm_select.rb +0 -26
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-5.0.3/test/benchmarks/bm_select_incremental.rb +0 -25
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-5.0.3/test/benchmarks/bm_valid.rb +0 -101
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-5.0.3/test/profilers/domain_profiler.rb +0 -12
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-5.0.3/test/profilers/find_profiler.rb +0 -12
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-5.0.3/test/profilers/find_profiler_jp.rb +0 -12
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-5.0.3/test/profilers/initialization_profiler.rb +0 -11
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-5.0.3/test/profilers/list_profsize.rb +0 -11
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-5.0.3/test/profilers/object_binsize.rb +0 -57
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-5.0.3/test/psl_test.rb +0 -52
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-5.0.3/test/test_helper.rb +0 -10
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-5.0.3/test/unit/domain_test.rb +0 -106
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-5.0.3/test/unit/errors_test.rb +0 -25
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-5.0.3/test/unit/list_test.rb +0 -241
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-5.0.3/test/unit/public_suffix_test.rb +0 -188
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-5.0.3/test/unit/rule_test.rb +0 -222
- data/vendor/bundle/ruby/3.2.0/gems/sshkit-1.21.5/lib/sshkit/version.rb +0 -3
- data/vendor/bundle/ruby/3.2.0/gems/stringio-3.0.8/ext/stringio/extconf.rb +0 -3
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/autotest/cucumber.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/autotest/cucumber_mixin.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/autotest/cucumber_rails.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/autotest/cucumber_rails_rspec.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/autotest/cucumber_rails_rspec2.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/autotest/cucumber_rspec.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/autotest/cucumber_rspec2.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/autotest/discover.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/cli/configuration.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/cli/main.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/cli/options.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/cli/profile_loader.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/cli/rerun_file.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/configuration.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/constantize.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/encoding.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/errors.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/events/envelope.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/events/gherkin_source_parsed.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/events/gherkin_source_read.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/events/hook_test_step_created.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/events/step_activated.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/events/step_definition_registered.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/events/test_case_created.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/events/test_case_finished.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/events/test_case_ready.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/events/test_case_started.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/events/test_run_finished.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/events/test_run_started.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/events/test_step_created.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/events/test_step_finished.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/events/test_step_started.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/events/undefined_parameter_type.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/events.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/file_specs.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/filters/activate_steps.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/filters/apply_after_hooks.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/filters/apply_after_step_hooks.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/filters/apply_around_hooks.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/filters/apply_before_hooks.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/filters/broadcast_test_case_ready_event.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/filters/broadcast_test_run_started_event.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/filters/gated_receiver.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/filters/prepare_world.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/filters/quit.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/filters/randomizer.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/filters/retry.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/filters/tag_limits/test_case_index.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/filters/tag_limits/verifier.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/filters/tag_limits.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/filters.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/ansicolor.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/backtrace_filter.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/console_counts.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/console_issues.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/duration.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/duration_extractor.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/errors.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/fail_fast.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/fanout.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/html.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/http_io.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/ignore_missing_messages.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/interceptor.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/io.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/junit.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/message.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/progress.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/publish_banner_printer.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/query/hook_by_test_step.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/query/pickle_by_test.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/query/pickle_step_by_test_step.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/query/step_definitions_by_test_step.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/query/test_case_started_by_test_case.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/rerun.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/stepdefs.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/steps.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/summary.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/unicode.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/url_reporter.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/formatter/usage.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/gherkin/data_table_parser.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/gherkin/formatter/ansi_escapes.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/gherkin/formatter/escaping.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/gherkin/i18n.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/gherkin/steps_parser.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/glue/dsl.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/glue/hook.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/glue/invoke_in_world.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/glue/registry_wrapper.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/glue/snippet.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/glue/step_definition.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/glue/world_factory.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/hooks.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/load_path.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/multiline_argument/data_table/diff_matrices.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/multiline_argument/data_table.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/multiline_argument/doc_string.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/multiline_argument.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/platform.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/project_initializer.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/rspec/disable_option_parser.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/rspec/doubles.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/running_test_case.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/runtime/after_hooks.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/runtime/before_hooks.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/runtime/step_hooks.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/runtime/support_code.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/runtime.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/step_definition_light.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/step_definitions.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/step_match.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/step_match_search.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/term/ansicolor.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/term/banner.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber/unit.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/cucumber.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-9.0.2 → cucumber-9.1.0}/lib/simplecov_setup.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/compiler.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/event_bus.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/events.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/filter.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/gherkin/document.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/gherkin/parser.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/gherkin/writer/helpers.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/gherkin/writer.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/platform.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/report/summary.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/test/action.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/test/around_hook.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/test/case.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/test/data_table.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/test/doc_string.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/test/empty_multiline_argument.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/test/filters/activate_steps_for_self_test.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/test/filters/locations_filter.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/test/filters/name_filter.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/test/filters/tag_filter.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/test/filters.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/test/location.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/test/result.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/test/runner.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/test/step.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/test/tag.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core/test/timer.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-core-11.1.0 → cucumber-core-12.0.0}/lib/cucumber/core.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-messages-21.0.1 → cucumber-messages-22.0.0}/lib/cucumber/messages/id_generator.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-messages-21.0.1 → cucumber-messages-22.0.0}/lib/cucumber/messages/message/deserialization.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-messages-21.0.1 → cucumber-messages-22.0.0}/lib/cucumber/messages/message/serialization.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-messages-21.0.1 → cucumber-messages-22.0.0}/lib/cucumber/messages/message/utils.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-messages-21.0.1 → cucumber-messages-22.0.0}/lib/cucumber/messages/message.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-messages-21.0.1 → cucumber-messages-22.0.0}/lib/cucumber/messages/ndjson_to_message_enumerator.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-messages-21.0.1 → cucumber-messages-22.0.0}/lib/cucumber/messages/time_conversion.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-messages-21.0.1 → cucumber-messages-22.0.0}/lib/cucumber/messages.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-cucumber-expressions-16.1.2 → cucumber-messages-22.0.0}/spec/capture_warnings.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-messages-21.0.1 → cucumber-messages-22.0.0}/spec/cucumber/messages/acceptance_spec.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-messages-21.0.1 → cucumber-messages-22.0.0}/spec/cucumber/messages/id_generator_spec.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-messages-21.0.1 → cucumber-messages-22.0.0}/spec/cucumber/messages/message/deserialization_spec.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-messages-21.0.1 → cucumber-messages-22.0.0}/spec/cucumber/messages/message/dummy_messages.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-messages-21.0.1 → cucumber-messages-22.0.0}/spec/cucumber/messages/message/serialization_spec.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-messages-21.0.1 → cucumber-messages-22.0.0}/spec/cucumber/messages/message/utils_spec.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-messages-21.0.1 → cucumber-messages-22.0.0}/spec/cucumber/messages/ndjson_serialization_spec.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-messages-21.0.1 → cucumber-messages-22.0.0}/spec/cucumber/messages/time_conversion_spec.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-messages-21.0.1 → cucumber-messages-22.0.0}/spec/cucumber/messages/version_spec.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{cucumber-tag-expressions-4.1.0 → cucumber-tag-expressions-5.0.6}/lib/cucumber/tag_expressions.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/context.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/tag_formatter.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/tagged_logger_support.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/tagged_logging.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{lumberjack-1.2.9 → lumberjack-1.2.10}/lib/lumberjack/tags.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{public_suffix-5.0.3 → public_suffix-5.0.4}/lib/public_suffix/domain.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{public_suffix-5.0.3 → public_suffix-5.0.4}/lib/public_suffix/errors.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{public_suffix-5.0.3 → public_suffix-5.0.4}/lib/public_suffix/list.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{public_suffix-5.0.3 → public_suffix-5.0.4}/lib/public_suffix/rule.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{public_suffix-5.0.3 → public_suffix-5.0.4}/lib/public_suffix.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/doc/jamis.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/backtrace.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/clean.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/cloneable.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/cpu_counter.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/default_loader.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/early_time.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/ext/core.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/ext/string.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/file_creation_task.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/file_list.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/file_utils_ext.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/invocation_chain.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/invocation_exception_mixin.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/late_time.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/linked_list.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/loaders/makefile.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/multi_task.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/name_space.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/phony.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/private_reader.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/promise.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/pseudo_status.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/rake_module.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/rake_test_loader.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/rule_recursion_overflow_error.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/scope.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/task_argument_error.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/task_arguments.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/task_manager.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/tasklib.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/testtask.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/thread_history_display.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/trace_output.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake/win32.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{rake-13.0.6 → rake-13.1.0}/lib/rake.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/examples/simple_connection.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/core_ext/array.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/core_ext/hash.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/all.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/backends/abstract.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/backends/connection_pool/cache.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/backends/connection_pool/nil_cache.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/backends/connection_pool.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/backends/local.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/backends/netssh/known_hosts.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/backends/netssh.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/backends/printer.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/backends/skipper.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/color.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/command.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/command_map.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/configuration.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/coordinator.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/deprecation_logger.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/dsl.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/exception.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/formatters/abstract.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/formatters/black_hole.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/formatters/dot.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/formatters/pretty.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/formatters/simple_text.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/host.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/log_message.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/logger.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/mapping_interaction_handler.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/runners/abstract.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/runners/group.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/runners/null.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/runners/parallel.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit/runners/sequential.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/lib/sshkit.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/functional/backends/test_local.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/functional/backends/test_netssh.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/functional/test_ssh_server_comes_up_for_functional_tests.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/helper.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/support/vagrant_wrapper.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/unit/backends/test_abstract.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/unit/backends/test_connection_pool.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/unit/backends/test_local.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/unit/backends/test_netssh.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/unit/backends/test_printer.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/unit/formatters/test_custom.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/unit/formatters/test_dot.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/unit/formatters/test_pretty.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/unit/formatters/test_simple_text.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/unit/runners/test_group.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/unit/runners/test_parallel.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/unit/runners/test_sequential.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/unit/test_color.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/unit/test_command.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/unit/test_command_map.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/unit/test_configuration.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/unit/test_coordinator.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/unit/test_deprecation_logger.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/unit/test_dsl.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/unit/test_host.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/unit/test_logger.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{sshkit-1.21.5 → sshkit-1.21.6}/test/unit/test_mapping_interaction_handler.rb +0 -0
@@ -0,0 +1,2360 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
##
|
3
|
+
# This file contains stuff stolen outright from:
|
4
|
+
#
|
5
|
+
# rtags.rb -
|
6
|
+
# ruby-lex.rb - ruby lexcal analyzer
|
7
|
+
# ruby-token.rb - ruby tokens
|
8
|
+
# by Keiju ISHITSUKA (Nippon Rational Inc.)
|
9
|
+
#
|
10
|
+
|
11
|
+
require 'ripper'
|
12
|
+
require_relative 'ripper_state_lex'
|
13
|
+
|
14
|
+
##
|
15
|
+
# Extracts code elements from a source file returning a TopLevel object
|
16
|
+
# containing the constituent file elements.
|
17
|
+
#
|
18
|
+
# This file is based on rtags
|
19
|
+
#
|
20
|
+
# RubyParser understands how to document:
|
21
|
+
# * classes
|
22
|
+
# * modules
|
23
|
+
# * methods
|
24
|
+
# * constants
|
25
|
+
# * aliases
|
26
|
+
# * private, public, protected
|
27
|
+
# * private_class_function, public_class_function
|
28
|
+
# * private_constant, public_constant
|
29
|
+
# * module_function
|
30
|
+
# * attr, attr_reader, attr_writer, attr_accessor
|
31
|
+
# * extra accessors given on the command line
|
32
|
+
# * metaprogrammed methods
|
33
|
+
# * require
|
34
|
+
# * include
|
35
|
+
#
|
36
|
+
# == Method Arguments
|
37
|
+
#
|
38
|
+
#--
|
39
|
+
# NOTE: I don't think this works, needs tests, remove the paragraph following
|
40
|
+
# this block when known to work
|
41
|
+
#
|
42
|
+
# The parser extracts the arguments from the method definition. You can
|
43
|
+
# override this with a custom argument definition using the :args: directive:
|
44
|
+
#
|
45
|
+
# ##
|
46
|
+
# # This method tries over and over until it is tired
|
47
|
+
#
|
48
|
+
# def go_go_go(thing_to_try, tries = 10) # :args: thing_to_try
|
49
|
+
# puts thing_to_try
|
50
|
+
# go_go_go thing_to_try, tries - 1
|
51
|
+
# end
|
52
|
+
#
|
53
|
+
# If you have a more-complex set of overrides you can use the :call-seq:
|
54
|
+
# directive:
|
55
|
+
#++
|
56
|
+
#
|
57
|
+
# The parser extracts the arguments from the method definition. You can
|
58
|
+
# override this with a custom argument definition using the :call-seq:
|
59
|
+
# directive:
|
60
|
+
#
|
61
|
+
# ##
|
62
|
+
# # This method can be called with a range or an offset and length
|
63
|
+
# #
|
64
|
+
# # :call-seq:
|
65
|
+
# # my_method(Range)
|
66
|
+
# # my_method(offset, length)
|
67
|
+
#
|
68
|
+
# def my_method(*args)
|
69
|
+
# end
|
70
|
+
#
|
71
|
+
# The parser extracts +yield+ expressions from method bodies to gather the
|
72
|
+
# yielded argument names. If your method manually calls a block instead of
|
73
|
+
# yielding or you want to override the discovered argument names use
|
74
|
+
# the :yields: directive:
|
75
|
+
#
|
76
|
+
# ##
|
77
|
+
# # My method is awesome
|
78
|
+
#
|
79
|
+
# def my_method(&block) # :yields: happy, times
|
80
|
+
# block.call 1, 2
|
81
|
+
# end
|
82
|
+
#
|
83
|
+
# == Metaprogrammed Methods
|
84
|
+
#
|
85
|
+
# To pick up a metaprogrammed method, the parser looks for a comment starting
|
86
|
+
# with '##' before an identifier:
|
87
|
+
#
|
88
|
+
# ##
|
89
|
+
# # This is a meta-programmed method!
|
90
|
+
#
|
91
|
+
# add_my_method :meta_method, :arg1, :arg2
|
92
|
+
#
|
93
|
+
# The parser looks at the token after the identifier to determine the name, in
|
94
|
+
# this example, :meta_method. If a name cannot be found, a warning is printed
|
95
|
+
# and 'unknown is used.
|
96
|
+
#
|
97
|
+
# You can force the name of a method using the :method: directive:
|
98
|
+
#
|
99
|
+
# ##
|
100
|
+
# # :method: some_method!
|
101
|
+
#
|
102
|
+
# By default, meta-methods are instance methods. To indicate that a method is
|
103
|
+
# a singleton method instead use the :singleton-method: directive:
|
104
|
+
#
|
105
|
+
# ##
|
106
|
+
# # :singleton-method:
|
107
|
+
#
|
108
|
+
# You can also use the :singleton-method: directive with a name:
|
109
|
+
#
|
110
|
+
# ##
|
111
|
+
# # :singleton-method: some_method!
|
112
|
+
#
|
113
|
+
# You can define arguments for metaprogrammed methods via either the
|
114
|
+
# :call-seq:, :arg: or :args: directives.
|
115
|
+
#
|
116
|
+
# Additionally you can mark a method as an attribute by
|
117
|
+
# using :attr:, :attr_reader:, :attr_writer: or :attr_accessor:. Just like
|
118
|
+
# for :method:, the name is optional.
|
119
|
+
#
|
120
|
+
# ##
|
121
|
+
# # :attr_reader: my_attr_name
|
122
|
+
#
|
123
|
+
# == Hidden methods and attributes
|
124
|
+
#
|
125
|
+
# You can provide documentation for methods that don't appear using
|
126
|
+
# the :method:, :singleton-method: and :attr: directives:
|
127
|
+
#
|
128
|
+
# ##
|
129
|
+
# # :attr_writer: ghost_writer
|
130
|
+
# # There is an attribute here, but you can't see it!
|
131
|
+
#
|
132
|
+
# ##
|
133
|
+
# # :method: ghost_method
|
134
|
+
# # There is a method here, but you can't see it!
|
135
|
+
#
|
136
|
+
# ##
|
137
|
+
# # this is a comment for a regular method
|
138
|
+
#
|
139
|
+
# def regular_method() end
|
140
|
+
#
|
141
|
+
# Note that by default, the :method: directive will be ignored if there is a
|
142
|
+
# standard rdocable item following it.
|
143
|
+
|
144
|
+
class RDoc::Parser::Ruby < RDoc::Parser
|
145
|
+
|
146
|
+
parse_files_matching(/\.rbw?$/)
|
147
|
+
|
148
|
+
include RDoc::TokenStream
|
149
|
+
include RDoc::Parser::RubyTools
|
150
|
+
|
151
|
+
##
|
152
|
+
# RDoc::NormalClass type
|
153
|
+
|
154
|
+
NORMAL = "::"
|
155
|
+
|
156
|
+
##
|
157
|
+
# RDoc::SingleClass type
|
158
|
+
|
159
|
+
SINGLE = "<<"
|
160
|
+
|
161
|
+
##
|
162
|
+
# Creates a new Ruby parser.
|
163
|
+
|
164
|
+
def initialize(top_level, file_name, content, options, stats)
|
165
|
+
super
|
166
|
+
|
167
|
+
content = handle_tab_width(content)
|
168
|
+
|
169
|
+
@size = 0
|
170
|
+
@token_listeners = nil
|
171
|
+
content = RDoc::Encoding.remove_magic_comment content
|
172
|
+
@scanner = RDoc::Parser::RipperStateLex.parse(content)
|
173
|
+
@content = content
|
174
|
+
@scanner_point = 0
|
175
|
+
@prev_seek = nil
|
176
|
+
@markup = @options.markup
|
177
|
+
@track_visibility = :nodoc != @options.visibility
|
178
|
+
@encoding = @options.encoding
|
179
|
+
|
180
|
+
reset
|
181
|
+
end
|
182
|
+
|
183
|
+
def tk_nl?(tk)
|
184
|
+
:on_nl == tk[:kind] or :on_ignored_nl == tk[:kind]
|
185
|
+
end
|
186
|
+
|
187
|
+
##
|
188
|
+
# Retrieves the read token stream and replaces +pattern+ with +replacement+
|
189
|
+
# using gsub. If the result is only a ";" returns an empty string.
|
190
|
+
|
191
|
+
def get_tkread_clean pattern, replacement # :nodoc:
|
192
|
+
read = get_tkread.gsub(pattern, replacement).strip
|
193
|
+
return '' if read == ';'
|
194
|
+
read
|
195
|
+
end
|
196
|
+
|
197
|
+
##
|
198
|
+
# Extracts the visibility information for the visibility token +tk+
|
199
|
+
# and +single+ class type identifier.
|
200
|
+
#
|
201
|
+
# Returns the visibility type (a string), the visibility (a symbol) and
|
202
|
+
# +singleton+ if the methods following should be converted to singleton
|
203
|
+
# methods.
|
204
|
+
|
205
|
+
def get_visibility_information tk, single # :nodoc:
|
206
|
+
vis_type = tk[:text]
|
207
|
+
singleton = single == SINGLE
|
208
|
+
|
209
|
+
vis =
|
210
|
+
case vis_type
|
211
|
+
when 'private' then :private
|
212
|
+
when 'protected' then :protected
|
213
|
+
when 'public' then :public
|
214
|
+
when 'private_class_method' then
|
215
|
+
singleton = true
|
216
|
+
:private
|
217
|
+
when 'public_class_method' then
|
218
|
+
singleton = true
|
219
|
+
:public
|
220
|
+
when 'module_function' then
|
221
|
+
singleton = true
|
222
|
+
:public
|
223
|
+
else
|
224
|
+
raise RDoc::Error, "Invalid visibility: #{tk.name}"
|
225
|
+
end
|
226
|
+
|
227
|
+
return vis_type, vis, singleton
|
228
|
+
end
|
229
|
+
|
230
|
+
##
|
231
|
+
# Look for the first comment in a file that isn't a shebang line.
|
232
|
+
|
233
|
+
def collect_first_comment
|
234
|
+
skip_tkspace
|
235
|
+
comment = ''.dup
|
236
|
+
comment = RDoc::Encoding.change_encoding comment, @encoding if @encoding
|
237
|
+
first_line = true
|
238
|
+
first_comment_tk_kind = nil
|
239
|
+
line_no = nil
|
240
|
+
|
241
|
+
tk = get_tk
|
242
|
+
|
243
|
+
while tk && (:on_comment == tk[:kind] or :on_embdoc == tk[:kind])
|
244
|
+
comment_body = retrieve_comment_body(tk)
|
245
|
+
if first_line and comment_body =~ /\A#!/ then
|
246
|
+
skip_tkspace
|
247
|
+
tk = get_tk
|
248
|
+
elsif first_line and comment_body =~ /\A#\s*-\*-/ then
|
249
|
+
first_line = false
|
250
|
+
skip_tkspace
|
251
|
+
tk = get_tk
|
252
|
+
else
|
253
|
+
break if first_comment_tk_kind and not first_comment_tk_kind === tk[:kind]
|
254
|
+
first_comment_tk_kind = tk[:kind]
|
255
|
+
|
256
|
+
line_no = tk[:line_no] if first_line
|
257
|
+
first_line = false
|
258
|
+
comment << comment_body
|
259
|
+
tk = get_tk
|
260
|
+
|
261
|
+
if :on_nl === tk then
|
262
|
+
skip_tkspace_without_nl
|
263
|
+
tk = get_tk
|
264
|
+
end
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
268
|
+
unget_tk tk
|
269
|
+
|
270
|
+
new_comment comment, line_no
|
271
|
+
end
|
272
|
+
|
273
|
+
##
|
274
|
+
# Consumes trailing whitespace from the token stream
|
275
|
+
|
276
|
+
def consume_trailing_spaces # :nodoc:
|
277
|
+
skip_tkspace_without_nl
|
278
|
+
end
|
279
|
+
|
280
|
+
##
|
281
|
+
# Creates a new attribute in +container+ with +name+.
|
282
|
+
|
283
|
+
def create_attr container, single, name, rw, comment # :nodoc:
|
284
|
+
att = RDoc::Attr.new get_tkread, name, rw, comment, single == SINGLE
|
285
|
+
record_location att
|
286
|
+
|
287
|
+
container.add_attribute att
|
288
|
+
@stats.add_attribute att
|
289
|
+
|
290
|
+
att
|
291
|
+
end
|
292
|
+
|
293
|
+
##
|
294
|
+
# Creates a module alias in +container+ at +rhs_name+ (or at the top-level
|
295
|
+
# for "::") with the name from +constant+.
|
296
|
+
|
297
|
+
def create_module_alias container, constant, rhs_name # :nodoc:
|
298
|
+
mod = if rhs_name =~ /^::/ then
|
299
|
+
@store.find_class_or_module rhs_name
|
300
|
+
else
|
301
|
+
container.find_module_named rhs_name
|
302
|
+
end
|
303
|
+
|
304
|
+
container.add_module_alias mod, rhs_name, constant, @top_level
|
305
|
+
end
|
306
|
+
|
307
|
+
##
|
308
|
+
# Aborts with +msg+
|
309
|
+
|
310
|
+
def error(msg)
|
311
|
+
msg = make_message msg
|
312
|
+
|
313
|
+
abort msg
|
314
|
+
end
|
315
|
+
|
316
|
+
##
|
317
|
+
# Looks for a true or false token.
|
318
|
+
|
319
|
+
def get_bool
|
320
|
+
skip_tkspace
|
321
|
+
tk = get_tk
|
322
|
+
if :on_kw == tk[:kind] && 'true' == tk[:text]
|
323
|
+
true
|
324
|
+
elsif :on_kw == tk[:kind] && ('false' == tk[:text] || 'nil' == tk[:text])
|
325
|
+
false
|
326
|
+
else
|
327
|
+
unget_tk tk
|
328
|
+
true
|
329
|
+
end
|
330
|
+
end
|
331
|
+
|
332
|
+
##
|
333
|
+
# Look for the name of a class of module (optionally with a leading :: or
|
334
|
+
# with :: separated named) and return the ultimate name, the associated
|
335
|
+
# container, and the given name (with the ::).
|
336
|
+
|
337
|
+
def get_class_or_module container, ignore_constants = false
|
338
|
+
skip_tkspace
|
339
|
+
name_t = get_tk
|
340
|
+
given_name = ''.dup
|
341
|
+
|
342
|
+
# class ::A -> A is in the top level
|
343
|
+
if :on_op == name_t[:kind] and '::' == name_t[:text] then # bug
|
344
|
+
name_t = get_tk
|
345
|
+
container = @top_level
|
346
|
+
given_name << '::'
|
347
|
+
end
|
348
|
+
|
349
|
+
skip_tkspace_without_nl
|
350
|
+
given_name << name_t[:text]
|
351
|
+
|
352
|
+
is_self = name_t[:kind] == :on_op && name_t[:text] == '<<'
|
353
|
+
new_modules = []
|
354
|
+
while !is_self && (tk = peek_tk) and :on_op == tk[:kind] and '::' == tk[:text] do
|
355
|
+
prev_container = container
|
356
|
+
container = container.find_module_named name_t[:text]
|
357
|
+
container ||=
|
358
|
+
if ignore_constants then
|
359
|
+
c = RDoc::NormalModule.new name_t[:text]
|
360
|
+
c.store = @store
|
361
|
+
new_modules << [prev_container, c]
|
362
|
+
c
|
363
|
+
else
|
364
|
+
c = prev_container.add_module RDoc::NormalModule, name_t[:text]
|
365
|
+
c.ignore unless prev_container.document_children
|
366
|
+
@top_level.add_to_classes_or_modules c
|
367
|
+
c
|
368
|
+
end
|
369
|
+
|
370
|
+
record_location container
|
371
|
+
|
372
|
+
get_tk
|
373
|
+
skip_tkspace
|
374
|
+
if :on_lparen == peek_tk[:kind] # ProcObjectInConstant::()
|
375
|
+
parse_method_or_yield_parameters
|
376
|
+
break
|
377
|
+
end
|
378
|
+
name_t = get_tk
|
379
|
+
unless :on_const == name_t[:kind] || :on_ident == name_t[:kind]
|
380
|
+
raise RDoc::Error, "Invalid class or module definition: #{given_name}"
|
381
|
+
end
|
382
|
+
if prev_container == container and !ignore_constants
|
383
|
+
given_name = name_t[:text]
|
384
|
+
else
|
385
|
+
given_name << '::' + name_t[:text]
|
386
|
+
end
|
387
|
+
end
|
388
|
+
|
389
|
+
skip_tkspace_without_nl
|
390
|
+
|
391
|
+
return [container, name_t, given_name, new_modules]
|
392
|
+
end
|
393
|
+
|
394
|
+
##
|
395
|
+
# Skip opening parentheses and yield the block.
|
396
|
+
# Skip closing parentheses too when exists.
|
397
|
+
|
398
|
+
def skip_parentheses(&block)
|
399
|
+
left_tk = peek_tk
|
400
|
+
|
401
|
+
if :on_lparen == left_tk[:kind]
|
402
|
+
get_tk
|
403
|
+
|
404
|
+
ret = skip_parentheses(&block)
|
405
|
+
|
406
|
+
right_tk = peek_tk
|
407
|
+
if :on_rparen == right_tk[:kind]
|
408
|
+
get_tk
|
409
|
+
end
|
410
|
+
|
411
|
+
ret
|
412
|
+
else
|
413
|
+
yield
|
414
|
+
end
|
415
|
+
end
|
416
|
+
|
417
|
+
##
|
418
|
+
# Return a superclass, which can be either a constant of an expression
|
419
|
+
|
420
|
+
def get_class_specification
|
421
|
+
tk = peek_tk
|
422
|
+
if tk.nil?
|
423
|
+
return ''
|
424
|
+
elsif :on_kw == tk[:kind] && 'self' == tk[:text]
|
425
|
+
return 'self'
|
426
|
+
elsif :on_gvar == tk[:kind]
|
427
|
+
return ''
|
428
|
+
end
|
429
|
+
|
430
|
+
res = get_constant
|
431
|
+
|
432
|
+
skip_tkspace_without_nl
|
433
|
+
|
434
|
+
get_tkread # empty out read buffer
|
435
|
+
|
436
|
+
tk = get_tk
|
437
|
+
return res unless tk
|
438
|
+
|
439
|
+
case tk[:kind]
|
440
|
+
when :on_nl, :on_comment, :on_embdoc, :on_semicolon then
|
441
|
+
unget_tk(tk)
|
442
|
+
return res
|
443
|
+
end
|
444
|
+
|
445
|
+
res += parse_call_parameters(tk)
|
446
|
+
res
|
447
|
+
end
|
448
|
+
|
449
|
+
##
|
450
|
+
# Parse a constant, which might be qualified by one or more class or module
|
451
|
+
# names
|
452
|
+
|
453
|
+
def get_constant
|
454
|
+
res = ""
|
455
|
+
skip_tkspace_without_nl
|
456
|
+
tk = get_tk
|
457
|
+
|
458
|
+
while tk && ((:on_op == tk[:kind] && '::' == tk[:text]) || :on_const == tk[:kind]) do
|
459
|
+
res += tk[:text]
|
460
|
+
tk = get_tk
|
461
|
+
end
|
462
|
+
|
463
|
+
unget_tk(tk)
|
464
|
+
res
|
465
|
+
end
|
466
|
+
|
467
|
+
##
|
468
|
+
# Get an included module that may be surrounded by parens
|
469
|
+
|
470
|
+
def get_included_module_with_optional_parens
|
471
|
+
skip_tkspace_without_nl
|
472
|
+
get_tkread
|
473
|
+
tk = get_tk
|
474
|
+
end_token = get_end_token tk
|
475
|
+
return '' unless end_token
|
476
|
+
|
477
|
+
nest = 0
|
478
|
+
continue = false
|
479
|
+
only_constant = true
|
480
|
+
|
481
|
+
while tk != nil do
|
482
|
+
is_element_of_constant = false
|
483
|
+
case tk[:kind]
|
484
|
+
when :on_semicolon then
|
485
|
+
break if nest == 0
|
486
|
+
when :on_lbracket then
|
487
|
+
nest += 1
|
488
|
+
when :on_rbracket then
|
489
|
+
nest -= 1
|
490
|
+
when :on_lbrace then
|
491
|
+
nest += 1
|
492
|
+
when :on_rbrace then
|
493
|
+
nest -= 1
|
494
|
+
if nest <= 0
|
495
|
+
# we might have a.each { |i| yield i }
|
496
|
+
unget_tk(tk) if nest < 0
|
497
|
+
break
|
498
|
+
end
|
499
|
+
when :on_lparen then
|
500
|
+
nest += 1
|
501
|
+
when end_token[:kind] then
|
502
|
+
if end_token[:kind] == :on_rparen
|
503
|
+
nest -= 1
|
504
|
+
break if nest <= 0
|
505
|
+
else
|
506
|
+
break if nest <= 0
|
507
|
+
end
|
508
|
+
when :on_rparen then
|
509
|
+
nest -= 1
|
510
|
+
when :on_comment, :on_embdoc then
|
511
|
+
@read.pop
|
512
|
+
if :on_nl == end_token[:kind] and "\n" == tk[:text][-1] and
|
513
|
+
(!continue or (tk[:state] & RDoc::Parser::RipperStateLex::EXPR_LABEL) != 0) then
|
514
|
+
break if !continue and nest <= 0
|
515
|
+
end
|
516
|
+
when :on_comma then
|
517
|
+
continue = true
|
518
|
+
when :on_ident then
|
519
|
+
continue = false if continue
|
520
|
+
when :on_kw then
|
521
|
+
case tk[:text]
|
522
|
+
when 'def', 'do', 'case', 'for', 'begin', 'class', 'module'
|
523
|
+
nest += 1
|
524
|
+
when 'if', 'unless', 'while', 'until', 'rescue'
|
525
|
+
# postfix if/unless/while/until/rescue must be EXPR_LABEL
|
526
|
+
nest += 1 unless (tk[:state] & RDoc::Parser::RipperStateLex::EXPR_LABEL) != 0
|
527
|
+
when 'end'
|
528
|
+
nest -= 1
|
529
|
+
break if nest == 0
|
530
|
+
end
|
531
|
+
when :on_const then
|
532
|
+
is_element_of_constant = true
|
533
|
+
when :on_op then
|
534
|
+
is_element_of_constant = true if '::' == tk[:text]
|
535
|
+
end
|
536
|
+
only_constant = false unless is_element_of_constant
|
537
|
+
tk = get_tk
|
538
|
+
end
|
539
|
+
|
540
|
+
if only_constant
|
541
|
+
get_tkread_clean(/\s+/, ' ')
|
542
|
+
else
|
543
|
+
''
|
544
|
+
end
|
545
|
+
end
|
546
|
+
|
547
|
+
##
|
548
|
+
# Little hack going on here. In the statement:
|
549
|
+
#
|
550
|
+
# f = 2*(1+yield)
|
551
|
+
#
|
552
|
+
# We see the RPAREN as the next token, so we need to exit early. This still
|
553
|
+
# won't catch all cases (such as "a = yield + 1"
|
554
|
+
|
555
|
+
def get_end_token tk # :nodoc:
|
556
|
+
case tk[:kind]
|
557
|
+
when :on_lparen
|
558
|
+
token = RDoc::Parser::RipperStateLex::Token.new
|
559
|
+
token[:kind] = :on_rparen
|
560
|
+
token[:text] = ')'
|
561
|
+
token
|
562
|
+
when :on_rparen
|
563
|
+
nil
|
564
|
+
else
|
565
|
+
token = RDoc::Parser::RipperStateLex::Token.new
|
566
|
+
token[:kind] = :on_nl
|
567
|
+
token[:text] = "\n"
|
568
|
+
token
|
569
|
+
end
|
570
|
+
end
|
571
|
+
|
572
|
+
##
|
573
|
+
# Retrieves the method container for a singleton method.
|
574
|
+
|
575
|
+
def get_method_container container, name_t # :nodoc:
|
576
|
+
prev_container = container
|
577
|
+
container = container.find_module_named(name_t[:text])
|
578
|
+
|
579
|
+
unless container then
|
580
|
+
constant = prev_container.constants.find do |const|
|
581
|
+
const.name == name_t[:text]
|
582
|
+
end
|
583
|
+
|
584
|
+
if constant then
|
585
|
+
parse_method_dummy prev_container
|
586
|
+
return
|
587
|
+
end
|
588
|
+
end
|
589
|
+
|
590
|
+
unless container then
|
591
|
+
# TODO seems broken, should starting at Object in @store
|
592
|
+
obj = name_t[:text].split("::").inject(Object) do |state, item|
|
593
|
+
state.const_get(item)
|
594
|
+
end rescue nil
|
595
|
+
|
596
|
+
type = obj.class == Class ? RDoc::NormalClass : RDoc::NormalModule
|
597
|
+
|
598
|
+
unless [Class, Module].include?(obj.class) then
|
599
|
+
warn("Couldn't find #{name_t[:text]}. Assuming it's a module")
|
600
|
+
end
|
601
|
+
|
602
|
+
if type == RDoc::NormalClass then
|
603
|
+
sclass = obj.superclass ? obj.superclass.name : nil
|
604
|
+
container = prev_container.add_class type, name_t[:text], sclass
|
605
|
+
else
|
606
|
+
container = prev_container.add_module type, name_t[:text]
|
607
|
+
end
|
608
|
+
|
609
|
+
record_location container
|
610
|
+
end
|
611
|
+
|
612
|
+
container
|
613
|
+
end
|
614
|
+
|
615
|
+
##
|
616
|
+
# Extracts a name or symbol from the token stream.
|
617
|
+
|
618
|
+
def get_symbol_or_name
|
619
|
+
tk = get_tk
|
620
|
+
case tk[:kind]
|
621
|
+
when :on_symbol then
|
622
|
+
text = tk[:text].sub(/^:/, '')
|
623
|
+
|
624
|
+
next_tk = peek_tk
|
625
|
+
if next_tk && :on_op == next_tk[:kind] && '=' == next_tk[:text] then
|
626
|
+
get_tk
|
627
|
+
text << '='
|
628
|
+
end
|
629
|
+
|
630
|
+
text
|
631
|
+
when :on_ident, :on_const, :on_gvar, :on_cvar, :on_ivar, :on_op, :on_kw then
|
632
|
+
tk[:text]
|
633
|
+
when :on_tstring, :on_dstring then
|
634
|
+
tk[:text][1..-2]
|
635
|
+
else
|
636
|
+
raise RDoc::Error, "Name or symbol expected (got #{tk})"
|
637
|
+
end
|
638
|
+
end
|
639
|
+
|
640
|
+
##
|
641
|
+
# Marks containers between +container+ and +ancestor+ as ignored
|
642
|
+
|
643
|
+
def suppress_parents container, ancestor # :nodoc:
|
644
|
+
while container and container != ancestor do
|
645
|
+
container.suppress unless container.documented?
|
646
|
+
container = container.parent
|
647
|
+
end
|
648
|
+
end
|
649
|
+
|
650
|
+
##
|
651
|
+
# Look for directives in a normal comment block:
|
652
|
+
#
|
653
|
+
# # :stopdoc:
|
654
|
+
# # Don't display comment from this point forward
|
655
|
+
#
|
656
|
+
# This routine modifies its +comment+ parameter.
|
657
|
+
|
658
|
+
def look_for_directives_in container, comment
|
659
|
+
@preprocess.handle comment, container do |directive, param|
|
660
|
+
case directive
|
661
|
+
when 'method', 'singleton-method',
|
662
|
+
'attr', 'attr_accessor', 'attr_reader', 'attr_writer' then
|
663
|
+
false # handled elsewhere
|
664
|
+
when 'section' then
|
665
|
+
break unless container.kind_of?(RDoc::Context)
|
666
|
+
container.set_current_section param, comment.dup
|
667
|
+
comment.text = ''
|
668
|
+
break
|
669
|
+
end
|
670
|
+
end
|
671
|
+
|
672
|
+
comment.remove_private
|
673
|
+
end
|
674
|
+
|
675
|
+
##
|
676
|
+
# Adds useful info about the parser to +message+
|
677
|
+
|
678
|
+
def make_message message
|
679
|
+
prefix = "#{@file_name}:".dup
|
680
|
+
|
681
|
+
tk = peek_tk
|
682
|
+
prefix << "#{tk[:line_no]}:#{tk[:char_no]}:" if tk
|
683
|
+
|
684
|
+
"#{prefix} #{message}"
|
685
|
+
end
|
686
|
+
|
687
|
+
##
|
688
|
+
# Creates a comment with the correct format
|
689
|
+
|
690
|
+
def new_comment comment, line_no = nil
|
691
|
+
c = RDoc::Comment.new comment, @top_level, :ruby
|
692
|
+
c.line = line_no
|
693
|
+
c.format = @markup
|
694
|
+
c
|
695
|
+
end
|
696
|
+
|
697
|
+
##
|
698
|
+
# Creates an RDoc::Attr for the name following +tk+, setting the comment to
|
699
|
+
# +comment+.
|
700
|
+
|
701
|
+
def parse_attr(context, single, tk, comment)
|
702
|
+
line_no = tk[:line_no]
|
703
|
+
|
704
|
+
args = parse_symbol_arg 1
|
705
|
+
if args.size > 0 then
|
706
|
+
name = args[0]
|
707
|
+
rw = "R"
|
708
|
+
skip_tkspace_without_nl
|
709
|
+
tk = get_tk
|
710
|
+
|
711
|
+
if :on_comma == tk[:kind] then
|
712
|
+
rw = "RW" if get_bool
|
713
|
+
else
|
714
|
+
unget_tk tk
|
715
|
+
end
|
716
|
+
|
717
|
+
att = create_attr context, single, name, rw, comment
|
718
|
+
att.line = line_no
|
719
|
+
|
720
|
+
read_documentation_modifiers att, RDoc::ATTR_MODIFIERS
|
721
|
+
else
|
722
|
+
warn "'attr' ignored - looks like a variable"
|
723
|
+
end
|
724
|
+
end
|
725
|
+
|
726
|
+
##
|
727
|
+
# Creates an RDoc::Attr for each attribute listed after +tk+, setting the
|
728
|
+
# comment for each to +comment+.
|
729
|
+
|
730
|
+
def parse_attr_accessor(context, single, tk, comment)
|
731
|
+
line_no = tk[:line_no]
|
732
|
+
|
733
|
+
args = parse_symbol_arg
|
734
|
+
rw = "?"
|
735
|
+
|
736
|
+
tmp = RDoc::CodeObject.new
|
737
|
+
read_documentation_modifiers tmp, RDoc::ATTR_MODIFIERS
|
738
|
+
# TODO In most other places we let the context keep track of document_self
|
739
|
+
# and add found items appropriately but here we do not. I'm not sure why.
|
740
|
+
return if @track_visibility and not tmp.document_self
|
741
|
+
|
742
|
+
case tk[:text]
|
743
|
+
when "attr_reader" then rw = "R"
|
744
|
+
when "attr_writer" then rw = "W"
|
745
|
+
when "attr_accessor" then rw = "RW"
|
746
|
+
else
|
747
|
+
rw = '?'
|
748
|
+
end
|
749
|
+
|
750
|
+
for name in args
|
751
|
+
att = create_attr context, single, name, rw, comment
|
752
|
+
att.line = line_no
|
753
|
+
end
|
754
|
+
end
|
755
|
+
|
756
|
+
##
|
757
|
+
# Parses an +alias+ in +context+ with +comment+
|
758
|
+
|
759
|
+
def parse_alias(context, single, tk, comment)
|
760
|
+
line_no = tk[:line_no]
|
761
|
+
|
762
|
+
skip_tkspace
|
763
|
+
|
764
|
+
if :on_lparen === peek_tk[:kind] then
|
765
|
+
get_tk
|
766
|
+
skip_tkspace
|
767
|
+
end
|
768
|
+
|
769
|
+
new_name = get_symbol_or_name
|
770
|
+
|
771
|
+
skip_tkspace
|
772
|
+
if :on_comma === peek_tk[:kind] then
|
773
|
+
get_tk
|
774
|
+
skip_tkspace
|
775
|
+
end
|
776
|
+
|
777
|
+
begin
|
778
|
+
old_name = get_symbol_or_name
|
779
|
+
rescue RDoc::Error
|
780
|
+
return
|
781
|
+
end
|
782
|
+
|
783
|
+
al = RDoc::Alias.new(get_tkread, old_name, new_name, comment,
|
784
|
+
single == SINGLE)
|
785
|
+
record_location al
|
786
|
+
al.line = line_no
|
787
|
+
|
788
|
+
read_documentation_modifiers al, RDoc::ATTR_MODIFIERS
|
789
|
+
context.add_alias al
|
790
|
+
@stats.add_alias al
|
791
|
+
|
792
|
+
al
|
793
|
+
end
|
794
|
+
|
795
|
+
##
|
796
|
+
# Extracts call parameters from the token stream.
|
797
|
+
|
798
|
+
def parse_call_parameters(tk)
|
799
|
+
end_token = case tk[:kind]
|
800
|
+
when :on_lparen
|
801
|
+
:on_rparen
|
802
|
+
when :on_rparen
|
803
|
+
return ""
|
804
|
+
else
|
805
|
+
:on_nl
|
806
|
+
end
|
807
|
+
nest = 0
|
808
|
+
|
809
|
+
loop do
|
810
|
+
break if tk.nil?
|
811
|
+
case tk[:kind]
|
812
|
+
when :on_semicolon
|
813
|
+
break
|
814
|
+
when :on_lparen
|
815
|
+
nest += 1
|
816
|
+
when end_token
|
817
|
+
if end_token == :on_rparen
|
818
|
+
nest -= 1
|
819
|
+
break if RDoc::Parser::RipperStateLex.end?(tk) and nest <= 0
|
820
|
+
else
|
821
|
+
break if RDoc::Parser::RipperStateLex.end?(tk)
|
822
|
+
end
|
823
|
+
when :on_comment, :on_embdoc
|
824
|
+
unget_tk(tk)
|
825
|
+
break
|
826
|
+
when :on_op
|
827
|
+
if tk[:text] =~ /^(.{1,2})?=$/
|
828
|
+
unget_tk(tk)
|
829
|
+
break
|
830
|
+
end
|
831
|
+
end
|
832
|
+
tk = get_tk
|
833
|
+
end
|
834
|
+
|
835
|
+
get_tkread_clean "\n", " "
|
836
|
+
end
|
837
|
+
|
838
|
+
##
|
839
|
+
# Parses a class in +context+ with +comment+
|
840
|
+
|
841
|
+
def parse_class container, single, tk, comment
|
842
|
+
line_no = tk[:line_no]
|
843
|
+
|
844
|
+
declaration_context = container
|
845
|
+
container, name_t, given_name, = get_class_or_module container
|
846
|
+
|
847
|
+
if name_t[:kind] == :on_const
|
848
|
+
cls = parse_class_regular container, declaration_context, single,
|
849
|
+
name_t, given_name, comment
|
850
|
+
elsif name_t[:kind] == :on_op && name_t[:text] == '<<'
|
851
|
+
case name = skip_parentheses { get_class_specification }
|
852
|
+
when 'self', container.name
|
853
|
+
read_documentation_modifiers cls, RDoc::CLASS_MODIFIERS
|
854
|
+
parse_statements container, SINGLE
|
855
|
+
return # don't update line
|
856
|
+
else
|
857
|
+
cls = parse_class_singleton container, name, comment
|
858
|
+
end
|
859
|
+
else
|
860
|
+
warn "Expected class name or '<<'. Got #{name_t[:kind]}: #{name_t[:text].inspect}"
|
861
|
+
return
|
862
|
+
end
|
863
|
+
|
864
|
+
cls.line = line_no
|
865
|
+
|
866
|
+
# after end modifiers
|
867
|
+
read_documentation_modifiers cls, RDoc::CLASS_MODIFIERS
|
868
|
+
|
869
|
+
cls
|
870
|
+
end
|
871
|
+
|
872
|
+
##
|
873
|
+
# Parses and creates a regular class
|
874
|
+
|
875
|
+
def parse_class_regular container, declaration_context, single, # :nodoc:
|
876
|
+
name_t, given_name, comment
|
877
|
+
superclass = '::Object'
|
878
|
+
|
879
|
+
if given_name =~ /^::/ then
|
880
|
+
declaration_context = @top_level
|
881
|
+
given_name = $'
|
882
|
+
end
|
883
|
+
|
884
|
+
tk = peek_tk
|
885
|
+
if tk[:kind] == :on_op && tk[:text] == '<' then
|
886
|
+
get_tk
|
887
|
+
skip_tkspace
|
888
|
+
superclass = get_class_specification
|
889
|
+
superclass = '(unknown)' if superclass.empty?
|
890
|
+
end
|
891
|
+
|
892
|
+
cls_type = single == SINGLE ? RDoc::SingleClass : RDoc::NormalClass
|
893
|
+
cls = declaration_context.add_class cls_type, given_name, superclass
|
894
|
+
cls.ignore unless container.document_children
|
895
|
+
|
896
|
+
read_documentation_modifiers cls, RDoc::CLASS_MODIFIERS
|
897
|
+
record_location cls
|
898
|
+
|
899
|
+
cls.add_comment comment, @top_level
|
900
|
+
|
901
|
+
@top_level.add_to_classes_or_modules cls
|
902
|
+
@stats.add_class cls
|
903
|
+
|
904
|
+
suppress_parents container, declaration_context unless cls.document_self
|
905
|
+
|
906
|
+
parse_statements cls
|
907
|
+
|
908
|
+
cls
|
909
|
+
end
|
910
|
+
|
911
|
+
##
|
912
|
+
# Parses a singleton class in +container+ with the given +name+ and
|
913
|
+
# +comment+.
|
914
|
+
|
915
|
+
def parse_class_singleton container, name, comment # :nodoc:
|
916
|
+
other = @store.find_class_named name
|
917
|
+
|
918
|
+
unless other then
|
919
|
+
if name =~ /^::/ then
|
920
|
+
name = $'
|
921
|
+
container = @top_level
|
922
|
+
end
|
923
|
+
|
924
|
+
other = container.add_module RDoc::NormalModule, name
|
925
|
+
record_location other
|
926
|
+
|
927
|
+
# class << $gvar
|
928
|
+
other.ignore if name.empty?
|
929
|
+
|
930
|
+
other.add_comment comment, @top_level
|
931
|
+
end
|
932
|
+
|
933
|
+
# notify :nodoc: all if not a constant-named class/module
|
934
|
+
# (and remove any comment)
|
935
|
+
unless name =~ /\A(::)?[A-Z]/ then
|
936
|
+
other.document_self = nil
|
937
|
+
other.document_children = false
|
938
|
+
other.clear_comment
|
939
|
+
end
|
940
|
+
|
941
|
+
@top_level.add_to_classes_or_modules other
|
942
|
+
@stats.add_class other
|
943
|
+
|
944
|
+
read_documentation_modifiers other, RDoc::CLASS_MODIFIERS
|
945
|
+
parse_statements(other, SINGLE)
|
946
|
+
|
947
|
+
other
|
948
|
+
end
|
949
|
+
|
950
|
+
##
|
951
|
+
# Parses a constant in +context+ with +comment+. If +ignore_constants+ is
|
952
|
+
# true, no found constants will be added to RDoc.
|
953
|
+
|
954
|
+
def parse_constant container, tk, comment, ignore_constants = false
|
955
|
+
line_no = tk[:line_no]
|
956
|
+
|
957
|
+
name = tk[:text]
|
958
|
+
skip_tkspace_without_nl
|
959
|
+
|
960
|
+
return unless name =~ /^\w+$/
|
961
|
+
|
962
|
+
new_modules = []
|
963
|
+
if :on_op == peek_tk[:kind] && '::' == peek_tk[:text] then
|
964
|
+
unget_tk tk
|
965
|
+
|
966
|
+
container, name_t, _, new_modules = get_class_or_module container, true
|
967
|
+
|
968
|
+
name = name_t[:text]
|
969
|
+
end
|
970
|
+
|
971
|
+
is_array_or_hash = false
|
972
|
+
if peek_tk && :on_lbracket == peek_tk[:kind]
|
973
|
+
get_tk
|
974
|
+
nest = 1
|
975
|
+
while bracket_tk = get_tk
|
976
|
+
case bracket_tk[:kind]
|
977
|
+
when :on_lbracket
|
978
|
+
nest += 1
|
979
|
+
when :on_rbracket
|
980
|
+
nest -= 1
|
981
|
+
break if nest == 0
|
982
|
+
end
|
983
|
+
end
|
984
|
+
skip_tkspace_without_nl
|
985
|
+
is_array_or_hash = true
|
986
|
+
end
|
987
|
+
|
988
|
+
unless peek_tk && :on_op == peek_tk[:kind] && '=' == peek_tk[:text] then
|
989
|
+
return false
|
990
|
+
end
|
991
|
+
get_tk
|
992
|
+
|
993
|
+
unless ignore_constants
|
994
|
+
new_modules.each do |prev_c, new_module|
|
995
|
+
prev_c.add_module_by_normal_module new_module
|
996
|
+
new_module.ignore unless prev_c.document_children
|
997
|
+
@top_level.add_to_classes_or_modules new_module
|
998
|
+
end
|
999
|
+
end
|
1000
|
+
|
1001
|
+
value = ''
|
1002
|
+
con = RDoc::Constant.new name, value, comment
|
1003
|
+
|
1004
|
+
body = parse_constant_body container, con, is_array_or_hash
|
1005
|
+
|
1006
|
+
return unless body
|
1007
|
+
|
1008
|
+
con.value = body
|
1009
|
+
record_location con
|
1010
|
+
con.line = line_no
|
1011
|
+
read_documentation_modifiers con, RDoc::CONSTANT_MODIFIERS
|
1012
|
+
|
1013
|
+
return if is_array_or_hash
|
1014
|
+
|
1015
|
+
@stats.add_constant con
|
1016
|
+
container.add_constant con
|
1017
|
+
|
1018
|
+
true
|
1019
|
+
end
|
1020
|
+
|
1021
|
+
def parse_constant_body container, constant, is_array_or_hash # :nodoc:
|
1022
|
+
nest = 0
|
1023
|
+
rhs_name = ''.dup
|
1024
|
+
|
1025
|
+
get_tkread
|
1026
|
+
|
1027
|
+
tk = get_tk
|
1028
|
+
|
1029
|
+
body = nil
|
1030
|
+
loop do
|
1031
|
+
break if tk.nil?
|
1032
|
+
if :on_semicolon == tk[:kind] then
|
1033
|
+
break if nest <= 0
|
1034
|
+
elsif [:on_tlambeg, :on_lparen, :on_lbrace, :on_lbracket].include?(tk[:kind]) then
|
1035
|
+
nest += 1
|
1036
|
+
elsif (:on_kw == tk[:kind] && 'def' == tk[:text]) then
|
1037
|
+
nest += 1
|
1038
|
+
elsif (:on_kw == tk[:kind] && %w{do if unless case begin}.include?(tk[:text])) then
|
1039
|
+
if (tk[:state] & RDoc::Parser::RipperStateLex::EXPR_LABEL) == 0
|
1040
|
+
nest += 1
|
1041
|
+
end
|
1042
|
+
elsif [:on_rparen, :on_rbrace, :on_rbracket].include?(tk[:kind]) ||
|
1043
|
+
(:on_kw == tk[:kind] && 'end' == tk[:text]) then
|
1044
|
+
nest -= 1
|
1045
|
+
elsif (:on_comment == tk[:kind] or :on_embdoc == tk[:kind]) then
|
1046
|
+
unget_tk tk
|
1047
|
+
if nest <= 0 and RDoc::Parser::RipperStateLex.end?(tk) then
|
1048
|
+
body = get_tkread_clean(/^[ \t]+/, '')
|
1049
|
+
read_documentation_modifiers constant, RDoc::CONSTANT_MODIFIERS
|
1050
|
+
break
|
1051
|
+
else
|
1052
|
+
read_documentation_modifiers constant, RDoc::CONSTANT_MODIFIERS
|
1053
|
+
end
|
1054
|
+
elsif :on_const == tk[:kind] then
|
1055
|
+
rhs_name << tk[:text]
|
1056
|
+
|
1057
|
+
next_tk = peek_tk
|
1058
|
+
if nest <= 0 and (next_tk.nil? || :on_nl == next_tk[:kind]) then
|
1059
|
+
create_module_alias container, constant, rhs_name unless is_array_or_hash
|
1060
|
+
break
|
1061
|
+
end
|
1062
|
+
elsif :on_nl == tk[:kind] then
|
1063
|
+
if nest <= 0 and RDoc::Parser::RipperStateLex.end?(tk) then
|
1064
|
+
unget_tk tk
|
1065
|
+
break
|
1066
|
+
end
|
1067
|
+
elsif :on_op == tk[:kind] && '::' == tk[:text]
|
1068
|
+
rhs_name << '::'
|
1069
|
+
end
|
1070
|
+
tk = get_tk
|
1071
|
+
end
|
1072
|
+
|
1073
|
+
body ? body : get_tkread_clean(/^[ \t]+/, '')
|
1074
|
+
end
|
1075
|
+
|
1076
|
+
##
|
1077
|
+
# Generates an RDoc::Method or RDoc::Attr from +comment+ by looking for
|
1078
|
+
# :method: or :attr: directives in +comment+.
|
1079
|
+
|
1080
|
+
def parse_comment container, tk, comment
|
1081
|
+
return parse_comment_tomdoc container, tk, comment if @markup == 'tomdoc'
|
1082
|
+
column = tk[:char_no]
|
1083
|
+
line_no = comment.line.nil? ? tk[:line_no] : comment.line
|
1084
|
+
|
1085
|
+
comment.text = comment.text.sub(/(^# +:?)(singleton-)(method:)/, '\1\3')
|
1086
|
+
singleton = !!$~
|
1087
|
+
|
1088
|
+
co =
|
1089
|
+
if (comment.text = comment.text.sub(/^# +:?method: *(\S*).*?\n/i, '')) && !!$~ then
|
1090
|
+
line_no += $`.count("\n")
|
1091
|
+
parse_comment_ghost container, comment.text, $1, column, line_no, comment
|
1092
|
+
elsif (comment.text = comment.text.sub(/# +:?(attr(_reader|_writer|_accessor)?): *(\S*).*?\n/i, '')) && !!$~ then
|
1093
|
+
parse_comment_attr container, $1, $3, comment
|
1094
|
+
end
|
1095
|
+
|
1096
|
+
if co then
|
1097
|
+
co.singleton = singleton
|
1098
|
+
co.line = line_no
|
1099
|
+
end
|
1100
|
+
|
1101
|
+
true
|
1102
|
+
end
|
1103
|
+
|
1104
|
+
##
|
1105
|
+
# Parse a comment that is describing an attribute in +container+ with the
|
1106
|
+
# given +name+ and +comment+.
|
1107
|
+
|
1108
|
+
def parse_comment_attr container, type, name, comment # :nodoc:
|
1109
|
+
return if name.empty?
|
1110
|
+
|
1111
|
+
rw = case type
|
1112
|
+
when 'attr_reader' then 'R'
|
1113
|
+
when 'attr_writer' then 'W'
|
1114
|
+
else 'RW'
|
1115
|
+
end
|
1116
|
+
|
1117
|
+
create_attr container, NORMAL, name, rw, comment
|
1118
|
+
end
|
1119
|
+
|
1120
|
+
def parse_comment_ghost container, text, name, column, line_no, # :nodoc:
|
1121
|
+
comment
|
1122
|
+
name = nil if name.empty?
|
1123
|
+
|
1124
|
+
meth = RDoc::GhostMethod.new get_tkread, name
|
1125
|
+
record_location meth
|
1126
|
+
|
1127
|
+
meth.start_collecting_tokens
|
1128
|
+
indent = RDoc::Parser::RipperStateLex::Token.new(1, 1, :on_sp, ' ' * column)
|
1129
|
+
position_comment = RDoc::Parser::RipperStateLex::Token.new(line_no, 1, :on_comment)
|
1130
|
+
position_comment[:text] = "# File #{@top_level.relative_name}, line #{line_no}"
|
1131
|
+
newline = RDoc::Parser::RipperStateLex::Token.new(0, 0, :on_nl, "\n")
|
1132
|
+
meth.add_tokens [position_comment, newline, indent]
|
1133
|
+
|
1134
|
+
meth.params =
|
1135
|
+
if text.sub!(/^#\s+:?args?:\s*(.*?)\s*$/i, '') then
|
1136
|
+
$1
|
1137
|
+
else
|
1138
|
+
''
|
1139
|
+
end
|
1140
|
+
|
1141
|
+
comment.normalize
|
1142
|
+
comment.extract_call_seq meth
|
1143
|
+
|
1144
|
+
return unless meth.name
|
1145
|
+
|
1146
|
+
container.add_method meth
|
1147
|
+
|
1148
|
+
meth.comment = comment
|
1149
|
+
|
1150
|
+
@stats.add_method meth
|
1151
|
+
|
1152
|
+
meth
|
1153
|
+
end
|
1154
|
+
|
1155
|
+
##
|
1156
|
+
# Creates an RDoc::Method on +container+ from +comment+ if there is a
|
1157
|
+
# Signature section in the comment
|
1158
|
+
|
1159
|
+
def parse_comment_tomdoc container, tk, comment
|
1160
|
+
return unless signature = RDoc::TomDoc.signature(comment)
|
1161
|
+
column = tk[:char_no]
|
1162
|
+
line_no = tk[:line_no]
|
1163
|
+
|
1164
|
+
name, = signature.split %r%[ \(]%, 2
|
1165
|
+
|
1166
|
+
meth = RDoc::GhostMethod.new get_tkread, name
|
1167
|
+
record_location meth
|
1168
|
+
meth.line = line_no
|
1169
|
+
|
1170
|
+
meth.start_collecting_tokens
|
1171
|
+
indent = RDoc::Parser::RipperStateLex::Token.new(1, 1, :on_sp, ' ' * column)
|
1172
|
+
position_comment = RDoc::Parser::RipperStateLex::Token.new(line_no, 1, :on_comment)
|
1173
|
+
position_comment[:text] = "# File #{@top_level.relative_name}, line #{line_no}"
|
1174
|
+
newline = RDoc::Parser::RipperStateLex::Token.new(0, 0, :on_nl, "\n")
|
1175
|
+
meth.add_tokens [position_comment, newline, indent]
|
1176
|
+
|
1177
|
+
meth.call_seq = signature
|
1178
|
+
|
1179
|
+
comment.normalize
|
1180
|
+
|
1181
|
+
return unless meth.name
|
1182
|
+
|
1183
|
+
container.add_method meth
|
1184
|
+
|
1185
|
+
meth.comment = comment
|
1186
|
+
|
1187
|
+
@stats.add_method meth
|
1188
|
+
end
|
1189
|
+
|
1190
|
+
##
|
1191
|
+
# Parses an +include+ or +extend+, indicated by the +klass+ and adds it to
|
1192
|
+
# +container+ # with +comment+
|
1193
|
+
|
1194
|
+
def parse_extend_or_include klass, container, comment # :nodoc:
|
1195
|
+
loop do
|
1196
|
+
skip_tkspace_comment
|
1197
|
+
|
1198
|
+
name = get_included_module_with_optional_parens
|
1199
|
+
|
1200
|
+
unless name.empty? then
|
1201
|
+
obj = container.add klass, name, comment
|
1202
|
+
record_location obj
|
1203
|
+
end
|
1204
|
+
|
1205
|
+
return if peek_tk.nil? || :on_comma != peek_tk[:kind]
|
1206
|
+
|
1207
|
+
get_tk
|
1208
|
+
end
|
1209
|
+
end
|
1210
|
+
|
1211
|
+
##
|
1212
|
+
# Parses an +included+ with a block feature of ActiveSupport::Concern.
|
1213
|
+
|
1214
|
+
def parse_included_with_activesupport_concern container, comment # :nodoc:
|
1215
|
+
skip_tkspace_without_nl
|
1216
|
+
tk = get_tk
|
1217
|
+
unless tk[:kind] == :on_lbracket || (tk[:kind] == :on_kw && tk[:text] == 'do')
|
1218
|
+
unget_tk tk
|
1219
|
+
return nil # should be a block
|
1220
|
+
end
|
1221
|
+
|
1222
|
+
parse_statements container
|
1223
|
+
|
1224
|
+
container
|
1225
|
+
end
|
1226
|
+
|
1227
|
+
##
|
1228
|
+
# Parses identifiers that can create new methods or change visibility.
|
1229
|
+
#
|
1230
|
+
# Returns true if the comment was not consumed.
|
1231
|
+
|
1232
|
+
def parse_identifier container, single, tk, comment # :nodoc:
|
1233
|
+
case tk[:text]
|
1234
|
+
when 'private', 'protected', 'public', 'private_class_method',
|
1235
|
+
'public_class_method', 'module_function' then
|
1236
|
+
parse_visibility container, single, tk
|
1237
|
+
return true
|
1238
|
+
when 'private_constant', 'public_constant'
|
1239
|
+
parse_constant_visibility container, single, tk
|
1240
|
+
return true
|
1241
|
+
when 'attr' then
|
1242
|
+
parse_attr container, single, tk, comment
|
1243
|
+
when /^attr_(reader|writer|accessor)$/ then
|
1244
|
+
parse_attr_accessor container, single, tk, comment
|
1245
|
+
when 'alias_method' then
|
1246
|
+
parse_alias container, single, tk, comment
|
1247
|
+
when 'require', 'include' then
|
1248
|
+
# ignore
|
1249
|
+
else
|
1250
|
+
if comment.text =~ /\A#\#$/ then
|
1251
|
+
case comment.text
|
1252
|
+
when /^# +:?attr(_reader|_writer|_accessor)?:/ then
|
1253
|
+
parse_meta_attr container, single, tk, comment
|
1254
|
+
else
|
1255
|
+
method = parse_meta_method container, single, tk, comment
|
1256
|
+
method.params = container.params if
|
1257
|
+
container.params
|
1258
|
+
method.block_params = container.block_params if
|
1259
|
+
container.block_params
|
1260
|
+
end
|
1261
|
+
end
|
1262
|
+
end
|
1263
|
+
|
1264
|
+
false
|
1265
|
+
end
|
1266
|
+
|
1267
|
+
##
|
1268
|
+
# Parses a meta-programmed attribute and creates an RDoc::Attr.
|
1269
|
+
#
|
1270
|
+
# To create foo and bar attributes on class C with comment "My attributes":
|
1271
|
+
#
|
1272
|
+
# class C
|
1273
|
+
#
|
1274
|
+
# ##
|
1275
|
+
# # :attr:
|
1276
|
+
# #
|
1277
|
+
# # My attributes
|
1278
|
+
#
|
1279
|
+
# my_attr :foo, :bar
|
1280
|
+
#
|
1281
|
+
# end
|
1282
|
+
#
|
1283
|
+
# To create a foo attribute on class C with comment "My attribute":
|
1284
|
+
#
|
1285
|
+
# class C
|
1286
|
+
#
|
1287
|
+
# ##
|
1288
|
+
# # :attr: foo
|
1289
|
+
# #
|
1290
|
+
# # My attribute
|
1291
|
+
#
|
1292
|
+
# my_attr :foo, :bar
|
1293
|
+
#
|
1294
|
+
# end
|
1295
|
+
|
1296
|
+
def parse_meta_attr(context, single, tk, comment)
|
1297
|
+
args = parse_symbol_arg
|
1298
|
+
rw = "?"
|
1299
|
+
|
1300
|
+
# If nodoc is given, don't document any of them
|
1301
|
+
|
1302
|
+
tmp = RDoc::CodeObject.new
|
1303
|
+
read_documentation_modifiers tmp, RDoc::ATTR_MODIFIERS
|
1304
|
+
|
1305
|
+
regexp = /^# +:?(attr(_reader|_writer|_accessor)?): *(\S*).*?\n/i
|
1306
|
+
if regexp =~ comment.text then
|
1307
|
+
comment.text = comment.text.sub(regexp, '')
|
1308
|
+
rw = case $1
|
1309
|
+
when 'attr_reader' then 'R'
|
1310
|
+
when 'attr_writer' then 'W'
|
1311
|
+
else 'RW'
|
1312
|
+
end
|
1313
|
+
name = $3 unless $3.empty?
|
1314
|
+
end
|
1315
|
+
|
1316
|
+
if name then
|
1317
|
+
att = create_attr context, single, name, rw, comment
|
1318
|
+
else
|
1319
|
+
args.each do |attr_name|
|
1320
|
+
att = create_attr context, single, attr_name, rw, comment
|
1321
|
+
end
|
1322
|
+
end
|
1323
|
+
|
1324
|
+
att
|
1325
|
+
end
|
1326
|
+
|
1327
|
+
##
|
1328
|
+
# Parses a meta-programmed method
|
1329
|
+
|
1330
|
+
def parse_meta_method(container, single, tk, comment)
|
1331
|
+
column = tk[:char_no]
|
1332
|
+
line_no = tk[:line_no]
|
1333
|
+
|
1334
|
+
start_collecting_tokens
|
1335
|
+
add_token tk
|
1336
|
+
add_token_listener self
|
1337
|
+
|
1338
|
+
skip_tkspace_without_nl
|
1339
|
+
|
1340
|
+
comment.text = comment.text.sub(/(^# +:?)(singleton-)(method:)/, '\1\3')
|
1341
|
+
singleton = !!$~
|
1342
|
+
|
1343
|
+
name = parse_meta_method_name comment, tk
|
1344
|
+
|
1345
|
+
return unless name
|
1346
|
+
|
1347
|
+
meth = RDoc::MetaMethod.new get_tkread, name
|
1348
|
+
record_location meth
|
1349
|
+
meth.line = line_no
|
1350
|
+
meth.singleton = singleton
|
1351
|
+
|
1352
|
+
remove_token_listener self
|
1353
|
+
|
1354
|
+
meth.start_collecting_tokens
|
1355
|
+
indent = RDoc::Parser::RipperStateLex::Token.new(1, 1, :on_sp, ' ' * column)
|
1356
|
+
position_comment = RDoc::Parser::RipperStateLex::Token.new(line_no, 1, :on_comment)
|
1357
|
+
position_comment[:text] = "# File #{@top_level.relative_name}, line #{line_no}"
|
1358
|
+
newline = RDoc::Parser::RipperStateLex::Token.new(0, 0, :on_nl, "\n")
|
1359
|
+
meth.add_tokens [position_comment, newline, indent]
|
1360
|
+
meth.add_tokens @token_stream
|
1361
|
+
|
1362
|
+
parse_meta_method_params container, single, meth, tk, comment
|
1363
|
+
|
1364
|
+
meth.comment = comment
|
1365
|
+
|
1366
|
+
@stats.add_method meth
|
1367
|
+
|
1368
|
+
meth
|
1369
|
+
end
|
1370
|
+
|
1371
|
+
##
|
1372
|
+
# Parses the name of a metaprogrammed method. +comment+ is used to
|
1373
|
+
# determine the name while +tk+ is used in an error message if the name
|
1374
|
+
# cannot be determined.
|
1375
|
+
|
1376
|
+
def parse_meta_method_name comment, tk # :nodoc:
|
1377
|
+
if comment.text.sub!(/^# +:?method: *(\S*).*?\n/i, '') then
|
1378
|
+
return $1 unless $1.empty?
|
1379
|
+
end
|
1380
|
+
|
1381
|
+
name_t = get_tk
|
1382
|
+
|
1383
|
+
if :on_symbol == name_t[:kind] then
|
1384
|
+
name_t[:text][1..-1]
|
1385
|
+
elsif :on_tstring == name_t[:kind] then
|
1386
|
+
name_t[:text][1..-2]
|
1387
|
+
elsif :on_op == name_t[:kind] && '=' == name_t[:text] then # ignore
|
1388
|
+
remove_token_listener self
|
1389
|
+
|
1390
|
+
nil
|
1391
|
+
else
|
1392
|
+
warn "unknown name token #{name_t.inspect} for meta-method '#{tk[:text]}'"
|
1393
|
+
'unknown'
|
1394
|
+
end
|
1395
|
+
end
|
1396
|
+
|
1397
|
+
##
|
1398
|
+
# Parses the parameters and block for a meta-programmed method.
|
1399
|
+
|
1400
|
+
def parse_meta_method_params container, single, meth, tk, comment # :nodoc:
|
1401
|
+
token_listener meth do
|
1402
|
+
meth.params = ''
|
1403
|
+
|
1404
|
+
look_for_directives_in meth, comment
|
1405
|
+
comment.normalize
|
1406
|
+
comment.extract_call_seq meth
|
1407
|
+
|
1408
|
+
container.add_method meth
|
1409
|
+
|
1410
|
+
last_tk = tk
|
1411
|
+
|
1412
|
+
while tk = get_tk do
|
1413
|
+
if :on_semicolon == tk[:kind] then
|
1414
|
+
break
|
1415
|
+
elsif :on_nl == tk[:kind] then
|
1416
|
+
break unless last_tk and :on_comma == last_tk[:kind]
|
1417
|
+
elsif :on_sp == tk[:kind] then
|
1418
|
+
# expression continues
|
1419
|
+
elsif :on_kw == tk[:kind] && 'do' == tk[:text] then
|
1420
|
+
parse_statements container, single, meth
|
1421
|
+
break
|
1422
|
+
else
|
1423
|
+
last_tk = tk
|
1424
|
+
end
|
1425
|
+
end
|
1426
|
+
end
|
1427
|
+
end
|
1428
|
+
|
1429
|
+
##
|
1430
|
+
# Parses a normal method defined by +def+
|
1431
|
+
|
1432
|
+
def parse_method(container, single, tk, comment)
|
1433
|
+
singleton = nil
|
1434
|
+
added_container = false
|
1435
|
+
name = nil
|
1436
|
+
column = tk[:char_no]
|
1437
|
+
line_no = tk[:line_no]
|
1438
|
+
|
1439
|
+
start_collecting_tokens
|
1440
|
+
add_token tk
|
1441
|
+
|
1442
|
+
token_listener self do
|
1443
|
+
prev_container = container
|
1444
|
+
name, container, singleton = parse_method_name container
|
1445
|
+
added_container = container != prev_container
|
1446
|
+
end
|
1447
|
+
|
1448
|
+
return unless name
|
1449
|
+
|
1450
|
+
meth = RDoc::AnyMethod.new get_tkread, name
|
1451
|
+
look_for_directives_in meth, comment
|
1452
|
+
meth.singleton = single == SINGLE ? true : singleton
|
1453
|
+
|
1454
|
+
record_location meth
|
1455
|
+
meth.line = line_no
|
1456
|
+
|
1457
|
+
meth.start_collecting_tokens
|
1458
|
+
indent = RDoc::Parser::RipperStateLex::Token.new(1, 1, :on_sp, ' ' * column)
|
1459
|
+
token = RDoc::Parser::RipperStateLex::Token.new(line_no, 1, :on_comment)
|
1460
|
+
token[:text] = "# File #{@top_level.relative_name}, line #{line_no}"
|
1461
|
+
newline = RDoc::Parser::RipperStateLex::Token.new(0, 0, :on_nl, "\n")
|
1462
|
+
meth.add_tokens [token, newline, indent]
|
1463
|
+
meth.add_tokens @token_stream
|
1464
|
+
|
1465
|
+
parse_method_params_and_body container, single, meth, added_container
|
1466
|
+
|
1467
|
+
comment.normalize
|
1468
|
+
comment.extract_call_seq meth
|
1469
|
+
|
1470
|
+
meth.comment = comment
|
1471
|
+
|
1472
|
+
# after end modifiers
|
1473
|
+
read_documentation_modifiers meth, RDoc::METHOD_MODIFIERS
|
1474
|
+
|
1475
|
+
@stats.add_method meth
|
1476
|
+
end
|
1477
|
+
|
1478
|
+
##
|
1479
|
+
# Parses the parameters and body of +meth+
|
1480
|
+
|
1481
|
+
def parse_method_params_and_body container, single, meth, added_container
|
1482
|
+
token_listener meth do
|
1483
|
+
parse_method_parameters meth
|
1484
|
+
|
1485
|
+
if meth.document_self or not @track_visibility then
|
1486
|
+
container.add_method meth
|
1487
|
+
elsif added_container then
|
1488
|
+
container.document_self = false
|
1489
|
+
end
|
1490
|
+
|
1491
|
+
# Having now read the method parameters and documentation modifiers, we
|
1492
|
+
# now know whether we have to rename #initialize to ::new
|
1493
|
+
|
1494
|
+
if meth.name == "initialize" && !meth.singleton then
|
1495
|
+
if meth.dont_rename_initialize then
|
1496
|
+
meth.visibility = :protected
|
1497
|
+
else
|
1498
|
+
meth.singleton = true
|
1499
|
+
meth.name = "new"
|
1500
|
+
meth.visibility = :public
|
1501
|
+
end
|
1502
|
+
end
|
1503
|
+
|
1504
|
+
parse_statements container, single, meth
|
1505
|
+
end
|
1506
|
+
end
|
1507
|
+
|
1508
|
+
##
|
1509
|
+
# Parses a method that needs to be ignored.
|
1510
|
+
|
1511
|
+
def parse_method_dummy container
|
1512
|
+
dummy = RDoc::Context.new
|
1513
|
+
dummy.parent = container
|
1514
|
+
dummy.store = container.store
|
1515
|
+
skip_method dummy
|
1516
|
+
end
|
1517
|
+
|
1518
|
+
##
|
1519
|
+
# Parses the name of a method in +container+.
|
1520
|
+
#
|
1521
|
+
# Returns the method name, the container it is in (for def Foo.name) and if
|
1522
|
+
# it is a singleton or regular method.
|
1523
|
+
|
1524
|
+
def parse_method_name container # :nodoc:
|
1525
|
+
skip_tkspace
|
1526
|
+
name_t = get_tk
|
1527
|
+
back_tk = skip_tkspace_without_nl
|
1528
|
+
singleton = false
|
1529
|
+
|
1530
|
+
dot = get_tk
|
1531
|
+
if dot[:kind] == :on_period || (dot[:kind] == :on_op && dot[:text] == '::') then
|
1532
|
+
singleton = true
|
1533
|
+
|
1534
|
+
name, container = parse_method_name_singleton container, name_t
|
1535
|
+
else
|
1536
|
+
unget_tk dot
|
1537
|
+
back_tk.reverse_each do |token|
|
1538
|
+
unget_tk token
|
1539
|
+
end
|
1540
|
+
|
1541
|
+
name = parse_method_name_regular container, name_t
|
1542
|
+
end
|
1543
|
+
|
1544
|
+
return name, container, singleton
|
1545
|
+
end
|
1546
|
+
|
1547
|
+
##
|
1548
|
+
# For the given +container+ and initial name token +name_t+ the method name
|
1549
|
+
# is parsed from the token stream for a regular method.
|
1550
|
+
|
1551
|
+
def parse_method_name_regular container, name_t # :nodoc:
|
1552
|
+
if :on_op == name_t[:kind] && (%w{* & [] []= <<}.include?(name_t[:text])) then
|
1553
|
+
name_t[:text]
|
1554
|
+
else
|
1555
|
+
unless [:on_kw, :on_const, :on_ident].include?(name_t[:kind]) then
|
1556
|
+
warn "expected method name token, . or ::, got #{name_t.inspect}"
|
1557
|
+
skip_method container
|
1558
|
+
return
|
1559
|
+
end
|
1560
|
+
name_t[:text]
|
1561
|
+
end
|
1562
|
+
end
|
1563
|
+
|
1564
|
+
##
|
1565
|
+
# For the given +container+ and initial name token +name_t+ the method name
|
1566
|
+
# and the new +container+ (if necessary) are parsed from the token stream
|
1567
|
+
# for a singleton method.
|
1568
|
+
|
1569
|
+
def parse_method_name_singleton container, name_t # :nodoc:
|
1570
|
+
skip_tkspace
|
1571
|
+
name_t2 = get_tk
|
1572
|
+
|
1573
|
+
if (:on_kw == name_t[:kind] && 'self' == name_t[:text]) || (:on_op == name_t[:kind] && '%' == name_t[:text]) then
|
1574
|
+
# NOTE: work around '[' being consumed early
|
1575
|
+
if :on_lbracket == name_t2[:kind]
|
1576
|
+
get_tk
|
1577
|
+
name = '[]'
|
1578
|
+
else
|
1579
|
+
name = name_t2[:text]
|
1580
|
+
end
|
1581
|
+
elsif :on_const == name_t[:kind] then
|
1582
|
+
name = name_t2[:text]
|
1583
|
+
|
1584
|
+
container = get_method_container container, name_t
|
1585
|
+
|
1586
|
+
return unless container
|
1587
|
+
|
1588
|
+
name
|
1589
|
+
elsif :on_ident == name_t[:kind] || :on_ivar == name_t[:kind] || :on_gvar == name_t[:kind] then
|
1590
|
+
parse_method_dummy container
|
1591
|
+
|
1592
|
+
name = nil
|
1593
|
+
elsif (:on_kw == name_t[:kind]) && ('true' == name_t[:text] || 'false' == name_t[:text] || 'nil' == name_t[:text]) then
|
1594
|
+
klass_name = "#{name_t[:text].capitalize}Class"
|
1595
|
+
container = @store.find_class_named klass_name
|
1596
|
+
container ||= @top_level.add_class RDoc::NormalClass, klass_name
|
1597
|
+
|
1598
|
+
name = name_t2[:text]
|
1599
|
+
else
|
1600
|
+
warn "unexpected method name token #{name_t.inspect}"
|
1601
|
+
# break
|
1602
|
+
skip_method container
|
1603
|
+
|
1604
|
+
name = nil
|
1605
|
+
end
|
1606
|
+
|
1607
|
+
return name, container
|
1608
|
+
end
|
1609
|
+
|
1610
|
+
##
|
1611
|
+
# Extracts +yield+ parameters from +method+
|
1612
|
+
|
1613
|
+
def parse_method_or_yield_parameters(method = nil,
|
1614
|
+
modifiers = RDoc::METHOD_MODIFIERS)
|
1615
|
+
skip_tkspace_without_nl
|
1616
|
+
tk = get_tk
|
1617
|
+
end_token = get_end_token tk
|
1618
|
+
return '' unless end_token
|
1619
|
+
|
1620
|
+
nest = 0
|
1621
|
+
continue = false
|
1622
|
+
|
1623
|
+
while tk != nil do
|
1624
|
+
case tk[:kind]
|
1625
|
+
when :on_semicolon then
|
1626
|
+
break if nest == 0
|
1627
|
+
when :on_lbracket then
|
1628
|
+
nest += 1
|
1629
|
+
when :on_rbracket then
|
1630
|
+
nest -= 1
|
1631
|
+
when :on_lbrace then
|
1632
|
+
nest += 1
|
1633
|
+
when :on_rbrace then
|
1634
|
+
nest -= 1
|
1635
|
+
if nest <= 0
|
1636
|
+
# we might have a.each { |i| yield i }
|
1637
|
+
unget_tk(tk) if nest < 0
|
1638
|
+
break
|
1639
|
+
end
|
1640
|
+
when :on_lparen then
|
1641
|
+
nest += 1
|
1642
|
+
when end_token[:kind] then
|
1643
|
+
if end_token[:kind] == :on_rparen
|
1644
|
+
nest -= 1
|
1645
|
+
break if nest <= 0
|
1646
|
+
else
|
1647
|
+
break
|
1648
|
+
end
|
1649
|
+
when :on_rparen then
|
1650
|
+
nest -= 1
|
1651
|
+
when :on_comment, :on_embdoc then
|
1652
|
+
@read.pop
|
1653
|
+
if :on_nl == end_token[:kind] and "\n" == tk[:text][-1] and
|
1654
|
+
(!continue or (tk[:state] & RDoc::Parser::RipperStateLex::EXPR_LABEL) != 0) then
|
1655
|
+
if method && method.block_params.nil? then
|
1656
|
+
unget_tk tk
|
1657
|
+
read_documentation_modifiers method, modifiers
|
1658
|
+
end
|
1659
|
+
break if !continue and nest <= 0
|
1660
|
+
end
|
1661
|
+
when :on_comma then
|
1662
|
+
continue = true
|
1663
|
+
when :on_ident then
|
1664
|
+
continue = false if continue
|
1665
|
+
end
|
1666
|
+
tk = get_tk
|
1667
|
+
end
|
1668
|
+
|
1669
|
+
get_tkread_clean(/\s+/, ' ')
|
1670
|
+
end
|
1671
|
+
|
1672
|
+
##
|
1673
|
+
# Capture the method's parameters. Along the way, look for a comment
|
1674
|
+
# containing:
|
1675
|
+
#
|
1676
|
+
# # yields: ....
|
1677
|
+
#
|
1678
|
+
# and add this as the block_params for the method
|
1679
|
+
|
1680
|
+
def parse_method_parameters method
|
1681
|
+
res = parse_method_or_yield_parameters method
|
1682
|
+
|
1683
|
+
res = "(#{res})" unless res =~ /\A\(/
|
1684
|
+
method.params = res unless method.params
|
1685
|
+
|
1686
|
+
return if method.block_params
|
1687
|
+
|
1688
|
+
skip_tkspace_without_nl
|
1689
|
+
read_documentation_modifiers method, RDoc::METHOD_MODIFIERS
|
1690
|
+
end
|
1691
|
+
|
1692
|
+
##
|
1693
|
+
# Parses an RDoc::NormalModule in +container+ with +comment+
|
1694
|
+
|
1695
|
+
def parse_module container, single, tk, comment
|
1696
|
+
container, name_t, = get_class_or_module container
|
1697
|
+
|
1698
|
+
name = name_t[:text]
|
1699
|
+
|
1700
|
+
mod = container.add_module RDoc::NormalModule, name
|
1701
|
+
mod.ignore unless container.document_children
|
1702
|
+
record_location mod
|
1703
|
+
|
1704
|
+
read_documentation_modifiers mod, RDoc::CLASS_MODIFIERS
|
1705
|
+
mod.add_comment comment, @top_level
|
1706
|
+
parse_statements mod
|
1707
|
+
|
1708
|
+
# after end modifiers
|
1709
|
+
read_documentation_modifiers mod, RDoc::CLASS_MODIFIERS
|
1710
|
+
|
1711
|
+
@stats.add_module mod
|
1712
|
+
end
|
1713
|
+
|
1714
|
+
##
|
1715
|
+
# Parses an RDoc::Require in +context+ containing +comment+
|
1716
|
+
|
1717
|
+
def parse_require(context, comment)
|
1718
|
+
skip_tkspace_comment
|
1719
|
+
tk = get_tk
|
1720
|
+
|
1721
|
+
if :on_lparen == tk[:kind] then
|
1722
|
+
skip_tkspace_comment
|
1723
|
+
tk = get_tk
|
1724
|
+
end
|
1725
|
+
|
1726
|
+
name = tk[:text][1..-2] if :on_tstring == tk[:kind]
|
1727
|
+
|
1728
|
+
if name then
|
1729
|
+
@top_level.add_require RDoc::Require.new(name, comment)
|
1730
|
+
else
|
1731
|
+
unget_tk tk
|
1732
|
+
end
|
1733
|
+
end
|
1734
|
+
|
1735
|
+
##
|
1736
|
+
# Parses a rescue
|
1737
|
+
|
1738
|
+
def parse_rescue
|
1739
|
+
skip_tkspace_without_nl
|
1740
|
+
|
1741
|
+
while tk = get_tk
|
1742
|
+
case tk[:kind]
|
1743
|
+
when :on_nl, :on_semicolon, :on_comment then
|
1744
|
+
break
|
1745
|
+
when :on_comma then
|
1746
|
+
skip_tkspace_without_nl
|
1747
|
+
|
1748
|
+
get_tk if :on_nl == peek_tk[:kind]
|
1749
|
+
end
|
1750
|
+
|
1751
|
+
skip_tkspace_without_nl
|
1752
|
+
end
|
1753
|
+
end
|
1754
|
+
|
1755
|
+
##
|
1756
|
+
# Retrieve comment body without =begin/=end
|
1757
|
+
|
1758
|
+
def retrieve_comment_body(tk)
|
1759
|
+
if :on_embdoc == tk[:kind]
|
1760
|
+
tk[:text].gsub(/\A=begin.*\n/, '').gsub(/=end\n?\z/, '')
|
1761
|
+
else
|
1762
|
+
tk[:text]
|
1763
|
+
end
|
1764
|
+
end
|
1765
|
+
|
1766
|
+
##
|
1767
|
+
# The core of the Ruby parser.
|
1768
|
+
|
1769
|
+
def parse_statements(container, single = NORMAL, current_method = nil,
|
1770
|
+
comment = new_comment(''))
|
1771
|
+
raise 'no' unless RDoc::Comment === comment
|
1772
|
+
comment = RDoc::Encoding.change_encoding comment, @encoding if @encoding
|
1773
|
+
|
1774
|
+
nest = 1
|
1775
|
+
save_visibility = container.visibility
|
1776
|
+
|
1777
|
+
non_comment_seen = true
|
1778
|
+
|
1779
|
+
while tk = get_tk do
|
1780
|
+
keep_comment = false
|
1781
|
+
try_parse_comment = false
|
1782
|
+
|
1783
|
+
non_comment_seen = true unless (:on_comment == tk[:kind] or :on_embdoc == tk[:kind])
|
1784
|
+
|
1785
|
+
case tk[:kind]
|
1786
|
+
when :on_nl, :on_ignored_nl, :on_comment, :on_embdoc then
|
1787
|
+
if :on_nl == tk[:kind] or :on_ignored_nl == tk[:kind]
|
1788
|
+
skip_tkspace
|
1789
|
+
tk = get_tk
|
1790
|
+
else
|
1791
|
+
past_tokens = @read.size > 1 ? @read[0..-2] : []
|
1792
|
+
nl_position = 0
|
1793
|
+
past_tokens.reverse.each_with_index do |read_tk, i|
|
1794
|
+
if read_tk =~ /^\n$/ then
|
1795
|
+
nl_position = (past_tokens.size - 1) - i
|
1796
|
+
break
|
1797
|
+
elsif read_tk =~ /^#.*\n$/ then
|
1798
|
+
nl_position = ((past_tokens.size - 1) - i) + 1
|
1799
|
+
break
|
1800
|
+
end
|
1801
|
+
end
|
1802
|
+
comment_only_line = past_tokens[nl_position..-1].all?{ |c| c =~ /^\s+$/ }
|
1803
|
+
unless comment_only_line then
|
1804
|
+
tk = get_tk
|
1805
|
+
end
|
1806
|
+
end
|
1807
|
+
|
1808
|
+
if tk and (:on_comment == tk[:kind] or :on_embdoc == tk[:kind]) then
|
1809
|
+
if non_comment_seen then
|
1810
|
+
# Look for RDoc in a comment about to be thrown away
|
1811
|
+
non_comment_seen = parse_comment container, tk, comment unless
|
1812
|
+
comment.empty?
|
1813
|
+
|
1814
|
+
comment = ''
|
1815
|
+
comment = RDoc::Encoding.change_encoding comment, @encoding if @encoding
|
1816
|
+
end
|
1817
|
+
|
1818
|
+
line_no = nil
|
1819
|
+
while tk and (:on_comment == tk[:kind] or :on_embdoc == tk[:kind]) do
|
1820
|
+
comment_body = retrieve_comment_body(tk)
|
1821
|
+
line_no = tk[:line_no] if comment.empty?
|
1822
|
+
comment += comment_body
|
1823
|
+
comment << "\n" unless comment_body =~ /\n\z/
|
1824
|
+
|
1825
|
+
if comment_body.size > 1 && comment_body =~ /\n\z/ then
|
1826
|
+
skip_tkspace_without_nl # leading spaces
|
1827
|
+
end
|
1828
|
+
tk = get_tk
|
1829
|
+
end
|
1830
|
+
|
1831
|
+
comment = new_comment comment, line_no
|
1832
|
+
|
1833
|
+
unless comment.empty? then
|
1834
|
+
look_for_directives_in container, comment
|
1835
|
+
|
1836
|
+
if container.done_documenting then
|
1837
|
+
throw :eof if RDoc::TopLevel === container
|
1838
|
+
container.ongoing_visibility = save_visibility
|
1839
|
+
end
|
1840
|
+
end
|
1841
|
+
|
1842
|
+
keep_comment = true
|
1843
|
+
else
|
1844
|
+
non_comment_seen = true
|
1845
|
+
end
|
1846
|
+
|
1847
|
+
unget_tk tk
|
1848
|
+
keep_comment = true
|
1849
|
+
container.current_line_visibility = nil
|
1850
|
+
|
1851
|
+
when :on_kw then
|
1852
|
+
case tk[:text]
|
1853
|
+
when 'class' then
|
1854
|
+
parse_class container, single, tk, comment
|
1855
|
+
|
1856
|
+
when 'module' then
|
1857
|
+
parse_module container, single, tk, comment
|
1858
|
+
|
1859
|
+
when 'def' then
|
1860
|
+
parse_method container, single, tk, comment
|
1861
|
+
|
1862
|
+
when 'alias' then
|
1863
|
+
parse_alias container, single, tk, comment unless current_method
|
1864
|
+
|
1865
|
+
when 'yield' then
|
1866
|
+
if current_method.nil? then
|
1867
|
+
warn "Warning: yield outside of method" if container.document_self
|
1868
|
+
else
|
1869
|
+
parse_yield container, single, tk, current_method
|
1870
|
+
end
|
1871
|
+
|
1872
|
+
when 'until', 'while' then
|
1873
|
+
if (tk[:state] & RDoc::Parser::RipperStateLex::EXPR_LABEL) == 0
|
1874
|
+
nest += 1
|
1875
|
+
skip_optional_do_after_expression
|
1876
|
+
end
|
1877
|
+
|
1878
|
+
# Until and While can have a 'do', which shouldn't increase the nesting.
|
1879
|
+
# We can't solve the general case, but we can handle most occurrences by
|
1880
|
+
# ignoring a do at the end of a line.
|
1881
|
+
|
1882
|
+
# 'for' is trickier
|
1883
|
+
when 'for' then
|
1884
|
+
nest += 1
|
1885
|
+
skip_for_variable
|
1886
|
+
skip_optional_do_after_expression
|
1887
|
+
|
1888
|
+
when 'case', 'do', 'if', 'unless', 'begin' then
|
1889
|
+
if (tk[:state] & RDoc::Parser::RipperStateLex::EXPR_LABEL) == 0
|
1890
|
+
nest += 1
|
1891
|
+
end
|
1892
|
+
|
1893
|
+
when 'super' then
|
1894
|
+
current_method.calls_super = true if current_method
|
1895
|
+
|
1896
|
+
when 'rescue' then
|
1897
|
+
parse_rescue
|
1898
|
+
|
1899
|
+
when 'end' then
|
1900
|
+
nest -= 1
|
1901
|
+
if nest == 0 then
|
1902
|
+
container.ongoing_visibility = save_visibility
|
1903
|
+
|
1904
|
+
parse_comment container, tk, comment unless comment.empty?
|
1905
|
+
|
1906
|
+
return
|
1907
|
+
end
|
1908
|
+
end
|
1909
|
+
|
1910
|
+
when :on_const then
|
1911
|
+
unless parse_constant container, tk, comment, current_method then
|
1912
|
+
try_parse_comment = true
|
1913
|
+
end
|
1914
|
+
|
1915
|
+
when :on_ident then
|
1916
|
+
if nest == 1 and current_method.nil? then
|
1917
|
+
keep_comment = parse_identifier container, single, tk, comment
|
1918
|
+
end
|
1919
|
+
|
1920
|
+
case tk[:text]
|
1921
|
+
when "require" then
|
1922
|
+
parse_require container, comment
|
1923
|
+
when "include" then
|
1924
|
+
parse_extend_or_include RDoc::Include, container, comment
|
1925
|
+
when "extend" then
|
1926
|
+
parse_extend_or_include RDoc::Extend, container, comment
|
1927
|
+
when "included" then
|
1928
|
+
parse_included_with_activesupport_concern container, comment
|
1929
|
+
end
|
1930
|
+
|
1931
|
+
else
|
1932
|
+
try_parse_comment = nest == 1
|
1933
|
+
end
|
1934
|
+
|
1935
|
+
if try_parse_comment then
|
1936
|
+
non_comment_seen = parse_comment container, tk, comment unless
|
1937
|
+
comment.empty?
|
1938
|
+
|
1939
|
+
keep_comment = false
|
1940
|
+
end
|
1941
|
+
|
1942
|
+
unless keep_comment then
|
1943
|
+
comment = new_comment ''
|
1944
|
+
comment = RDoc::Encoding.change_encoding comment, @encoding if @encoding
|
1945
|
+
container.params = nil
|
1946
|
+
container.block_params = nil
|
1947
|
+
end
|
1948
|
+
|
1949
|
+
consume_trailing_spaces
|
1950
|
+
end
|
1951
|
+
|
1952
|
+
container.params = nil
|
1953
|
+
container.block_params = nil
|
1954
|
+
end
|
1955
|
+
|
1956
|
+
##
|
1957
|
+
# Parse up to +no+ symbol arguments
|
1958
|
+
|
1959
|
+
def parse_symbol_arg(no = nil)
|
1960
|
+
skip_tkspace_comment
|
1961
|
+
|
1962
|
+
tk = get_tk
|
1963
|
+
if tk[:kind] == :on_lparen
|
1964
|
+
parse_symbol_arg_paren no
|
1965
|
+
else
|
1966
|
+
parse_symbol_arg_space no, tk
|
1967
|
+
end
|
1968
|
+
end
|
1969
|
+
|
1970
|
+
##
|
1971
|
+
# Parses up to +no+ symbol arguments surrounded by () and places them in
|
1972
|
+
# +args+.
|
1973
|
+
|
1974
|
+
def parse_symbol_arg_paren no # :nodoc:
|
1975
|
+
args = []
|
1976
|
+
|
1977
|
+
loop do
|
1978
|
+
skip_tkspace_comment
|
1979
|
+
if tk1 = parse_symbol_in_arg
|
1980
|
+
args.push tk1
|
1981
|
+
break if no and args.size >= no
|
1982
|
+
end
|
1983
|
+
|
1984
|
+
skip_tkspace_comment
|
1985
|
+
case (tk2 = get_tk)[:kind]
|
1986
|
+
when :on_rparen
|
1987
|
+
break
|
1988
|
+
when :on_comma
|
1989
|
+
else
|
1990
|
+
warn("unexpected token: '#{tk2.inspect}'") if $DEBUG_RDOC
|
1991
|
+
break
|
1992
|
+
end
|
1993
|
+
end
|
1994
|
+
|
1995
|
+
args
|
1996
|
+
end
|
1997
|
+
|
1998
|
+
##
|
1999
|
+
# Parses up to +no+ symbol arguments separated by spaces and places them in
|
2000
|
+
# +args+.
|
2001
|
+
|
2002
|
+
def parse_symbol_arg_space no, tk # :nodoc:
|
2003
|
+
args = []
|
2004
|
+
|
2005
|
+
unget_tk tk
|
2006
|
+
if tk = parse_symbol_in_arg
|
2007
|
+
args.push tk
|
2008
|
+
return args if no and args.size >= no
|
2009
|
+
end
|
2010
|
+
|
2011
|
+
loop do
|
2012
|
+
skip_tkspace_without_nl
|
2013
|
+
|
2014
|
+
tk1 = get_tk
|
2015
|
+
if tk1.nil? || :on_comma != tk1[:kind] then
|
2016
|
+
unget_tk tk1
|
2017
|
+
break
|
2018
|
+
end
|
2019
|
+
|
2020
|
+
skip_tkspace_comment
|
2021
|
+
if tk = parse_symbol_in_arg
|
2022
|
+
args.push tk
|
2023
|
+
break if no and args.size >= no
|
2024
|
+
end
|
2025
|
+
end
|
2026
|
+
|
2027
|
+
args
|
2028
|
+
end
|
2029
|
+
|
2030
|
+
##
|
2031
|
+
# Returns symbol text from the next token
|
2032
|
+
|
2033
|
+
def parse_symbol_in_arg
|
2034
|
+
tk = get_tk
|
2035
|
+
if :on_symbol == tk[:kind] then
|
2036
|
+
tk[:text].sub(/^:/, '')
|
2037
|
+
elsif :on_tstring == tk[:kind] then
|
2038
|
+
tk[:text][1..-2]
|
2039
|
+
elsif :on_dstring == tk[:kind] or :on_ident == tk[:kind] then
|
2040
|
+
nil # ignore
|
2041
|
+
else
|
2042
|
+
warn("Expected symbol or string, got #{tk.inspect}") if $DEBUG_RDOC
|
2043
|
+
nil
|
2044
|
+
end
|
2045
|
+
end
|
2046
|
+
|
2047
|
+
##
|
2048
|
+
# Parses statements in the top-level +container+
|
2049
|
+
|
2050
|
+
def parse_top_level_statements container
|
2051
|
+
comment = collect_first_comment
|
2052
|
+
|
2053
|
+
look_for_directives_in container, comment
|
2054
|
+
|
2055
|
+
throw :eof if container.done_documenting
|
2056
|
+
|
2057
|
+
@markup = comment.format
|
2058
|
+
|
2059
|
+
# HACK move if to RDoc::Context#comment=
|
2060
|
+
container.comment = comment if container.document_self unless comment.empty?
|
2061
|
+
|
2062
|
+
parse_statements container, NORMAL, nil, comment
|
2063
|
+
end
|
2064
|
+
|
2065
|
+
##
|
2066
|
+
# Determines the visibility in +container+ from +tk+
|
2067
|
+
|
2068
|
+
def parse_visibility(container, single, tk)
|
2069
|
+
vis_type, vis, singleton = get_visibility_information tk, single
|
2070
|
+
|
2071
|
+
skip_tkspace_comment false
|
2072
|
+
|
2073
|
+
ptk = peek_tk
|
2074
|
+
# Ryan Davis suggested the extension to ignore modifiers, because he
|
2075
|
+
# often writes
|
2076
|
+
#
|
2077
|
+
# protected unless $TESTING
|
2078
|
+
#
|
2079
|
+
if [:on_nl, :on_semicolon].include?(ptk[:kind]) || (:on_kw == ptk[:kind] && (['if', 'unless'].include?(ptk[:text]))) then
|
2080
|
+
container.ongoing_visibility = vis
|
2081
|
+
elsif :on_kw == ptk[:kind] && 'def' == ptk[:text]
|
2082
|
+
container.current_line_visibility = vis
|
2083
|
+
else
|
2084
|
+
update_visibility container, vis_type, vis, singleton
|
2085
|
+
end
|
2086
|
+
end
|
2087
|
+
|
2088
|
+
##
|
2089
|
+
# Parses a Module#private_constant or Module#public_constant call from +tk+.
|
2090
|
+
|
2091
|
+
def parse_constant_visibility(container, single, tk)
|
2092
|
+
args = parse_symbol_arg
|
2093
|
+
case tk[:text]
|
2094
|
+
when 'private_constant'
|
2095
|
+
vis = :private
|
2096
|
+
when 'public_constant'
|
2097
|
+
vis = :public
|
2098
|
+
else
|
2099
|
+
raise RDoc::Error, 'Unreachable'
|
2100
|
+
end
|
2101
|
+
container.set_constant_visibility_for args, vis
|
2102
|
+
end
|
2103
|
+
|
2104
|
+
##
|
2105
|
+
# Determines the block parameter for +context+
|
2106
|
+
|
2107
|
+
def parse_yield(context, single, tk, method)
|
2108
|
+
return if method.block_params
|
2109
|
+
|
2110
|
+
get_tkread
|
2111
|
+
method.block_params = parse_method_or_yield_parameters
|
2112
|
+
end
|
2113
|
+
|
2114
|
+
##
|
2115
|
+
# Directives are modifier comments that can appear after class, module, or
|
2116
|
+
# method names. For example:
|
2117
|
+
#
|
2118
|
+
# def fred # :yields: a, b
|
2119
|
+
#
|
2120
|
+
# or:
|
2121
|
+
#
|
2122
|
+
# class MyClass # :nodoc:
|
2123
|
+
#
|
2124
|
+
# We return the directive name and any parameters as a two element array if
|
2125
|
+
# the name is in +allowed+. A directive can be found anywhere up to the end
|
2126
|
+
# of the current line.
|
2127
|
+
|
2128
|
+
def read_directive allowed
|
2129
|
+
tokens = []
|
2130
|
+
|
2131
|
+
while tk = get_tk do
|
2132
|
+
tokens << tk
|
2133
|
+
|
2134
|
+
if :on_nl == tk[:kind] or (:on_kw == tk[:kind] && 'def' == tk[:text]) then
|
2135
|
+
return
|
2136
|
+
elsif :on_comment == tk[:kind] or :on_embdoc == tk[:kind] then
|
2137
|
+
return unless tk[:text] =~ /:?\b([\w-]+):\s*(.*)/
|
2138
|
+
|
2139
|
+
directive = $1.downcase
|
2140
|
+
|
2141
|
+
return [directive, $2] if allowed.include? directive
|
2142
|
+
|
2143
|
+
return
|
2144
|
+
end
|
2145
|
+
end
|
2146
|
+
ensure
|
2147
|
+
unless tokens.length == 1 and (:on_comment == tokens.first[:kind] or :on_embdoc == tokens.first[:kind]) then
|
2148
|
+
tokens.reverse_each do |token|
|
2149
|
+
unget_tk token
|
2150
|
+
end
|
2151
|
+
end
|
2152
|
+
end
|
2153
|
+
|
2154
|
+
##
|
2155
|
+
# Handles directives following the definition for +context+ (any
|
2156
|
+
# RDoc::CodeObject) if the directives are +allowed+ at this point.
|
2157
|
+
#
|
2158
|
+
# See also RDoc::Markup::PreProcess#handle_directive
|
2159
|
+
|
2160
|
+
def read_documentation_modifiers context, allowed
|
2161
|
+
skip_tkspace_without_nl
|
2162
|
+
directive, value = read_directive allowed
|
2163
|
+
|
2164
|
+
return unless directive
|
2165
|
+
|
2166
|
+
@preprocess.handle_directive '', directive, value, context do |dir, param|
|
2167
|
+
if %w[notnew not_new not-new].include? dir then
|
2168
|
+
context.dont_rename_initialize = true
|
2169
|
+
|
2170
|
+
true
|
2171
|
+
end
|
2172
|
+
end
|
2173
|
+
end
|
2174
|
+
|
2175
|
+
##
|
2176
|
+
# Records the location of this +container+ in the file for this parser and
|
2177
|
+
# adds it to the list of classes and modules in the file.
|
2178
|
+
|
2179
|
+
def record_location container # :nodoc:
|
2180
|
+
case container
|
2181
|
+
when RDoc::ClassModule then
|
2182
|
+
@top_level.add_to_classes_or_modules container
|
2183
|
+
end
|
2184
|
+
|
2185
|
+
container.record_location @top_level
|
2186
|
+
end
|
2187
|
+
|
2188
|
+
##
|
2189
|
+
# Scans this Ruby file for Ruby constructs
|
2190
|
+
|
2191
|
+
def scan
|
2192
|
+
reset
|
2193
|
+
|
2194
|
+
catch :eof do
|
2195
|
+
begin
|
2196
|
+
parse_top_level_statements @top_level
|
2197
|
+
|
2198
|
+
rescue StandardError => e
|
2199
|
+
if @content.include?('<%') and @content.include?('%>') then
|
2200
|
+
# Maybe, this is ERB.
|
2201
|
+
$stderr.puts "\033[2KRDoc detects ERB file. Skips it for compatibility:"
|
2202
|
+
$stderr.puts @file_name
|
2203
|
+
return
|
2204
|
+
end
|
2205
|
+
|
2206
|
+
if @scanner_point >= @scanner.size
|
2207
|
+
now_line_no = @scanner[@scanner.size - 1][:line_no]
|
2208
|
+
else
|
2209
|
+
now_line_no = peek_tk[:line_no]
|
2210
|
+
end
|
2211
|
+
first_tk_index = @scanner.find_index { |tk| tk[:line_no] == now_line_no }
|
2212
|
+
last_tk_index = @scanner.find_index { |tk| tk[:line_no] == now_line_no + 1 }
|
2213
|
+
last_tk_index = last_tk_index ? last_tk_index - 1 : @scanner.size - 1
|
2214
|
+
code = @scanner[first_tk_index..last_tk_index].map{ |t| t[:text] }.join
|
2215
|
+
|
2216
|
+
$stderr.puts <<-EOF
|
2217
|
+
|
2218
|
+
#{self.class} failure around line #{now_line_no} of
|
2219
|
+
#{@file_name}
|
2220
|
+
|
2221
|
+
EOF
|
2222
|
+
|
2223
|
+
unless code.empty? then
|
2224
|
+
$stderr.puts code
|
2225
|
+
$stderr.puts
|
2226
|
+
end
|
2227
|
+
|
2228
|
+
raise e
|
2229
|
+
end
|
2230
|
+
end
|
2231
|
+
|
2232
|
+
@top_level
|
2233
|
+
end
|
2234
|
+
|
2235
|
+
##
|
2236
|
+
# while, until, and for have an optional do
|
2237
|
+
|
2238
|
+
def skip_optional_do_after_expression
|
2239
|
+
skip_tkspace_without_nl
|
2240
|
+
tk = get_tk
|
2241
|
+
|
2242
|
+
b_nest = 0
|
2243
|
+
nest = 0
|
2244
|
+
|
2245
|
+
loop do
|
2246
|
+
break unless tk
|
2247
|
+
case tk[:kind]
|
2248
|
+
when :on_semicolon, :on_nl, :on_ignored_nl then
|
2249
|
+
break if b_nest.zero?
|
2250
|
+
when :on_lparen then
|
2251
|
+
nest += 1
|
2252
|
+
when :on_rparen then
|
2253
|
+
nest -= 1
|
2254
|
+
when :on_kw then
|
2255
|
+
case tk[:text]
|
2256
|
+
when 'begin'
|
2257
|
+
b_nest += 1
|
2258
|
+
when 'end'
|
2259
|
+
b_nest -= 1
|
2260
|
+
when 'do'
|
2261
|
+
break if nest.zero?
|
2262
|
+
end
|
2263
|
+
when :on_comment, :on_embdoc then
|
2264
|
+
if b_nest.zero? and "\n" == tk[:text][-1] then
|
2265
|
+
break
|
2266
|
+
end
|
2267
|
+
end
|
2268
|
+
tk = get_tk
|
2269
|
+
end
|
2270
|
+
|
2271
|
+
skip_tkspace_without_nl
|
2272
|
+
|
2273
|
+
get_tk if peek_tk && :on_kw == peek_tk[:kind] && 'do' == peek_tk[:text]
|
2274
|
+
end
|
2275
|
+
|
2276
|
+
##
|
2277
|
+
# skip the var [in] part of a 'for' statement
|
2278
|
+
|
2279
|
+
def skip_for_variable
|
2280
|
+
skip_tkspace_without_nl
|
2281
|
+
get_tk
|
2282
|
+
skip_tkspace_without_nl
|
2283
|
+
tk = get_tk
|
2284
|
+
unget_tk(tk) unless :on_kw == tk[:kind] and 'in' == tk[:text]
|
2285
|
+
end
|
2286
|
+
|
2287
|
+
##
|
2288
|
+
# Skips the next method in +container+
|
2289
|
+
|
2290
|
+
def skip_method container
|
2291
|
+
meth = RDoc::AnyMethod.new "", "anon"
|
2292
|
+
parse_method_parameters meth
|
2293
|
+
parse_statements container, false, meth
|
2294
|
+
end
|
2295
|
+
|
2296
|
+
##
|
2297
|
+
# Skip spaces until a comment is found
|
2298
|
+
|
2299
|
+
def skip_tkspace_comment(skip_nl = true)
|
2300
|
+
loop do
|
2301
|
+
skip_nl ? skip_tkspace : skip_tkspace_without_nl
|
2302
|
+
next_tk = peek_tk
|
2303
|
+
return if next_tk.nil? || (:on_comment != next_tk[:kind] and :on_embdoc != next_tk[:kind])
|
2304
|
+
get_tk
|
2305
|
+
end
|
2306
|
+
end
|
2307
|
+
|
2308
|
+
##
|
2309
|
+
# Updates visibility in +container+ from +vis_type+ and +vis+.
|
2310
|
+
|
2311
|
+
def update_visibility container, vis_type, vis, singleton # :nodoc:
|
2312
|
+
new_methods = []
|
2313
|
+
|
2314
|
+
case vis_type
|
2315
|
+
when 'module_function' then
|
2316
|
+
args = parse_symbol_arg
|
2317
|
+
container.set_visibility_for args, :private, false
|
2318
|
+
|
2319
|
+
container.methods_matching args do |m|
|
2320
|
+
s_m = m.dup
|
2321
|
+
record_location s_m
|
2322
|
+
s_m.singleton = true
|
2323
|
+
new_methods << s_m
|
2324
|
+
end
|
2325
|
+
when 'public_class_method', 'private_class_method' then
|
2326
|
+
args = parse_symbol_arg
|
2327
|
+
|
2328
|
+
container.methods_matching args, true do |m|
|
2329
|
+
if m.parent != container then
|
2330
|
+
m = m.dup
|
2331
|
+
record_location m
|
2332
|
+
new_methods << m
|
2333
|
+
end
|
2334
|
+
|
2335
|
+
m.visibility = vis
|
2336
|
+
end
|
2337
|
+
else
|
2338
|
+
args = parse_symbol_arg
|
2339
|
+
container.set_visibility_for args, vis, singleton
|
2340
|
+
end
|
2341
|
+
|
2342
|
+
new_methods.each do |method|
|
2343
|
+
case method
|
2344
|
+
when RDoc::AnyMethod then
|
2345
|
+
container.add_method method
|
2346
|
+
when RDoc::Attr then
|
2347
|
+
container.add_attribute method
|
2348
|
+
end
|
2349
|
+
method.visibility = vis
|
2350
|
+
end
|
2351
|
+
end
|
2352
|
+
|
2353
|
+
##
|
2354
|
+
# Prints +message+ to +$stderr+ unless we're being quiet
|
2355
|
+
|
2356
|
+
def warn message
|
2357
|
+
@options.warn make_message message
|
2358
|
+
end
|
2359
|
+
|
2360
|
+
end
|