convenient_service 0.17.0 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -7
- data/lib/convenient_service/commands/is_service.rb +28 -0
- data/lib/convenient_service/commands/is_service_class.rb +30 -0
- data/lib/convenient_service/commands.rb +4 -0
- data/lib/convenient_service/common/plugins/ensures_negated_j_send_result/middleware.rb +22 -0
- data/lib/convenient_service/common/plugins/ensures_negated_j_send_result.rb +3 -0
- data/lib/convenient_service/common/plugins/has_around_callbacks/concern.rb +8 -1
- data/lib/convenient_service/common/plugins/has_around_callbacks/middleware.rb +28 -7
- data/lib/convenient_service/common/plugins/has_callbacks/concern.rb +19 -9
- data/lib/convenient_service/common/plugins/has_callbacks/entities/callback_collection.rb +49 -1
- data/lib/convenient_service/common/plugins/has_callbacks/middleware.rb +21 -3
- data/lib/convenient_service/common/plugins/has_callbacks.rb +0 -1
- data/lib/convenient_service/common/plugins/has_instance_proxy/entities/instance_proxy.rb +1 -1
- data/lib/convenient_service/common/plugins/has_internals/entities/internals/plugins/has_cache/concern.rb +12 -0
- data/lib/convenient_service/common/plugins.rb +3 -3
- data/lib/convenient_service/core/concern/class_methods.rb +3 -0
- data/lib/convenient_service/core/entities/config/entities/concerns/entities/stack.rb +22 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/container/concern/instance_methods.rb +1 -1
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware_creators/observable/entities/event.rb +13 -15
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/chain/commands/normalize_env.rb +55 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/chain/commands.rb +1 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/chain/concern/instance_methods.rb +3 -3
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/classic.rb +14 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/stack.rb +22 -0
- data/lib/convenient_service/core/entities/config/exceptions.rb +2 -0
- data/lib/convenient_service/core/entities/config.rb +3 -0
- data/lib/convenient_service/dependencies/built_in.rb +0 -7
- data/lib/convenient_service/dependencies/extractions/ds.rb +45 -0
- data/lib/convenient_service/dependencies/only_queries.rb +29 -0
- data/lib/convenient_service/dependencies/queries/gems/active_model.rb +38 -0
- data/lib/convenient_service/dependencies/queries/gems/logger.rb +39 -0
- data/lib/convenient_service/dependencies/queries/gems/paint.rb +39 -0
- data/lib/convenient_service/dependencies/queries/gems/rspec.rb +60 -0
- data/lib/convenient_service/dependencies/queries/ruby.rb +103 -0
- data/lib/convenient_service/dependencies/queries/version/null_version.rb +87 -0
- data/lib/convenient_service/dependencies/queries/version.rb +87 -0
- data/lib/convenient_service/dependencies/queries.rb +536 -0
- data/lib/convenient_service/dependencies.rb +2 -430
- data/lib/convenient_service/feature/configs/standard.rb +0 -2
- data/lib/convenient_service/logger.rb +9 -1
- data/lib/convenient_service/rspec/matchers/classes/call_chain_next.rb +41 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/commands/generate_printable_method.rb +46 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/delegation.rb +89 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/inputs.rb +223 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/outputs.rb +38 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matcher_collection.rb +157 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/arguments/commands/apply_stub_to_track_delegations.rb +77 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/arguments/commands/generate_printable_arguments.rb +94 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/arguments.rb +89 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/base.rb +99 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/return_custom_value.rb +91 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/return_delegation_value.rb +129 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/with_any_arguments.rb +31 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/with_concrete_arguments.rb +31 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/without_arguments.rb +31 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers.rb +11 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities.rb +5 -1
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/exceptions.rb +65 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to.rb +163 -41
- data/lib/convenient_service/service/configs/amazing_print_inspect/aliases.rb +7 -0
- data/lib/convenient_service/service/configs/amazing_print_inspect.rb +61 -0
- data/lib/convenient_service/service/configs/awesome_print_inspect.rb +1 -1
- data/lib/convenient_service/service/configs/{minimal.rb → essential.rb} +40 -93
- data/lib/convenient_service/service/configs/standard/v1.rb +47 -34
- data/lib/convenient_service/service/configs/standard.rb +70 -68
- data/lib/convenient_service/service/configs.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_connected_steps/concern.rb +503 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/and.rb +136 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/base.rb +126 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/empty.rb +104 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/group.rb +118 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb +118 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/or.rb +145 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/scalar.rb +133 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions.rb +10 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/step_collection.rb +224 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps/entities.rb +4 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps/exceptions.rb +95 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps/middleware.rb +30 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps.rb +6 -0
- data/lib/convenient_service/service/plugins/can_have_fallbacks/concern.rb +18 -0
- data/lib/convenient_service/service/plugins/can_have_fallbacks/exceptions.rb +22 -4
- data/lib/convenient_service/service/plugins/can_have_fallbacks/middleware.rb +3 -3
- data/lib/convenient_service/service/plugins/can_have_rollbacks/middleware.rb +66 -0
- data/lib/convenient_service/service/plugins/can_have_rollbacks.rb +3 -0
- data/lib/convenient_service/service/plugins/can_have_sequential_steps/concern.rb +76 -0
- data/lib/convenient_service/service/plugins/{can_have_steps → can_have_sequential_steps}/entities/step_collection.rb +61 -10
- data/lib/convenient_service/service/plugins/can_have_sequential_steps/entities.rb +3 -0
- data/lib/convenient_service/service/plugins/{can_have_steps → can_have_sequential_steps}/middleware.rb +7 -3
- data/lib/convenient_service/service/plugins/can_have_sequential_steps.rb +5 -0
- data/lib/convenient_service/service/plugins/can_have_steps/commands/is_step.rb +34 -0
- data/lib/convenient_service/service/plugins/can_have_steps/commands.rb +1 -0
- data/lib/convenient_service/service/plugins/can_have_steps/concern.rb +4 -57
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/define_method_in_container.rb +45 -26
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/reassignment.rb +0 -2
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/exceptions.rb +4 -24
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb +166 -83
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/exceptions.rb +19 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/{can_be_result_step → can_be_method_step}/can_be_executed/exceptions.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_method_step/can_be_executed/middleware.rb +52 -6
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_method_step/can_be_executed.rb +1 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_method_step/concern.rb +7 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_alternative_steps.rb +3 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_fallbacks/concern.rb +0 -46
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_fallbacks/exceptions.rb +53 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_fallbacks/middleware.rb +75 -6
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_fallbacks.rb +1 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_parent_result/middleware.rb +13 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_amazing_print_inspect/concern.rb +46 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_amazing_print_inspect.rb +3 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_awesome_print_inspect/concern.rb +3 -2
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_result/concern.rb +34 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_result/middleware.rb +58 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_result.rb +4 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins.rb +2 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities.rb +0 -1
- data/lib/convenient_service/service/plugins/can_have_steps.rb +41 -1
- data/lib/convenient_service/service/plugins/can_have_stubbed_results/commands/fetch_all_services_stubbed_results_cache.rb +2 -2
- data/lib/convenient_service/service/plugins/forbids_convenient_service_entities_as_constructor_arguments/exceptions.rb +53 -0
- data/lib/convenient_service/service/plugins/forbids_convenient_service_entities_as_constructor_arguments/middleware.rb +108 -0
- data/lib/convenient_service/service/plugins/forbids_convenient_service_entities_as_constructor_arguments.rb +4 -0
- data/lib/convenient_service/service/plugins/has_amazing_print_inspect/concern.rb +39 -0
- data/lib/convenient_service/service/plugins/has_amazing_print_inspect.rb +3 -0
- data/lib/convenient_service/service/plugins/{can_have_steps/entities/step/plugins/can_be_result_step → has_j_send_result/entities/result/plugins/can_be_from_exception}/concern.rb +7 -5
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_be_from_exception.rb +3 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_checked_status/concern.rb +2 -2
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_checked_status.rb +0 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_step/concern.rb +7 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_amazing_print_inspect/concern.rb +41 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_amazing_print_inspect.rb +3 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_awesome_print_inspect/concern.rb +2 -2
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/concern/instance_methods.rb +0 -7
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/plugins/has_amazing_print_inspect/concern.rb +46 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/plugins/has_amazing_print_inspect.rb +3 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/plugins/has_amazing_print_inspect/concern.rb +46 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/plugins/has_amazing_print_inspect.rb +3 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/plugins/has_amazing_print_inspect/concern.rb +46 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/plugins/has_amazing_print_inspect.rb +3 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/concern/instance_methods.rb +45 -17
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins/can_be_checked/concern.rb +38 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins/can_be_checked/middleware.rb +51 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins/can_be_checked.rb +4 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins/has_amazing_print_inspect/concern.rb +46 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins/has_amazing_print_inspect.rb +3 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins.rb +1 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/exceptions.rb +15 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_negated_result/concern.rb +72 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_negated_result.rb +3 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/helps_to_learn_similarities_with_common_objects/concern/instance_methods.rb +161 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/helps_to_learn_similarities_with_common_objects/concern.rb +27 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/helps_to_learn_similarities_with_common_objects/exceptions.rb +34 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/helps_to_learn_similarities_with_common_objects.rb +4 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/raises_on_not_checked_result_status/middleware.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins.rb +3 -0
- data/lib/convenient_service/service/plugins/has_j_send_result.rb +0 -1
- data/lib/convenient_service/service/plugins/has_j_send_result_params_validations/using_dry_validation/middleware.rb +4 -0
- data/lib/convenient_service/service/plugins/has_mermaid_flowchart/concern.rb +6 -1
- data/lib/convenient_service/service/plugins/has_negated_j_send_result/concern.rb +23 -0
- data/lib/convenient_service/service/plugins/has_negated_j_send_result.rb +3 -0
- data/lib/convenient_service/service/plugins/has_negated_result/concern.rb +33 -0
- data/lib/convenient_service/service/plugins/{has_j_send_result → has_negated_result}/exceptions.rb +3 -3
- data/lib/convenient_service/service/plugins/has_negated_result.rb +4 -0
- data/lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/middleware.rb +1 -0
- data/lib/convenient_service/service/plugins/{wraps_result_in_db_transaction → wraps_result_in_d_b_transaction}/middleware.rb +1 -1
- data/lib/convenient_service/service/plugins.rb +10 -3
- data/lib/convenient_service/specification.rb +28 -0
- data/lib/convenient_service/support/backtrace_cleaner.rb +6 -1
- data/lib/convenient_service/support/cache/entities/caches/base.rb +3 -0
- data/lib/convenient_service/support/counter.rb +2 -0
- data/lib/convenient_service/support/method_parameters.rb +121 -0
- data/lib/convenient_service/support/middleware/stack_builder.rb +37 -0
- data/lib/convenient_service/support/never_reach_here.rb +21 -0
- data/lib/convenient_service/support/thread_safe_counter.rb +1 -0
- data/lib/convenient_service/support/unique_value.rb +3 -0
- data/lib/convenient_service/support/value.rb +78 -0
- data/lib/convenient_service/support.rb +3 -3
- data/lib/convenient_service/utils/array/find_last.rb +8 -3
- data/lib/convenient_service/utils/object/get_own_method.rb +54 -0
- data/lib/convenient_service/utils/object/instance_variable_delete.rb +1 -1
- data/lib/convenient_service/utils/object/safe_send.rb +84 -0
- data/lib/convenient_service/utils/object.rb +24 -0
- data/lib/convenient_service/utils/string/enclose.rb +52 -0
- data/lib/convenient_service/utils/string.rb +5 -0
- data/lib/convenient_service/version.rb +1 -1
- data/lib/convenient_service.rb +85 -0
- metadata +256 -322
- data/.dev/.tmuxinator.yml +0 -22
- data/.dockerignore +0 -1
- data/.gem_release.yml +0 -11
- data/.github/contributing.md +0 -15
- data/.github/issue_template.md +0 -35
- data/.github/pull_request_template.md +0 -31
- data/.github/workflows/cd.yml +0 -68
- data/.github/workflows/ci.yml +0 -212
- data/.gitignore +0 -66
- data/.inch.yml +0 -7
- data/.rspec +0 -3
- data/.rubocop.yml +0 -45
- data/.rubocop_rspec.yml +0 -58
- data/.ruby-version +0 -1
- data/.tool-versions +0 -1
- data/.vscode/CacheItsValue.code-snippets +0 -15
- data/.vscode/DelegateTo.code-snippets +0 -15
- data/.vscode/cache_its_value.code-snippets +0 -17
- data/.vscode/comparison.code-snippets +0 -41
- data/.vscode/delegate_to.code-snippets +0 -20
- data/.yardopts +0 -16
- data/Appraisals +0 -146
- data/CHANGELOG.md +0 -504
- data/Gemfile +0 -17
- data/ROADMAP.md +0 -92
- data/Rakefile +0 -54
- data/Taskfile.yml +0 -679
- data/benchmark/commit_config/ips.rb +0 -18
- data/benchmark/commit_config/profile.rb +0 -30
- data/benchmark/empty_service/ips.rb +0 -123
- data/benchmark/has_committed_config/ips.rb +0 -78
- data/benchmark/has_committed_config/profile.rb +0 -30
- data/convenient_service.gemspec +0 -233
- data/coverage/.gitkeep +0 -0
- data/docker/2.7/Dockerfile +0 -73
- data/docker/3.0/Dockerfile +0 -73
- data/docker/3.1/Dockerfile +0 -73
- data/docker/3.2/Dockerfile +0 -73
- data/docker/jruby-9.4/Dockerfile +0 -88
- data/docker/truffleruby-22.3/Dockerfile +0 -91
- data/docs/.gitkeep +0 -0
- data/docs/api/.gitkeep +0 -0
- data/env.rb +0 -23
- data/gemfiles/.gitkeep +0 -0
- data/lib/convenient_service/common/plugins/has_callbacks/container.rb +0 -17
- data/lib/convenient_service/common/plugins/normalizes_env/middleware.rb +0 -31
- data/lib/convenient_service/common/plugins/normalizes_env.rb +0 -3
- data/lib/convenient_service/examples/dry/gemfile/dry_service/config.rb +0 -45
- data/lib/convenient_service/examples/dry/gemfile/dry_service.rb +0 -3
- data/lib/convenient_service/examples/dry/gemfile/services/assert_file_exists.rb +0 -29
- data/lib/convenient_service/examples/dry/gemfile/services/assert_file_not_empty.rb +0 -29
- data/lib/convenient_service/examples/dry/gemfile/services/assert_node_available.rb +0 -26
- data/lib/convenient_service/examples/dry/gemfile/services/assert_npm_package_available.rb +0 -39
- data/lib/convenient_service/examples/dry/gemfile/services/assert_valid_ruby_syntax.rb +0 -41
- data/lib/convenient_service/examples/dry/gemfile/services/format.rb +0 -37
- data/lib/convenient_service/examples/dry/gemfile/services/format_body.rb +0 -93
- data/lib/convenient_service/examples/dry/gemfile/services/format_gems_with_envs.rb +0 -96
- data/lib/convenient_service/examples/dry/gemfile/services/format_gems_without_envs.rb +0 -84
- data/lib/convenient_service/examples/dry/gemfile/services/format_header.rb +0 -74
- data/lib/convenient_service/examples/dry/gemfile/services/parse_content.rb +0 -93
- data/lib/convenient_service/examples/dry/gemfile/services/print_shell_command.rb +0 -44
- data/lib/convenient_service/examples/dry/gemfile/services/read_file_content.rb +0 -31
- data/lib/convenient_service/examples/dry/gemfile/services/run_shell_command.rb +0 -45
- data/lib/convenient_service/examples/dry/gemfile/services/strip_comments.rb +0 -109
- data/lib/convenient_service/examples/dry/gemfile/services.rb +0 -18
- data/lib/convenient_service/examples/dry/gemfile.rb +0 -27
- data/lib/convenient_service/examples/dry/v1/gemfile/dry_service/config.rb +0 -47
- data/lib/convenient_service/examples/dry/v1/gemfile/dry_service.rb +0 -3
- data/lib/convenient_service/examples/dry/v1/gemfile/services/assert_file_exists.rb +0 -31
- data/lib/convenient_service/examples/dry/v1/gemfile/services/assert_file_not_empty.rb +0 -31
- data/lib/convenient_service/examples/dry/v1/gemfile/services/assert_node_available.rb +0 -28
- data/lib/convenient_service/examples/dry/v1/gemfile/services/assert_npm_package_available.rb +0 -41
- data/lib/convenient_service/examples/dry/v1/gemfile/services/assert_valid_ruby_syntax.rb +0 -43
- data/lib/convenient_service/examples/dry/v1/gemfile/services/format.rb +0 -39
- data/lib/convenient_service/examples/dry/v1/gemfile/services/format_body.rb +0 -95
- data/lib/convenient_service/examples/dry/v1/gemfile/services/format_gems_with_envs.rb +0 -98
- data/lib/convenient_service/examples/dry/v1/gemfile/services/format_gems_without_envs.rb +0 -86
- data/lib/convenient_service/examples/dry/v1/gemfile/services/format_header.rb +0 -76
- data/lib/convenient_service/examples/dry/v1/gemfile/services/parse_content.rb +0 -95
- data/lib/convenient_service/examples/dry/v1/gemfile/services/read_file_content.rb +0 -33
- data/lib/convenient_service/examples/dry/v1/gemfile/services/run_shell_command.rb +0 -43
- data/lib/convenient_service/examples/dry/v1/gemfile/services/strip_comments.rb +0 -111
- data/lib/convenient_service/examples/dry/v1/gemfile/services.rb +0 -17
- data/lib/convenient_service/examples/dry/v1/gemfile.rb +0 -29
- data/lib/convenient_service/examples/rails/gemfile/rails_service/config.rb +0 -56
- data/lib/convenient_service/examples/rails/gemfile/rails_service.rb +0 -3
- data/lib/convenient_service/examples/rails/gemfile/services/assert_file_exists.rb +0 -25
- data/lib/convenient_service/examples/rails/gemfile/services/assert_file_not_empty.rb +0 -25
- data/lib/convenient_service/examples/rails/gemfile/services/assert_node_available.rb +0 -26
- data/lib/convenient_service/examples/rails/gemfile/services/assert_npm_package_available.rb +0 -35
- data/lib/convenient_service/examples/rails/gemfile/services/assert_valid_ruby_syntax.rb +0 -35
- data/lib/convenient_service/examples/rails/gemfile/services/format.rb +0 -66
- data/lib/convenient_service/examples/rails/gemfile/services/format_body.rb +0 -79
- data/lib/convenient_service/examples/rails/gemfile/services/format_gems_with_envs.rb +0 -82
- data/lib/convenient_service/examples/rails/gemfile/services/format_gems_without_envs.rb +0 -70
- data/lib/convenient_service/examples/rails/gemfile/services/format_header.rb +0 -68
- data/lib/convenient_service/examples/rails/gemfile/services/merge_sections.rb +0 -25
- data/lib/convenient_service/examples/rails/gemfile/services/parse_content.rb +0 -89
- data/lib/convenient_service/examples/rails/gemfile/services/print_shell_command.rb +0 -40
- data/lib/convenient_service/examples/rails/gemfile/services/read_file_content.rb +0 -27
- data/lib/convenient_service/examples/rails/gemfile/services/replace_file_content.rb +0 -37
- data/lib/convenient_service/examples/rails/gemfile/services/run_shell_command.rb +0 -40
- data/lib/convenient_service/examples/rails/gemfile/services/strip_comments.rb +0 -107
- data/lib/convenient_service/examples/rails/gemfile/services.rb +0 -21
- data/lib/convenient_service/examples/rails/gemfile.rb +0 -27
- data/lib/convenient_service/examples/rails/v1/gemfile/rails_service/config.rb +0 -58
- data/lib/convenient_service/examples/rails/v1/gemfile/rails_service.rb +0 -3
- data/lib/convenient_service/examples/rails/v1/gemfile/services/assert_file_exists.rb +0 -27
- data/lib/convenient_service/examples/rails/v1/gemfile/services/assert_file_not_empty.rb +0 -27
- data/lib/convenient_service/examples/rails/v1/gemfile/services/assert_node_available.rb +0 -28
- data/lib/convenient_service/examples/rails/v1/gemfile/services/assert_npm_package_available.rb +0 -37
- data/lib/convenient_service/examples/rails/v1/gemfile/services/assert_valid_ruby_syntax.rb +0 -37
- data/lib/convenient_service/examples/rails/v1/gemfile/services/format.rb +0 -68
- data/lib/convenient_service/examples/rails/v1/gemfile/services/format_body.rb +0 -81
- data/lib/convenient_service/examples/rails/v1/gemfile/services/format_gems_with_envs.rb +0 -84
- data/lib/convenient_service/examples/rails/v1/gemfile/services/format_gems_without_envs.rb +0 -72
- data/lib/convenient_service/examples/rails/v1/gemfile/services/format_header.rb +0 -70
- data/lib/convenient_service/examples/rails/v1/gemfile/services/merge_sections.rb +0 -27
- data/lib/convenient_service/examples/rails/v1/gemfile/services/parse_content.rb +0 -91
- data/lib/convenient_service/examples/rails/v1/gemfile/services/read_file_content.rb +0 -29
- data/lib/convenient_service/examples/rails/v1/gemfile/services/replace_file_content.rb +0 -39
- data/lib/convenient_service/examples/rails/v1/gemfile/services/run_shell_command.rb +0 -38
- data/lib/convenient_service/examples/rails/v1/gemfile/services/strip_comments.rb +0 -109
- data/lib/convenient_service/examples/rails/v1/gemfile/services.rb +0 -20
- data/lib/convenient_service/examples/rails/v1/gemfile.rb +0 -29
- data/lib/convenient_service/examples/standard/cowsay/services/build_cloud.rb +0 -42
- data/lib/convenient_service/examples/standard/cowsay/services/build_cow.rb +0 -38
- data/lib/convenient_service/examples/standard/cowsay/services/print.rb +0 -32
- data/lib/convenient_service/examples/standard/cowsay/services.rb +0 -5
- data/lib/convenient_service/examples/standard/cowsay.rb +0 -26
- data/lib/convenient_service/examples/standard/date_time/services/safe_parse.rb +0 -31
- data/lib/convenient_service/examples/standard/date_time/services.rb +0 -3
- data/lib/convenient_service/examples/standard/date_time.rb +0 -25
- data/lib/convenient_service/examples/standard/factorial/services/calculate.rb +0 -55
- data/lib/convenient_service/examples/standard/factorial/services.rb +0 -3
- data/lib/convenient_service/examples/standard/factorial/utils/timeout/with_timeout.rb +0 -50
- data/lib/convenient_service/examples/standard/factorial/utils/timeout.rb +0 -21
- data/lib/convenient_service/examples/standard/factorial/utils.rb +0 -3
- data/lib/convenient_service/examples/standard/factorial.rb +0 -26
- data/lib/convenient_service/examples/standard/gemfile/services/assert_file_exists.rb +0 -30
- data/lib/convenient_service/examples/standard/gemfile/services/assert_file_not_empty.rb +0 -30
- data/lib/convenient_service/examples/standard/gemfile/services/assert_node_available.rb +0 -26
- data/lib/convenient_service/examples/standard/gemfile/services/assert_npm_package_available.rb +0 -48
- data/lib/convenient_service/examples/standard/gemfile/services/assert_valid_ruby_syntax.rb +0 -39
- data/lib/convenient_service/examples/standard/gemfile/services/format.rb +0 -80
- data/lib/convenient_service/examples/standard/gemfile/services/format_body.rb +0 -83
- data/lib/convenient_service/examples/standard/gemfile/services/format_gems_with_envs.rb +0 -86
- data/lib/convenient_service/examples/standard/gemfile/services/format_gems_without_envs.rb +0 -74
- data/lib/convenient_service/examples/standard/gemfile/services/format_header.rb +0 -66
- data/lib/convenient_service/examples/standard/gemfile/services/merge_sections.rb +0 -52
- data/lib/convenient_service/examples/standard/gemfile/services/parse_content.rb +0 -101
- data/lib/convenient_service/examples/standard/gemfile/services/print_shell_command.rb +0 -45
- data/lib/convenient_service/examples/standard/gemfile/services/read_file_content.rb +0 -39
- data/lib/convenient_service/examples/standard/gemfile/services/replace_file_content.rb +0 -48
- data/lib/convenient_service/examples/standard/gemfile/services/run_shell_command.rb +0 -54
- data/lib/convenient_service/examples/standard/gemfile/services/strip_comments.rb +0 -111
- data/lib/convenient_service/examples/standard/gemfile/services.rb +0 -21
- data/lib/convenient_service/examples/standard/gemfile.rb +0 -26
- data/lib/convenient_service/examples/standard/request_params/constants.rb +0 -15
- data/lib/convenient_service/examples/standard/request_params/entities/description.rb +0 -40
- data/lib/convenient_service/examples/standard/request_params/entities/format.rb +0 -40
- data/lib/convenient_service/examples/standard/request_params/entities/id.rb +0 -47
- data/lib/convenient_service/examples/standard/request_params/entities/logger.rb +0 -21
- data/lib/convenient_service/examples/standard/request_params/entities/request.rb +0 -23
- data/lib/convenient_service/examples/standard/request_params/entities/source.rb +0 -40
- data/lib/convenient_service/examples/standard/request_params/entities/tag.rb +0 -40
- data/lib/convenient_service/examples/standard/request_params/entities/title.rb +0 -40
- data/lib/convenient_service/examples/standard/request_params/entities.rb +0 -11
- data/lib/convenient_service/examples/standard/request_params/services/apply_default_param_values.rb +0 -26
- data/lib/convenient_service/examples/standard/request_params/services/cast_params.rb +0 -38
- data/lib/convenient_service/examples/standard/request_params/services/extract_params_from_body.rb +0 -70
- data/lib/convenient_service/examples/standard/request_params/services/extract_params_from_path.rb +0 -62
- data/lib/convenient_service/examples/standard/request_params/services/filter_out_unpermitted_params.rb +0 -26
- data/lib/convenient_service/examples/standard/request_params/services/log_request_params.rb +0 -54
- data/lib/convenient_service/examples/standard/request_params/services/merge_params.rb +0 -26
- data/lib/convenient_service/examples/standard/request_params/services/prepare.rb +0 -65
- data/lib/convenient_service/examples/standard/request_params/services/validate_casted_params.rb +0 -94
- data/lib/convenient_service/examples/standard/request_params/services/validate_uncasted_params.rb +0 -72
- data/lib/convenient_service/examples/standard/request_params/services.rb +0 -13
- data/lib/convenient_service/examples/standard/request_params/utils/array/wrap.rb +0 -46
- data/lib/convenient_service/examples/standard/request_params/utils/array.rb +0 -21
- data/lib/convenient_service/examples/standard/request_params/utils/http/request/parse_body.rb +0 -42
- data/lib/convenient_service/examples/standard/request_params/utils/http/request/parse_path.rb +0 -40
- data/lib/convenient_service/examples/standard/request_params/utils/http/request.rb +0 -28
- data/lib/convenient_service/examples/standard/request_params/utils/http.rb +0 -3
- data/lib/convenient_service/examples/standard/request_params/utils/integer/safe_parse.rb +0 -31
- data/lib/convenient_service/examples/standard/request_params/utils/integer.rb +0 -25
- data/lib/convenient_service/examples/standard/request_params/utils/json/safe_parse.rb +0 -40
- data/lib/convenient_service/examples/standard/request_params/utils/json.rb +0 -21
- data/lib/convenient_service/examples/standard/request_params/utils/object/blank.rb +0 -34
- data/lib/convenient_service/examples/standard/request_params/utils/object/present.rb +0 -31
- data/lib/convenient_service/examples/standard/request_params/utils/object.rb +0 -26
- data/lib/convenient_service/examples/standard/request_params/utils/url/valid.rb +0 -47
- data/lib/convenient_service/examples/standard/request_params/utils/url.rb +0 -21
- data/lib/convenient_service/examples/standard/request_params/utils.rb +0 -8
- data/lib/convenient_service/examples/standard/request_params.rb +0 -49
- data/lib/convenient_service/examples/standard/v1/cowsay/services/build_cloud.rb +0 -44
- data/lib/convenient_service/examples/standard/v1/cowsay/services/build_cow.rb +0 -40
- data/lib/convenient_service/examples/standard/v1/cowsay/services/print.rb +0 -34
- data/lib/convenient_service/examples/standard/v1/cowsay/services.rb +0 -5
- data/lib/convenient_service/examples/standard/v1/cowsay.rb +0 -26
- data/lib/convenient_service/examples/standard/v1/date_time/services/safe_parse.rb +0 -33
- data/lib/convenient_service/examples/standard/v1/date_time/services.rb +0 -3
- data/lib/convenient_service/examples/standard/v1/date_time.rb +0 -25
- data/lib/convenient_service/examples/standard/v1/factorial/services/calculate.rb +0 -51
- data/lib/convenient_service/examples/standard/v1/factorial/services.rb +0 -3
- data/lib/convenient_service/examples/standard/v1/factorial/utils/timeout/with_timeout.rb +0 -52
- data/lib/convenient_service/examples/standard/v1/factorial/utils/timeout.rb +0 -23
- data/lib/convenient_service/examples/standard/v1/factorial/utils.rb +0 -3
- data/lib/convenient_service/examples/standard/v1/factorial.rb +0 -26
- data/lib/convenient_service/examples/standard/v1/gemfile/services/assert_file_exists.rb +0 -32
- data/lib/convenient_service/examples/standard/v1/gemfile/services/assert_file_not_empty.rb +0 -32
- data/lib/convenient_service/examples/standard/v1/gemfile/services/assert_node_available.rb +0 -28
- data/lib/convenient_service/examples/standard/v1/gemfile/services/assert_npm_package_available.rb +0 -50
- data/lib/convenient_service/examples/standard/v1/gemfile/services/assert_valid_ruby_syntax.rb +0 -41
- data/lib/convenient_service/examples/standard/v1/gemfile/services/format.rb +0 -82
- data/lib/convenient_service/examples/standard/v1/gemfile/services/format_body.rb +0 -85
- data/lib/convenient_service/examples/standard/v1/gemfile/services/format_gems_with_envs.rb +0 -88
- data/lib/convenient_service/examples/standard/v1/gemfile/services/format_gems_without_envs.rb +0 -76
- data/lib/convenient_service/examples/standard/v1/gemfile/services/format_header.rb +0 -68
- data/lib/convenient_service/examples/standard/v1/gemfile/services/merge_sections.rb +0 -54
- data/lib/convenient_service/examples/standard/v1/gemfile/services/parse_content.rb +0 -103
- data/lib/convenient_service/examples/standard/v1/gemfile/services/read_file_content.rb +0 -41
- data/lib/convenient_service/examples/standard/v1/gemfile/services/replace_file_content.rb +0 -50
- data/lib/convenient_service/examples/standard/v1/gemfile/services/run_shell_command.rb +0 -52
- data/lib/convenient_service/examples/standard/v1/gemfile/services/strip_comments.rb +0 -113
- data/lib/convenient_service/examples/standard/v1/gemfile/services.rb +0 -20
- data/lib/convenient_service/examples/standard/v1/gemfile.rb +0 -26
- data/lib/convenient_service/examples/standard/v1/request_params/constants.rb +0 -17
- data/lib/convenient_service/examples/standard/v1/request_params/entities/description.rb +0 -42
- data/lib/convenient_service/examples/standard/v1/request_params/entities/format.rb +0 -42
- data/lib/convenient_service/examples/standard/v1/request_params/entities/id.rb +0 -49
- data/lib/convenient_service/examples/standard/v1/request_params/entities/logger.rb +0 -23
- data/lib/convenient_service/examples/standard/v1/request_params/entities/request.rb +0 -25
- data/lib/convenient_service/examples/standard/v1/request_params/entities/source.rb +0 -42
- data/lib/convenient_service/examples/standard/v1/request_params/entities/tag.rb +0 -42
- data/lib/convenient_service/examples/standard/v1/request_params/entities/title.rb +0 -42
- data/lib/convenient_service/examples/standard/v1/request_params/entities.rb +0 -11
- data/lib/convenient_service/examples/standard/v1/request_params/services/apply_default_param_values.rb +0 -28
- data/lib/convenient_service/examples/standard/v1/request_params/services/cast_params.rb +0 -40
- data/lib/convenient_service/examples/standard/v1/request_params/services/extract_params_from_body.rb +0 -72
- data/lib/convenient_service/examples/standard/v1/request_params/services/extract_params_from_path.rb +0 -64
- data/lib/convenient_service/examples/standard/v1/request_params/services/filter_out_unpermitted_params.rb +0 -28
- data/lib/convenient_service/examples/standard/v1/request_params/services/log_request_params.rb +0 -56
- data/lib/convenient_service/examples/standard/v1/request_params/services/merge_params.rb +0 -28
- data/lib/convenient_service/examples/standard/v1/request_params/services/prepare.rb +0 -67
- data/lib/convenient_service/examples/standard/v1/request_params/services/validate_casted_params.rb +0 -96
- data/lib/convenient_service/examples/standard/v1/request_params/services/validate_uncasted_params.rb +0 -74
- data/lib/convenient_service/examples/standard/v1/request_params/services.rb +0 -13
- data/lib/convenient_service/examples/standard/v1/request_params/utils/array/wrap.rb +0 -48
- data/lib/convenient_service/examples/standard/v1/request_params/utils/array.rb +0 -23
- data/lib/convenient_service/examples/standard/v1/request_params/utils/http/request/parse_body.rb +0 -44
- data/lib/convenient_service/examples/standard/v1/request_params/utils/http/request/parse_path.rb +0 -42
- data/lib/convenient_service/examples/standard/v1/request_params/utils/http/request.rb +0 -30
- data/lib/convenient_service/examples/standard/v1/request_params/utils/http.rb +0 -3
- data/lib/convenient_service/examples/standard/v1/request_params/utils/integer/safe_parse.rb +0 -33
- data/lib/convenient_service/examples/standard/v1/request_params/utils/integer.rb +0 -27
- data/lib/convenient_service/examples/standard/v1/request_params/utils/json/safe_parse.rb +0 -42
- data/lib/convenient_service/examples/standard/v1/request_params/utils/json.rb +0 -23
- data/lib/convenient_service/examples/standard/v1/request_params/utils/object/blank.rb +0 -36
- data/lib/convenient_service/examples/standard/v1/request_params/utils/object/present.rb +0 -33
- data/lib/convenient_service/examples/standard/v1/request_params/utils/object.rb +0 -28
- data/lib/convenient_service/examples/standard/v1/request_params/utils/url/valid.rb +0 -49
- data/lib/convenient_service/examples/standard/v1/request_params/utils/url.rb +0 -23
- data/lib/convenient_service/examples/standard/v1/request_params/utils.rb +0 -8
- data/lib/convenient_service/examples/standard/v1/request_params.rb +0 -49
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/commands/generate_printable_method.rb +0 -50
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/arguments/commands/apply_stub_to_track_delegations.rb +0 -82
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/arguments/commands/generate_printable_arguments.rb +0 -100
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/arguments.rb +0 -95
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/base.rb +0 -87
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/return_its_value.rb +0 -132
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/with_any_arguments.rb +0 -37
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/with_concrete_arguments.rb +0 -37
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/without_arguments.rb +0 -37
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/values/base.rb +0 -41
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/values/with_calling_original.rb +0 -30
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/values/without_calling_original.rb +0 -30
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings.rb +0 -12
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings_collection/exceptions.rb +0 -57
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings_collection.rb +0 -171
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/delegation.rb +0 -79
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities.rb +0 -5
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher.rb +0 -276
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/reassignment/commands/define_method_in_container.rb +0 -74
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/reassignment/commands.rb +0 -3
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_result_step/can_be_executed/middleware.rb +0 -72
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_result_step/can_be_executed.rb +0 -4
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_result_step.rb +0 -5
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_fallbacks/result.rb +0 -3
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_checked_status/middleware.rb +0 -43
- data/lib/convenient_service/services.rb +0 -4
- data/lib/convenient_service/support/gems/active_model.rb +0 -36
- data/lib/convenient_service/support/gems/logger.rb +0 -37
- data/lib/convenient_service/support/gems/paint.rb +0 -37
- data/lib/convenient_service/support/gems/rspec.rb +0 -58
- data/lib/convenient_service/support/ruby.rb +0 -53
- data/lib/convenient_service/support/version/null_version.rb +0 -85
- data/lib/convenient_service/support/version.rb +0 -75
- data/logo.png +0 -0
- data/minitest.rb +0 -30
- data/yard/yard-convenient_service_concern.rb +0 -45
- /data/lib/convenient_service/{support → dependencies/queries}/gems.rb +0 -0
- /data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/{entities/matcher/commands.rb → commands.rb} +0 -0
- /data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/{matcher/entities/chainings/sub_matchers → sub_matchers}/arguments/commands.rb +0 -0
data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher.rb
DELETED
@@ -1,276 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative "matcher/commands"
|
4
|
-
require_relative "matcher/entities"
|
5
|
-
|
6
|
-
##
|
7
|
-
# @internal
|
8
|
-
# IMPORTANT: This matcher has a dedicated end-user doc. Do NOT forget to update it when needed.
|
9
|
-
# https://github.com/marian13/convenient_service_docs/blob/main/docs/api/tests/rspec/matchers/delegate_to.mdx
|
10
|
-
#
|
11
|
-
module ConvenientService
|
12
|
-
module RSpec
|
13
|
-
module PrimitiveMatchers
|
14
|
-
module Classes
|
15
|
-
##
|
16
|
-
# @internal
|
17
|
-
# specify {
|
18
|
-
# expect { method_class.cast(other, **options) }
|
19
|
-
# .to delegate_to(ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method::Commands::CastMethod, :call)
|
20
|
-
# .with_arguments(other: other, options: options)
|
21
|
-
# .and_return_its_value
|
22
|
-
# }
|
23
|
-
#
|
24
|
-
# { method_class.cast(other, **options) }
|
25
|
-
# # => block_expectation
|
26
|
-
#
|
27
|
-
# ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method::Commands::CastMethod
|
28
|
-
# # => object
|
29
|
-
#
|
30
|
-
# :call
|
31
|
-
# #=> method
|
32
|
-
#
|
33
|
-
# (other: other, options: options)
|
34
|
-
# # => expected_arguments
|
35
|
-
#
|
36
|
-
# and_return_its_value
|
37
|
-
# # => return_its_value_chaining
|
38
|
-
#
|
39
|
-
# NOTE: A similar (with different behaviour) matcher exists in `saharspec`.
|
40
|
-
# https://github.com/zverok/saharspec#send_messageobject-method-matcher
|
41
|
-
#
|
42
|
-
class DelegateTo
|
43
|
-
module Entities
|
44
|
-
class Matcher
|
45
|
-
include Support::Delegate
|
46
|
-
|
47
|
-
##
|
48
|
-
# @!attribute [r] object
|
49
|
-
# @return [Object] Can be any type.
|
50
|
-
#
|
51
|
-
attr_reader :object
|
52
|
-
|
53
|
-
##
|
54
|
-
# @!attribute [r] method
|
55
|
-
# @return [String, Symbol]
|
56
|
-
#
|
57
|
-
attr_reader :method
|
58
|
-
|
59
|
-
##
|
60
|
-
# @!attribute [r] block_expectation
|
61
|
-
# @return [Proc]
|
62
|
-
#
|
63
|
-
attr_reader :block_expectation
|
64
|
-
|
65
|
-
##
|
66
|
-
# @return [Boolean]
|
67
|
-
#
|
68
|
-
delegate :should_call_original?, to: :chainings
|
69
|
-
|
70
|
-
##
|
71
|
-
# @param object [Object]
|
72
|
-
# @param method [String, Symbol]
|
73
|
-
# @param block_expectation [Proc]
|
74
|
-
# @return [void]
|
75
|
-
#
|
76
|
-
def initialize(object, method, block_expectation = nil)
|
77
|
-
##
|
78
|
-
# TODO: `raise unless object.respond_to?(method)`.
|
79
|
-
# TODO: `any_block`.
|
80
|
-
# TODO: `with_warmup`.
|
81
|
-
#
|
82
|
-
@object = object
|
83
|
-
@method = method
|
84
|
-
@block_expectation = block_expectation
|
85
|
-
end
|
86
|
-
|
87
|
-
##
|
88
|
-
# @param block_expectation [Proc]
|
89
|
-
# @return [Boolean]
|
90
|
-
#
|
91
|
-
def matches?(block_expectation)
|
92
|
-
@block_expectation = block_expectation
|
93
|
-
|
94
|
-
chainings.arguments = Entities::Chainings::SubMatchers::WithAnyArguments.new(matcher: self) unless chainings.has_arguments?
|
95
|
-
chainings.call_original = Entities::Chainings::Values::WithCallingOriginal.new(matcher: self) unless chainings.has_call_original?
|
96
|
-
|
97
|
-
chainings.sub_matchers_match?(block_expectation)
|
98
|
-
end
|
99
|
-
|
100
|
-
##
|
101
|
-
# @internal
|
102
|
-
# NOTE: Required by RSpec.
|
103
|
-
# https://relishapp.com/rspec/rspec-expectations/v/3-8/docs/custom-matchers/define-a-matcher-supporting-block-expectations
|
104
|
-
#
|
105
|
-
def supports_block_expectations?
|
106
|
-
true
|
107
|
-
end
|
108
|
-
|
109
|
-
##
|
110
|
-
# @return [String]
|
111
|
-
#
|
112
|
-
def description
|
113
|
-
"delegate to `#{printable_method}`"
|
114
|
-
end
|
115
|
-
|
116
|
-
##
|
117
|
-
# @return [String]
|
118
|
-
#
|
119
|
-
def failure_message
|
120
|
-
chainings.failure_message
|
121
|
-
end
|
122
|
-
|
123
|
-
##
|
124
|
-
# @return [String]
|
125
|
-
#
|
126
|
-
def failure_message_when_negated
|
127
|
-
chainings.failure_message_when_negated
|
128
|
-
end
|
129
|
-
|
130
|
-
##
|
131
|
-
# @return [ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo]
|
132
|
-
# @raise [ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo::Exceptions::ArgumentsChainingIsAlreadySet]
|
133
|
-
#
|
134
|
-
def with_arguments(...)
|
135
|
-
self.expected_arguments = Support::Arguments.new(...)
|
136
|
-
|
137
|
-
chainings.arguments = Entities::Chainings::SubMatchers::WithConcreteArguments.new(matcher: self)
|
138
|
-
|
139
|
-
self
|
140
|
-
end
|
141
|
-
|
142
|
-
##
|
143
|
-
# @return [ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo]
|
144
|
-
# @raise [ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo::Exceptions::ArgumentsChainingIsAlreadySet]
|
145
|
-
#
|
146
|
-
def with_any_arguments
|
147
|
-
chainings.arguments = Entities::Chainings::SubMatchers::WithAnyArguments.new(matcher: self)
|
148
|
-
|
149
|
-
self
|
150
|
-
end
|
151
|
-
|
152
|
-
##
|
153
|
-
# @return [ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo]
|
154
|
-
# @raise [ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo::Exceptions::ArgumentsChainingIsAlreadySet]
|
155
|
-
#
|
156
|
-
def without_arguments
|
157
|
-
chainings.arguments = Entities::Chainings::SubMatchers::WithoutArguments.new(matcher: self)
|
158
|
-
|
159
|
-
self
|
160
|
-
end
|
161
|
-
|
162
|
-
##
|
163
|
-
# @return [ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo]
|
164
|
-
# @raise [ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo::Exceptions::ReturnItsValueChainingIsAlreadySet]
|
165
|
-
#
|
166
|
-
def and_return_its_value
|
167
|
-
chainings.return_its_value = Entities::Chainings::SubMatchers::ReturnItsValue.new(matcher: self)
|
168
|
-
|
169
|
-
self
|
170
|
-
end
|
171
|
-
|
172
|
-
##
|
173
|
-
# @return [ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo]
|
174
|
-
#
|
175
|
-
def with_calling_original
|
176
|
-
chainings.call_original = Entities::Chainings::Values::WithCallingOriginal.new(matcher: self)
|
177
|
-
|
178
|
-
self
|
179
|
-
end
|
180
|
-
|
181
|
-
##
|
182
|
-
# @return [ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo]
|
183
|
-
#
|
184
|
-
def without_calling_original
|
185
|
-
chainings.call_original = Entities::Chainings::Values::WithoutCallingOriginal.new(matcher: self)
|
186
|
-
|
187
|
-
self
|
188
|
-
end
|
189
|
-
|
190
|
-
##
|
191
|
-
# @return [ConvenientService::Support::Arguments]
|
192
|
-
#
|
193
|
-
def expected_arguments
|
194
|
-
@expected_arguments ||= Support::Arguments.null_arguments
|
195
|
-
end
|
196
|
-
|
197
|
-
##
|
198
|
-
# @param arguments [ConvenientService::Support::Arguments]
|
199
|
-
# @return [ConvenientService::Support::Arguments]
|
200
|
-
#
|
201
|
-
def expected_arguments=(arguments)
|
202
|
-
Utils::Object.instance_variable_delete(self, :@delegation_value)
|
203
|
-
|
204
|
-
@expected_arguments = arguments
|
205
|
-
end
|
206
|
-
|
207
|
-
##
|
208
|
-
# @return [Object] Can be any type.
|
209
|
-
#
|
210
|
-
# @internal
|
211
|
-
# IMPORTANT: Must be refreshed when `expected_arguments` are reset.
|
212
|
-
#
|
213
|
-
def delegation_value
|
214
|
-
Utils::Object.memoize_including_falsy_values(self, :@delegation_value) do
|
215
|
-
object.__send__(
|
216
|
-
method,
|
217
|
-
*expected_arguments.args,
|
218
|
-
**expected_arguments.kwargs,
|
219
|
-
&expected_arguments.block
|
220
|
-
)
|
221
|
-
end
|
222
|
-
end
|
223
|
-
|
224
|
-
##
|
225
|
-
# @return [ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo::Entities::Matcher::Entities::Chainings]
|
226
|
-
# @api private
|
227
|
-
#
|
228
|
-
def chainings
|
229
|
-
@chainings ||= Entities::ChainingsCollection.new(matcher: self)
|
230
|
-
end
|
231
|
-
|
232
|
-
##
|
233
|
-
# @return [Array]
|
234
|
-
# @api private
|
235
|
-
#
|
236
|
-
def delegations
|
237
|
-
@delegations ||= []
|
238
|
-
end
|
239
|
-
|
240
|
-
##
|
241
|
-
# @return [String]
|
242
|
-
#
|
243
|
-
def printable_method
|
244
|
-
@printable_method ||= Commands::GeneratePrintableMethod.call(object: object, method: method)
|
245
|
-
end
|
246
|
-
|
247
|
-
##
|
248
|
-
# @return [String]
|
249
|
-
#
|
250
|
-
def printable_block_expectation
|
251
|
-
@printable_block_expectation ||= Utils::Proc.display(block_expectation)
|
252
|
-
end
|
253
|
-
|
254
|
-
##
|
255
|
-
# @param other [Object] Can be any type.
|
256
|
-
# @return [Boolean, nil]
|
257
|
-
#
|
258
|
-
# @internal
|
259
|
-
# TODO: Unify ==(other) YARD tags.
|
260
|
-
#
|
261
|
-
def ==(other)
|
262
|
-
return unless other.instance_of?(self.class)
|
263
|
-
|
264
|
-
return false if object != other.object
|
265
|
-
return false if method != other.method
|
266
|
-
return false if block_expectation != other.block_expectation
|
267
|
-
|
268
|
-
true
|
269
|
-
end
|
270
|
-
end
|
271
|
-
end
|
272
|
-
end
|
273
|
-
end
|
274
|
-
end
|
275
|
-
end
|
276
|
-
end
|
@@ -1,74 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module ConvenientService
|
4
|
-
module Service
|
5
|
-
module Plugins
|
6
|
-
module CanHaveSteps
|
7
|
-
module Entities
|
8
|
-
class Method
|
9
|
-
module Entities
|
10
|
-
module Callers
|
11
|
-
class Reassignment < Callers::Base
|
12
|
-
module Commands
|
13
|
-
class DefineMethodInContainer < Support::Command
|
14
|
-
include Support::Delegate
|
15
|
-
|
16
|
-
attr_reader :method, :container, :index
|
17
|
-
|
18
|
-
delegate :key, :name, to: :method
|
19
|
-
|
20
|
-
def initialize(method:, container:, index:)
|
21
|
-
@method = method
|
22
|
-
@container = container
|
23
|
-
@index = index
|
24
|
-
end
|
25
|
-
|
26
|
-
##
|
27
|
-
# @return [Boolean]
|
28
|
-
#
|
29
|
-
def call
|
30
|
-
##
|
31
|
-
# NOTE: `prepend` is thread-safe.
|
32
|
-
#
|
33
|
-
container.klass.prepend reassigned_methods
|
34
|
-
|
35
|
-
return false if Utils::Module.instance_method_defined?(reassigned_methods, method, private: true)
|
36
|
-
|
37
|
-
<<~RUBY.tap { |code| reassigned_methods.module_eval(code, __FILE__, __LINE__ + 1) }
|
38
|
-
def #{name}
|
39
|
-
step =
|
40
|
-
steps
|
41
|
-
.select { |step| step.has_reassignment?(__method__) }
|
42
|
-
.select(&:completed?)
|
43
|
-
.last
|
44
|
-
|
45
|
-
return super unless step
|
46
|
-
|
47
|
-
key = step.reassignment(__method__).key.to_sym
|
48
|
-
|
49
|
-
step.result.unsafe_data[key]
|
50
|
-
end
|
51
|
-
RUBY
|
52
|
-
|
53
|
-
true
|
54
|
-
end
|
55
|
-
|
56
|
-
private
|
57
|
-
|
58
|
-
##
|
59
|
-
# @return [Module]
|
60
|
-
#
|
61
|
-
def reassigned_methods
|
62
|
-
@reassigned_methods ||= Utils::Module.fetch_own_const(container.klass, :ReassignedMethods) { ::Module.new }
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
@@ -1,72 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module ConvenientService
|
4
|
-
module Service
|
5
|
-
module Plugins
|
6
|
-
module CanHaveSteps
|
7
|
-
module Entities
|
8
|
-
class Step
|
9
|
-
module Plugins
|
10
|
-
module CanBeResultStep
|
11
|
-
module CanBeExecuted
|
12
|
-
class Middleware < MethodChainMiddleware
|
13
|
-
intended_for :service_result, entity: :step
|
14
|
-
|
15
|
-
##
|
16
|
-
# @return [ConvenientService::Service::Plugins::HasJSendResult::Entities::Result]
|
17
|
-
# @raise [ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Plugins::CanBeResultStep::CanBeExecuted::Exceptions::MethodForStepIsNotDefined]
|
18
|
-
#
|
19
|
-
# @internal
|
20
|
-
# NOTE: `kwargs` are intentionally NOT passed to `own_method.call`, since all the corresponding methods are available inside `own_method` body.
|
21
|
-
#
|
22
|
-
def next(...)
|
23
|
-
return chain.next(...) unless entity.result_step?
|
24
|
-
|
25
|
-
return own_method.call if own_method
|
26
|
-
|
27
|
-
::ConvenientService.raise Exceptions::MethodForStepIsNotDefined.new(service_class: organizer.class, method_name: method_name)
|
28
|
-
end
|
29
|
-
|
30
|
-
private
|
31
|
-
|
32
|
-
##
|
33
|
-
# @return [Method, nil]
|
34
|
-
#
|
35
|
-
# @internal
|
36
|
-
# TODO: A possible bottleneck. Should be removed if receives negative feedback.
|
37
|
-
#
|
38
|
-
# NOTE: `own_method.bind(organizer).call` is logically the same as `own_method.bind_call(organizer)`.
|
39
|
-
# - https://ruby-doc.org/core-2.7.1/UnboundMethod.html#method-i-bind_call
|
40
|
-
# - https://blog.saeloun.com/2019/10/17/ruby-2-7-adds-unboundmethod-bind_call-method.html
|
41
|
-
#
|
42
|
-
def own_method
|
43
|
-
method = Utils::Module.get_own_instance_method(organizer.class, method_name, private: true)
|
44
|
-
|
45
|
-
return unless method
|
46
|
-
|
47
|
-
method.bind(organizer)
|
48
|
-
end
|
49
|
-
|
50
|
-
##
|
51
|
-
# @return [ConvenientService::Service]
|
52
|
-
#
|
53
|
-
def organizer
|
54
|
-
@organizer ||= entity.organizer
|
55
|
-
end
|
56
|
-
|
57
|
-
##
|
58
|
-
# @return [Symbol]
|
59
|
-
#
|
60
|
-
def method_name
|
61
|
-
@method_name ||= entity.method
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
@@ -1,43 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module ConvenientService
|
4
|
-
module Service
|
5
|
-
module Plugins
|
6
|
-
module HasJSendResult
|
7
|
-
module Entities
|
8
|
-
class Result
|
9
|
-
module Plugins
|
10
|
-
module CanHaveCheckedStatus
|
11
|
-
class Middleware < MethodChainMiddleware
|
12
|
-
intended_for [
|
13
|
-
:success?,
|
14
|
-
:failure?,
|
15
|
-
:error?,
|
16
|
-
:not_success?,
|
17
|
-
:not_failure?,
|
18
|
-
:not_error?
|
19
|
-
],
|
20
|
-
entity: :result
|
21
|
-
|
22
|
-
##
|
23
|
-
# @param args [Array<Object>]
|
24
|
-
# @param kwargs [Hash{Symbol => Object}]
|
25
|
-
# @param block [Proc, nil]
|
26
|
-
# @return [ConvenientService::Service::Plugins::HasJSendResult::Entities::Result]
|
27
|
-
#
|
28
|
-
def next(*args, **kwargs, &block)
|
29
|
-
mark_status_as_checked = kwargs.fetch(:mark_status_as_checked) { true }
|
30
|
-
|
31
|
-
entity.internals.cache[:has_checked_status] = true if mark_status_as_checked
|
32
|
-
|
33
|
-
chain.next(*args, **Utils::Hash.except(kwargs, [:mark_status_as_checked]), &block)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
@@ -1,36 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module ConvenientService
|
4
|
-
module Support
|
5
|
-
module Gems
|
6
|
-
##
|
7
|
-
# @api private
|
8
|
-
#
|
9
|
-
class ActiveModel
|
10
|
-
class << self
|
11
|
-
##
|
12
|
-
# @return [Boolean]
|
13
|
-
#
|
14
|
-
# @internal
|
15
|
-
# `Style/TernaryParentheses` is disabled since `defined?` has too low priority without parentheses.
|
16
|
-
#
|
17
|
-
# rubocop:disable Style/TernaryParentheses
|
18
|
-
def loaded?
|
19
|
-
(defined? ::ActiveModel) ? true : false
|
20
|
-
end
|
21
|
-
# rubocop:enable Style/TernaryParentheses
|
22
|
-
|
23
|
-
##
|
24
|
-
# @return [ConvenientService::Support::Version]
|
25
|
-
#
|
26
|
-
# @internal
|
27
|
-
# https://github.com/rails/rails/blob/main/activemodel/lib/active_model/version.rb
|
28
|
-
#
|
29
|
-
def version
|
30
|
-
loaded? ? Support::Version.new(::ActiveModel.version) : Support::Version.null_version
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
@@ -1,37 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module ConvenientService
|
4
|
-
module Support
|
5
|
-
module Gems
|
6
|
-
class Logger
|
7
|
-
class << self
|
8
|
-
##
|
9
|
-
# @api private
|
10
|
-
#
|
11
|
-
# @return [Boolean]
|
12
|
-
#
|
13
|
-
# @internal
|
14
|
-
# `Style/TernaryParentheses` is disabled since `defined?` has too low priority without parentheses.
|
15
|
-
#
|
16
|
-
# rubocop:disable Style/TernaryParentheses
|
17
|
-
def loaded?
|
18
|
-
(defined? ::Logger) ? true : false
|
19
|
-
end
|
20
|
-
# rubocop:enable Style/TernaryParentheses
|
21
|
-
|
22
|
-
##
|
23
|
-
# @api private
|
24
|
-
#
|
25
|
-
# @return [ConvenientService::Support::Version]
|
26
|
-
#
|
27
|
-
# @internal
|
28
|
-
# - https://github.com/ruby/logger/blob/v1.5.3/lib/logger/version.rb
|
29
|
-
#
|
30
|
-
def version
|
31
|
-
loaded? ? Support::Version.new(::Logger::VERSION) : Support::Version.null_version
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
@@ -1,37 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module ConvenientService
|
4
|
-
module Support
|
5
|
-
module Gems
|
6
|
-
class Paint
|
7
|
-
class << self
|
8
|
-
##
|
9
|
-
# @api private
|
10
|
-
#
|
11
|
-
# @return [Boolean]
|
12
|
-
#
|
13
|
-
# @internal
|
14
|
-
# `Style/TernaryParentheses` is disabled since `defined?` has too low priority without parentheses.
|
15
|
-
#
|
16
|
-
# rubocop:disable Style/TernaryParentheses
|
17
|
-
def loaded?
|
18
|
-
(defined? ::Paint) ? true : false
|
19
|
-
end
|
20
|
-
# rubocop:enable Style/TernaryParentheses
|
21
|
-
|
22
|
-
##
|
23
|
-
# @api private
|
24
|
-
#
|
25
|
-
# @return [ConvenientService::Support::Version]
|
26
|
-
#
|
27
|
-
# @internal
|
28
|
-
# - https://github.com/janlelis/paint/blob/v2.2.1/lib/paint/version.rb
|
29
|
-
#
|
30
|
-
def version
|
31
|
-
loaded? ? Support::Version.new(::Paint::VERSION) : Support::Version.null_version
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
@@ -1,58 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module ConvenientService
|
4
|
-
module Support
|
5
|
-
module Gems
|
6
|
-
##
|
7
|
-
# @api private
|
8
|
-
#
|
9
|
-
class RSpec
|
10
|
-
class << self
|
11
|
-
##
|
12
|
-
# @return [Boolean]
|
13
|
-
#
|
14
|
-
# @internal
|
15
|
-
# `Style/TernaryParentheses` is disabled since `defined?` has too low priority without parentheses.
|
16
|
-
#
|
17
|
-
# rubocop:disable Style/TernaryParentheses
|
18
|
-
def loaded?
|
19
|
-
(defined? ::RSpec) ? true : false
|
20
|
-
end
|
21
|
-
# rubocop:enable Style/TernaryParentheses
|
22
|
-
|
23
|
-
##
|
24
|
-
# @return [ConvenientService::Support::Version]
|
25
|
-
#
|
26
|
-
# @internal
|
27
|
-
# https://github.com/rspec/rspec-core/blob/main/lib/rspec/core/version.rb
|
28
|
-
#
|
29
|
-
def version
|
30
|
-
loaded? ? Support::Version.new(::RSpec::Core::Version::STRING) : Support::Version.null_version
|
31
|
-
end
|
32
|
-
|
33
|
-
##
|
34
|
-
# @return [RSpec::Core::Example, nil]
|
35
|
-
#
|
36
|
-
# @internal
|
37
|
-
# NOTE: Returns `nil` in environments where RSpec is NOT fully loaded, e.g: irb, rails console, etc.
|
38
|
-
#
|
39
|
-
# `::RSpec.current_example` docs:
|
40
|
-
# - https://www.rubydoc.info/github/rspec/rspec-core/RSpec.current_example
|
41
|
-
# - https://github.com/rspec/rspec-core/blob/v3.12.0/lib/rspec/core.rb#L122
|
42
|
-
# - https://relishapp.com/rspec/rspec-core/docs/metadata/current-example
|
43
|
-
#
|
44
|
-
def current_example
|
45
|
-
return unless loaded?
|
46
|
-
|
47
|
-
##
|
48
|
-
# NOTE: This happens in Ruby-only projects where RSpec is loaded by `Bundler.require`, not by `bundle exec rspec`.
|
49
|
-
#
|
50
|
-
return unless ::RSpec.respond_to?(:current_example)
|
51
|
-
|
52
|
-
::RSpec.current_example
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|