convenient_service 0.11.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.dev/.tmuxinator.yml +6 -1
- data/.github/workflows/ci.yml +23 -1
- data/.gitignore +18 -0
- data/.vscode/CacheItsValue.code-snippets +15 -0
- data/.vscode/DelegateTo.code-snippets +15 -0
- data/.vscode/cache_its_value.code-snippets +17 -0
- data/.vscode/comparison.code-snippets +41 -0
- data/.vscode/delegate_to.code-snippets +20 -0
- data/Appraisals +24 -2
- data/CHANGELOG.md +205 -0
- data/Gemfile +12 -1
- data/README.md +14 -4
- data/ROADMAP.md +5 -1
- data/Taskfile.yml +320 -21
- data/benchmark/commit_config/ips.rb +18 -0
- data/benchmark/commit_config/profile.rb +30 -0
- data/benchmark/empty_service/ips.rb +123 -0
- data/benchmark/has_committed_config/ips.rb +78 -0
- data/benchmark/has_committed_config/profile.rb +30 -0
- data/convenient_service.gemspec +165 -6
- data/docker/2.7/Dockerfile +3 -3
- data/docker/3.0/Dockerfile +2 -2
- data/docker/3.1/Dockerfile +2 -2
- data/docker/3.2/Dockerfile +73 -0
- data/docker/jruby-9.4/Dockerfile +88 -0
- data/docker/truffleruby-22.3/Dockerfile +91 -0
- data/gemfiles/.gitkeep +0 -0
- data/lib/convenient_service/alias.rb +3 -0
- data/lib/convenient_service/aliases.rb +0 -4
- data/lib/convenient_service/common/plugins/aliases.rb +0 -1
- data/lib/convenient_service/common/plugins/assigns_attributes_in_constructor/using_active_model_attribute_assignment/middleware.rb +15 -9
- data/lib/convenient_service/common/plugins/caches_constructor_arguments/concern.rb +22 -0
- data/lib/convenient_service/common/plugins/caches_constructor_arguments/middleware.rb +22 -0
- data/lib/convenient_service/common/plugins/caches_constructor_arguments.rb +4 -0
- data/lib/convenient_service/common/plugins/caches_return_value/middleware.rb +12 -8
- data/lib/convenient_service/common/plugins/can_be_copied/concern.rb +22 -5
- data/lib/convenient_service/common/plugins/can_have_user_provided_entity/commands/find_or_create_entity.rb +9 -7
- data/lib/convenient_service/common/plugins/can_have_user_provided_entity/{errors.rb → exceptions.rb} +4 -4
- data/lib/convenient_service/common/plugins/can_have_user_provided_entity.rb +1 -1
- data/lib/convenient_service/common/plugins/can_utilize_finite_loop/concern.rb +40 -0
- data/lib/convenient_service/common/plugins/can_utilize_finite_loop/constants.rb +21 -0
- data/lib/convenient_service/common/plugins/can_utilize_finite_loop.rb +4 -0
- data/lib/convenient_service/common/plugins/has_around_callbacks/{errors.rb → exceptions.rb} +2 -2
- data/lib/convenient_service/common/plugins/has_around_callbacks/middleware.rb +9 -3
- data/lib/convenient_service/common/plugins/has_around_callbacks.rb +1 -1
- data/lib/convenient_service/common/plugins/has_callbacks/entities/callback.rb +8 -8
- data/lib/convenient_service/common/plugins/has_callbacks/middleware.rb +7 -1
- data/lib/convenient_service/common/plugins/has_constructor/concern.rb +3 -4
- data/lib/convenient_service/common/plugins/has_constructor_without_initialize/concern.rb +1 -9
- data/lib/convenient_service/common/plugins/has_internals/entities/internals/plugins/aliases.rb +7 -0
- data/lib/convenient_service/common/plugins/has_internals/entities/internals/plugins/has_cache/concern.rb +1 -1
- data/lib/convenient_service/common/plugins/has_internals/entities/internals/plugins.rb +2 -0
- data/lib/convenient_service/common/plugins/has_j_send_result_duck_short_syntax/concern.rb +68 -0
- data/lib/convenient_service/common/plugins/has_j_send_result_duck_short_syntax.rb +3 -0
- data/lib/convenient_service/common/plugins/normalizes_env/middleware.rb +3 -1
- data/lib/convenient_service/common/plugins.rb +2 -1
- data/lib/convenient_service/configs/awesome_print_inspect/aliases.rb +7 -0
- data/lib/convenient_service/configs/awesome_print_inspect.rb +59 -0
- data/lib/convenient_service/configs/minimal.rb +86 -15
- data/lib/convenient_service/configs/standard.rb +92 -30
- data/lib/convenient_service/core/aliases.rb +4 -5
- data/lib/convenient_service/core/concern/class_methods.rb +129 -0
- data/lib/convenient_service/core/concern/instance_methods.rb +76 -0
- data/lib/convenient_service/core/concern.rb +25 -0
- data/lib/convenient_service/core/constants.rb +36 -0
- data/lib/convenient_service/core/entities/config/commands/track_method_missing_commit_trigger.rb +69 -0
- data/lib/convenient_service/core/entities/config/commands.rb +3 -0
- data/lib/convenient_service/core/entities/config/entities/concerns/entities/middleware/commands/cast_middleware.rb +2 -2
- data/lib/convenient_service/core/entities/config/entities/concerns/entities/middleware.rb +1 -0
- data/lib/convenient_service/core/entities/config/entities/concerns/entities/stack.rb +10 -10
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/caller/commands/cast_caller.rb +2 -2
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/caller/concern/instance_methods.rb +9 -2
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/caller/constants.rb +26 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/caller.rb +1 -3
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/container/concern/instance_methods.rb +10 -3
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware_creators/base.rb +95 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware_creators/observable/entities/event.rb +95 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware_creators/observable/entities.rb +3 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware_creators/observable.rb +42 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware_creators/with.rb +50 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware_creators.rb +6 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/base/commands/create_observable_middleware.rb +104 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/base/commands.rb +3 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/base/concern/class_methods.rb +115 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/base/concern/instance_methods.rb +70 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/base/concern.rb +32 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/base/constants.rb +36 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/base/structs/intended_method.rb +23 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/base/structs.rb +3 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/base.rb +26 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/chain/commands/create_observable_middleware.rb +90 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/chain/commands.rb +3 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/chain/concern/class_methods.rb +37 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/chain/concern/instance_methods.rb +115 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/chain/concern.rb +32 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/chain/entities/method_chain.rb +86 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/chain/entities.rb +3 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/chain.rb +34 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/classic.rb +42 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares.rb +6 -0
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/stack.rb +58 -23
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities.rb +2 -2
- data/lib/convenient_service/core/entities/config/entities/method_middlewares.rb +2 -2
- data/lib/convenient_service/core/entities/config/exceptions.rb +64 -0
- data/lib/convenient_service/core/entities/config.rb +32 -9
- data/lib/convenient_service/core/entities.rb +0 -1
- data/lib/convenient_service/core.rb +8 -5
- data/lib/convenient_service/dependencies/built_in.rb +18 -4
- data/lib/convenient_service/dependencies/extractions/active_support_backtrace_cleaner/backtrace_cleaner.rb +149 -0
- data/lib/convenient_service/dependencies/extractions/active_support_backtrace_cleaner.rb +15 -0
- data/lib/convenient_service/dependencies/extractions/active_support_concern/concern.rb +19 -2
- data/lib/convenient_service/dependencies/extractions/active_support_concern.rb +8 -3
- data/lib/convenient_service/dependencies/extractions/ruby_middleware/middleware/builder.rb +7 -1
- data/lib/convenient_service/dependencies/extractions/ruby_middleware/middleware/logger.rb +7 -1
- data/lib/convenient_service/dependencies/extractions/ruby_middleware/middleware/runner.rb +15 -1
- data/lib/convenient_service/dependencies/extractions/ruby_middleware/middleware.rb +8 -1
- data/lib/convenient_service/dependencies/extractions/ruby_middleware.rb +3 -2
- data/lib/convenient_service/dependencies.rb +269 -30
- data/lib/convenient_service/examples/dry/gemfile/dry_service/config.rb +19 -21
- data/lib/convenient_service/examples/dry/gemfile/services/assert_file_exists.rb +1 -1
- data/lib/convenient_service/examples/dry/gemfile/services/assert_file_not_empty.rb +1 -1
- data/lib/convenient_service/examples/dry/gemfile/services/assert_node_available.rb +2 -2
- data/lib/convenient_service/examples/dry/gemfile/services/assert_npm_package_available.rb +2 -2
- data/lib/convenient_service/examples/dry/gemfile/services/assert_valid_ruby_syntax.rb +2 -2
- data/lib/convenient_service/examples/dry/gemfile/services/format.rb +1 -1
- data/lib/convenient_service/examples/dry/gemfile/services/format_body.rb +1 -1
- data/lib/convenient_service/examples/dry/gemfile/services/format_gems_with_envs.rb +1 -1
- data/lib/convenient_service/examples/dry/gemfile/services/format_gems_without_envs.rb +1 -1
- data/lib/convenient_service/examples/dry/gemfile/services/format_header.rb +1 -1
- data/lib/convenient_service/examples/dry/gemfile/services/parse_content.rb +1 -1
- data/lib/convenient_service/examples/dry/gemfile/services/print_shell_command.rb +11 -4
- data/lib/convenient_service/examples/dry/gemfile/services/read_file_content.rb +1 -1
- data/lib/convenient_service/examples/dry/gemfile/services/{run_shell.rb → run_shell_command.rb} +10 -5
- data/lib/convenient_service/examples/dry/gemfile/services/strip_comments.rb +2 -2
- data/lib/convenient_service/examples/dry/gemfile/services.rb +3 -2
- data/lib/convenient_service/examples/dry/gemfile.rb +5 -5
- data/lib/convenient_service/examples/rails/gemfile/rails_service/config.rb +28 -30
- data/lib/convenient_service/examples/rails/gemfile/services/assert_file_exists.rb +2 -2
- data/lib/convenient_service/examples/rails/gemfile/services/assert_file_not_empty.rb +2 -2
- data/lib/convenient_service/examples/rails/gemfile/services/assert_node_available.rb +2 -2
- data/lib/convenient_service/examples/rails/gemfile/services/assert_npm_package_available.rb +3 -3
- data/lib/convenient_service/examples/rails/gemfile/services/assert_valid_ruby_syntax.rb +2 -2
- data/lib/convenient_service/examples/rails/gemfile/services/format.rb +2 -2
- data/lib/convenient_service/examples/rails/gemfile/services/format_body.rb +1 -1
- data/lib/convenient_service/examples/rails/gemfile/services/format_gems_with_envs.rb +1 -1
- data/lib/convenient_service/examples/rails/gemfile/services/format_gems_without_envs.rb +1 -1
- data/lib/convenient_service/examples/rails/gemfile/services/format_header.rb +1 -1
- data/lib/convenient_service/examples/rails/gemfile/services/merge_sections.rb +3 -3
- data/lib/convenient_service/examples/rails/gemfile/services/parse_content.rb +2 -2
- data/lib/convenient_service/examples/rails/gemfile/services/print_shell_command.rb +11 -4
- data/lib/convenient_service/examples/rails/gemfile/services/read_file_content.rb +2 -2
- data/lib/convenient_service/examples/rails/gemfile/services/replace_file_content.rb +3 -3
- data/lib/convenient_service/examples/rails/gemfile/services/{run_shell.rb → run_shell_command.rb} +11 -6
- data/lib/convenient_service/examples/rails/gemfile/services/strip_comments.rb +3 -3
- data/lib/convenient_service/examples/rails/gemfile/services.rb +2 -2
- data/lib/convenient_service/examples/rails/gemfile.rb +5 -5
- data/lib/convenient_service/examples/standard/cowsay/services/build_cloud.rb +1 -1
- data/lib/convenient_service/examples/standard/cowsay/services/build_cow.rb +1 -1
- data/lib/convenient_service/examples/standard/cowsay/services/print.rb +1 -1
- data/lib/convenient_service/examples/standard/cowsay.rb +5 -5
- data/lib/convenient_service/examples/standard/date_time/services/safe_parse.rb +31 -0
- data/lib/convenient_service/examples/standard/date_time/services.rb +3 -0
- data/lib/convenient_service/examples/standard/date_time.rb +23 -0
- data/lib/convenient_service/examples/standard/factorial/services/calculate.rb +49 -0
- data/lib/convenient_service/examples/standard/factorial/services.rb +3 -0
- data/lib/convenient_service/examples/standard/factorial/utils/timeout/with_timeout.rb +50 -0
- data/lib/convenient_service/examples/standard/factorial/utils/timeout.rb +21 -0
- data/lib/convenient_service/examples/standard/factorial/utils.rb +3 -0
- data/lib/convenient_service/examples/standard/factorial.rb +24 -0
- data/lib/convenient_service/examples/standard/gemfile/services/assert_file_exists.rb +2 -2
- data/lib/convenient_service/examples/standard/gemfile/services/assert_file_not_empty.rb +2 -2
- data/lib/convenient_service/examples/standard/gemfile/services/assert_node_available.rb +2 -11
- data/lib/convenient_service/examples/standard/gemfile/services/assert_npm_package_available.rb +2 -12
- data/lib/convenient_service/examples/standard/gemfile/services/assert_valid_ruby_syntax.rb +2 -2
- data/lib/convenient_service/examples/standard/gemfile/services/format.rb +1 -11
- data/lib/convenient_service/examples/standard/gemfile/services/format_body.rb +1 -1
- data/lib/convenient_service/examples/standard/gemfile/services/format_gems_with_envs.rb +1 -1
- data/lib/convenient_service/examples/standard/gemfile/services/format_gems_without_envs.rb +1 -1
- data/lib/convenient_service/examples/standard/gemfile/services/format_header.rb +1 -1
- data/lib/convenient_service/examples/standard/gemfile/services/merge_sections.rb +1 -11
- data/lib/convenient_service/examples/standard/gemfile/services/parse_content.rb +1 -11
- data/lib/convenient_service/examples/standard/gemfile/services/print_shell_command.rb +15 -8
- data/lib/convenient_service/examples/standard/gemfile/services/read_file_content.rb +2 -12
- data/lib/convenient_service/examples/standard/gemfile/services/replace_file_content.rb +1 -11
- data/lib/convenient_service/examples/standard/gemfile/services/{run_shell.rb → run_shell_command.rb} +22 -5
- data/lib/convenient_service/examples/standard/gemfile/services/strip_comments.rb +2 -2
- data/lib/convenient_service/examples/standard/gemfile/services.rb +2 -2
- data/lib/convenient_service/examples/standard/gemfile.rb +5 -5
- data/lib/convenient_service/examples/standard/request_params/constants.rb +1 -1
- data/lib/convenient_service/examples/standard/request_params/entities/description.rb +1 -1
- data/lib/convenient_service/examples/standard/request_params/entities/format.rb +1 -1
- data/lib/convenient_service/examples/standard/request_params/entities/id.rb +1 -1
- data/lib/convenient_service/examples/standard/request_params/entities/logger.rb +1 -1
- data/lib/convenient_service/examples/standard/request_params/entities/request.rb +1 -1
- data/lib/convenient_service/examples/standard/request_params/entities/source.rb +1 -1
- data/lib/convenient_service/examples/standard/request_params/entities/tag.rb +1 -1
- data/lib/convenient_service/examples/standard/request_params/entities/title.rb +1 -1
- data/lib/convenient_service/examples/standard/request_params/services/apply_default_param_values.rb +1 -1
- data/lib/convenient_service/examples/standard/request_params/services/cast_params.rb +1 -1
- data/lib/convenient_service/examples/standard/request_params/services/extract_params_from_body.rb +1 -11
- data/lib/convenient_service/examples/standard/request_params/services/extract_params_from_path.rb +1 -11
- data/lib/convenient_service/examples/standard/request_params/services/filter_out_unpermitted_params.rb +1 -1
- data/lib/convenient_service/examples/standard/request_params/services/log_request_params.rb +1 -1
- data/lib/convenient_service/examples/standard/request_params/services/merge_params.rb +1 -1
- data/lib/convenient_service/examples/standard/request_params/services/prepare.rb +1 -1
- data/lib/convenient_service/examples/standard/request_params/services/validate_casted_params.rb +1 -11
- data/lib/convenient_service/examples/standard/request_params/services/validate_uncasted_params.rb +1 -11
- data/lib/convenient_service/examples/standard/request_params/utils/array/wrap.rb +2 -2
- data/lib/convenient_service/examples/standard/request_params/utils/array.rb +1 -1
- data/lib/convenient_service/examples/standard/request_params/utils/http/request/parse_body.rb +2 -2
- data/lib/convenient_service/examples/standard/request_params/utils/http/request/parse_path.rb +2 -2
- data/lib/convenient_service/examples/standard/request_params/utils/http/request.rb +1 -1
- data/lib/convenient_service/examples/standard/request_params/utils/integer/safe_parse.rb +2 -2
- data/lib/convenient_service/examples/standard/request_params/utils/integer.rb +1 -1
- data/lib/convenient_service/examples/standard/request_params/utils/json/safe_parse.rb +2 -2
- data/lib/convenient_service/examples/standard/request_params/utils/json.rb +1 -1
- data/lib/convenient_service/examples/standard/request_params/utils/object/blank.rb +2 -2
- data/lib/convenient_service/examples/standard/request_params/utils/object/present.rb +2 -2
- data/lib/convenient_service/examples/standard/request_params/utils/object.rb +1 -1
- data/lib/convenient_service/examples/standard/request_params/utils/url/valid.rb +47 -0
- data/lib/convenient_service/examples/standard/request_params/utils/url.rb +21 -0
- data/lib/convenient_service/examples/standard/request_params/utils.rb +1 -0
- data/lib/convenient_service/examples/standard/request_params.rb +5 -5
- data/lib/convenient_service/exception.rb +16 -0
- data/lib/convenient_service/feature.rb +11 -0
- data/lib/convenient_service/logger.rb +71 -25
- data/lib/convenient_service/rspec/helpers/custom/ignoring_exception/exceptions.rb +27 -0
- data/lib/convenient_service/rspec/helpers/custom/ignoring_exception.rb +51 -0
- data/lib/convenient_service/rspec/helpers/custom/in_threads.rb +74 -0
- data/lib/convenient_service/rspec/helpers/custom/stub_service/constants.rb +20 -0
- data/lib/convenient_service/rspec/helpers/custom/stub_service/entities/result_spec.rb +2 -2
- data/lib/convenient_service/rspec/helpers/custom/stub_service/entities/stubbed_service.rb +22 -18
- data/lib/convenient_service/rspec/helpers/custom/stub_service.rb +1 -0
- data/lib/convenient_service/rspec/helpers/custom/wrap_method/entities/wrapped_method.rb +113 -56
- data/lib/convenient_service/rspec/helpers/custom/wrap_method/{errors.rb → exceptions.rb} +2 -2
- data/lib/convenient_service/rspec/helpers/custom/wrap_method.rb +31 -7
- data/lib/convenient_service/rspec/helpers/custom.rb +2 -1
- data/lib/convenient_service/rspec/helpers/ignoring_exception.rb +13 -0
- data/lib/convenient_service/rspec/helpers/{ignoring_error.rb → in_threads.rb} +3 -3
- data/lib/convenient_service/rspec/helpers.rb +4 -2
- data/lib/convenient_service/rspec/matchers/custom/be_descendant_of.rb +1 -1
- data/lib/convenient_service/rspec/matchers/custom/cache_its_value.rb +20 -0
- data/lib/convenient_service/rspec/matchers/custom/call_chain_next.rb +103 -2
- data/lib/convenient_service/rspec/matchers/custom/delegate_to/entities/matcher/entities/chainings/sub_matchers/return_its_value.rb +3 -0
- data/lib/convenient_service/rspec/matchers/custom/delegate_to/entities/matcher/entities/chainings/sub_matchers/with_concrete_arguments.rb +1 -1
- data/lib/convenient_service/rspec/matchers/custom/delegate_to/entities/matcher/entities/chainings_collection/{errors.rb → exceptions.rb} +4 -4
- data/lib/convenient_service/rspec/matchers/custom/delegate_to/entities/matcher/entities/chainings_collection.rb +11 -11
- data/lib/convenient_service/rspec/matchers/custom/delegate_to/entities/matcher/entities/delegation.rb +3 -3
- data/lib/convenient_service/rspec/matchers/custom/delegate_to/entities/matcher.rb +5 -5
- data/lib/convenient_service/rspec/matchers/custom/delegate_to.rb +13 -3
- data/lib/convenient_service/rspec/matchers/custom/export.rb +82 -0
- data/lib/convenient_service/rspec/matchers/custom/have_abstract_method.rb +1 -1
- data/lib/convenient_service/rspec/matchers/custom/have_alias_method.rb +3 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/constants.rb +31 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/chain.rb +226 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/printers/base/commands/generate_expected_code_part.rb +61 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/printers/base/commands/generate_expected_data_part.rb +61 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/printers/base/commands/generate_expected_message_part.rb +61 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/printers/base/commands/generate_expected_parts.rb +121 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/printers/base/commands/generate_expected_service_part.rb +61 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/printers/base/commands/generate_expected_status_part.rb +68 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/printers/base/commands/generate_expected_step_part.rb +61 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/printers/base/commands/generate_got_parts.rb +98 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/printers/base/commands/generate_got_service_part.rb +68 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/printers/base/commands/generate_got_step_part.rb +68 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/printers/base/commands.rb +13 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/printers/base.rb +207 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/printers/error/commands/generate_got_jsend_attributes_part.rb +120 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/printers/error/commands.rb +3 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/printers/error.rb +34 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/printers/failure/commands/generate_got_jsend_attributes_part.rb +121 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/printers/failure/commands.rb +3 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/printers/failure.rb +34 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/printers/null.rb +147 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/printers/success/commands/generate_got_jsend_attributes_part.rb +96 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/printers/success/commands.rb +3 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/printers/success.rb +34 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/printers.rb +46 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/validator/commands/validate_result.rb +121 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/validator/commands/validate_result_code.rb +97 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/validator/commands/validate_result_data.rb +97 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/validator/commands/validate_result_message.rb +97 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/validator/commands/validate_result_service.rb +81 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/validator/commands/validate_result_status.rb +92 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/validator/commands/validate_result_step.rb +127 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/validator/commands/validate_result_type.rb +89 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/validator/commands.rb +10 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities/validator.rb +123 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/entities.rb +5 -0
- data/lib/convenient_service/rspec/matchers/custom/results/base/{errors.rb → exceptions.rb} +8 -2
- data/lib/convenient_service/rspec/matchers/custom/results/base.rb +113 -149
- data/lib/convenient_service/rspec/matchers/custom/results/be_error.rb +6 -1
- data/lib/convenient_service/rspec/matchers/custom/results/be_failure.rb +6 -1
- data/lib/convenient_service/rspec/matchers/custom/results/be_not_error.rb +7 -2
- data/lib/convenient_service/rspec/matchers/custom/results/be_not_failure.rb +7 -2
- data/lib/convenient_service/rspec/matchers/custom/results/be_not_success.rb +7 -2
- data/lib/convenient_service/rspec/matchers/custom/results/be_success.rb +6 -1
- data/lib/convenient_service/rspec/matchers/custom.rb +1 -0
- data/lib/convenient_service/rspec/matchers/export.rb +13 -0
- data/lib/convenient_service/rspec/matchers/results/be_error.rb +3 -0
- data/lib/convenient_service/rspec/matchers/results/be_failure.rb +3 -0
- data/lib/convenient_service/rspec/matchers/results/be_not_error.rb +3 -0
- data/lib/convenient_service/rspec/matchers/results/be_not_failure.rb +3 -0
- data/lib/convenient_service/rspec/matchers/results/be_not_success.rb +3 -0
- data/lib/convenient_service/rspec/matchers/results/be_success.rb +3 -0
- data/lib/convenient_service/rspec/matchers.rb +2 -0
- data/lib/convenient_service/service/plugins/aliases.rb +0 -2
- data/lib/convenient_service/service/plugins/can_have_fallback/concern.rb +93 -0
- data/lib/convenient_service/service/plugins/can_have_fallback/exceptions.rb +36 -0
- data/lib/convenient_service/service/plugins/can_have_fallback/middleware.rb +30 -0
- data/lib/convenient_service/service/plugins/can_have_fallback.rb +5 -0
- data/lib/convenient_service/service/plugins/can_have_method_steps/middleware.rb +7 -26
- data/lib/convenient_service/service/plugins/can_have_steps/concern.rb +5 -2
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/cast_method.rb +46 -11
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/cast_method_direction.rb +29 -2
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/cast_method_factory.rb +113 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/define_method_in_container.rb +2 -2
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/commands.rb +1 -3
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/concern/instance_methods.rb +96 -26
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/alias.rb +2 -2
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/base.rb +49 -7
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/proc.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/raw.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/reassignment.rb +2 -2
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/usual.rb +2 -2
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/directions/base.rb +27 -4
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/directions/input.rb +2 -2
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/directions/output.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/factories/base.rb +62 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/factories/hash/base.rb +35 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/factories/hash/proc_value.rb +42 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/factories/hash/raw_value.rb +42 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/factories/hash/reassignment_value.rb +42 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/factories/hash/string_value.rb +42 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/factories/hash/symbol_value.rb +42 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/factories/hash.rb +8 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/factories/method.rb +40 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/factories/reassignment.rb +40 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/factories/string.rb +40 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/factories/symbol.rb +40 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/factories.rb +8 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/key.rb +31 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/name.rb +31 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities.rb +1 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/{errors.rb → exceptions.rb} +81 -15
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/service/concern/class_methods.rb +46 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/service/concern/instance_methods.rb +64 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/service/concern.rb +28 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/service.rb +7 -30
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb +39 -2
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/extract_params.rb +2 -4
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb +229 -64
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/exceptions.rb +27 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/aliases.rb +7 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_completed/concern.rb +44 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_completed.rb +3 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_method_step/can_be_executed/middleware.rb +36 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_method_step/can_be_executed.rb +3 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_method_step/can_be_printed/middleware.rb +32 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_method_step/can_be_printed.rb +3 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_method_step/concern.rb +37 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_method_step.rb +6 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_result_step/can_be_executed/exceptions.rb +38 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_result_step/can_be_executed/middleware.rb +72 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_result_step/can_be_executed.rb +4 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_result_step/concern.rb +30 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_result_step.rb +5 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_fallback/concern.rb +53 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_fallback/middleware.rb +34 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_fallback/result.rb +3 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_fallback.rb +4 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_parent_result/middleware.rb +4 -2
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_awesome_print_inspect/concern.rb +45 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_awesome_print_inspect.rb +3 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_inspect/concern.rb +5 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins.rb +6 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/structs/params.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step_collection.rb +37 -8
- data/lib/convenient_service/service/plugins/can_have_steps/middleware.rb +38 -9
- data/lib/convenient_service/service/plugins/can_have_stubbed_results/commands/fetch_all_services_stubbed_results_cache.rb +30 -0
- data/lib/convenient_service/service/plugins/can_have_stubbed_results/commands/fetch_service_stubbed_results_cache.rb +43 -0
- data/lib/convenient_service/service/plugins/can_have_stubbed_results/commands/get_service_stubbed_result.rb +58 -0
- data/lib/convenient_service/service/plugins/can_have_stubbed_results/commands/set_service_stubbed_result.rb +66 -0
- data/lib/convenient_service/service/plugins/can_have_stubbed_results/commands.rb +6 -0
- data/lib/convenient_service/service/plugins/can_have_stubbed_results/concern.rb +46 -0
- data/lib/convenient_service/service/plugins/can_have_stubbed_results/container.rb +17 -0
- data/lib/convenient_service/service/plugins/can_have_stubbed_results/middleware.rb +65 -0
- data/lib/convenient_service/service/plugins/can_have_stubbed_results.rb +6 -0
- data/lib/convenient_service/service/plugins/can_recalculate_result/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/collects_services_in_exception/commands/extract_service_details.rb +64 -0
- data/lib/convenient_service/service/plugins/collects_services_in_exception/commands.rb +3 -0
- data/lib/convenient_service/service/plugins/collects_services_in_exception/constants.rb +16 -0
- data/lib/convenient_service/service/plugins/collects_services_in_exception/middleware.rb +50 -0
- data/lib/convenient_service/service/plugins/collects_services_in_exception.rb +5 -0
- data/lib/convenient_service/service/plugins/counts_stubbed_results_invocations/middleware.rb +24 -0
- data/lib/convenient_service/service/plugins/counts_stubbed_results_invocations.rb +3 -0
- data/lib/convenient_service/service/plugins/has_awesome_print_inspect/concern.rb +39 -0
- data/lib/convenient_service/service/plugins/has_awesome_print_inspect.rb +3 -0
- data/lib/convenient_service/service/plugins/has_inspect/concern.rb +8 -1
- data/lib/convenient_service/service/plugins/{has_result → has_j_send_result}/commands/create_result_class.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/commands/is_result.rb +34 -0
- data/lib/convenient_service/service/plugins/{has_result → has_j_send_result}/commands.rb +2 -0
- data/lib/convenient_service/service/plugins/{has_result → has_j_send_result}/concern/class_methods.rb +21 -18
- data/lib/convenient_service/service/plugins/has_j_send_result/concern/instance_methods.rb +49 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/concern.rb +22 -0
- data/lib/convenient_service/service/plugins/{has_result → has_j_send_result}/constants.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/container.rb +21 -0
- data/lib/convenient_service/service/plugins/{has_result → has_j_send_result}/entities/result/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/aliases.rb +7 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_be_own_result/concern.rb +142 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_be_own_result.rb +3 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_be_stubbed_result/concern.rb +30 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_be_stubbed_result.rb +3 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_checked_status/concern.rb +30 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_checked_status/middleware.rb +43 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_checked_status.rb +4 -0
- data/lib/convenient_service/service/plugins/{has_result/entities/result/plugins/has_step → has_j_send_result/entities/result/plugins/can_have_fallback}/concern.rb +7 -4
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_fallback.rb +3 -0
- data/lib/convenient_service/service/plugins/{has_result → has_j_send_result}/entities/result/plugins/can_have_parent_result/concern.rb +19 -9
- data/lib/convenient_service/service/plugins/{has_result/entities/result/plugins/has_jsend_status_and_attributes/concern/class_methods.rb → has_j_send_result/entities/result/plugins/can_have_parent_result/constants.rb} +4 -5
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_parent_result.rb +4 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_step/concern.rb +30 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_step.rb +3 -0
- data/lib/convenient_service/service/plugins/{has_result → has_j_send_result}/entities/result/plugins/can_recalculate_result/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_awesome_print_inspect/concern.rb +38 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_awesome_print_inspect.rb +3 -0
- data/lib/convenient_service/service/plugins/{has_result → has_j_send_result}/entities/result/plugins/has_inspect/concern.rb +2 -3
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/commands/cast_j_send_attributes.rb +99 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/commands/create_code_class.rb +49 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/commands/create_data_class.rb +49 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/commands/create_message_class.rb +49 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/commands/create_status_class.rb +49 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/commands.rb +7 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/concern/class_methods.rb +125 -0
- data/lib/convenient_service/service/plugins/{has_result/entities/result/plugins/has_jsend_status_and_attributes → has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes}/concern/instance_methods.rb +59 -15
- data/lib/convenient_service/service/plugins/{has_result/entities/result/plugins/has_jsend_status_and_attributes → has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes}/concern.rb +2 -2
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/commands/is_code.rb +49 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/commands.rb +3 -0
- data/lib/convenient_service/service/plugins/{has_result/entities/result/plugins/has_jsend_status_and_attributes → has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes}/entities/code/concern/class_methods.rb +15 -3
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/concern/instance_methods.rb +123 -0
- data/lib/convenient_service/service/plugins/{has_result/entities/result/plugins/has_jsend_status_and_attributes → has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes}/entities/code/concern.rb +2 -2
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/plugins/aliases.rb +7 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/plugins/has_awesome_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_awesome_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/code/plugins/has_inspect/concern.rb +38 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/plugins/has_inspect.rb +3 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/plugins.rb +5 -0
- data/lib/convenient_service/service/plugins/{has_result/entities/result/plugins/has_jsend_status_and_attributes → has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes}/entities/code.rb +4 -2
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/commands/is_data.rb +49 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/commands.rb +3 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/concern/class_methods.rb +50 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/concern/instance_methods.rb +183 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/concern.rb +36 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/plugins/aliases.rb +7 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/plugins/has_awesome_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_awesome_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_inspect/commands/generate_inspect_output.rb +77 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/plugins/has_inspect/commands.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_inspect/concern.rb +41 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/plugins/has_inspect.rb +4 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/plugins.rb +5 -0
- data/lib/convenient_service/service/plugins/{has_result/entities/result/plugins/has_step/to_kwargs/middleware.rb → has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data.rb} +9 -7
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/commands/is_message.rb +49 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/commands.rb +3 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/concern/class_methods.rb +52 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/concern/instance_methods.rb +116 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/concern.rb +36 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/plugins/aliases.rb +7 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/plugins/has_awesome_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_awesome_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_inspect/concern.rb +38 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/plugins/has_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.rb +5 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message.rb +27 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/commands/is_status.rb +49 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/commands.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/class_methods.rb +52 -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 +140 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/concern.rb +36 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins/aliases.rb +7 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins/has_awesome_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_awesome_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/has_inspect/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/has_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 +5 -0
- data/lib/convenient_service/service/plugins/{has_result/entities/result/plugins/marks_result_status_as_checked/middleware.rb → has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status.rb} +9 -7
- data/lib/convenient_service/service/plugins/{has_result/entities/result/plugins/has_jsend_status_and_attributes/errors.rb → has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/exceptions.rb} +8 -4
- data/lib/convenient_service/service/plugins/{has_result/entities/result/plugins/has_jsend_status_and_attributes → has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes}/middleware.rb +9 -7
- data/lib/convenient_service/service/plugins/{has_result/entities/result/plugins/has_jsend_status_and_attributes/structs/jsend_attributes.rb → has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/structs/j_send_attributes.rb} +3 -3
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/structs.rb +3 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes.rb +8 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_stubbed_result_invocations_counter/concern.rb +30 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_stubbed_result_invocations_counter/middleware.rb +38 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_stubbed_result_invocations_counter.rb +4 -0
- data/lib/convenient_service/service/plugins/{has_result/entities/result/plugins/raises_on_not_checked_result_status/errors.rb → has_j_send_result/entities/result/plugins/raises_on_not_checked_result_status/exceptions.rb} +3 -3
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/raises_on_not_checked_result_status/middleware.rb +47 -0
- data/lib/convenient_service/service/plugins/{has_result → has_j_send_result}/entities/result/plugins/raises_on_not_checked_result_status.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins.rb +15 -0
- data/lib/convenient_service/service/plugins/{has_result → has_j_send_result}/entities/result.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/exceptions.rb +21 -0
- data/lib/convenient_service/service/plugins/has_j_send_result.rb +8 -0
- data/lib/convenient_service/service/plugins/{has_result_params_validations → has_j_send_result_params_validations}/using_active_model_validations/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/{has_result_params_validations → has_j_send_result_params_validations}/using_active_model_validations/middleware.rb +4 -2
- data/lib/convenient_service/service/plugins/{has_result_params_validations → has_j_send_result_params_validations}/using_dry_validation/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/{has_result_params_validations → has_j_send_result_params_validations}/using_dry_validation/middleware.rb +5 -3
- data/lib/convenient_service/service/plugins/{has_result_short_syntax → has_j_send_result_short_syntax}/concern.rb +1 -1
- data/lib/convenient_service/service/plugins/{has_result_short_syntax → has_j_send_result_short_syntax}/error/commands/assert_args_count_lower_than_three.rb +2 -2
- data/lib/convenient_service/service/plugins/{has_result_short_syntax → has_j_send_result_short_syntax}/error/commands/assert_either_args_or_kwargs_are_passed.rb +2 -2
- data/lib/convenient_service/service/plugins/{has_result_short_syntax/error/errors.rb → has_j_send_result_short_syntax/error/exceptions.rb} +4 -4
- data/lib/convenient_service/service/plugins/{has_result_short_syntax → has_j_send_result_short_syntax}/error/middleware.rb +5 -3
- data/lib/convenient_service/service/plugins/{has_result_short_syntax → has_j_send_result_short_syntax}/error.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result_short_syntax/failure/commands/assert_kwargs_contain_only_j_send_keys.rb +53 -0
- data/lib/convenient_service/service/plugins/has_j_send_result_short_syntax/failure/commands.rb +3 -0
- data/lib/convenient_service/service/plugins/has_j_send_result_short_syntax/failure/exceptions.rb +29 -0
- data/lib/convenient_service/service/plugins/has_j_send_result_short_syntax/failure/middleware.rb +23 -0
- data/lib/convenient_service/service/plugins/{has_result_short_syntax → has_j_send_result_short_syntax}/failure.rb +1 -1
- data/lib/convenient_service/service/plugins/{has_result_short_syntax → has_j_send_result_short_syntax}/success/commands/refute_kwargs_contain_data_and_extra_keys.rb +2 -2
- data/lib/convenient_service/service/plugins/{has_result_short_syntax/success/errors.rb → has_j_send_result_short_syntax/success/exceptions.rb} +3 -3
- data/lib/convenient_service/service/plugins/{has_result_short_syntax → has_j_send_result_short_syntax}/success/middleware.rb +5 -3
- data/lib/convenient_service/service/plugins/{has_result_short_syntax → has_j_send_result_short_syntax}/success.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result_short_syntax.rb +6 -0
- data/lib/convenient_service/service/plugins/{has_result_status_check_short_syntax → has_j_send_result_status_check_short_syntax}/concern.rb +17 -1
- data/lib/convenient_service/service/plugins/has_j_send_result_status_check_short_syntax.rb +3 -0
- data/lib/convenient_service/service/plugins/has_mermaid_flowchart/concern.rb +24 -0
- data/lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/code/commands/generate_lines.rb +94 -0
- data/lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/code/commands/generate_method_step_lines.rb +115 -0
- data/lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/code/commands/generate_result_lines.rb +105 -0
- data/lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/code/commands/generate_service_lines.rb +88 -0
- data/lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/code/commands/generate_service_step_lines.rb +127 -0
- data/lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/code/commands.rb +7 -0
- data/lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/code.rb +90 -0
- data/lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/settings.rb +144 -0
- data/lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/template.rb +85 -0
- data/lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities.rb +5 -0
- data/lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/templates/flowchart.html.erb +95 -0
- data/lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart.rb +108 -0
- data/lib/convenient_service/service/plugins/has_mermaid_flowchart/entities.rb +3 -0
- data/lib/convenient_service/service/plugins/has_mermaid_flowchart.rb +4 -0
- data/lib/convenient_service/service/plugins/has_result/concern.rb +17 -6
- data/lib/convenient_service/service/plugins/has_result/exceptions.rb +21 -0
- data/lib/convenient_service/service/plugins/has_result.rb +1 -5
- data/lib/convenient_service/service/plugins/raises_on_double_result/{errors.rb → exceptions.rb} +2 -2
- data/lib/convenient_service/service/plugins/raises_on_double_result/middleware.rb +11 -9
- data/lib/convenient_service/service/plugins/raises_on_double_result.rb +1 -1
- data/lib/convenient_service/service/plugins/raises_on_not_result_return_value/exceptions.rb +24 -0
- data/lib/convenient_service/service/plugins/raises_on_not_result_return_value/middleware.rb +25 -0
- data/lib/convenient_service/service/plugins/raises_on_not_result_return_value.rb +4 -0
- data/lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_backtrace.rb +1 -1
- data/lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_exception.rb +11 -10
- data/lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/middleware.rb +51 -10
- data/lib/convenient_service/service/plugins/sets_parent_to_foreign_result/middleware.rb +56 -0
- data/lib/convenient_service/service/plugins/sets_parent_to_foreign_result.rb +3 -0
- data/lib/convenient_service/service/plugins/wraps_result_in_db_transaction/middleware.rb +3 -1
- data/lib/convenient_service/service/plugins.rb +14 -6
- data/lib/convenient_service/support/abstract_method/{errors.rb → exceptions.rb} +2 -2
- data/lib/convenient_service/support/abstract_method.rb +2 -2
- data/lib/convenient_service/support/arguments.rb +3 -3
- data/lib/convenient_service/support/cache/constants.rb +36 -0
- data/lib/convenient_service/support/cache/entities/caches/array/entities/pair.rb +52 -0
- data/lib/convenient_service/support/cache/entities/caches/array/entities.rb +3 -0
- data/lib/convenient_service/support/cache/entities/caches/array.rb +135 -0
- data/lib/convenient_service/support/cache/entities/caches/base.rb +112 -0
- data/lib/convenient_service/support/cache/entities/caches/hash.rb +113 -0
- data/lib/convenient_service/support/cache/entities/caches/thread_safe_array.rb +89 -0
- data/lib/convenient_service/support/cache/entities/caches.rb +8 -0
- data/lib/convenient_service/support/cache/entities/key.rb +102 -0
- data/lib/convenient_service/support/cache/entities.rb +4 -0
- data/lib/convenient_service/support/cache/exceptions.rb +34 -0
- data/lib/convenient_service/support/cache.rb +16 -143
- data/lib/convenient_service/support/castable/{errors.rb → exceptions.rb} +3 -3
- data/lib/convenient_service/support/castable.rb +2 -2
- data/lib/convenient_service/support/command.rb +42 -3
- data/lib/convenient_service/support/copyable.rb +7 -23
- data/lib/convenient_service/support/counter.rb +211 -0
- data/lib/convenient_service/support/dependency_container/commands/assert_valid_container.rb +33 -0
- data/lib/convenient_service/support/dependency_container/commands/assert_valid_method.rb +58 -0
- data/lib/convenient_service/support/dependency_container/commands/assert_valid_scope.rb +5 -4
- data/lib/convenient_service/support/dependency_container/commands/define_entry.rb +49 -0
- data/lib/convenient_service/support/dependency_container/commands.rb +3 -0
- data/lib/convenient_service/support/dependency_container/container.rb +23 -0
- data/lib/convenient_service/support/dependency_container/entities/method.rb +49 -12
- data/lib/convenient_service/support/dependency_container/entities/method_collection.rb +3 -3
- data/lib/convenient_service/support/dependency_container/entry.rb +22 -0
- data/lib/convenient_service/support/dependency_container/{errors.rb → exceptions.rb} +6 -6
- data/lib/convenient_service/support/dependency_container/export.rb +4 -4
- data/lib/convenient_service/support/dependency_container/import.rb +8 -5
- data/lib/convenient_service/support/dependency_container.rb +4 -1
- data/lib/convenient_service/support/finite_loop.rb +43 -8
- data/lib/convenient_service/support/gems/logger.rb +37 -0
- data/lib/convenient_service/support/gems/paint.rb +37 -0
- data/lib/convenient_service/support/gems.rb +2 -0
- data/lib/convenient_service/support/middleware/stack_builder.rb +1 -1
- data/lib/convenient_service/support/not_passed.rb +4 -3
- data/lib/convenient_service/support/ruby.rb +31 -0
- data/lib/convenient_service/support/safe_method.rb +65 -0
- data/lib/convenient_service/support/thread_safe_counter.rb +128 -0
- data/lib/convenient_service/support/undefined.rb +4 -3
- data/lib/convenient_service/support/unique_value.rb +69 -0
- data/lib/convenient_service/support.rb +5 -0
- data/lib/convenient_service/utils/array/contain_exactly.rb +1 -5
- data/lib/convenient_service/utils/array/{errors.rb → exceptions.rb} +2 -2
- data/lib/convenient_service/utils/array/find_last.rb +1 -1
- data/lib/convenient_service/utils/array/find_yield.rb +1 -1
- data/lib/convenient_service/utils/array/limited_push.rb +54 -0
- data/lib/convenient_service/utils/array/merge.rb +3 -3
- data/lib/convenient_service/utils/array.rb +6 -1
- data/lib/convenient_service/utils/class/display_name.rb +49 -0
- data/lib/convenient_service/utils/class.rb +20 -0
- data/lib/convenient_service/utils/hash/assert_valid_keys.rb +50 -0
- data/lib/convenient_service/utils/hash/except.rb +1 -1
- data/lib/convenient_service/utils/hash/triple_equality_compare.rb +51 -0
- data/lib/convenient_service/utils/hash.rb +10 -0
- data/lib/convenient_service/utils/method/defined.rb +50 -6
- data/lib/convenient_service/utils/module/class_method_defined.rb +22 -2
- data/lib/convenient_service/utils/module/get_own_instance_method.rb +3 -0
- data/lib/convenient_service/utils/module/instance_method_defined.rb +22 -2
- data/lib/convenient_service/utils/object/clamp_class.rb +77 -0
- data/lib/convenient_service/utils/object/duck_class.rb +112 -0
- data/lib/convenient_service/utils/object/memoize_including_falsy_values.rb +1 -1
- data/lib/convenient_service/utils/object.rb +19 -1
- data/lib/convenient_service/utils/string/truncate.rb +69 -0
- data/lib/convenient_service/utils/string.rb +5 -0
- data/lib/convenient_service/utils.rb +21 -0
- data/lib/convenient_service/version.rb +1 -1
- data/lib/convenient_service.rb +16 -3
- data/minitest.rb +30 -0
- metadata +613 -150
- data/lib/convenient_service/common/plugins/caches_constructor_params/concern.rb +0 -22
- data/lib/convenient_service/common/plugins/caches_constructor_params/entities/constructor_params.rb +0 -34
- data/lib/convenient_service/common/plugins/caches_constructor_params/entities.rb +0 -3
- data/lib/convenient_service/common/plugins/caches_constructor_params/middleware.rb +0 -17
- data/lib/convenient_service/common/plugins/caches_constructor_params.rb +0 -5
- data/lib/convenient_service/core/class_methods.rb +0 -81
- data/lib/convenient_service/core/entities/classic_middleware.rb +0 -32
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/chain.rb +0 -71
- data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware.rb +0 -114
- data/lib/convenient_service/core/entities/config/errors.rb +0 -27
- data/lib/convenient_service/core/instance_methods.rb +0 -54
- data/lib/convenient_service/error.rb +0 -16
- data/lib/convenient_service/factories/arguments.rb +0 -43
- data/lib/convenient_service/factories/results.rb +0 -214
- data/lib/convenient_service/factories/services.rb +0 -229
- data/lib/convenient_service/factories/step/instance.rb +0 -42
- data/lib/convenient_service/factories/step.rb +0 -3
- data/lib/convenient_service/factories/steps.rb +0 -126
- data/lib/convenient_service/factories.rb +0 -22
- data/lib/convenient_service/factory.rb +0 -21
- data/lib/convenient_service/rspec/helpers/custom/ignoring_error.rb +0 -32
- data/lib/convenient_service/rspec/matchers/custom/results/base/commands/find_result_method_step.rb +0 -74
- data/lib/convenient_service/rspec/matchers/custom/results/base/commands/find_result_result_method_step.rb +0 -66
- data/lib/convenient_service/rspec/matchers/custom/results/base/commands/find_result_service_step.rb +0 -48
- data/lib/convenient_service/rspec/matchers/custom/results/base/commands/generate_expected_step_part.rb +0 -42
- data/lib/convenient_service/rspec/matchers/custom/results/base/commands/generate_got_step_part.rb +0 -42
- data/lib/convenient_service/rspec/matchers/custom/results/base/commands/match_result_step.rb +0 -89
- data/lib/convenient_service/rspec/matchers/custom/results/base/commands.rb +0 -10
- data/lib/convenient_service/service/plugins/can_have_result_step/middleware.rb +0 -43
- data/lib/convenient_service/service/plugins/can_have_result_step.rb +0 -3
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/cast_method_caller.rb +0 -74
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/cast_method_key.rb +0 -78
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/cast_method_name.rb +0 -78
- data/lib/convenient_service/service/plugins/can_have_steps/entities/service/class_methods.rb +0 -32
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/errors.rb +0 -23
- data/lib/convenient_service/service/plugins/can_have_stubbed_result/concern.rb +0 -51
- data/lib/convenient_service/service/plugins/can_have_stubbed_result/middleware.rb +0 -36
- data/lib/convenient_service/service/plugins/can_have_stubbed_result.rb +0 -4
- data/lib/convenient_service/service/plugins/has_result/concern/instance_methods.rb +0 -48
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins/can_have_parent_result/initialize/middleware.rb +0 -27
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins/can_have_parent_result/initialize.rb +0 -3
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins/can_have_parent_result/to_kwargs/middleware.rb +0 -25
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins/can_have_parent_result/to_kwargs.rb +0 -3
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins/can_have_parent_result.rb +0 -5
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins/has_jsend_status_and_attributes/commands/cast_jsend_attributes.rb +0 -37
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins/has_jsend_status_and_attributes/commands.rb +0 -3
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins/has_jsend_status_and_attributes/entities/code/concern/instance_methods.rb +0 -65
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins/has_jsend_status_and_attributes/entities/data/class_methods.rb +0 -32
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins/has_jsend_status_and_attributes/entities/data.rb +0 -74
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins/has_jsend_status_and_attributes/entities/message/class_methods.rb +0 -34
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins/has_jsend_status_and_attributes/entities/message.rb +0 -45
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins/has_jsend_status_and_attributes/entities/status/class_methods.rb +0 -34
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins/has_jsend_status_and_attributes/entities/status.rb +0 -77
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins/has_jsend_status_and_attributes/structs.rb +0 -3
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins/has_jsend_status_and_attributes.rb +0 -8
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins/has_result_short_syntax/concern.rb +0 -62
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins/has_result_short_syntax.rb +0 -3
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins/has_step/initialize/middleware.rb +0 -27
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins/has_step/initialize.rb +0 -3
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins/has_step/to_kwargs.rb +0 -3
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins/has_step.rb +0 -5
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins/marks_result_status_as_checked.rb +0 -3
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins/raises_on_not_checked_result_status/middleware.rb +0 -33
- data/lib/convenient_service/service/plugins/has_result/entities/result/plugins.rb +0 -10
- data/lib/convenient_service/service/plugins/has_result/errors.rb +0 -34
- data/lib/convenient_service/service/plugins/has_result/middleware.rb +0 -19
- data/lib/convenient_service/service/plugins/has_result_short_syntax/failure/commands/refute_kwargs_contain_data_and_extra_keys.rb +0 -29
- data/lib/convenient_service/service/plugins/has_result_short_syntax/failure/errors.rb +0 -28
- data/lib/convenient_service/service/plugins/has_result_short_syntax/failure/middleware.rb +0 -19
- data/lib/convenient_service/service/plugins/has_result_short_syntax/success/commands.rb +0 -3
- data/lib/convenient_service/service/plugins/has_result_short_syntax.rb +0 -6
- data/lib/convenient_service/service/plugins/has_result_status_check_short_syntax.rb +0 -3
- data/lib/convenient_service/services/run_method_in_organizer.rb +0 -28
- data/lib/convenient_service/services/run_own_method_in_organizer.rb +0 -64
- data/lib/convenient_service/support/cache/key.rb +0 -100
- /data/lib/convenient_service/service/plugins/{has_result → has_j_send_result}/entities/result/plugins/can_recalculate_result.rb +0 -0
- /data/lib/convenient_service/service/plugins/{has_result → has_j_send_result}/entities/result/plugins/has_inspect.rb +0 -0
- /data/lib/convenient_service/service/plugins/{has_result/entities/result/plugins/has_jsend_status_and_attributes → has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes}/entities.rb +0 -0
- /data/lib/convenient_service/service/plugins/{has_result → has_j_send_result}/entities.rb +0 -0
- /data/lib/convenient_service/service/plugins/{has_result_params_validations → has_j_send_result_params_validations}/using_active_model_validations.rb +0 -0
- /data/lib/convenient_service/service/plugins/{has_result_params_validations → has_j_send_result_params_validations}/using_dry_validation.rb +0 -0
- /data/lib/convenient_service/service/plugins/{has_result_short_syntax → has_j_send_result_short_syntax}/error/commands.rb +0 -0
- /data/lib/convenient_service/service/plugins/{has_result_short_syntax/failure → has_j_send_result_short_syntax/success}/commands.rb +0 -0
@@ -0,0 +1,78 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "convenient_service"
|
5
|
+
require "benchmark/ips"
|
6
|
+
|
7
|
+
##
|
8
|
+
# Introduction.
|
9
|
+
#
|
10
|
+
# This benchmark is checking `.has_committed_config?`. As a result, keep in mind that everything in this file should be reviewed in its context.
|
11
|
+
# For example, there is a class called `CurrentImplementation`. Actually, it is the `ImplementationWithoutMemoizationOfHasCommittedConfigInService`.
|
12
|
+
# Or `WithMemoizationInService` - means `ImplementationWithMemoizationOfHasCommittedConfigInService`, etc.
|
13
|
+
#
|
14
|
+
# For the current implementation source, see `ConvenientService::Core::Concern::ClassMethods#has_committed_config?`.
|
15
|
+
##
|
16
|
+
|
17
|
+
class CurrentImplementation
|
18
|
+
include ConvenientService::Standard::Config
|
19
|
+
end
|
20
|
+
|
21
|
+
class WithMemoizationInService
|
22
|
+
include ConvenientService::Standard::Config
|
23
|
+
|
24
|
+
class << self
|
25
|
+
def has_committed_config?
|
26
|
+
@__convenient_service_has_committed_config__ ||= super
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
##
|
32
|
+
# Warmup.
|
33
|
+
#
|
34
|
+
implementations = [CurrentImplementation, WithMemoizationInService]
|
35
|
+
|
36
|
+
implementations.each(&:commit_config!)
|
37
|
+
|
38
|
+
##
|
39
|
+
# Benchmarking of iterations per second.
|
40
|
+
#
|
41
|
+
Benchmark.ips do |x|
|
42
|
+
x.time = 5 # Seconds.
|
43
|
+
x.warmup = 0 # No additional warmup required. It is already performed outside.
|
44
|
+
|
45
|
+
x.report("`.has_committed_config?` - No memoization in service") { CurrentImplementation.has_committed_config? }
|
46
|
+
x.report("`.has_committed_config?` - Memoization in service") { WithMemoizationInService.has_committed_config? }
|
47
|
+
|
48
|
+
x.compare!(order: :baseline)
|
49
|
+
end
|
50
|
+
|
51
|
+
##
|
52
|
+
# Example result.
|
53
|
+
#
|
54
|
+
# Calculating -------------------------------------
|
55
|
+
# `.has_committed_config?` - No memoization in service
|
56
|
+
# 131.142k (± 8.9%) i/s - 220.039k in 1.777241s
|
57
|
+
# `.has_committed_config?` - Memoization in service
|
58
|
+
# 131.319k (±10.5%) i/s - 216.215k in 1.763880s
|
59
|
+
|
60
|
+
# Comparison:
|
61
|
+
# `.has_committed_config?` - No memoization in service: 131142.1 i/s
|
62
|
+
# `.has_committed_config?` - Memoization in service: 131319.1 i/s - same-ish: difference falls within error
|
63
|
+
##
|
64
|
+
|
65
|
+
##
|
66
|
+
# Summary.
|
67
|
+
#
|
68
|
+
# It is one of the Convenient Service design goals to NOT pollute the end-user public interface with extra private methods, instance variables, etc.
|
69
|
+
# Since memoization does NOT bring too big performance improvement, no extra instance variables are introduced.
|
70
|
+
##
|
71
|
+
|
72
|
+
##
|
73
|
+
# More info.
|
74
|
+
# - https://johnnunemaker.com/how-to-benchmark-your-ruby-gem
|
75
|
+
# - https://github.com/evanphx/benchmark-ips
|
76
|
+
# - https://rubydoc.info/gems/benchmark-ips/Benchmark/Compare
|
77
|
+
# - https://en.wikipedia.org/wiki/Standard_deviation
|
78
|
+
##
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "convenient_service"
|
5
|
+
require "stackprof"
|
6
|
+
|
7
|
+
class Service
|
8
|
+
include ConvenientService::Standard::Config
|
9
|
+
end
|
10
|
+
|
11
|
+
Service.commit_config!
|
12
|
+
|
13
|
+
##
|
14
|
+
# Quotes:
|
15
|
+
# - stackprof will tell you what is impeding your progress.
|
16
|
+
# - The assumption is the more times something shows up in the sample the more time it is taking.
|
17
|
+
#
|
18
|
+
# Docs:
|
19
|
+
# - https://www.johnnunemaker.com/how-to-benchmark-your-ruby-gem
|
20
|
+
# - https://github.com/tmm1/stackprof
|
21
|
+
#
|
22
|
+
profile = StackProf.run(mode: :wall, interval: 1_000) do
|
23
|
+
2_000_000.times { Service.has_committed_config? }
|
24
|
+
end
|
25
|
+
|
26
|
+
result = StackProf::Report.new(profile)
|
27
|
+
puts
|
28
|
+
result.print_text
|
29
|
+
puts "\n\n\n"
|
30
|
+
result.print_method(/has_committed_config?/)
|
data/convenient_service.gemspec
CHANGED
@@ -3,6 +3,13 @@
|
|
3
3
|
require_relative "lib/convenient_service/specification"
|
4
4
|
require_relative "lib/convenient_service/version"
|
5
5
|
|
6
|
+
##
|
7
|
+
# NOTE:
|
8
|
+
# - Use `ConvenientService::Support::Ruby.jruby?` directly only in the files that do not require to load all dependencies.
|
9
|
+
# - Prefer `ConvenientService::Dependencies.ruby.jruby?` for the rest of the files.
|
10
|
+
#
|
11
|
+
require_relative "lib/convenient_service/support/ruby"
|
12
|
+
|
6
13
|
Gem::Specification.new do |spec|
|
7
14
|
spec.name = ConvenientService::Specification::NAME
|
8
15
|
spec.authors = ConvenientService::Specification::AUTHORS
|
@@ -29,27 +36,179 @@ Gem::Specification.new do |spec|
|
|
29
36
|
|
30
37
|
spec.require_paths = ["lib"]
|
31
38
|
|
32
|
-
|
39
|
+
##
|
40
|
+
# Used to run specs with multiple versions of gems.
|
41
|
+
# - https://github.com/thoughtbot/appraisal
|
42
|
+
#
|
43
|
+
spec.add_development_dependency "appraisal", "~> 2.5.0"
|
44
|
+
|
33
45
|
spec.add_development_dependency "awesome_print"
|
34
|
-
|
35
|
-
|
46
|
+
|
47
|
+
##
|
48
|
+
# Used for benchmarking (iteration per second). See `benchmark` directory.
|
49
|
+
# - https://github.com/evanphx/benchmark-ips
|
50
|
+
# - https://www.johnnunemaker.com/how-to-benchmark-your-ruby-gem
|
51
|
+
#
|
52
|
+
spec.add_development_dependency "benchmark-ips", "~> 2.12.0"
|
53
|
+
|
54
|
+
##
|
55
|
+
# Used for debugging any Ruby code (CRuby, JRuby, etc), since it written in plain Ruby.
|
56
|
+
# Has minimalistic interface.
|
57
|
+
# Does NOT support frame filtering.
|
58
|
+
# - https://github.com/gsamokovarov/break
|
59
|
+
#
|
60
|
+
spec.add_development_dependency "break"
|
61
|
+
|
62
|
+
##
|
63
|
+
# Used for debugging CRuby code.
|
64
|
+
# Check `debug` if you need frame filtering.
|
65
|
+
# Check `break` if you need to debug JRuby.
|
66
|
+
# - https://github.com/deivid-rodriguez/byebug
|
67
|
+
#
|
68
|
+
# NOTE: `byebug` has C extensions, that is why it is NOT supported in JRuby.
|
69
|
+
# - https://github.com/deivid-rodriguez/byebug/tree/master/ext/byebug
|
70
|
+
# - https://github.com/deivid-rodriguez/byebug/issues/179#issuecomment-152727003
|
71
|
+
#
|
72
|
+
spec.add_development_dependency "byebug", "~> 10.0" unless ConvenientService::Support::Ruby.jruby?
|
73
|
+
|
74
|
+
##
|
75
|
+
# NOTE: `commonmarker` has C extensions, that is why it is NOT supported in JRuby.
|
76
|
+
# - https://github.com/gjtorikian/commonmarker/tree/main/ext/commonmarker
|
77
|
+
#
|
78
|
+
spec.add_development_dependency "commonmarker" unless ConvenientService::Support::Ruby.jruby?
|
79
|
+
|
80
|
+
##
|
81
|
+
# Used for debugging CRuby code.
|
82
|
+
# Has almost the same public API as `byebug`, but supports frame filtering.
|
83
|
+
# Check `break` if you need to debug JRuby.
|
84
|
+
# - https://github.com/ruby/debug
|
85
|
+
# - https://st0012.dev/from-byebug-to-ruby-debug
|
86
|
+
# - https://st0012.dev/from-byebug-to-ruby-debug#heading-configuration
|
87
|
+
# - https://github.com/ruby/debug#configuration
|
88
|
+
# - ENV["RUBY_DEBUG_SKIP_PATH"]
|
89
|
+
#
|
90
|
+
# NOTE: `debug` has C extensions, that is why it is NOT supported in JRuby.
|
91
|
+
# - https://github.com/ruby/debug/tree/master/ext/debug
|
92
|
+
#
|
93
|
+
spec.add_development_dependency "debug" unless ConvenientService::Support::Ruby.jruby?
|
94
|
+
|
36
95
|
spec.add_development_dependency "faker"
|
96
|
+
|
37
97
|
spec.add_development_dependency "gem-release"
|
98
|
+
|
38
99
|
spec.add_development_dependency "inch"
|
100
|
+
|
39
101
|
spec.add_development_dependency "json"
|
102
|
+
|
103
|
+
##
|
104
|
+
# Used for memory profiling of Ruby code.
|
105
|
+
# - https://github.com/SamSaffron/memory_profiler
|
106
|
+
# - https://thoughtbot.com/blog/a-crash-course-in-analyzing-memory-usage-in-ruby
|
107
|
+
#
|
108
|
+
spec.add_development_dependency "memory_profiler"
|
109
|
+
|
110
|
+
##
|
111
|
+
# Used for testing Ruby code outside RSpec.
|
112
|
+
# - https://github.com/minitest/minitest
|
113
|
+
# - https://semaphoreci.com/community/tutorials/getting-started-with-minitest
|
114
|
+
# - https://cloudbees.com/blog/getting-started-with-minitest
|
115
|
+
#
|
116
|
+
spec.add_development_dependency "minitest", "~> 5.18.0"
|
117
|
+
|
118
|
+
##
|
119
|
+
# Used for mutation testing of Ruby code.
|
120
|
+
# - https://github.com/mbj/mutant
|
121
|
+
# - https://github.com/mbj/mutant/blob/main/docs/nomenclature.md
|
122
|
+
# - https://github.com/mbj/mutant/blob/main/docs/mutant-rspec.md
|
123
|
+
# - https://github.com/mbj/mutant/blob/main/docs/incremental.md
|
124
|
+
#
|
125
|
+
spec.add_development_dependency "mutant", "~> 0.11.21"
|
126
|
+
spec.add_development_dependency "mutant-rspec", "~> 0.11.21"
|
127
|
+
|
128
|
+
##
|
129
|
+
# Used for coloring logs.
|
130
|
+
# - https://github.com/janlelis/paint
|
131
|
+
#
|
40
132
|
spec.add_development_dependency "paint"
|
133
|
+
|
41
134
|
spec.add_development_dependency "progressbar"
|
135
|
+
|
42
136
|
spec.add_development_dependency "rake", "~> 12.0"
|
137
|
+
|
43
138
|
spec.add_development_dependency "rerun"
|
139
|
+
|
44
140
|
spec.add_development_dependency "rouge"
|
141
|
+
|
142
|
+
##
|
143
|
+
# Used for testing Ruby code.
|
144
|
+
# https://rspec.info
|
145
|
+
#
|
45
146
|
spec.add_development_dependency "rspec", "~> 3.11.0"
|
46
|
-
|
47
|
-
|
147
|
+
|
148
|
+
##
|
149
|
+
# Used for performance testing with RSpec.
|
150
|
+
# https://github.com/piotrmurach
|
151
|
+
#
|
152
|
+
spec.add_development_dependency "rspec-benchmark", "~> 0.6.0"
|
153
|
+
|
154
|
+
##
|
155
|
+
# Used for linting Ruby files.
|
156
|
+
# https://github.com/rubocop/rubocop
|
157
|
+
#
|
158
|
+
spec.add_development_dependency "rubocop", "~> 1.52.0"
|
159
|
+
|
160
|
+
##
|
161
|
+
# Used as a set of rules for rubocop for linting RSpec files.
|
162
|
+
# https://github.com/rubocop/rubocop-rspec
|
163
|
+
#
|
164
|
+
spec.add_development_dependency "rubocop-rspec", "~> 2.22.0"
|
165
|
+
|
48
166
|
spec.add_development_dependency "tty-prompt"
|
49
|
-
|
167
|
+
|
168
|
+
##
|
169
|
+
# Used as a set of rules for robocop for linting source files.
|
170
|
+
# https://github.com/testdouble/standard
|
171
|
+
#
|
172
|
+
spec.add_development_dependency "standard", "~> 1.30.1"
|
173
|
+
|
50
174
|
spec.add_development_dependency "simplecov"
|
175
|
+
|
51
176
|
spec.add_development_dependency "simplecov-lcov"
|
177
|
+
|
178
|
+
##
|
179
|
+
# Used to have a simplified public API of minitest.
|
180
|
+
# - https://github.com/thoughtbot/shoulda-context
|
181
|
+
#
|
182
|
+
spec.add_development_dependency "shoulda-context", "~> 2.0.0"
|
183
|
+
|
184
|
+
##
|
185
|
+
# Used for benchmarking (call-stack profiler). See `benchmark` directory.
|
186
|
+
# - https://github.com/tmm1/stackprof
|
187
|
+
# - https://www.johnnunemaker.com/how-to-benchmark-your-ruby-gem
|
188
|
+
#
|
189
|
+
spec.add_development_dependency "stackprof", "~> 0.2.25" unless ConvenientService::Support::Ruby.jruby?
|
190
|
+
|
52
191
|
spec.add_development_dependency "webrick"
|
192
|
+
|
53
193
|
spec.add_development_dependency "yard", "~> 0.9.28"
|
194
|
+
|
54
195
|
spec.add_development_dependency "yard-junk"
|
196
|
+
|
197
|
+
##
|
198
|
+
# The following gems are Convenient Service alternatives.
|
199
|
+
# Used for performance comparisons.
|
200
|
+
# See `benchmark/empty_service`.
|
201
|
+
# - https://github.com/sunny/actor
|
202
|
+
# - https://github.com/collectiveidea/interactor
|
203
|
+
# - https://github.com/trailblazer/trailblazer-operation
|
204
|
+
# - https://github.com/AaronLasseigne/active_interaction
|
205
|
+
# - https://github.com/adomokos/light-service
|
206
|
+
# - https://github.com/cypriss/mutations
|
207
|
+
#
|
208
|
+
spec.add_development_dependency "service_actor", "~> 3.7.0"
|
209
|
+
spec.add_development_dependency "interactor", "~> 3.1.2"
|
210
|
+
spec.add_development_dependency "trailblazer-operation", "~> 0.10.1"
|
211
|
+
spec.add_development_dependency "active_interaction", "~> 5.3.0"
|
212
|
+
spec.add_development_dependency "light-service", "~> 0.18.0"
|
213
|
+
spec.add_development_dependency "mutations", "~> 0.9.1"
|
55
214
|
end
|
data/docker/2.7/Dockerfile
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
#
|
4
4
|
# NOTE: Linted by hadolint.
|
5
5
|
#
|
6
|
-
# docker run --rm -i ghcr.io/hadolint/hadolint < docker/
|
6
|
+
# docker run --rm -i ghcr.io/hadolint/hadolint < docker/2.7/Dockerfile
|
7
7
|
#
|
8
8
|
# NOTE: A command to build image.
|
9
9
|
#
|
@@ -21,12 +21,12 @@
|
|
21
21
|
# NOTE: If there are no memory, performance, or cost constraints, prefer to use as standard Linux distribution as it is possible.
|
22
22
|
# In a general case, you simply won't have enough time to resolve all the "quirks" of more specific distributions if you are an application developer.
|
23
23
|
# That is why a `slim` version is used instead of `alpine`.
|
24
|
-
# Also `slim` is more similar to Ubuntu
|
24
|
+
# Also `slim` is more similar to Ubuntu.
|
25
25
|
# - https://github.com/timbru31/docker-ruby-node/tree/master/2.7/16
|
26
26
|
# - https://medium.com/swlh/alpine-slim-stretch-buster-jessie-bullseye-bookworm-what-are-the-differences-in-docker-62171ed4531d
|
27
27
|
# - https://hub.docker.com/r/timbru31/ruby-node/tags
|
28
28
|
#
|
29
|
-
# NOTE: Gallium means Node.js 16.x
|
29
|
+
# NOTE: Gallium means Node.js 16.x.
|
30
30
|
# https://github.com/nodejs/Release
|
31
31
|
#
|
32
32
|
FROM timbru31/ruby-node:2.7-slim-gallium
|
data/docker/3.0/Dockerfile
CHANGED
@@ -21,12 +21,12 @@
|
|
21
21
|
# NOTE: If there are no memory, performance, or cost constraints, prefer to use as standard Linux distribution as it is possible.
|
22
22
|
# In a general case, you simply won't have enough time to resolve all the "quirks" of more specific distributions if you are an application developer.
|
23
23
|
# That is why a `slim` version is used instead of `alpine`.
|
24
|
-
# Also `slim` is more similar to Ubuntu
|
24
|
+
# Also `slim` is more similar to Ubuntu.
|
25
25
|
# - https://github.com/timbru31/docker-ruby-node/tree/master/3.0/16
|
26
26
|
# - https://medium.com/swlh/alpine-slim-stretch-buster-jessie-bullseye-bookworm-what-are-the-differences-in-docker-62171ed4531d
|
27
27
|
# - https://hub.docker.com/r/timbru31/ruby-node/tags
|
28
28
|
#
|
29
|
-
# NOTE: Gallium means Node.js 16.x
|
29
|
+
# NOTE: Gallium means Node.js 16.x.
|
30
30
|
# https://github.com/nodejs/Release
|
31
31
|
#
|
32
32
|
FROM timbru31/ruby-node:3.0-slim-gallium
|
data/docker/3.1/Dockerfile
CHANGED
@@ -21,12 +21,12 @@
|
|
21
21
|
# NOTE: If there are no memory, performance, or cost constraints, prefer to use as standard Linux distribution as it is possible.
|
22
22
|
# In a general case, you simply won't have enough time to resolve all the "quirks" of more specific distributions if you are an application developer.
|
23
23
|
# That is why a `slim` version is used instead of `alpine`.
|
24
|
-
# Also `slim` is more similar to Ubuntu
|
24
|
+
# Also `slim` is more similar to Ubuntu.
|
25
25
|
# - https://github.com/timbru31/docker-ruby-node/tree/master/3.1/16
|
26
26
|
# - https://medium.com/swlh/alpine-slim-stretch-buster-jessie-bullseye-bookworm-what-are-the-differences-in-docker-62171ed4531d
|
27
27
|
# - https://hub.docker.com/r/timbru31/ruby-node/tags
|
28
28
|
#
|
29
|
-
# NOTE: Gallium means Node.js 16.x
|
29
|
+
# NOTE: Gallium means Node.js 16.x.
|
30
30
|
# https://github.com/nodejs/Release
|
31
31
|
#
|
32
32
|
FROM timbru31/ruby-node:3.1-slim-gallium
|
@@ -0,0 +1,73 @@
|
|
1
|
+
##
|
2
|
+
# Ruby 3.2 with Node.js 16.x.
|
3
|
+
#
|
4
|
+
# NOTE: Linted by hadolint.
|
5
|
+
#
|
6
|
+
# docker run --rm -i ghcr.io/hadolint/hadolint < docker/3.2/Dockerfile
|
7
|
+
#
|
8
|
+
# NOTE: A command to build image.
|
9
|
+
#
|
10
|
+
# cd convenient_service
|
11
|
+
# cp Gemfile Gemfile.3.2
|
12
|
+
# docker build . -f docker/3.2/Dockerfile -t convenient_service:3.2
|
13
|
+
# # or `task docker:build:ruby_3.2`
|
14
|
+
#
|
15
|
+
# NOTE: A command to run bash in container.
|
16
|
+
#
|
17
|
+
# cd convenient_service
|
18
|
+
# docker run --rm -it -v $(pwd):/gem convenient_service:3.2 bash
|
19
|
+
# # or `task docker:bash:ruby_3.2`
|
20
|
+
#
|
21
|
+
# NOTE: If there are no memory, performance, or cost constraints, prefer to use as standard Linux distribution as it is possible.
|
22
|
+
# In a general case, you simply won't have enough time to resolve all the "quirks" of more specific distributions if you are an application developer.
|
23
|
+
# That is why a `slim` version is used instead of `alpine`.
|
24
|
+
# Also `slim` is more similar to Ubuntu.
|
25
|
+
# - https://github.com/timbru31/docker-ruby-node/tree/master/3.2/16
|
26
|
+
# - https://medium.com/swlh/alpine-slim-stretch-buster-jessie-bullseye-bookworm-what-are-the-differences-in-docker-62171ed4531d
|
27
|
+
# - https://hub.docker.com/r/timbru31/ruby-node/tags
|
28
|
+
#
|
29
|
+
# NOTE: Gallium means Node.js 16.x.
|
30
|
+
# https://github.com/nodejs/Release
|
31
|
+
#
|
32
|
+
FROM timbru31/ruby-node:3.2-slim-gallium
|
33
|
+
|
34
|
+
##
|
35
|
+
# NOTE: `bundle install` dependencies.
|
36
|
+
#
|
37
|
+
RUN apt-get update -qq \
|
38
|
+
&& apt-get install --no-install-recommends -y git \
|
39
|
+
&& apt-get install --no-install-recommends -y make \
|
40
|
+
&& apt-get install --no-install-recommends -y gcc \
|
41
|
+
&& apt-get clean \
|
42
|
+
&& rm -rf /var/lib/apt/lists/*
|
43
|
+
|
44
|
+
RUN mkdir -p /gem
|
45
|
+
|
46
|
+
WORKDIR /gem
|
47
|
+
|
48
|
+
COPY . /gem
|
49
|
+
|
50
|
+
##
|
51
|
+
# NOTE: Every container has its own copy of `Gemfile`. This way a developer doesn't need to delete `Gemfile.lock` all the time when changing containers.
|
52
|
+
# - https://docs.docker.com/engine/reference/builder/#env
|
53
|
+
# - https://stackoverflow.com/questions/48863711/is-it-possible-to-override-gemfile-for-local-development
|
54
|
+
#
|
55
|
+
ENV BUNDLE_GEMFILE=Gemfile.3.2
|
56
|
+
|
57
|
+
RUN bundle install
|
58
|
+
|
59
|
+
RUN bundle exec appraisal install
|
60
|
+
|
61
|
+
##
|
62
|
+
# NOTE: Installs `task`.
|
63
|
+
# https://taskfile.dev/installation/#install-script
|
64
|
+
#
|
65
|
+
# NOTE: `task` is installed into `~/bin`. That is why `-b /bin` is used. See `echo ${PATH}` to debug.
|
66
|
+
#
|
67
|
+
RUN sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /bin
|
68
|
+
|
69
|
+
##
|
70
|
+
# NOTE: Is used to check whether a command is executed inside a Docker container. See Rakefile for examples.
|
71
|
+
# https://stackoverflow.com/a/65942222/12201472
|
72
|
+
#
|
73
|
+
ENV IN_DOCKER_CONTAINER=true
|
@@ -0,0 +1,88 @@
|
|
1
|
+
##
|
2
|
+
# JRuby 9.4 (CRuby 3.1 compatible) with Node.js 16.x.
|
3
|
+
# - https://www.jruby.org/download
|
4
|
+
#
|
5
|
+
# NOTE: Linted by hadolint.
|
6
|
+
#
|
7
|
+
# docker run --rm -i ghcr.io/hadolint/hadolint < docker/jruby-9.4/Dockerfile
|
8
|
+
#
|
9
|
+
# NOTE: A command to build image.
|
10
|
+
#
|
11
|
+
# cd convenient_service
|
12
|
+
# cp Gemfile Gemfile.jruby-9.4
|
13
|
+
# docker build . -f docker/jruby-9.4/Dockerfile -t convenient_service:jruby-9.4
|
14
|
+
# # or `task docker:build:jruby_9.4`
|
15
|
+
#
|
16
|
+
# NOTE: A command to run bash in container.
|
17
|
+
#
|
18
|
+
# cd convenient_service
|
19
|
+
# docker run --rm -it -v $(pwd):/gem convenient_service:jruby-9.4 bash
|
20
|
+
# # or `task docker:bash:jruby_9.4`
|
21
|
+
#
|
22
|
+
# NOTE: If there are no memory, performance, or cost constraints, prefer to use as standard Linux distribution as it is possible.
|
23
|
+
# In a general case, you simply won't have enough time to resolve all the "quirks" of more specific distributions if you are an application developer.
|
24
|
+
# `jruby:9.4` uses Ubuntu under the hood.s
|
25
|
+
# - https://hub.docker.com/_/jruby/tags
|
26
|
+
# - https://github.com/jruby/docker-jruby/blob/master/9.4/jre8/Dockerfile
|
27
|
+
# - https://github.com/adoptium/containers/blob/main/19/jdk/ubuntu/jammy/Dockerfile.releases.full#L20
|
28
|
+
#
|
29
|
+
# NOTE: Gallium means Node.js 16.x.
|
30
|
+
# https://github.com/nodejs/Release
|
31
|
+
#
|
32
|
+
FROM jruby:9.4
|
33
|
+
|
34
|
+
##
|
35
|
+
# NOTE: `git` is `bundle install` dependency.
|
36
|
+
#
|
37
|
+
# NOTE: `curl` and `gnupg2` are Node.js 16.x dependencies.
|
38
|
+
# https://github.com/timbru31/docker-ruby-node/blob/master/3.2/16/slim/Dockerfile
|
39
|
+
#
|
40
|
+
RUN apt-get update -qq \
|
41
|
+
&& apt-get install --no-install-recommends -y git \
|
42
|
+
&& apt-get install --no-install-recommends -y curl \
|
43
|
+
&& apt-get install --no-install-recommends -y gnupg2 \
|
44
|
+
&& apt-get clean \
|
45
|
+
&& rm -rf /var/lib/apt/lists/*
|
46
|
+
|
47
|
+
RUN mkdir -p /gem
|
48
|
+
|
49
|
+
WORKDIR /gem
|
50
|
+
|
51
|
+
COPY . /gem
|
52
|
+
|
53
|
+
##
|
54
|
+
# NOTE: Every container has its own copy of `Gemfile`. This way a developer doesn't need to delete `Gemfile.lock` all the time when changing containers.
|
55
|
+
# - https://docs.docker.com/engine/reference/builder/#env
|
56
|
+
# - https://stackoverflow.com/questions/48863711/is-it-possible-to-koverride-gemfile-for-local-development
|
57
|
+
#
|
58
|
+
ENV BUNDLE_GEMFILE=Gemfile.jruby-9.4
|
59
|
+
|
60
|
+
RUN bundle install
|
61
|
+
|
62
|
+
RUN bundle exec appraisal install
|
63
|
+
|
64
|
+
##
|
65
|
+
# NOTE: Installs `task`.
|
66
|
+
# https://taskfile.dev/installation/#install-script
|
67
|
+
#
|
68
|
+
# NOTE: `task` is installed into `~/bin`. That is why `-b /bin` is used. See `echo ${PATH}` to debug.
|
69
|
+
#
|
70
|
+
RUN sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /bin
|
71
|
+
|
72
|
+
##
|
73
|
+
# NOTE: Intalls Node.js 16.x and `yarn`.
|
74
|
+
# https://github.com/timbru31/docker-ruby-node/blob/master/3.2/16/slim/Dockerfile
|
75
|
+
#
|
76
|
+
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -\
|
77
|
+
&& apt-get update -qq \
|
78
|
+
&& apt-get install -qq --no-install-recommends nodejs \
|
79
|
+
&& apt-get upgrade -qq \
|
80
|
+
&& apt-get clean \
|
81
|
+
&& rm -rf /var/lib/apt/lists/*\
|
82
|
+
&& npm install -g yarn@1
|
83
|
+
|
84
|
+
##
|
85
|
+
# NOTE: Is used to check whether a command is executed inside a Docker container. See Rakefile for examples.
|
86
|
+
# https://stackoverflow.com/a/65942222/12201472
|
87
|
+
#
|
88
|
+
ENV IN_DOCKER_CONTAINER=true
|
@@ -0,0 +1,91 @@
|
|
1
|
+
##
|
2
|
+
# TruffleRuby 22.3 (CRuby 3.1 compatible) with Node.js 16.x.
|
3
|
+
# - https://github.com/graalvm/container/blob/master/truffleruby/README.md
|
4
|
+
# - https://github.com/oracle/truffleruby/blob/master/doc/user/compatibility.md
|
5
|
+
#
|
6
|
+
# NOTE: Linted by hadolint.
|
7
|
+
#
|
8
|
+
# docker run --rm -i ghcr.io/hadolint/hadolint < docker/truffleruby-22.3/Dockerfile
|
9
|
+
#
|
10
|
+
# NOTE: A command to build image.
|
11
|
+
#
|
12
|
+
# cd convenient_service
|
13
|
+
# cp Gemfile Gemfile.truffleruby-22.3
|
14
|
+
# docker build . -f docker/truffleruby-22.3/Dockerfile -t convenient_service:truffleruby-22.3
|
15
|
+
# # or `task docker:build:jruby_9.4`
|
16
|
+
#
|
17
|
+
# NOTE: A command to run bash in container.
|
18
|
+
#
|
19
|
+
# cd convenient_service
|
20
|
+
# docker run --rm -it -v $(pwd):/gem convenient_service:truffleruby-22.3 bash
|
21
|
+
# # or `task docker:bash:jruby_9.4`
|
22
|
+
#
|
23
|
+
# NOTE: If there are no memory, performance, or cost constraints, prefer to use as standard Linux distribution as it is possible.
|
24
|
+
# In a general case, you simply won't have enough time to resolve all the "quirks" of more specific distributions if you are an application developer.
|
25
|
+
# `ghcr.io/graalvm/truffleruby:debian-22.3` uses Debian (that is similar to Ubuntu) under the hood.
|
26
|
+
# - https://github.com/graalvm/container/pkgs/container/truffleruby/65464856?tag=debian-22.3
|
27
|
+
# - https://github.com/graalvm/container/blob/master/truffleruby/Dockerfile.debian#L6
|
28
|
+
# - https://www.graalvm.org/latest/docs/getting-started/container-images/
|
29
|
+
#
|
30
|
+
# NOTE: Gallium means Node.js 16.x.
|
31
|
+
# https://github.com/nodejs/Release
|
32
|
+
#
|
33
|
+
FROM ghcr.io/graalvm/truffleruby:debian-22.3
|
34
|
+
|
35
|
+
##
|
36
|
+
# NOTE: `git`, `make`, `gcc` are `bundle install` dependencies.
|
37
|
+
#
|
38
|
+
# NOTE: `curl` and `gnupg2` are Node.js 16.x dependencies.
|
39
|
+
# https://github.com/timbru31/docker-ruby-node/blob/master/3.2/16/slim/Dockerfile
|
40
|
+
#
|
41
|
+
RUN apt-get update -qq \
|
42
|
+
&& apt-get install --no-install-recommends -y git \
|
43
|
+
&& apt-get install --no-install-recommends -y make \
|
44
|
+
&& apt-get install --no-install-recommends -y gcc \
|
45
|
+
&& apt-get install --no-install-recommends -y curl \
|
46
|
+
&& apt-get install --no-install-recommends -y gnupg2 \
|
47
|
+
&& apt-get clean \
|
48
|
+
&& rm -rf /var/lib/apt/lists/*
|
49
|
+
|
50
|
+
RUN mkdir -p /gem
|
51
|
+
|
52
|
+
WORKDIR /gem
|
53
|
+
|
54
|
+
COPY . /gem
|
55
|
+
|
56
|
+
##
|
57
|
+
# NOTE: Every container has its own copy of `Gemfile`. This way a developer doesn't need to delete `Gemfile.lock` all the time when changing containers.
|
58
|
+
# - https://docs.docker.com/engine/reference/builder/#env
|
59
|
+
# - https://stackoverflow.com/questions/48863711/is-it-possible-to-koverride-gemfile-for-local-development
|
60
|
+
#
|
61
|
+
ENV BUNDLE_GEMFILE=Gemfile.truffleruby-22.3
|
62
|
+
|
63
|
+
RUN bundle install
|
64
|
+
|
65
|
+
RUN bundle exec appraisal install
|
66
|
+
|
67
|
+
##
|
68
|
+
# NOTE: Installs `task`.
|
69
|
+
# https://taskfile.dev/installation/#install-script
|
70
|
+
#
|
71
|
+
# NOTE: `task` is installed into `~/bin`. That is why `-b /bin` is used. See `echo ${PATH}` to debug.
|
72
|
+
#
|
73
|
+
RUN sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /bin
|
74
|
+
|
75
|
+
##
|
76
|
+
# NOTE: Intalls Node.js 16.x and `yarn`.
|
77
|
+
# https://github.com/timbru31/docker-ruby-node/blob/master/3.2/16/slim/Dockerfile
|
78
|
+
#
|
79
|
+
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -\
|
80
|
+
&& apt-get update -qq \
|
81
|
+
&& apt-get install -qq --no-install-recommends nodejs \
|
82
|
+
&& apt-get upgrade -qq \
|
83
|
+
&& apt-get clean \
|
84
|
+
&& rm -rf /var/lib/apt/lists/*\
|
85
|
+
&& npm install -g yarn@1
|
86
|
+
|
87
|
+
##
|
88
|
+
# NOTE: Is used to check whether a command is executed inside a Docker container. See Rakefile for examples.
|
89
|
+
# https://stackoverflow.com/a/65942222/12201472
|
90
|
+
#
|
91
|
+
ENV IN_DOCKER_CONTAINER=true
|
data/gemfiles/.gitkeep
ADDED
File without changes
|
@@ -9,8 +9,4 @@ module ConvenientService
|
|
9
9
|
Command = ::ConvenientService::Support::Command
|
10
10
|
Concern = ::ConvenientService::Support::Concern
|
11
11
|
DependencyContainer = ::ConvenientService::Support::DependencyContainer
|
12
|
-
|
13
|
-
ClassicMiddleware = ::ConvenientService::Core::Entities::ClassicMiddleware
|
14
|
-
ConcernMiddleware = ::ConvenientService::Core::Entities::Config::Entities::Concerns::Entities::Middleware
|
15
|
-
MethodChainMiddleware = ::ConvenientService::Core::Entities::Config::Entities::MethodMiddlewares::Entities::Middleware
|
16
12
|
end
|