├── .dev └── .tmuxinator.yml ├── .dockerignore ├── .gem_release.yml ├── .github ├── contributing.md ├── issue_template.md ├── pull_request_template.md └── workflows │ ├── cd.yml │ └── ci.yml ├── .gitignore ├── .inch.yml ├── .rubocop.yml ├── .rubocop_rspec.yml ├── .ruby-version ├── .tool-versions ├── .vscode ├── CacheItsValue.code-snippets ├── DelegateTo.code-snippets ├── IgnoringException.code-snippets ├── Service.code-snippets ├── ServiceWithSteps.code-snippets ├── cache_its_value.code-snippets ├── comparison.code-snippets ├── delegate_to.code-snippets ├── let_service.code-snippets.code-snippets ├── let_service_with_steps.code-snippets ├── yresult.code-snippets ├── yservice.code-snippets ├── ystep.code-snippets └── ystep_expression.code-snippets ├── .yardopts ├── Appraisals ├── BACKLOG.md ├── CHANGELOG.md ├── COMM-LICENSE.txt ├── Gemfile ├── LICENSE.txt ├── README.md ├── Rakefile ├── Taskfile.yml ├── benchmark ├── implementation │ ├── commit_config │ │ ├── ips.rb │ │ └── profile.rb │ ├── empty_service │ │ └── ips.rb │ ├── has_committed_config │ │ ├── ips.rb │ │ └── profile.rb │ └── regular_service │ │ └── memory.rb ├── initial_load │ └── require │ │ ├── get_process_mem.rb │ │ └── memory_profiler_objects.rb └── load │ ├── deeply_nested_steps │ └── bm.rb │ ├── deeply_nested_steps_with_rollbacks │ └── bm.rb │ ├── deeply_nested_steps_without_rollbacks │ └── bm.rb │ ├── many_connected_steps │ └── bm.rb │ ├── many_included_modules │ └── bm.rb │ ├── many_included_modules_with_missing_method │ └── bm.rb │ ├── many_middlewares │ └── bm.rb │ ├── many_nested_middlewares │ └── bm.rb │ └── many_sequential_steps │ └── bm.rb ├── bin ├── appraisal └── minitest ├── console └── seeds.rb ├── convenient_service.gemspec ├── coverage └── .gitkeep ├── docker ├── jruby_10.0 │ └── Dockerfile ├── jruby_9.4 │ └── Dockerfile ├── ruby_2.7 │ └── Dockerfile ├── ruby_3.0 │ └── Dockerfile ├── ruby_3.1 │ └── Dockerfile ├── ruby_3.2 │ └── Dockerfile ├── ruby_3.3 │ └── Dockerfile ├── ruby_3.4 │ └── Dockerfile ├── ruby_3.5 │ └── Dockerfile ├── truffleruby_22.3 │ └── Dockerfile └── truffleruby_24.0 │ └── Dockerfile ├── docs ├── .gitkeep └── api │ └── .gitkeep ├── lib ├── convenient_service.rb └── convenient_service │ ├── aliases.rb │ ├── commands.rb │ ├── common.rb │ ├── common │ ├── plugins.rb │ └── plugins │ │ ├── aliases.rb │ │ ├── assigns_attributes_in_constructor │ │ ├── using_active_model_attribute_assignment.rb │ │ ├── using_active_model_attribute_assignment │ │ │ ├── concern.rb │ │ │ └── middleware.rb │ │ ├── using_dry_initializer.rb │ │ └── using_dry_initializer │ │ │ └── concern.rb │ │ ├── caches_constructor_arguments.rb │ │ ├── caches_constructor_arguments │ │ ├── concern.rb │ │ └── middleware.rb │ │ ├── caches_return_value.rb │ │ ├── caches_return_value │ │ └── middleware.rb │ │ ├── can_be_copied.rb │ │ ├── can_be_copied │ │ └── concern.rb │ │ ├── can_have_callbacks.rb │ │ ├── can_have_callbacks │ │ ├── concern.rb │ │ ├── entities.rb │ │ ├── entities │ │ │ ├── callback.rb │ │ │ ├── callback_collection.rb │ │ │ ├── type.rb │ │ │ ├── type │ │ │ │ └── concern.rb │ │ │ └── type_collection.rb │ │ ├── exceptions.rb │ │ └── middleware.rb │ │ ├── can_have_not_passed_arguments.rb │ │ ├── can_have_not_passed_arguments │ │ └── concern.rb │ │ ├── can_have_user_provided_entity.rb │ │ ├── can_have_user_provided_entity │ │ ├── commands.rb │ │ ├── commands │ │ │ └── find_or_create_entity.rb │ │ ├── container.rb │ │ └── exceptions.rb │ │ ├── can_utilize_finite_loop.rb │ │ ├── can_utilize_finite_loop │ │ ├── concern.rb │ │ └── constants.rb │ │ ├── cleans_exception_backtrace.rb │ │ ├── cleans_exception_backtrace │ │ └── middleware.rb │ │ ├── ensures_negated_j_send_result.rb │ │ ├── ensures_negated_j_send_result │ │ └── middleware.rb │ │ ├── has_attributes │ │ ├── using_active_model_attributes.rb │ │ └── using_active_model_attributes │ │ │ ├── concern.rb │ │ │ ├── patches.rb │ │ │ └── patches │ │ │ └── active_model_attributes.rb │ │ ├── has_constructor.rb │ │ ├── has_constructor │ │ └── concern.rb │ │ ├── has_constructor_without_initialize.rb │ │ ├── has_constructor_without_initialize │ │ └── concern.rb │ │ ├── has_instance_proxy.rb │ │ ├── has_instance_proxy │ │ ├── commands.rb │ │ ├── commands │ │ │ └── create_instance_proxy_class.rb │ │ ├── concern.rb │ │ ├── entities.rb │ │ ├── entities │ │ │ └── instance_proxy.rb │ │ └── middleware.rb │ │ ├── has_internals.rb │ │ ├── has_internals │ │ ├── commands.rb │ │ ├── commands │ │ │ └── create_internals_class.rb │ │ ├── concern.rb │ │ ├── entities.rb │ │ └── entities │ │ │ ├── internals.rb │ │ │ └── internals │ │ │ ├── concern.rb │ │ │ ├── plugins.rb │ │ │ └── plugins │ │ │ ├── aliases.rb │ │ │ ├── has_cache.rb │ │ │ └── has_cache │ │ │ └── concern.rb │ │ ├── has_j_send_result_duck_short_syntax.rb │ │ ├── has_j_send_result_duck_short_syntax │ │ └── concern.rb │ │ └── has_memoization │ │ ├── using_memo_wise.rb │ │ └── using_memo_wise │ │ └── concern.rb │ ├── config.rb │ ├── config │ ├── commands.rb │ ├── commands │ │ └── normalize_options.rb │ ├── entities.rb │ ├── entities │ │ ├── option.rb │ │ └── options.rb │ └── exceptions.rb │ ├── core.rb │ ├── core │ ├── aliases.rb │ ├── concern.rb │ ├── concern │ │ ├── class_methods.rb │ │ ├── instance_methods.rb │ │ └── singleton_class_methods.rb │ ├── constants.rb │ ├── entities.rb │ └── entities │ │ ├── config.rb │ │ └── config │ │ ├── commands.rb │ │ ├── commands │ │ ├── create_entity_class.rb │ │ ├── find_entity_class.rb │ │ ├── find_or_create_entity_class.rb │ │ └── track_method_missing_commit_trigger.rb │ │ ├── entities.rb │ │ ├── entities │ │ ├── concerns.rb │ │ ├── concerns │ │ │ ├── entities.rb │ │ │ └── entities │ │ │ │ ├── default_concern.rb │ │ │ │ ├── middleware.rb │ │ │ │ ├── middleware │ │ │ │ ├── commands.rb │ │ │ │ └── commands │ │ │ │ │ └── cast_middleware.rb │ │ │ │ └── stack.rb │ │ ├── method_middlewares.rb │ │ └── method_middlewares │ │ │ ├── commands.rb │ │ │ ├── commands │ │ │ └── generate_stack_name.rb │ │ │ ├── entities.rb │ │ │ └── entities │ │ │ ├── caller.rb │ │ │ ├── caller │ │ │ ├── commands.rb │ │ │ ├── commands │ │ │ │ ├── cast_caller.rb │ │ │ │ ├── define_method_callers.rb │ │ │ │ └── undefine_method_callers.rb │ │ │ ├── concern.rb │ │ │ ├── concern │ │ │ │ ├── class_methods.rb │ │ │ │ └── instance_methods.rb │ │ │ └── constants.rb │ │ │ ├── container.rb │ │ │ ├── container │ │ │ ├── commands.rb │ │ │ ├── commands │ │ │ │ ├── cast_container.rb │ │ │ │ └── resolve_methods_middlewares_callers.rb │ │ │ ├── concern.rb │ │ │ └── concern │ │ │ │ ├── class_methods.rb │ │ │ │ └── instance_methods.rb │ │ │ ├── middleware_creators.rb │ │ │ ├── middleware_creators │ │ │ ├── base.rb │ │ │ ├── observable.rb │ │ │ ├── observable │ │ │ │ ├── entities.rb │ │ │ │ └── entities │ │ │ │ │ └── event.rb │ │ │ └── with.rb │ │ │ ├── middlewares.rb │ │ │ ├── middlewares │ │ │ ├── base.rb │ │ │ ├── base │ │ │ │ ├── commands.rb │ │ │ │ ├── commands │ │ │ │ │ └── create_observable_middleware.rb │ │ │ │ ├── concern.rb │ │ │ │ ├── concern │ │ │ │ │ ├── class_methods.rb │ │ │ │ │ └── instance_methods.rb │ │ │ │ ├── constants.rb │ │ │ │ ├── structs.rb │ │ │ │ └── structs │ │ │ │ │ └── intended_method.rb │ │ │ ├── chain.rb │ │ │ ├── chain │ │ │ │ ├── commands.rb │ │ │ │ ├── commands │ │ │ │ │ ├── create_observable_middleware.rb │ │ │ │ │ └── normalize_env.rb │ │ │ │ ├── concern.rb │ │ │ │ ├── concern │ │ │ │ │ ├── class_methods.rb │ │ │ │ │ └── instance_methods.rb │ │ │ │ ├── entities.rb │ │ │ │ └── entities │ │ │ │ │ └── method_chain.rb │ │ │ └── classic.rb │ │ │ └── stack.rb │ │ └── exceptions.rb │ ├── dependencies.rb │ ├── dependencies │ ├── built_in.rb │ ├── extractions.rb │ ├── extractions │ │ ├── active_support_backtrace_cleaner.rb │ │ ├── active_support_backtrace_cleaner │ │ │ └── backtrace_cleaner.rb │ │ ├── active_support_concern.rb │ │ ├── active_support_concern │ │ │ └── concern.rb │ │ ├── b.rb │ │ ├── bb.rb │ │ ├── byebug_syntax_highlighting.rb │ │ ├── ce.rb │ │ ├── ds.rb │ │ ├── ruby_middleware.rb │ │ └── ruby_middleware │ │ │ ├── middleware.rb │ │ │ └── middleware │ │ │ ├── builder.rb │ │ │ ├── logger.rb │ │ │ └── runner.rb │ ├── only_queries.rb │ ├── queries.rb │ └── queries │ │ ├── gems.rb │ │ ├── gems │ │ ├── active_model.rb │ │ ├── logger.rb │ │ ├── paint.rb │ │ └── rspec.rb │ │ ├── ruby.rb │ │ ├── version.rb │ │ └── version │ │ └── null_version.rb │ ├── examples │ ├── dry │ │ ├── gemfile.rb │ │ ├── gemfile │ │ │ ├── dry_service.rb │ │ │ ├── dry_service │ │ │ │ └── config.rb │ │ │ ├── services.rb │ │ │ └── services │ │ │ │ ├── assert_file_exists.rb │ │ │ │ ├── assert_file_not_empty.rb │ │ │ │ ├── assert_node_available.rb │ │ │ │ ├── assert_npm_package_available.rb │ │ │ │ ├── assert_valid_ruby_syntax.rb │ │ │ │ ├── format.rb │ │ │ │ ├── format_body.rb │ │ │ │ ├── format_gems_with_envs.rb │ │ │ │ ├── format_gems_without_envs.rb │ │ │ │ ├── format_header.rb │ │ │ │ ├── parse_content.rb │ │ │ │ ├── print_shell_command.rb │ │ │ │ ├── read_file_content.rb │ │ │ │ ├── run_shell_command.rb │ │ │ │ └── strip_comments.rb │ │ └── v1 │ │ │ ├── gemfile.rb │ │ │ └── gemfile │ │ │ ├── dry_service.rb │ │ │ ├── dry_service │ │ │ └── config.rb │ │ │ ├── services.rb │ │ │ └── services │ │ │ ├── assert_file_exists.rb │ │ │ ├── assert_file_not_empty.rb │ │ │ ├── assert_node_available.rb │ │ │ ├── assert_npm_package_available.rb │ │ │ ├── assert_valid_ruby_syntax.rb │ │ │ ├── format.rb │ │ │ ├── format_body.rb │ │ │ ├── format_gems_with_envs.rb │ │ │ ├── format_gems_without_envs.rb │ │ │ ├── format_header.rb │ │ │ ├── parse_content.rb │ │ │ ├── read_file_content.rb │ │ │ ├── run_shell_command.rb │ │ │ └── strip_comments.rb │ ├── rails │ │ ├── gemfile.rb │ │ ├── gemfile │ │ │ ├── rails_service.rb │ │ │ ├── rails_service │ │ │ │ └── config.rb │ │ │ ├── services.rb │ │ │ └── services │ │ │ │ ├── assert_file_exists.rb │ │ │ │ ├── assert_file_not_empty.rb │ │ │ │ ├── assert_node_available.rb │ │ │ │ ├── assert_npm_package_available.rb │ │ │ │ ├── assert_valid_ruby_syntax.rb │ │ │ │ ├── format.rb │ │ │ │ ├── format_body.rb │ │ │ │ ├── format_gems_with_envs.rb │ │ │ │ ├── format_gems_without_envs.rb │ │ │ │ ├── format_header.rb │ │ │ │ ├── merge_sections.rb │ │ │ │ ├── parse_content.rb │ │ │ │ ├── print_shell_command.rb │ │ │ │ ├── read_file_content.rb │ │ │ │ ├── replace_file_content.rb │ │ │ │ ├── run_shell_command.rb │ │ │ │ └── strip_comments.rb │ │ └── v1 │ │ │ ├── gemfile.rb │ │ │ └── gemfile │ │ │ ├── rails_service.rb │ │ │ ├── rails_service │ │ │ └── config.rb │ │ │ ├── services.rb │ │ │ └── services │ │ │ ├── assert_file_exists.rb │ │ │ ├── assert_file_not_empty.rb │ │ │ ├── assert_node_available.rb │ │ │ ├── assert_npm_package_available.rb │ │ │ ├── assert_valid_ruby_syntax.rb │ │ │ ├── format.rb │ │ │ ├── format_body.rb │ │ │ ├── format_gems_with_envs.rb │ │ │ ├── format_gems_without_envs.rb │ │ │ ├── format_header.rb │ │ │ ├── merge_sections.rb │ │ │ ├── parse_content.rb │ │ │ ├── read_file_content.rb │ │ │ ├── replace_file_content.rb │ │ │ ├── run_shell_command.rb │ │ │ └── strip_comments.rb │ └── standard │ │ ├── cowsay.rb │ │ ├── cowsay │ │ ├── services.rb │ │ └── services │ │ │ ├── build_cloud.rb │ │ │ ├── build_cow.rb │ │ │ └── print.rb │ │ ├── date_time.rb │ │ ├── date_time │ │ ├── services.rb │ │ └── services │ │ │ └── safe_parse.rb │ │ ├── factorial.rb │ │ ├── factorial │ │ ├── services.rb │ │ ├── services │ │ │ └── calculate.rb │ │ ├── utils.rb │ │ └── utils │ │ │ ├── timeout.rb │ │ │ └── timeout │ │ │ └── with_timeout.rb │ │ ├── gemfile.rb │ │ ├── gemfile │ │ ├── services.rb │ │ └── services │ │ │ ├── assert_file_exists.rb │ │ │ ├── assert_file_not_empty.rb │ │ │ ├── assert_node_available.rb │ │ │ ├── assert_npm_package_available.rb │ │ │ ├── assert_valid_ruby_syntax.rb │ │ │ ├── format.rb │ │ │ ├── format_body.rb │ │ │ ├── format_gems_with_envs.rb │ │ │ ├── format_gems_without_envs.rb │ │ │ ├── format_header.rb │ │ │ ├── merge_sections.rb │ │ │ ├── parse_content.rb │ │ │ ├── print_shell_command.rb │ │ │ ├── read_file_content.rb │ │ │ ├── replace_file_content.rb │ │ │ ├── run_shell_command.rb │ │ │ └── strip_comments.rb │ │ ├── request_params.rb │ │ ├── request_params │ │ ├── constants.rb │ │ ├── entities.rb │ │ ├── entities │ │ │ ├── description.rb │ │ │ ├── format.rb │ │ │ ├── id.rb │ │ │ ├── logger.rb │ │ │ ├── request.rb │ │ │ ├── source.rb │ │ │ ├── tag.rb │ │ │ └── title.rb │ │ ├── services.rb │ │ ├── services │ │ │ ├── apply_default_param_values.rb │ │ │ ├── cast_params.rb │ │ │ ├── extract_params_from_body.rb │ │ │ ├── extract_params_from_path.rb │ │ │ ├── filter_out_unpermitted_params.rb │ │ │ ├── log_request_params.rb │ │ │ ├── merge_params.rb │ │ │ ├── prepare.rb │ │ │ ├── validate_casted_params.rb │ │ │ └── validate_uncasted_params.rb │ │ ├── utils.rb │ │ └── utils │ │ │ ├── array.rb │ │ │ ├── array │ │ │ └── wrap.rb │ │ │ ├── http.rb │ │ │ ├── http │ │ │ ├── request.rb │ │ │ └── request │ │ │ │ ├── parse_body.rb │ │ │ │ └── parse_path.rb │ │ │ ├── integer.rb │ │ │ ├── integer │ │ │ └── safe_parse.rb │ │ │ ├── json.rb │ │ │ ├── json │ │ │ └── safe_parse.rb │ │ │ ├── object.rb │ │ │ ├── object │ │ │ ├── blank.rb │ │ │ └── present.rb │ │ │ ├── url.rb │ │ │ └── url │ │ │ └── valid.rb │ │ └── v1 │ │ ├── cowsay.rb │ │ ├── cowsay │ │ ├── services.rb │ │ └── services │ │ │ ├── build_cloud.rb │ │ │ ├── build_cow.rb │ │ │ └── print.rb │ │ ├── date_time.rb │ │ ├── date_time │ │ ├── services.rb │ │ └── services │ │ │ └── safe_parse.rb │ │ ├── factorial.rb │ │ ├── factorial │ │ ├── services.rb │ │ ├── services │ │ │ └── calculate.rb │ │ ├── utils.rb │ │ └── utils │ │ │ ├── timeout.rb │ │ │ └── timeout │ │ │ └── with_timeout.rb │ │ ├── gemfile.rb │ │ ├── gemfile │ │ ├── services.rb │ │ └── services │ │ │ ├── assert_file_exists.rb │ │ │ ├── assert_file_not_empty.rb │ │ │ ├── assert_node_available.rb │ │ │ ├── assert_npm_package_available.rb │ │ │ ├── assert_valid_ruby_syntax.rb │ │ │ ├── format.rb │ │ │ ├── format_body.rb │ │ │ ├── format_gems_with_envs.rb │ │ │ ├── format_gems_without_envs.rb │ │ │ ├── format_header.rb │ │ │ ├── merge_sections.rb │ │ │ ├── parse_content.rb │ │ │ ├── read_file_content.rb │ │ │ ├── replace_file_content.rb │ │ │ ├── run_shell_command.rb │ │ │ └── strip_comments.rb │ │ ├── request_params.rb │ │ └── request_params │ │ ├── constants.rb │ │ ├── entities.rb │ │ ├── entities │ │ ├── description.rb │ │ ├── format.rb │ │ ├── id.rb │ │ ├── logger.rb │ │ ├── request.rb │ │ ├── source.rb │ │ ├── tag.rb │ │ └── title.rb │ │ ├── services.rb │ │ ├── services │ │ ├── apply_default_param_values.rb │ │ ├── cast_params.rb │ │ ├── extract_params_from_body.rb │ │ ├── extract_params_from_path.rb │ │ ├── filter_out_unpermitted_params.rb │ │ ├── log_request_params.rb │ │ ├── merge_params.rb │ │ ├── prepare.rb │ │ ├── validate_casted_params.rb │ │ └── validate_uncasted_params.rb │ │ ├── utils.rb │ │ └── utils │ │ ├── array.rb │ │ ├── array │ │ └── wrap.rb │ │ ├── http.rb │ │ ├── http │ │ ├── request.rb │ │ └── request │ │ │ ├── parse_body.rb │ │ │ └── parse_path.rb │ │ ├── integer.rb │ │ ├── integer │ │ └── safe_parse.rb │ │ ├── json.rb │ │ ├── json │ │ └── safe_parse.rb │ │ ├── object.rb │ │ ├── object │ │ ├── blank.rb │ │ └── present.rb │ │ ├── url.rb │ │ └── url │ │ └── valid.rb │ ├── exception.rb │ ├── extras │ ├── alias.rb │ ├── plugins │ │ ├── assigns_attributes_in_constructor │ │ │ ├── using_active_model_attribute_assignment.rb │ │ │ └── using_dry_initializer.rb │ │ ├── has_attributes │ │ │ └── using_active_model_attributes.rb │ │ ├── has_j_send_result_params_validations │ │ │ ├── using_active_model_validations.rb │ │ │ └── using_dry_validation.rb │ │ ├── has_memoization │ │ │ └── using_memo_wise.rb │ │ └── wraps_result_in_db_transaction │ │ │ └── using_active_record_base_transaction.rb │ ├── rspec.rb │ └── standard │ │ └── config │ │ └── options │ │ ├── active_model_validations.rb │ │ ├── amazing_print_inspect.rb │ │ ├── awesome_print_inspect.rb │ │ ├── dry_initializer.rb │ │ └── memo_wise.rb │ ├── feature.rb │ ├── feature │ ├── configs.rb │ ├── configs │ │ ├── aliases.rb │ │ ├── standard.rb │ │ └── standard │ │ │ ├── commands.rb │ │ │ └── commands │ │ │ ├── is_feature.rb │ │ │ └── is_feature_class.rb │ ├── core.rb │ ├── plugins.rb │ └── plugins │ │ ├── aliases.rb │ │ ├── can_have_entries.rb │ │ ├── can_have_entries │ │ ├── commands.rb │ │ ├── commands │ │ │ ├── define_entries.rb │ │ │ └── define_entry.rb │ │ ├── concern.rb │ │ └── exceptions.rb │ │ ├── can_have_stubbed_entries.rb │ │ └── can_have_stubbed_entries │ │ ├── commands.rb │ │ ├── commands │ │ ├── fetch_all_features_stubbed_entries_cache.rb │ │ ├── fetch_feature_stubbed_entries_cache.rb │ │ └── set_feature_stubbed_entry.rb │ │ ├── concern.rb │ │ ├── container.rb │ │ └── middleware.rb │ ├── logger.rb │ ├── rspec.rb │ ├── rspec │ ├── helpers.rb │ ├── helpers │ │ ├── classes.rb │ │ ├── classes │ │ │ ├── stub_entry.rb │ │ │ ├── stub_entry │ │ │ │ ├── constants.rb │ │ │ │ ├── entities.rb │ │ │ │ └── entities │ │ │ │ │ ├── stubbed_feature.rb │ │ │ │ │ └── value_spec.rb │ │ │ ├── stub_service.rb │ │ │ ├── stub_service │ │ │ │ ├── constants.rb │ │ │ │ ├── entities.rb │ │ │ │ └── entities │ │ │ │ │ ├── result_spec.rb │ │ │ │ │ └── stubbed_service.rb │ │ │ ├── wrap_method.rb │ │ │ └── wrap_method │ │ │ │ ├── entities.rb │ │ │ │ ├── entities │ │ │ │ └── wrapped_method.rb │ │ │ │ └── exceptions.rb │ │ ├── ignoring_exception.rb │ │ ├── stub_entry.rb │ │ ├── stub_service.rb │ │ └── wrap_method.rb │ ├── matchers.rb │ ├── matchers │ │ ├── call_chain_next.rb │ │ ├── classes.rb │ │ ├── classes │ │ │ ├── call_chain_next.rb │ │ │ ├── export.rb │ │ │ ├── include_config.rb │ │ │ ├── results.rb │ │ │ └── results │ │ │ │ ├── base.rb │ │ │ │ ├── base │ │ │ │ ├── constants.rb │ │ │ │ ├── entities.rb │ │ │ │ ├── entities │ │ │ │ │ ├── chain.rb │ │ │ │ │ ├── printers.rb │ │ │ │ │ ├── printers │ │ │ │ │ │ ├── base.rb │ │ │ │ │ │ ├── base │ │ │ │ │ │ │ ├── commands.rb │ │ │ │ │ │ │ └── commands │ │ │ │ │ │ │ │ ├── generate_expected_code_part.rb │ │ │ │ │ │ │ │ ├── generate_expected_data_part.rb │ │ │ │ │ │ │ │ ├── generate_expected_message_part.rb │ │ │ │ │ │ │ │ ├── generate_expected_parts.rb │ │ │ │ │ │ │ │ ├── generate_expected_service_part.rb │ │ │ │ │ │ │ │ ├── generate_expected_status_part.rb │ │ │ │ │ │ │ │ ├── generate_expected_step_part.rb │ │ │ │ │ │ │ │ ├── generate_got_parts.rb │ │ │ │ │ │ │ │ ├── generate_got_service_part.rb │ │ │ │ │ │ │ │ └── generate_got_step_part.rb │ │ │ │ │ │ ├── error.rb │ │ │ │ │ │ ├── error │ │ │ │ │ │ │ ├── commands.rb │ │ │ │ │ │ │ └── commands │ │ │ │ │ │ │ │ └── generate_got_jsend_attributes_part.rb │ │ │ │ │ │ ├── failure.rb │ │ │ │ │ │ ├── failure │ │ │ │ │ │ │ ├── commands.rb │ │ │ │ │ │ │ └── commands │ │ │ │ │ │ │ │ └── generate_got_jsend_attributes_part.rb │ │ │ │ │ │ ├── null.rb │ │ │ │ │ │ ├── success.rb │ │ │ │ │ │ └── success │ │ │ │ │ │ │ ├── commands.rb │ │ │ │ │ │ │ └── commands │ │ │ │ │ │ │ └── generate_got_jsend_attributes_part.rb │ │ │ │ │ ├── validator.rb │ │ │ │ │ └── validator │ │ │ │ │ │ ├── commands.rb │ │ │ │ │ │ └── commands │ │ │ │ │ │ ├── validate_result.rb │ │ │ │ │ │ ├── validate_result_code.rb │ │ │ │ │ │ ├── validate_result_data.rb │ │ │ │ │ │ ├── validate_result_message.rb │ │ │ │ │ │ ├── validate_result_original_service.rb │ │ │ │ │ │ ├── validate_result_service.rb │ │ │ │ │ │ ├── validate_result_status.rb │ │ │ │ │ │ ├── validate_result_step.rb │ │ │ │ │ │ └── validate_result_type.rb │ │ │ │ └── exceptions.rb │ │ │ │ ├── be_error.rb │ │ │ │ ├── be_failure.rb │ │ │ │ ├── be_not_error.rb │ │ │ │ ├── be_not_failure.rb │ │ │ │ ├── be_not_success.rb │ │ │ │ └── be_success.rb │ │ ├── delegate_to.rb │ │ ├── export.rb │ │ ├── include_config.rb │ │ ├── include_module.rb │ │ ├── results.rb │ │ └── results │ │ │ ├── be_error.rb │ │ │ ├── be_failure.rb │ │ │ ├── be_not_error.rb │ │ │ ├── be_not_failure.rb │ │ │ ├── be_not_success.rb │ │ │ ├── be_result.rb │ │ │ └── be_success.rb │ ├── primitive_helpers.rb │ ├── primitive_helpers │ │ ├── classes.rb │ │ ├── classes │ │ │ ├── ignoring_exception.rb │ │ │ ├── ignoring_exception │ │ │ │ └── exceptions.rb │ │ │ └── in_threads.rb │ │ ├── ignoring_exception.rb │ │ └── in_threads.rb │ ├── primitive_matchers.rb │ └── primitive_matchers │ │ ├── be_descendant_of.rb │ │ ├── be_direct_descendant_of.rb │ │ ├── cache_its_value.rb │ │ ├── classes.rb │ │ ├── classes │ │ ├── be_descendant_of.rb │ │ ├── be_direct_descendant_of.rb │ │ ├── cache_its_value.rb │ │ ├── delegate_to.rb │ │ ├── delegate_to │ │ │ ├── commands.rb │ │ │ ├── commands │ │ │ │ └── generate_printable_method.rb │ │ │ ├── entities.rb │ │ │ ├── entities │ │ │ │ ├── delegation.rb │ │ │ │ ├── inputs.rb │ │ │ │ ├── outputs.rb │ │ │ │ ├── sub_matcher_collection.rb │ │ │ │ ├── sub_matchers.rb │ │ │ │ └── sub_matchers │ │ │ │ │ ├── arguments.rb │ │ │ │ │ ├── arguments │ │ │ │ │ ├── commands.rb │ │ │ │ │ └── commands │ │ │ │ │ │ ├── apply_stub_to_track_delegations.rb │ │ │ │ │ │ └── generate_printable_arguments.rb │ │ │ │ │ ├── base.rb │ │ │ │ │ ├── return_custom_value.rb │ │ │ │ │ ├── return_delegation_value.rb │ │ │ │ │ ├── with_any_arguments.rb │ │ │ │ │ ├── with_concrete_arguments.rb │ │ │ │ │ └── without_arguments.rb │ │ │ └── exceptions.rb │ │ ├── extend_module.rb │ │ ├── have_abstract_method.rb │ │ ├── have_alias_method.rb │ │ ├── have_attr_accessor.rb │ │ ├── have_attr_reader.rb │ │ ├── have_attr_writer.rb │ │ ├── include_module.rb │ │ ├── prepend_module.rb │ │ └── singleton_prepend_module.rb │ │ ├── delegate_to.rb │ │ ├── extend_module.rb │ │ ├── have_abstract_method.rb │ │ ├── have_alias_method.rb │ │ ├── have_attr_accessor.rb │ │ ├── have_attr_reader.rb │ │ ├── have_attr_writer.rb │ │ ├── include_module.rb │ │ ├── prepend_module.rb │ │ └── singleton_prepend_module.rb │ ├── service.rb │ ├── service │ ├── configs.rb │ ├── configs │ │ ├── aliases.rb │ │ ├── standard.rb │ │ └── standard │ │ │ ├── aliases.rb │ │ │ ├── commands.rb │ │ │ ├── commands │ │ │ ├── is_service.rb │ │ │ └── is_service_class.rb │ │ │ └── v1.rb │ ├── core.rb │ ├── plugins.rb │ └── plugins │ │ ├── aliases.rb │ │ ├── can_have_after_step_callbacks.rb │ │ ├── can_have_after_step_callbacks │ │ └── middleware.rb │ │ ├── can_have_around_step_callbacks.rb │ │ ├── can_have_around_step_callbacks │ │ └── middleware.rb │ │ ├── can_have_before_step_callbacks.rb │ │ ├── can_have_before_step_callbacks │ │ └── middleware.rb │ │ ├── can_have_connected_steps.rb │ │ ├── can_have_connected_steps │ │ ├── concern.rb │ │ ├── entities.rb │ │ ├── entities │ │ │ ├── expressions.rb │ │ │ ├── expressions │ │ │ │ ├── and.rb │ │ │ │ ├── base.rb │ │ │ │ ├── complex_if.rb │ │ │ │ ├── else.rb │ │ │ │ ├── empty.rb │ │ │ │ ├── group.rb │ │ │ │ ├── if.rb │ │ │ │ ├── not.rb │ │ │ │ ├── or.rb │ │ │ │ └── scalar.rb │ │ │ └── step_collection.rb │ │ ├── exceptions.rb │ │ └── middleware.rb │ │ ├── can_have_fallbacks.rb │ │ ├── can_have_fallbacks │ │ ├── concern.rb │ │ ├── exceptions.rb │ │ └── middleware.rb │ │ ├── can_have_recalculations.rb │ │ ├── can_have_recalculations │ │ └── concern.rb │ │ ├── can_have_rollbacks.rb │ │ ├── can_have_rollbacks │ │ └── middleware.rb │ │ ├── can_have_sequential_steps.rb │ │ ├── can_have_sequential_steps │ │ ├── concern.rb │ │ ├── entities.rb │ │ ├── entities │ │ │ └── step_collection.rb │ │ └── middleware.rb │ │ ├── can_have_step_aware_collections.rb │ │ ├── can_have_step_aware_enumerables.rb │ │ ├── can_have_step_aware_enumerables │ │ ├── commands.rb │ │ ├── commands │ │ │ ├── cast_step_aware_enumerable.rb │ │ │ └── cast_step_aware_enumerator.rb │ │ ├── concern.rb │ │ ├── entities.rb │ │ ├── entities │ │ │ ├── step_aware_enumerables.rb │ │ │ └── step_aware_enumerables │ │ │ │ ├── arithmetic_sequence_enumerator.rb │ │ │ │ ├── array.rb │ │ │ │ ├── base.rb │ │ │ │ ├── boolean.rb │ │ │ │ ├── chain_enumerator.rb │ │ │ │ ├── enumerable.rb │ │ │ │ ├── enumerator.rb │ │ │ │ ├── hash.rb │ │ │ │ ├── lazy_enumerator.rb │ │ │ │ ├── object.rb │ │ │ │ └── set.rb │ │ └── exceptions.rb │ │ ├── can_have_steps.rb │ │ ├── can_have_steps │ │ ├── commands.rb │ │ ├── commands │ │ │ ├── create_step_class.rb │ │ │ └── is_step.rb │ │ ├── concern.rb │ │ ├── entities.rb │ │ ├── entities │ │ │ ├── method.rb │ │ │ ├── method │ │ │ │ ├── commands.rb │ │ │ │ ├── commands │ │ │ │ │ ├── cast_method.rb │ │ │ │ │ ├── cast_method_direction.rb │ │ │ │ │ ├── cast_method_factory.rb │ │ │ │ │ └── define_method_in_container.rb │ │ │ │ ├── concern.rb │ │ │ │ ├── concern │ │ │ │ │ ├── class_methods.rb │ │ │ │ │ └── instance_methods.rb │ │ │ │ ├── entities.rb │ │ │ │ ├── entities │ │ │ │ │ ├── callers.rb │ │ │ │ │ ├── callers │ │ │ │ │ │ ├── alias.rb │ │ │ │ │ │ ├── base.rb │ │ │ │ │ │ ├── proc.rb │ │ │ │ │ │ ├── raw.rb │ │ │ │ │ │ └── usual.rb │ │ │ │ │ ├── directions.rb │ │ │ │ │ ├── directions │ │ │ │ │ │ ├── base.rb │ │ │ │ │ │ ├── input.rb │ │ │ │ │ │ └── output.rb │ │ │ │ │ ├── factories.rb │ │ │ │ │ ├── factories │ │ │ │ │ │ ├── base.rb │ │ │ │ │ │ ├── hash.rb │ │ │ │ │ │ ├── hash │ │ │ │ │ │ │ ├── base.rb │ │ │ │ │ │ │ ├── proc_value.rb │ │ │ │ │ │ │ ├── raw_value.rb │ │ │ │ │ │ │ ├── string_value.rb │ │ │ │ │ │ │ └── symbol_value.rb │ │ │ │ │ │ ├── method.rb │ │ │ │ │ │ ├── string.rb │ │ │ │ │ │ └── symbol.rb │ │ │ │ │ ├── key.rb │ │ │ │ │ └── name.rb │ │ │ │ └── exceptions.rb │ │ │ ├── service.rb │ │ │ ├── service │ │ │ │ ├── concern.rb │ │ │ │ └── concern │ │ │ │ │ ├── class_methods.rb │ │ │ │ │ └── instance_methods.rb │ │ │ ├── step.rb │ │ │ └── step │ │ │ │ ├── commands.rb │ │ │ │ ├── commands │ │ │ │ ├── cast_params.rb │ │ │ │ └── extract_params.rb │ │ │ │ ├── concern.rb │ │ │ │ ├── concern │ │ │ │ └── instance_methods.rb │ │ │ │ ├── exceptions.rb │ │ │ │ ├── plugins.rb │ │ │ │ ├── plugins │ │ │ │ ├── aliases.rb │ │ │ │ ├── can_be_completed.rb │ │ │ │ ├── can_be_completed │ │ │ │ │ └── concern.rb │ │ │ │ ├── can_be_method_step.rb │ │ │ │ ├── can_be_method_step │ │ │ │ │ ├── commands.rb │ │ │ │ │ ├── commands │ │ │ │ │ │ └── calculate_method_result.rb │ │ │ │ │ ├── concern.rb │ │ │ │ │ ├── exceptions.rb │ │ │ │ │ └── middleware.rb │ │ │ │ ├── can_be_service_step.rb │ │ │ │ ├── can_be_service_step │ │ │ │ │ ├── commands.rb │ │ │ │ │ ├── commands │ │ │ │ │ │ └── calculate_service_result.rb │ │ │ │ │ ├── concern.rb │ │ │ │ │ ├── exceptions.rb │ │ │ │ │ └── middleware.rb │ │ │ │ ├── can_have_alternative_steps.rb │ │ │ │ ├── can_have_fallbacks.rb │ │ │ │ ├── can_have_fallbacks │ │ │ │ │ ├── concern.rb │ │ │ │ │ ├── exceptions.rb │ │ │ │ │ └── middleware.rb │ │ │ │ ├── can_have_parent_result.rb │ │ │ │ ├── can_have_parent_result │ │ │ │ │ └── middleware.rb │ │ │ │ ├── has_amazing_print_inspect.rb │ │ │ │ ├── has_amazing_print_inspect │ │ │ │ │ └── concern.rb │ │ │ │ ├── has_awesome_print_inspect.rb │ │ │ │ ├── has_awesome_print_inspect │ │ │ │ │ └── concern.rb │ │ │ │ ├── has_inspect.rb │ │ │ │ ├── has_inspect │ │ │ │ │ └── concern.rb │ │ │ │ ├── has_result.rb │ │ │ │ ├── has_result │ │ │ │ │ ├── concern.rb │ │ │ │ │ ├── exceptions.rb │ │ │ │ │ └── middleware.rb │ │ │ │ ├── raises_on_not_result_return_value.rb │ │ │ │ └── raises_on_not_result_return_value │ │ │ │ │ ├── exceptions.rb │ │ │ │ │ └── middleware.rb │ │ │ │ ├── structs.rb │ │ │ │ └── structs │ │ │ │ └── params.rb │ │ └── middleware.rb │ │ ├── can_have_stubbed_results.rb │ │ ├── can_have_stubbed_results │ │ ├── commands.rb │ │ ├── commands │ │ │ ├── fetch_all_services_stubbed_results_cache.rb │ │ │ ├── fetch_service_stubbed_results_cache.rb │ │ │ └── set_service_stubbed_result.rb │ │ ├── concern.rb │ │ ├── container.rb │ │ └── middleware.rb │ │ ├── can_not_be_inherited.rb │ │ ├── can_not_be_inherited │ │ ├── concern.rb │ │ └── exceptions.rb │ │ ├── collects_services_in_exception.rb │ │ ├── collects_services_in_exception │ │ ├── commands.rb │ │ ├── commands │ │ │ └── extract_service_details.rb │ │ ├── constants.rb │ │ └── middleware.rb │ │ ├── counts_stubbed_results_invocations.rb │ │ ├── counts_stubbed_results_invocations │ │ └── middleware.rb │ │ ├── forbids_convenient_service_entities_as_constructor_arguments.rb │ │ ├── forbids_convenient_service_entities_as_constructor_arguments │ │ ├── exceptions.rb │ │ └── middleware.rb │ │ ├── has_amazing_print_inspect.rb │ │ ├── has_amazing_print_inspect │ │ └── concern.rb │ │ ├── has_awesome_print_inspect.rb │ │ ├── has_awesome_print_inspect │ │ └── concern.rb │ │ ├── has_inspect.rb │ │ ├── has_inspect │ │ └── concern.rb │ │ ├── has_j_send_result.rb │ │ ├── has_j_send_result │ │ ├── commands.rb │ │ ├── commands │ │ │ ├── create_result_class.rb │ │ │ └── is_result.rb │ │ ├── concern.rb │ │ ├── concern │ │ │ ├── class_methods.rb │ │ │ └── instance_methods.rb │ │ ├── constants.rb │ │ ├── container.rb │ │ ├── entities.rb │ │ └── entities │ │ │ ├── result.rb │ │ │ └── result │ │ │ ├── concern.rb │ │ │ ├── plugins.rb │ │ │ └── plugins │ │ │ ├── aliases.rb │ │ │ ├── can_be_from_exception.rb │ │ │ ├── can_be_from_exception │ │ │ └── concern.rb │ │ │ ├── can_be_from_fallback.rb │ │ │ ├── can_be_from_fallback │ │ │ └── concern.rb │ │ │ ├── can_be_own_result.rb │ │ │ ├── can_be_own_result │ │ │ └── concern.rb │ │ │ ├── can_be_stubbed_result.rb │ │ │ ├── can_be_stubbed_result │ │ │ └── concern.rb │ │ │ ├── can_have_checked_status.rb │ │ │ ├── can_have_checked_status │ │ │ └── concern.rb │ │ │ ├── can_have_parent_result.rb │ │ │ ├── can_have_parent_result │ │ │ ├── concern.rb │ │ │ └── constants.rb │ │ │ ├── can_have_step.rb │ │ │ ├── can_have_step │ │ │ └── concern.rb │ │ │ ├── has_amazing_print_inspect.rb │ │ │ ├── has_amazing_print_inspect │ │ │ ├── commands.rb │ │ │ ├── commands │ │ │ │ └── generate_inspect_output.rb │ │ │ └── concern.rb │ │ │ ├── has_awesome_print_inspect.rb │ │ │ ├── has_awesome_print_inspect │ │ │ ├── commands.rb │ │ │ ├── commands │ │ │ │ └── generate_inspect_output.rb │ │ │ └── concern.rb │ │ │ ├── has_inspect.rb │ │ │ ├── has_inspect │ │ │ └── concern.rb │ │ │ ├── has_j_send_status_and_attributes.rb │ │ │ ├── has_j_send_status_and_attributes │ │ │ ├── commands.rb │ │ │ ├── commands │ │ │ │ ├── cast_j_send_attributes.rb │ │ │ │ ├── create_code_class.rb │ │ │ │ ├── create_data_class.rb │ │ │ │ ├── create_message_class.rb │ │ │ │ └── create_status_class.rb │ │ │ ├── concern.rb │ │ │ ├── concern │ │ │ │ ├── class_methods.rb │ │ │ │ └── instance_methods.rb │ │ │ ├── entities.rb │ │ │ ├── entities │ │ │ │ ├── code.rb │ │ │ │ ├── code │ │ │ │ │ ├── commands.rb │ │ │ │ │ ├── commands │ │ │ │ │ │ └── is_code.rb │ │ │ │ │ ├── concern.rb │ │ │ │ │ ├── concern │ │ │ │ │ │ ├── class_methods.rb │ │ │ │ │ │ └── instance_methods.rb │ │ │ │ │ ├── plugins.rb │ │ │ │ │ └── plugins │ │ │ │ │ │ ├── aliases.rb │ │ │ │ │ │ ├── has_amazing_print_inspect.rb │ │ │ │ │ │ ├── has_amazing_print_inspect │ │ │ │ │ │ └── concern.rb │ │ │ │ │ │ ├── has_awesome_print_inspect.rb │ │ │ │ │ │ ├── has_awesome_print_inspect │ │ │ │ │ │ └── concern.rb │ │ │ │ │ │ ├── has_inspect.rb │ │ │ │ │ │ └── has_inspect │ │ │ │ │ │ └── concern.rb │ │ │ │ ├── data.rb │ │ │ │ ├── data │ │ │ │ │ ├── commands.rb │ │ │ │ │ ├── commands │ │ │ │ │ │ └── is_data.rb │ │ │ │ │ ├── concern.rb │ │ │ │ │ ├── concern │ │ │ │ │ │ ├── class_methods.rb │ │ │ │ │ │ └── instance_methods.rb │ │ │ │ │ ├── plugins.rb │ │ │ │ │ └── plugins │ │ │ │ │ │ ├── aliases.rb │ │ │ │ │ │ ├── has_amazing_print_inspect.rb │ │ │ │ │ │ ├── has_amazing_print_inspect │ │ │ │ │ │ └── concern.rb │ │ │ │ │ │ ├── has_awesome_print_inspect.rb │ │ │ │ │ │ ├── has_awesome_print_inspect │ │ │ │ │ │ └── concern.rb │ │ │ │ │ │ ├── has_inspect.rb │ │ │ │ │ │ ├── has_inspect │ │ │ │ │ │ └── concern.rb │ │ │ │ │ │ ├── has_method_readers.rb │ │ │ │ │ │ └── has_method_readers │ │ │ │ │ │ └── middleware.rb │ │ │ │ ├── message.rb │ │ │ │ ├── message │ │ │ │ │ ├── commands.rb │ │ │ │ │ ├── commands │ │ │ │ │ │ └── is_message.rb │ │ │ │ │ ├── concern.rb │ │ │ │ │ ├── concern │ │ │ │ │ │ ├── class_methods.rb │ │ │ │ │ │ └── instance_methods.rb │ │ │ │ │ ├── plugins.rb │ │ │ │ │ └── plugins │ │ │ │ │ │ ├── aliases.rb │ │ │ │ │ │ ├── has_amazing_print_inspect.rb │ │ │ │ │ │ ├── has_amazing_print_inspect │ │ │ │ │ │ └── concern.rb │ │ │ │ │ │ ├── has_awesome_print_inspect.rb │ │ │ │ │ │ ├── has_awesome_print_inspect │ │ │ │ │ │ └── concern.rb │ │ │ │ │ │ ├── has_inspect.rb │ │ │ │ │ │ └── has_inspect │ │ │ │ │ │ └── concern.rb │ │ │ │ ├── status.rb │ │ │ │ └── status │ │ │ │ │ ├── commands.rb │ │ │ │ │ ├── commands │ │ │ │ │ └── is_status.rb │ │ │ │ │ ├── concern.rb │ │ │ │ │ ├── concern │ │ │ │ │ ├── class_methods.rb │ │ │ │ │ └── instance_methods.rb │ │ │ │ │ ├── plugins.rb │ │ │ │ │ └── plugins │ │ │ │ │ ├── aliases.rb │ │ │ │ │ ├── can_be_checked.rb │ │ │ │ │ ├── can_be_checked │ │ │ │ │ ├── concern.rb │ │ │ │ │ └── middleware.rb │ │ │ │ │ ├── has_amazing_print_inspect.rb │ │ │ │ │ ├── has_amazing_print_inspect │ │ │ │ │ └── concern.rb │ │ │ │ │ ├── has_awesome_print_inspect.rb │ │ │ │ │ ├── has_awesome_print_inspect │ │ │ │ │ └── concern.rb │ │ │ │ │ ├── has_inspect.rb │ │ │ │ │ └── has_inspect │ │ │ │ │ └── concern.rb │ │ │ ├── exceptions.rb │ │ │ ├── middleware.rb │ │ │ ├── structs.rb │ │ │ └── structs │ │ │ │ └── j_send_attributes.rb │ │ │ ├── has_negated_result.rb │ │ │ ├── has_negated_result │ │ │ └── concern.rb │ │ │ ├── has_pattern_matching_support.rb │ │ │ ├── has_pattern_matching_support │ │ │ └── concern.rb │ │ │ ├── has_stubbed_result_invocations_counter.rb │ │ │ ├── has_stubbed_result_invocations_counter │ │ │ ├── concern.rb │ │ │ └── middleware.rb │ │ │ ├── helps_to_learn_similarities_with_common_objects.rb │ │ │ ├── helps_to_learn_similarities_with_common_objects │ │ │ ├── concern.rb │ │ │ ├── concern │ │ │ │ └── instance_methods.rb │ │ │ └── exceptions.rb │ │ │ ├── raises_on_not_checked_result_status.rb │ │ │ └── raises_on_not_checked_result_status │ │ │ ├── exceptions.rb │ │ │ └── middleware.rb │ │ ├── has_j_send_result_params_validations │ │ ├── using_active_model_validations.rb │ │ ├── using_active_model_validations │ │ │ ├── concern.rb │ │ │ └── middleware.rb │ │ ├── using_dry_validation.rb │ │ └── using_dry_validation │ │ │ ├── concern.rb │ │ │ └── middleware.rb │ │ ├── has_j_send_result_short_syntax.rb │ │ ├── has_j_send_result_short_syntax │ │ ├── concern.rb │ │ ├── error.rb │ │ ├── error │ │ │ ├── exceptions.rb │ │ │ └── middleware.rb │ │ ├── failure.rb │ │ ├── failure │ │ │ ├── exceptions.rb │ │ │ └── middleware.rb │ │ ├── success.rb │ │ └── success │ │ │ ├── commands.rb │ │ │ ├── commands │ │ │ └── refute_kwargs_contain_j_send_and_extra_keys.rb │ │ │ ├── exceptions.rb │ │ │ └── middleware.rb │ │ ├── has_j_send_result_status_check_short_syntax.rb │ │ ├── has_j_send_result_status_check_short_syntax │ │ └── concern.rb │ │ ├── has_mermaid_flowchart.rb │ │ ├── has_mermaid_flowchart │ │ ├── concern.rb │ │ ├── entities.rb │ │ └── entities │ │ │ ├── flowchart.rb │ │ │ └── flowchart │ │ │ ├── entities.rb │ │ │ ├── entities │ │ │ ├── code.rb │ │ │ ├── code │ │ │ │ ├── commands.rb │ │ │ │ └── commands │ │ │ │ │ ├── generate_lines.rb │ │ │ │ │ ├── generate_method_step_lines.rb │ │ │ │ │ ├── generate_result_lines.rb │ │ │ │ │ ├── generate_service_lines.rb │ │ │ │ │ └── generate_service_step_lines.rb │ │ │ ├── settings.rb │ │ │ └── template.rb │ │ │ └── templates │ │ │ └── flowchart.html.erb │ │ ├── has_negated_j_send_result.rb │ │ ├── has_negated_j_send_result │ │ └── concern.rb │ │ ├── has_negated_result.rb │ │ ├── has_negated_result │ │ ├── concern.rb │ │ └── exceptions.rb │ │ ├── has_result.rb │ │ ├── has_result │ │ ├── concern.rb │ │ └── exceptions.rb │ │ ├── raises_on_double_result.rb │ │ ├── raises_on_double_result │ │ ├── exceptions.rb │ │ └── middleware.rb │ │ ├── raises_on_not_result_return_value.rb │ │ ├── raises_on_not_result_return_value │ │ ├── exceptions.rb │ │ └── middleware.rb │ │ ├── rescues_result_unhandled_exceptions.rb │ │ ├── rescues_result_unhandled_exceptions │ │ ├── commands.rb │ │ ├── commands │ │ │ ├── format_backtrace.rb │ │ │ ├── format_cause.rb │ │ │ ├── format_class.rb │ │ │ ├── format_exception.rb │ │ │ ├── format_line.rb │ │ │ └── format_message.rb │ │ ├── constants.rb │ │ └── middleware.rb │ │ ├── sets_parent_to_foreign_result.rb │ │ ├── sets_parent_to_foreign_result │ │ └── middleware.rb │ │ ├── wraps_result_in_db_transaction.rb │ │ └── wraps_result_in_db_transaction │ │ ├── using_active_record_base_transaction.rb │ │ └── using_active_record_base_transaction │ │ └── middleware.rb │ ├── specification.rb │ ├── support.rb │ ├── support │ ├── abstract_method.rb │ ├── abstract_method │ │ └── exceptions.rb │ ├── arguments.rb │ ├── arguments │ │ ├── exceptions.rb │ │ └── null_arguments.rb │ ├── backtrace_cleaner.rb │ ├── cache.rb │ ├── cache │ │ ├── constants.rb │ │ ├── entities.rb │ │ ├── entities │ │ │ ├── caches.rb │ │ │ ├── caches │ │ │ │ ├── array.rb │ │ │ │ ├── array │ │ │ │ │ ├── entities.rb │ │ │ │ │ └── entities │ │ │ │ │ │ └── pair.rb │ │ │ │ ├── base.rb │ │ │ │ ├── hash.rb │ │ │ │ ├── thread_safe_array.rb │ │ │ │ └── thread_safe_hash.rb │ │ │ └── key.rb │ │ └── exceptions.rb │ ├── castable.rb │ ├── castable │ │ └── exceptions.rb │ ├── command.rb │ ├── concern.rb │ ├── copyable.rb │ ├── counter.rb │ ├── delegate.rb │ ├── dependency_container.rb │ ├── dependency_container │ │ ├── commands.rb │ │ ├── commands │ │ │ ├── assert_valid_container.rb │ │ │ ├── assert_valid_method.rb │ │ │ ├── assert_valid_scope.rb │ │ │ ├── create_methods_module.rb │ │ │ └── import_method.rb │ │ ├── constants.rb │ │ ├── container.rb │ │ ├── entities.rb │ │ ├── entities │ │ │ ├── method.rb │ │ │ ├── method_collection.rb │ │ │ ├── namespace.rb │ │ │ └── namespace_collection.rb │ │ ├── exceptions.rb │ │ ├── export.rb │ │ └── import.rb │ ├── finite_loop.rb │ ├── method_parameters.rb │ ├── middleware.rb │ ├── middleware │ │ ├── stack_builder.rb │ │ └── stack_builder │ │ │ ├── constants.rb │ │ │ ├── entities.rb │ │ │ ├── entities │ │ │ ├── builders.rb │ │ │ └── builders │ │ │ │ ├── rack.rb │ │ │ │ ├── rack │ │ │ │ └── exceptions.rb │ │ │ │ ├── ruby_middleware.rb │ │ │ │ ├── stateful.rb │ │ │ │ └── stateful │ │ │ │ └── exceptions.rb │ │ │ └── exceptions.rb │ ├── never_reach_here.rb │ ├── not_passed.rb │ ├── raw_value.rb │ ├── safe_method.rb │ ├── thread_safe_counter.rb │ ├── undefined.rb │ ├── unique_value.rb │ └── value.rb │ ├── utils.rb │ ├── utils │ ├── array.rb │ ├── array │ │ ├── contain_exactly.rb │ │ ├── drop_while.rb │ │ ├── exceptions.rb │ │ ├── find_last.rb │ │ ├── find_yield.rb │ │ ├── keep_after.rb │ │ ├── limited_push.rb │ │ ├── merge.rb │ │ ├── rjust.rb │ │ └── wrap.rb │ ├── bool.rb │ ├── bool │ │ ├── to_bool.rb │ │ └── to_env_bool.rb │ ├── class.rb │ ├── class │ │ ├── display_name.rb │ │ └── get_attached_object.rb │ ├── hash.rb │ ├── hash │ │ ├── assert_valid_keys.rb │ │ ├── except.rb │ │ └── triple_equality_compare.rb │ ├── kernel.rb │ ├── kernel │ │ └── silence_warnings.rb │ ├── method.rb │ ├── method │ │ ├── defined.rb │ │ ├── name.rb │ │ ├── name │ │ │ └── append.rb │ │ └── remove.rb │ ├── module.rb │ ├── module │ │ ├── class_method_defined.rb │ │ ├── exceptions.rb │ │ ├── fetch_own_const.rb │ │ ├── get_namespace.rb │ │ ├── get_own_const.rb │ │ ├── get_own_instance_method.rb │ │ ├── has_own_instance_method.rb │ │ ├── include_module.rb │ │ └── instance_method_defined.rb │ ├── object.rb │ ├── object │ │ ├── clamp_class.rb │ │ ├── duck_class.rb │ │ ├── get_own_method.rb │ │ ├── instance_variable_delete.rb │ │ ├── instance_variable_fetch.rb │ │ ├── memoize_including_falsy_values.rb │ │ ├── resolve_type.rb │ │ ├── safe_send.rb │ │ └── with_one_time_object.rb │ ├── proc.rb │ ├── proc │ │ ├── conjunct.rb │ │ ├── display.rb │ │ └── exec_config.rb │ ├── string.rb │ └── string │ │ ├── camelize.rb │ │ ├── demodulize.rb │ │ ├── enclose.rb │ │ ├── split.rb │ │ └── truncate.rb │ └── version.rb ├── logo.png ├── spec ├── amazing_print_helper.rb ├── awesome_print_helper.rb ├── coverage_helper.rb ├── dry_helper.rb ├── e2e │ ├── arguments_pattern_matchings_spec.rb │ ├── backtrace_cleaner_spec.rb │ ├── calculated_and_recalculated_results_spec.rb │ ├── exception_services_trace_spec.rb │ ├── if_steps_spec.rb │ ├── loops_spec.rb │ ├── result_pattern_matching_spec.rb │ ├── service_with_all_types_of_groups_spec.rb │ ├── service_with_all_types_of_groups_with_not_evaluated_steps_spec.rb │ ├── service_with_all_types_of_steps_spec.rb │ ├── service_with_undefined_methods_by_empty_middlewares_stacks_spec.rb │ ├── services_with_custom_negated_results_spec.rb │ ├── step_with_reassignments_spec.rb │ ├── steps_commitment_spec.rb │ ├── steps_with_special_characters_spec.rb │ ├── stubbed_feature_entries_spec.rb │ └── stubbed_service_results_spec.rb ├── lib │ ├── convenient_service │ │ ├── aliases_spec.rb │ │ ├── common │ │ │ └── plugins │ │ │ │ ├── aliases_spec.rb │ │ │ │ ├── assigns_attributes_in_constructor │ │ │ │ ├── using_active_model_attribute_assignment │ │ │ │ │ ├── concern_spec.rb │ │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── using_active_model_attribute_assignment_spec.rb │ │ │ │ ├── using_dry_initializer │ │ │ │ │ └── concern_spec.rb │ │ │ │ └── using_dry_initializer_spec.rb │ │ │ │ ├── caches_constructor_arguments │ │ │ │ ├── concern_spec.rb │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── caches_return_value │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── can_be_copied │ │ │ │ └── concern_spec.rb │ │ │ │ ├── can_have_callbacks │ │ │ │ ├── concern_spec.rb │ │ │ │ ├── entities │ │ │ │ │ ├── callback_collection_spec.rb │ │ │ │ │ ├── callback_spec.rb │ │ │ │ │ ├── type │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ ├── type_collection_spec.rb │ │ │ │ │ └── type_spec.rb │ │ │ │ ├── exceptions_spec.rb │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── can_have_not_passed_arguments │ │ │ │ └── concern_spec.rb │ │ │ │ ├── can_have_user_provided_entity │ │ │ │ ├── commands │ │ │ │ │ └── find_or_create_entity_spec.rb │ │ │ │ └── exceptions_spec.rb │ │ │ │ ├── can_utilize_finite_loop │ │ │ │ ├── concern_spec.rb │ │ │ │ └── constants_spec.rb │ │ │ │ ├── cleans_exception_backtrace │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── ensures_negated_j_send_result │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── has_attributes │ │ │ │ ├── using_active_model_attributes │ │ │ │ │ └── concern_spec.rb │ │ │ │ └── using_active_model_attributes_spec.rb │ │ │ │ ├── has_constructor │ │ │ │ └── concern_spec.rb │ │ │ │ ├── has_constructor_without_initialize │ │ │ │ └── concern_spec.rb │ │ │ │ ├── has_instance_proxy │ │ │ │ ├── commands │ │ │ │ │ └── create_instance_proxy_class_spec.rb │ │ │ │ ├── concern_spec.rb │ │ │ │ ├── entities │ │ │ │ │ └── instance_proxy_spec.rb │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── has_internals │ │ │ │ ├── commands │ │ │ │ │ └── create_internals_class_spec.rb │ │ │ │ ├── concern_spec.rb │ │ │ │ └── entities │ │ │ │ │ ├── internals │ │ │ │ │ ├── concern_spec.rb │ │ │ │ │ └── plugins │ │ │ │ │ │ ├── aliases_spec.rb │ │ │ │ │ │ └── has_cache │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ └── internals_spec.rb │ │ │ │ ├── has_j_send_result_duck_short_syntax │ │ │ │ └── concern_spec.rb │ │ │ │ └── has_memoization │ │ │ │ └── using_memo_wise │ │ │ │ └── concern_spec.rb │ │ ├── config │ │ │ ├── commands │ │ │ │ └── normalize_options_spec.rb │ │ │ ├── entities │ │ │ │ ├── option_spec.rb │ │ │ │ └── options_spec.rb │ │ │ └── exceptions_spec.rb │ │ ├── config_spec.rb │ │ ├── core │ │ │ ├── aliases_spec.rb │ │ │ ├── concern │ │ │ │ ├── class_methods_spec.rb │ │ │ │ ├── instance_methods_spec.rb │ │ │ │ └── singleton_class_methods_spec.rb │ │ │ ├── concern_spec.rb │ │ │ ├── constants_spec.rb │ │ │ └── entities │ │ │ │ ├── config │ │ │ │ ├── commands │ │ │ │ │ ├── create_entity_class_spec.rb │ │ │ │ │ ├── find_entity_class_spec.rb │ │ │ │ │ ├── find_or_create_entity_class_spec.rb │ │ │ │ │ └── track_method_missing_commit_trigger_spec.rb │ │ │ │ ├── entities │ │ │ │ │ ├── concerns │ │ │ │ │ │ └── entities │ │ │ │ │ │ │ ├── middleware │ │ │ │ │ │ │ └── commands │ │ │ │ │ │ │ │ └── cast_middleware_spec.rb │ │ │ │ │ │ │ ├── middleware_spec.rb │ │ │ │ │ │ │ └── stack_spec.rb │ │ │ │ │ ├── concerns_spec.rb │ │ │ │ │ ├── method_middlewares │ │ │ │ │ │ ├── commands │ │ │ │ │ │ │ └── generate_stack_name_spec.rb │ │ │ │ │ │ └── entities │ │ │ │ │ │ │ ├── caller │ │ │ │ │ │ │ ├── commands │ │ │ │ │ │ │ │ ├── cast_caller_spec.rb │ │ │ │ │ │ │ │ ├── define_method_callers_spec.rb │ │ │ │ │ │ │ │ └── undefine_method_callers_spec.rb │ │ │ │ │ │ │ ├── concern │ │ │ │ │ │ │ │ ├── class_methods_spec.rb │ │ │ │ │ │ │ │ └── instance_methods_spec.rb │ │ │ │ │ │ │ ├── concern_spec.rb │ │ │ │ │ │ │ └── constants_spec.rb │ │ │ │ │ │ │ ├── caller_spec.rb │ │ │ │ │ │ │ ├── container │ │ │ │ │ │ │ ├── commands │ │ │ │ │ │ │ │ ├── cast_container_spec.rb │ │ │ │ │ │ │ │ └── resolve_methods_middlewares_callers_spec.rb │ │ │ │ │ │ │ ├── concern │ │ │ │ │ │ │ │ ├── class_methods_spec.rb │ │ │ │ │ │ │ │ └── instance_methods_spec.rb │ │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ │ ├── container_spec.rb │ │ │ │ │ │ │ ├── middleware_creators │ │ │ │ │ │ │ ├── base_spec.rb │ │ │ │ │ │ │ ├── observable │ │ │ │ │ │ │ │ └── entities │ │ │ │ │ │ │ │ │ └── event_spec.rb │ │ │ │ │ │ │ ├── observable_spec.rb │ │ │ │ │ │ │ └── with_spec.rb │ │ │ │ │ │ │ ├── middlewares │ │ │ │ │ │ │ ├── base │ │ │ │ │ │ │ │ ├── commands │ │ │ │ │ │ │ │ │ └── create_observable_middleware_spec.rb │ │ │ │ │ │ │ │ ├── concern │ │ │ │ │ │ │ │ │ ├── class_methods_spec.rb │ │ │ │ │ │ │ │ │ └── instance_methods_spec.rb │ │ │ │ │ │ │ │ ├── concern_spec.rb │ │ │ │ │ │ │ │ ├── constants_spec.rb │ │ │ │ │ │ │ │ └── structs │ │ │ │ │ │ │ │ │ └── intended_method_spec.rb │ │ │ │ │ │ │ ├── base_spec.rb │ │ │ │ │ │ │ ├── chain │ │ │ │ │ │ │ │ ├── commands │ │ │ │ │ │ │ │ │ ├── create_observable_middleware_spec.rb │ │ │ │ │ │ │ │ │ └── normalize_env_spec.rb │ │ │ │ │ │ │ │ ├── concern │ │ │ │ │ │ │ │ │ ├── class_methods_spec.rb │ │ │ │ │ │ │ │ │ └── instance_methods_spec.rb │ │ │ │ │ │ │ │ ├── concern_spec.rb │ │ │ │ │ │ │ │ └── entities │ │ │ │ │ │ │ │ │ └── method_chain_spec.rb │ │ │ │ │ │ │ ├── chain_spec.rb │ │ │ │ │ │ │ └── classic_spec.rb │ │ │ │ │ │ │ └── stack_spec.rb │ │ │ │ │ └── method_middlewares_spec.rb │ │ │ │ └── exceptions_spec.rb │ │ │ │ └── config_spec.rb │ │ ├── core_spec.rb │ │ ├── dependencies │ │ │ └── queries │ │ │ │ ├── gems │ │ │ │ ├── active_model_spec.rb │ │ │ │ ├── logger_spec.rb │ │ │ │ ├── paint_spec.rb │ │ │ │ └── rspec_spec.rb │ │ │ │ ├── ruby_spec.rb │ │ │ │ ├── version │ │ │ │ └── null_version_spec.rb │ │ │ │ └── version_spec.rb │ │ ├── dependencies_spec.rb │ │ ├── examples │ │ │ ├── dry │ │ │ │ ├── gemfile │ │ │ │ │ ├── dry_service │ │ │ │ │ │ └── config_spec.rb │ │ │ │ │ └── services │ │ │ │ │ │ ├── assert_file_exists_spec.rb │ │ │ │ │ │ ├── assert_file_not_empty_spec.rb │ │ │ │ │ │ ├── assert_node_available_spec.rb │ │ │ │ │ │ ├── assert_npm_package_available_spec.rb │ │ │ │ │ │ ├── assert_valid_ruby_syntax_spec.rb │ │ │ │ │ │ ├── format_body_spec.rb │ │ │ │ │ │ ├── format_gems_with_envs_spec.rb │ │ │ │ │ │ ├── format_gems_without_envs_spec.rb │ │ │ │ │ │ ├── format_header_spec.rb │ │ │ │ │ │ ├── parse_content_spec.rb │ │ │ │ │ │ ├── print_shell_command_spec.rb │ │ │ │ │ │ ├── read_file_content_spec.rb │ │ │ │ │ │ ├── run_shell_command_spec.rb │ │ │ │ │ │ └── strip_comments_spec.rb │ │ │ │ ├── gemfile_spec.rb │ │ │ │ └── v1 │ │ │ │ │ ├── gemfile │ │ │ │ │ ├── dry_service │ │ │ │ │ │ └── config_spec.rb │ │ │ │ │ └── services │ │ │ │ │ │ ├── assert_file_exists_spec.rb │ │ │ │ │ │ ├── assert_file_not_empty_spec.rb │ │ │ │ │ │ ├── assert_node_available_spec.rb │ │ │ │ │ │ ├── assert_npm_package_available_spec.rb │ │ │ │ │ │ ├── assert_valid_ruby_syntax_spec.rb │ │ │ │ │ │ ├── format_body_spec.rb │ │ │ │ │ │ ├── format_gems_with_envs_spec.rb │ │ │ │ │ │ ├── format_gems_without_envs_spec.rb │ │ │ │ │ │ ├── format_header_spec.rb │ │ │ │ │ │ ├── parse_content_spec.rb │ │ │ │ │ │ ├── read_file_content_spec.rb │ │ │ │ │ │ ├── run_shell_command_spec.rb │ │ │ │ │ │ └── strip_comments_spec.rb │ │ │ │ │ └── gemfile_spec.rb │ │ │ ├── rails │ │ │ │ ├── gemfile │ │ │ │ │ ├── rails_service │ │ │ │ │ │ └── config_spec.rb │ │ │ │ │ └── services │ │ │ │ │ │ ├── assert_file_exists_spec.rb │ │ │ │ │ │ ├── assert_file_not_empty_spec.rb │ │ │ │ │ │ ├── assert_node_available_spec.rb │ │ │ │ │ │ ├── assert_npm_package_available_spec.rb │ │ │ │ │ │ ├── assert_valid_ruby_syntax_spec.rb │ │ │ │ │ │ ├── format_body_spec.rb │ │ │ │ │ │ ├── format_gems_with_envs_spec.rb │ │ │ │ │ │ ├── format_gems_without_envs_spec.rb │ │ │ │ │ │ ├── format_header_spec.rb │ │ │ │ │ │ ├── format_spec.rb │ │ │ │ │ │ ├── merge_sections_spec.rb │ │ │ │ │ │ ├── parse_content_spec.rb │ │ │ │ │ │ ├── print_shell_command_spec.rb │ │ │ │ │ │ ├── read_file_content_spec.rb │ │ │ │ │ │ ├── replace_file_content_spec.rb │ │ │ │ │ │ ├── run_shell_command_spec.rb │ │ │ │ │ │ └── strip_comments_spec.rb │ │ │ │ ├── gemfile_spec.rb │ │ │ │ └── v1 │ │ │ │ │ ├── gemfile │ │ │ │ │ ├── rails_service │ │ │ │ │ │ └── config_spec.rb │ │ │ │ │ └── services │ │ │ │ │ │ ├── assert_file_exists_spec.rb │ │ │ │ │ │ ├── assert_file_not_empty_spec.rb │ │ │ │ │ │ ├── assert_node_available_spec.rb │ │ │ │ │ │ ├── assert_npm_package_available_spec.rb │ │ │ │ │ │ ├── assert_valid_ruby_syntax_spec.rb │ │ │ │ │ │ ├── format_body_spec.rb │ │ │ │ │ │ ├── format_gems_with_envs_spec.rb │ │ │ │ │ │ ├── format_gems_without_envs_spec.rb │ │ │ │ │ │ ├── format_header_spec.rb │ │ │ │ │ │ ├── format_spec.rb │ │ │ │ │ │ ├── merge_sections_spec.rb │ │ │ │ │ │ ├── parse_content_spec.rb │ │ │ │ │ │ ├── read_file_content_spec.rb │ │ │ │ │ │ ├── replace_file_content_spec.rb │ │ │ │ │ │ ├── run_shell_command_spec.rb │ │ │ │ │ │ └── strip_comments_spec.rb │ │ │ │ │ └── gemfile_spec.rb │ │ │ └── standard │ │ │ │ ├── cowsay │ │ │ │ └── services │ │ │ │ │ ├── build_cloud_spec.rb │ │ │ │ │ ├── build_cow_spec.rb │ │ │ │ │ └── print_spec.rb │ │ │ │ ├── cowsay_spec.rb │ │ │ │ ├── date_time │ │ │ │ └── services │ │ │ │ │ └── safe_parse_spec.rb │ │ │ │ ├── date_time_spec.rb │ │ │ │ ├── factorial │ │ │ │ ├── services │ │ │ │ │ └── calculate_spec.rb │ │ │ │ └── utils │ │ │ │ │ ├── timeout │ │ │ │ │ └── with_timeout_spec.rb │ │ │ │ │ └── timeout_spec.rb │ │ │ │ ├── factorial_spec.rb │ │ │ │ ├── gemfile │ │ │ │ └── services │ │ │ │ │ ├── assert_file_exists_spec.rb │ │ │ │ │ ├── assert_file_not_empty_spec.rb │ │ │ │ │ ├── assert_node_available_spec.rb │ │ │ │ │ ├── assert_npm_package_available_spec.rb │ │ │ │ │ ├── assert_valid_ruby_syntax_spec.rb │ │ │ │ │ ├── format_body_spec.rb │ │ │ │ │ ├── format_gems_with_envs_spec.rb │ │ │ │ │ ├── format_gems_without_envs_spec.rb │ │ │ │ │ ├── format_header_spec.rb │ │ │ │ │ ├── format_spec.rb │ │ │ │ │ ├── merge_sections_spec.rb │ │ │ │ │ ├── parse_content_spec.rb │ │ │ │ │ ├── print_shell_command_spec.rb │ │ │ │ │ ├── read_file_content_spec.rb │ │ │ │ │ ├── replace_file_content_spec.rb │ │ │ │ │ ├── run_shell_command_spec.rb │ │ │ │ │ └── strip_comments_spec.rb │ │ │ │ ├── gemfile_spec.rb │ │ │ │ ├── request_params │ │ │ │ ├── constants_spec.rb │ │ │ │ ├── entities │ │ │ │ │ ├── description_spec.rb │ │ │ │ │ ├── format_spec.rb │ │ │ │ │ ├── id_spec.rb │ │ │ │ │ ├── logger_spec.rb │ │ │ │ │ ├── request_spec.rb │ │ │ │ │ ├── source_spec.rb │ │ │ │ │ ├── tag_spec.rb │ │ │ │ │ └── title_spec.rb │ │ │ │ ├── services │ │ │ │ │ ├── apply_default_param_values_spec.rb │ │ │ │ │ ├── cast_params_spec.rb │ │ │ │ │ ├── extract_params_from_body_spec.rb │ │ │ │ │ ├── extract_params_from_path_spec.rb │ │ │ │ │ ├── filter_out_unpermitted_params_spec.rb │ │ │ │ │ ├── log_request_params_spec.rb │ │ │ │ │ ├── merge_params_spec.rb │ │ │ │ │ ├── prepare_spec.rb │ │ │ │ │ ├── validate_casted_params_spec.rb │ │ │ │ │ └── validate_uncasted_params_spec.rb │ │ │ │ └── utils │ │ │ │ │ ├── array │ │ │ │ │ └── wrap_spec.rb │ │ │ │ │ ├── array_spec.rb │ │ │ │ │ ├── http │ │ │ │ │ ├── request │ │ │ │ │ │ ├── parse_body_spec.rb │ │ │ │ │ │ └── parse_path_spec.rb │ │ │ │ │ └── request_spec.rb │ │ │ │ │ ├── integer │ │ │ │ │ └── safe_parse_spec.rb │ │ │ │ │ ├── integer_spec.rb │ │ │ │ │ ├── json │ │ │ │ │ └── safe_parse_spec.rb │ │ │ │ │ ├── json_spec.rb │ │ │ │ │ ├── object │ │ │ │ │ ├── blank_spec.rb │ │ │ │ │ └── present_spec.rb │ │ │ │ │ ├── object_spec.rb │ │ │ │ │ ├── url │ │ │ │ │ └── valid_spec.rb │ │ │ │ │ └── url_spec.rb │ │ │ │ ├── request_params_spec.rb │ │ │ │ └── v1 │ │ │ │ ├── cowsay │ │ │ │ └── services │ │ │ │ │ ├── build_cloud_spec.rb │ │ │ │ │ ├── build_cow_spec.rb │ │ │ │ │ └── print_spec.rb │ │ │ │ ├── cowsay_spec.rb │ │ │ │ ├── date_time │ │ │ │ └── services │ │ │ │ │ └── safe_parse_spec.rb │ │ │ │ ├── date_time_spec.rb │ │ │ │ ├── factorial │ │ │ │ ├── services │ │ │ │ │ └── calculate_spec.rb │ │ │ │ └── utils │ │ │ │ │ ├── timeout │ │ │ │ │ └── with_timeout_spec.rb │ │ │ │ │ └── timeout_spec.rb │ │ │ │ ├── factorial_spec.rb │ │ │ │ ├── gemfile │ │ │ │ └── services │ │ │ │ │ ├── assert_file_exists_spec.rb │ │ │ │ │ ├── assert_file_not_empty_spec.rb │ │ │ │ │ ├── assert_node_available_spec.rb │ │ │ │ │ ├── assert_npm_package_available_spec.rb │ │ │ │ │ ├── assert_valid_ruby_syntax_spec.rb │ │ │ │ │ ├── format_body_spec.rb │ │ │ │ │ ├── format_gems_with_envs_spec.rb │ │ │ │ │ ├── format_gems_without_envs_spec.rb │ │ │ │ │ ├── format_header_spec.rb │ │ │ │ │ ├── format_spec.rb │ │ │ │ │ ├── merge_sections_spec.rb │ │ │ │ │ ├── parse_content_spec.rb │ │ │ │ │ ├── read_file_content_spec.rb │ │ │ │ │ ├── replace_file_content_spec.rb │ │ │ │ │ ├── run_shell_command_spec.rb │ │ │ │ │ └── strip_comments_spec.rb │ │ │ │ ├── gemfile_spec.rb │ │ │ │ ├── request_params │ │ │ │ ├── constants_spec.rb │ │ │ │ ├── entities │ │ │ │ │ ├── description_spec.rb │ │ │ │ │ ├── format_spec.rb │ │ │ │ │ ├── id_spec.rb │ │ │ │ │ ├── logger_spec.rb │ │ │ │ │ ├── request_spec.rb │ │ │ │ │ ├── source_spec.rb │ │ │ │ │ ├── tag_spec.rb │ │ │ │ │ └── title_spec.rb │ │ │ │ ├── services │ │ │ │ │ ├── apply_default_param_values_spec.rb │ │ │ │ │ ├── cast_params_spec.rb │ │ │ │ │ ├── extract_params_from_body_spec.rb │ │ │ │ │ ├── extract_params_from_path_spec.rb │ │ │ │ │ ├── filter_out_unpermitted_params_spec.rb │ │ │ │ │ ├── log_request_params_spec.rb │ │ │ │ │ ├── merge_params_spec.rb │ │ │ │ │ ├── prepare_spec.rb │ │ │ │ │ ├── validate_casted_params_spec.rb │ │ │ │ │ └── validate_uncasted_params_spec.rb │ │ │ │ └── utils │ │ │ │ │ ├── array │ │ │ │ │ └── wrap_spec.rb │ │ │ │ │ ├── array_spec.rb │ │ │ │ │ ├── http │ │ │ │ │ ├── request │ │ │ │ │ │ ├── parse_body_spec.rb │ │ │ │ │ │ └── parse_path_spec.rb │ │ │ │ │ └── request_spec.rb │ │ │ │ │ ├── integer │ │ │ │ │ └── safe_parse_spec.rb │ │ │ │ │ ├── integer_spec.rb │ │ │ │ │ ├── json │ │ │ │ │ └── safe_parse_spec.rb │ │ │ │ │ ├── json_spec.rb │ │ │ │ │ ├── object │ │ │ │ │ ├── blank_spec.rb │ │ │ │ │ └── present_spec.rb │ │ │ │ │ ├── object_spec.rb │ │ │ │ │ ├── url │ │ │ │ │ └── valid_spec.rb │ │ │ │ │ └── url_spec.rb │ │ │ │ └── request_params_spec.rb │ │ ├── exception_spec.rb │ │ ├── feature │ │ │ ├── configs │ │ │ │ ├── aliases_spec.rb │ │ │ │ ├── standard │ │ │ │ │ └── commands │ │ │ │ │ │ ├── is_feature_class_spec.rb │ │ │ │ │ │ └── is_feature_spec.rb │ │ │ │ └── standard_spec.rb │ │ │ ├── core_spec.rb │ │ │ └── plugins │ │ │ │ ├── aliases_spec.rb │ │ │ │ ├── can_have_entries │ │ │ │ ├── commands │ │ │ │ │ ├── define_entries_spec.rb │ │ │ │ │ └── define_entry_spec.rb │ │ │ │ ├── concern_spec.rb │ │ │ │ └── exceptions_spec.rb │ │ │ │ └── can_have_stubbed_entries │ │ │ │ ├── commands │ │ │ │ ├── fetch_all_features_stubbed_entries_cache_spec.rb │ │ │ │ ├── fetch_feature_stubbed_entries_cache_spec.rb │ │ │ │ └── set_feature_stubbed_entry_spec.rb │ │ │ │ ├── concern_spec.rb │ │ │ │ └── middleware_spec.rb │ │ ├── logger_spec.rb │ │ ├── rspec │ │ │ ├── helpers │ │ │ │ ├── classes │ │ │ │ │ ├── stub_entry │ │ │ │ │ │ ├── constants_spec.rb │ │ │ │ │ │ └── entities │ │ │ │ │ │ │ ├── stubbed_feature_spec.rb │ │ │ │ │ │ │ └── value_spec_spec.rb │ │ │ │ │ ├── stub_entry_spec.rb │ │ │ │ │ ├── stub_service │ │ │ │ │ │ ├── constants_spec.rb │ │ │ │ │ │ └── entities │ │ │ │ │ │ │ ├── result_spec_spec.rb │ │ │ │ │ │ │ └── stubbed_service_spec.rb │ │ │ │ │ ├── stub_service_spec.rb │ │ │ │ │ ├── wrap_method │ │ │ │ │ │ ├── entities │ │ │ │ │ │ │ └── wrapped_method_spec.rb │ │ │ │ │ │ └── exceptions_spec.rb │ │ │ │ │ └── wrap_method_spec.rb │ │ │ │ ├── ignoring_exception_spec.rb │ │ │ │ ├── stub_entry_spec.rb │ │ │ │ ├── stub_service_spec.rb │ │ │ │ └── wrap_method_spec.rb │ │ │ ├── matchers │ │ │ │ ├── call_chain_next_spec.rb │ │ │ │ ├── classes │ │ │ │ │ ├── call_chain_next_spec.rb │ │ │ │ │ ├── export_spec.rb │ │ │ │ │ ├── include_config_spec.rb │ │ │ │ │ └── results │ │ │ │ │ │ ├── base │ │ │ │ │ │ ├── constants_spec.rb │ │ │ │ │ │ ├── entities │ │ │ │ │ │ │ ├── chain_spec.rb │ │ │ │ │ │ │ ├── printers │ │ │ │ │ │ │ │ ├── base │ │ │ │ │ │ │ │ │ └── commands │ │ │ │ │ │ │ │ │ │ ├── generate_expected_code_part_spec.rb │ │ │ │ │ │ │ │ │ │ ├── generate_expected_data_part_spec.rb │ │ │ │ │ │ │ │ │ │ ├── generate_expected_message_part_spec.rb │ │ │ │ │ │ │ │ │ │ ├── generate_expected_parts_spec.rb │ │ │ │ │ │ │ │ │ │ ├── generate_expected_service_part_spec.rb │ │ │ │ │ │ │ │ │ │ ├── generate_expected_status_part_spec.rb │ │ │ │ │ │ │ │ │ │ ├── generate_expected_step_part_spec.rb │ │ │ │ │ │ │ │ │ │ ├── generate_got_parts_spec.rb │ │ │ │ │ │ │ │ │ │ ├── generate_got_service_part_spec.rb │ │ │ │ │ │ │ │ │ │ └── generate_got_step_part_spec.rb │ │ │ │ │ │ │ │ ├── base_spec.rb │ │ │ │ │ │ │ │ ├── error │ │ │ │ │ │ │ │ │ └── commands │ │ │ │ │ │ │ │ │ │ └── generate_got_jsend_attributes_part_spec.rb │ │ │ │ │ │ │ │ ├── error_spec.rb │ │ │ │ │ │ │ │ ├── failure │ │ │ │ │ │ │ │ │ └── commands │ │ │ │ │ │ │ │ │ │ └── generate_got_jsend_attributes_part_spec.rb │ │ │ │ │ │ │ │ ├── failure_spec.rb │ │ │ │ │ │ │ │ ├── null_spec.rb │ │ │ │ │ │ │ │ ├── success │ │ │ │ │ │ │ │ │ └── commands │ │ │ │ │ │ │ │ │ │ └── generate_got_jsend_attributes_part_spec.rb │ │ │ │ │ │ │ │ └── success_spec.rb │ │ │ │ │ │ │ ├── printers_spec.rb │ │ │ │ │ │ │ ├── validator │ │ │ │ │ │ │ │ └── commands │ │ │ │ │ │ │ │ │ ├── validate_result_code_spec.rb │ │ │ │ │ │ │ │ │ ├── validate_result_data_spec.rb │ │ │ │ │ │ │ │ │ ├── validate_result_message_spec.rb │ │ │ │ │ │ │ │ │ ├── validate_result_original_service_spec.rb │ │ │ │ │ │ │ │ │ ├── validate_result_service_spec.rb │ │ │ │ │ │ │ │ │ ├── validate_result_spec.rb │ │ │ │ │ │ │ │ │ ├── validate_result_status_spec.rb │ │ │ │ │ │ │ │ │ ├── validate_result_step_spec.rb │ │ │ │ │ │ │ │ │ └── validate_result_type_spec.rb │ │ │ │ │ │ │ └── validator_spec.rb │ │ │ │ │ │ └── exceptions_spec.rb │ │ │ │ │ │ ├── base_spec.rb │ │ │ │ │ │ ├── be_error_spec.rb │ │ │ │ │ │ ├── be_failure_spec.rb │ │ │ │ │ │ ├── be_not_error_spec.rb │ │ │ │ │ │ ├── be_not_failure_spec.rb │ │ │ │ │ │ ├── be_not_success_spec.rb │ │ │ │ │ │ └── be_success_spec.rb │ │ │ │ ├── delegate_to_spec.rb │ │ │ │ ├── export_spec.rb │ │ │ │ ├── include_config_spec.rb │ │ │ │ ├── include_module_spec.rb │ │ │ │ ├── results │ │ │ │ │ ├── be_error_spec.rb │ │ │ │ │ ├── be_failure_spec.rb │ │ │ │ │ ├── be_not_error_spec.rb │ │ │ │ │ ├── be_not_failure_spec.rb │ │ │ │ │ ├── be_not_success_spec.rb │ │ │ │ │ ├── be_result_spec.rb │ │ │ │ │ └── be_success_spec.rb │ │ │ │ └── results_spec.rb │ │ │ ├── matchers_spec.rb │ │ │ ├── primitive_helpers │ │ │ │ ├── classes │ │ │ │ │ ├── ignoring_exception │ │ │ │ │ │ └── exceptions_spec.rb │ │ │ │ │ └── ignoring_exception_spec.rb │ │ │ │ ├── ignoring_exception_spec.rb │ │ │ │ └── in_threads_spec.rb │ │ │ ├── primitive_matchers │ │ │ │ ├── be_descendant_of_spec.rb │ │ │ │ ├── be_direct_descendant_of_spec.rb │ │ │ │ ├── cache_its_value_spec.rb │ │ │ │ ├── classes │ │ │ │ │ ├── be_descendant_of_spec.rb │ │ │ │ │ ├── be_direct_descendant_of_spec.rb │ │ │ │ │ ├── cache_its_value_spec.rb │ │ │ │ │ ├── delegate_to │ │ │ │ │ │ ├── commands │ │ │ │ │ │ │ └── generate_printable_method_spec.rb │ │ │ │ │ │ ├── entities │ │ │ │ │ │ │ ├── delegation_spec.rb │ │ │ │ │ │ │ ├── inputs_spec.rb │ │ │ │ │ │ │ ├── outputs_spec.rb │ │ │ │ │ │ │ ├── sub_matcher_collection_spec.rb │ │ │ │ │ │ │ └── sub_matchers │ │ │ │ │ │ │ │ ├── arguments │ │ │ │ │ │ │ │ └── commands │ │ │ │ │ │ │ │ │ ├── apply_stub_to_track_delegations_spec.rb │ │ │ │ │ │ │ │ │ └── generate_printable_arguments_spec.rb │ │ │ │ │ │ │ │ ├── arguments_spec.rb │ │ │ │ │ │ │ │ ├── base_spec.rb │ │ │ │ │ │ │ │ ├── return_custom_value_spec.rb │ │ │ │ │ │ │ │ ├── return_delegation_value_spec.rb │ │ │ │ │ │ │ │ ├── with_any_arguments_spec.rb │ │ │ │ │ │ │ │ ├── with_concrete_arguments_spec.rb │ │ │ │ │ │ │ │ └── without_arguments_spec.rb │ │ │ │ │ │ └── exceptions_spec.rb │ │ │ │ │ ├── delegate_to_spec.rb │ │ │ │ │ ├── extend_module_spec.rb │ │ │ │ │ ├── have_abstract_method_spec.rb │ │ │ │ │ ├── have_alias_method_spec.rb │ │ │ │ │ ├── include_module_spec.rb │ │ │ │ │ ├── prepend_module_spec.rb │ │ │ │ │ └── singleton_prepend_module_spec.rb │ │ │ │ ├── delegate_to_spec.rb │ │ │ │ ├── extend_module_spec.rb │ │ │ │ ├── have_abstract_method_spec.rb │ │ │ │ ├── have_alias_method_spec.rb │ │ │ │ ├── have_attr_accessor_spec.rb │ │ │ │ ├── have_attr_reader_spec.rb │ │ │ │ ├── have_attr_writer_spec.rb │ │ │ │ ├── include_module_spec.rb │ │ │ │ ├── prepend_module_spec.rb │ │ │ │ └── singleton_prepend_module_spec.rb │ │ │ └── primitive_matchers_spec.rb │ │ ├── service │ │ │ ├── configs │ │ │ │ ├── aliases_spec.rb │ │ │ │ ├── standard │ │ │ │ │ ├── aliases_spec.rb │ │ │ │ │ ├── commands │ │ │ │ │ │ ├── is_service_class_spec.rb │ │ │ │ │ │ └── is_service_spec.rb │ │ │ │ │ └── v1_spec.rb │ │ │ │ └── standard_spec.rb │ │ │ ├── core_spec.rb │ │ │ └── plugins │ │ │ │ ├── aliases_spec.rb │ │ │ │ ├── can_have_after_step_callbacks │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── can_have_around_step_callbacks │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── can_have_before_step_callbacks │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── can_have_connected_steps │ │ │ │ ├── concern_spec.rb │ │ │ │ ├── entities │ │ │ │ │ ├── expressions │ │ │ │ │ │ ├── and_spec.rb │ │ │ │ │ │ ├── base_spec.rb │ │ │ │ │ │ ├── empty_spec.rb │ │ │ │ │ │ ├── group_spec.rb │ │ │ │ │ │ ├── not_spec.rb │ │ │ │ │ │ ├── or_spec.rb │ │ │ │ │ │ └── scalar_spec.rb │ │ │ │ │ └── step_collection_spec.rb │ │ │ │ ├── exceptions_spec.rb │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── can_have_fallbacks │ │ │ │ ├── concern_spec.rb │ │ │ │ ├── exceptions_spec.rb │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── can_have_recalculations │ │ │ │ └── concern_spec.rb │ │ │ │ ├── can_have_rollbacks │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── can_have_sequential_steps │ │ │ │ ├── concern_spec.rb │ │ │ │ ├── entities │ │ │ │ │ └── step_collection_spec.rb │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── can_have_steps │ │ │ │ ├── commands │ │ │ │ │ ├── create_step_class_spec.rb │ │ │ │ │ └── is_step_spec.rb │ │ │ │ ├── concern_spec.rb │ │ │ │ ├── entities │ │ │ │ │ ├── method │ │ │ │ │ │ ├── commands │ │ │ │ │ │ │ ├── cast_method_direction_spec.rb │ │ │ │ │ │ │ ├── cast_method_factory_spec.rb │ │ │ │ │ │ │ ├── cast_method_spec.rb │ │ │ │ │ │ │ └── define_method_in_container_spec.rb │ │ │ │ │ │ ├── concern │ │ │ │ │ │ │ ├── class_methods_spec.rb │ │ │ │ │ │ │ └── instance_methods_spec.rb │ │ │ │ │ │ ├── concern_spec.rb │ │ │ │ │ │ ├── entities │ │ │ │ │ │ │ ├── callers │ │ │ │ │ │ │ │ ├── alias_spec.rb │ │ │ │ │ │ │ │ ├── base_spec.rb │ │ │ │ │ │ │ │ ├── proc_spec.rb │ │ │ │ │ │ │ │ ├── raw_spec.rb │ │ │ │ │ │ │ │ └── usual_spec.rb │ │ │ │ │ │ │ ├── directions │ │ │ │ │ │ │ │ ├── base_spec.rb │ │ │ │ │ │ │ │ ├── input_spec.rb │ │ │ │ │ │ │ │ └── output_spec.rb │ │ │ │ │ │ │ ├── factories │ │ │ │ │ │ │ │ ├── base_spec.rb │ │ │ │ │ │ │ │ ├── hash │ │ │ │ │ │ │ │ │ ├── base_spec.rb │ │ │ │ │ │ │ │ │ ├── proc_value_spec.rb │ │ │ │ │ │ │ │ │ ├── raw_value_spec.rb │ │ │ │ │ │ │ │ │ ├── string_value_spec.rb │ │ │ │ │ │ │ │ │ └── symbol_value_spec.rb │ │ │ │ │ │ │ │ ├── method_spec.rb │ │ │ │ │ │ │ │ ├── string_spec.rb │ │ │ │ │ │ │ │ └── symbol_spec.rb │ │ │ │ │ │ │ ├── key_spec.rb │ │ │ │ │ │ │ └── name_spec.rb │ │ │ │ │ │ └── exceptions_spec.rb │ │ │ │ │ ├── method_spec.rb │ │ │ │ │ ├── service │ │ │ │ │ │ ├── concern │ │ │ │ │ │ │ ├── class_methods_spec.rb │ │ │ │ │ │ │ └── instance_methods_spec.rb │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ ├── service_spec.rb │ │ │ │ │ ├── step │ │ │ │ │ │ ├── commands │ │ │ │ │ │ │ ├── cast_params_spec.rb │ │ │ │ │ │ │ └── extract_params_spec.rb │ │ │ │ │ │ ├── concern │ │ │ │ │ │ │ └── instance_methods_spec.rb │ │ │ │ │ │ ├── concern_spec.rb │ │ │ │ │ │ ├── exceptions_spec.rb │ │ │ │ │ │ ├── plugins │ │ │ │ │ │ │ ├── aliases_spec.rb │ │ │ │ │ │ │ ├── can_be_completed │ │ │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ │ ├── can_be_method_step │ │ │ │ │ │ │ │ ├── commands │ │ │ │ │ │ │ │ │ └── calculate_method_result_spec.rb │ │ │ │ │ │ │ │ ├── concern_spec.rb │ │ │ │ │ │ │ │ ├── exceptions_spec.rb │ │ │ │ │ │ │ │ └── middleware_spec.rb │ │ │ │ │ │ │ ├── can_be_service_step │ │ │ │ │ │ │ │ ├── commands │ │ │ │ │ │ │ │ │ └── calculate_service_result_spec.rb │ │ │ │ │ │ │ │ ├── concern_spec.rb │ │ │ │ │ │ │ │ ├── exceptions_spec.rb │ │ │ │ │ │ │ │ └── middleware_spec.rb │ │ │ │ │ │ │ ├── can_have_fallbacks │ │ │ │ │ │ │ │ ├── concern_spec.rb │ │ │ │ │ │ │ │ ├── exceptions_spec.rb │ │ │ │ │ │ │ │ └── middleware_spec.rb │ │ │ │ │ │ │ ├── can_have_parent_result │ │ │ │ │ │ │ │ └── middleware_spec.rb │ │ │ │ │ │ │ ├── has_amazing_print_inspect │ │ │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ │ ├── has_awesome_print_inspect │ │ │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ │ ├── has_inspect │ │ │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ │ ├── has_result │ │ │ │ │ │ │ │ ├── concern_spec.rb │ │ │ │ │ │ │ │ ├── exceptions_spec.rb │ │ │ │ │ │ │ │ └── middleware_spec.rb │ │ │ │ │ │ │ └── raises_on_not_result_return_value │ │ │ │ │ │ │ │ └── middleware_spec.rb │ │ │ │ │ │ └── structs │ │ │ │ │ │ │ └── params_spec.rb │ │ │ │ │ └── step_spec.rb │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── can_have_steps_spec.rb │ │ │ │ ├── can_have_stubbed_results │ │ │ │ ├── commands │ │ │ │ │ ├── fetch_all_services_stubbed_results_cache_spec.rb │ │ │ │ │ ├── fetch_service_stubbed_results_cache_spec.rb │ │ │ │ │ └── set_service_stubbed_result_spec.rb │ │ │ │ ├── concern_spec.rb │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── can_not_be_inherited │ │ │ │ ├── concern_spec.rb │ │ │ │ └── exceptions_spec.rb │ │ │ │ ├── collects_services_in_exception │ │ │ │ ├── commands │ │ │ │ │ └── extract_service_details_spec.rb │ │ │ │ ├── constants_spec.rb │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── counts_stubbed_results_invocations │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── forbids_convenient_service_entities_as_constructor_arguments │ │ │ │ ├── exceptions_spec.rb │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── has_amazing_print_inspect │ │ │ │ └── concern_spec.rb │ │ │ │ ├── has_awesome_print_inspect │ │ │ │ └── concern_spec.rb │ │ │ │ ├── has_inspect │ │ │ │ └── concern_spec.rb │ │ │ │ ├── has_j_send_result │ │ │ │ ├── commands │ │ │ │ │ ├── create_result_class_spec.rb │ │ │ │ │ └── is_result_spec.rb │ │ │ │ ├── concern │ │ │ │ │ ├── class_methods_spec.rb │ │ │ │ │ └── instance_methods_spec.rb │ │ │ │ ├── concern_spec.rb │ │ │ │ ├── constants_spec.rb │ │ │ │ ├── container_spec.rb │ │ │ │ └── entities │ │ │ │ │ ├── result │ │ │ │ │ └── plugins │ │ │ │ │ │ ├── aliases_spec.rb │ │ │ │ │ │ ├── can_be_from_exception │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ ├── can_be_from_fallback │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ ├── can_be_own_result │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ ├── can_be_stubbed_result │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ ├── can_have_checked_status │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ ├── can_have_parent_result │ │ │ │ │ │ ├── concern_spec.rb │ │ │ │ │ │ └── constants_spec.rb │ │ │ │ │ │ ├── can_have_step │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ ├── has_amazing_print_inspect │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ ├── has_awesome_print_inspect │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ ├── has_inspect │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ ├── has_j_send_status_and_attributes │ │ │ │ │ │ ├── commands │ │ │ │ │ │ │ ├── cast_j_send_attributes_spec.rb │ │ │ │ │ │ │ ├── create_code_class_spec.rb │ │ │ │ │ │ │ ├── create_data_class_spec.rb │ │ │ │ │ │ │ ├── create_message_class_spec.rb │ │ │ │ │ │ │ └── create_status_class_spec.rb │ │ │ │ │ │ ├── concern │ │ │ │ │ │ │ ├── class_methods_spec.rb │ │ │ │ │ │ │ └── instance_methods_spec.rb │ │ │ │ │ │ ├── concern_spec.rb │ │ │ │ │ │ ├── entities │ │ │ │ │ │ │ ├── code │ │ │ │ │ │ │ │ ├── commands │ │ │ │ │ │ │ │ │ └── is_code_spec.rb │ │ │ │ │ │ │ │ ├── concern │ │ │ │ │ │ │ │ │ ├── class_methods_spec.rb │ │ │ │ │ │ │ │ │ └── instance_methods_spec.rb │ │ │ │ │ │ │ │ ├── concern_spec.rb │ │ │ │ │ │ │ │ └── plugins │ │ │ │ │ │ │ │ │ ├── aliases_spec.rb │ │ │ │ │ │ │ │ │ ├── has_amazing_print_inspect │ │ │ │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ │ │ │ ├── has_awesome_print_inspect │ │ │ │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ │ │ │ └── has_inspect │ │ │ │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ │ ├── code_spec.rb │ │ │ │ │ │ │ ├── data │ │ │ │ │ │ │ │ ├── commands │ │ │ │ │ │ │ │ │ └── is_data_spec.rb │ │ │ │ │ │ │ │ ├── concern │ │ │ │ │ │ │ │ │ ├── class_methods_spec.rb │ │ │ │ │ │ │ │ │ └── instance_methods_spec.rb │ │ │ │ │ │ │ │ ├── concern_spec.rb │ │ │ │ │ │ │ │ └── plugins │ │ │ │ │ │ │ │ │ ├── aliases_spec.rb │ │ │ │ │ │ │ │ │ ├── has_amazing_print_inspect │ │ │ │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ │ │ │ ├── has_awesome_print_inspect │ │ │ │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ │ │ │ └── has_inspect │ │ │ │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ │ ├── data_spec.rb │ │ │ │ │ │ │ ├── message │ │ │ │ │ │ │ │ ├── commands │ │ │ │ │ │ │ │ │ └── is_message_spec.rb │ │ │ │ │ │ │ │ ├── concern │ │ │ │ │ │ │ │ │ ├── class_methods_spec.rb │ │ │ │ │ │ │ │ │ └── instance_methods_spec.rb │ │ │ │ │ │ │ │ ├── concern_spec.rb │ │ │ │ │ │ │ │ └── plugins │ │ │ │ │ │ │ │ │ ├── aliases_spec.rb │ │ │ │ │ │ │ │ │ ├── has_amazing_print_inspect │ │ │ │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ │ │ │ ├── has_awesome_print_inspect │ │ │ │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ │ │ │ └── has_inspect │ │ │ │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ │ ├── message_spec.rb │ │ │ │ │ │ │ ├── status │ │ │ │ │ │ │ │ ├── commands │ │ │ │ │ │ │ │ │ └── is_status_spec.rb │ │ │ │ │ │ │ │ ├── concern │ │ │ │ │ │ │ │ │ ├── class_methods_spec.rb │ │ │ │ │ │ │ │ │ └── instance_methods_spec.rb │ │ │ │ │ │ │ │ ├── concern_spec.rb │ │ │ │ │ │ │ │ └── plugins │ │ │ │ │ │ │ │ │ ├── aliases_spec.rb │ │ │ │ │ │ │ │ │ ├── can_be_checked │ │ │ │ │ │ │ │ │ ├── concern_spec.rb │ │ │ │ │ │ │ │ │ └── middleware_spec.rb │ │ │ │ │ │ │ │ │ ├── has_amazing_print_inspect │ │ │ │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ │ │ │ ├── has_awesome_print_inspect │ │ │ │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ │ │ │ └── has_inspect │ │ │ │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ │ └── status_spec.rb │ │ │ │ │ │ ├── exceptions_spec.rb │ │ │ │ │ │ ├── middleware_spec.rb │ │ │ │ │ │ └── structs │ │ │ │ │ │ │ └── j_send_attributes_spec.rb │ │ │ │ │ │ ├── has_negated_result │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ ├── has_pattern_matching_support │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ ├── has_stubbed_result_invocations_counter │ │ │ │ │ │ ├── concern_spec.rb │ │ │ │ │ │ └── middleware_spec.rb │ │ │ │ │ │ ├── helps_to_learn_similarities_with_common_objects │ │ │ │ │ │ ├── concern │ │ │ │ │ │ │ └── instance_methods_spec.rb │ │ │ │ │ │ └── concern_spec.rb │ │ │ │ │ │ └── raises_on_not_checked_result_status │ │ │ │ │ │ ├── exceptions_spec.rb │ │ │ │ │ │ └── middleware_spec.rb │ │ │ │ │ └── result_spec.rb │ │ │ │ ├── has_j_send_result_params_validations │ │ │ │ ├── using_active_model_validations │ │ │ │ │ ├── concern_spec.rb │ │ │ │ │ └── middleware_spec.rb │ │ │ │ └── using_dry_validation │ │ │ │ │ ├── concern │ │ │ │ │ └── class_methods_spec.rb │ │ │ │ │ ├── concern_spec.rb │ │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── has_j_send_result_short_syntax │ │ │ │ ├── concern │ │ │ │ │ └── class_methods_spec.rb │ │ │ │ ├── concern_spec.rb │ │ │ │ ├── error │ │ │ │ │ ├── exceptions_spec.rb │ │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── failure │ │ │ │ │ ├── exceptions_spec.rb │ │ │ │ │ └── middleware_spec.rb │ │ │ │ └── success │ │ │ │ │ ├── commands │ │ │ │ │ └── refute_kwargs_contain_j_send_and_extra_keys_spec.rb │ │ │ │ │ ├── exceptions_spec.rb │ │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── has_j_send_result_spec.rb │ │ │ │ ├── has_j_send_result_status_check_short_syntax │ │ │ │ └── concern │ │ │ │ │ └── class_methods_spec.rb │ │ │ │ ├── has_mermaid_flowchart │ │ │ │ ├── concern_spec.rb │ │ │ │ └── entities │ │ │ │ │ ├── flowchart │ │ │ │ │ ├── entities │ │ │ │ │ │ ├── code │ │ │ │ │ │ │ └── commands │ │ │ │ │ │ │ │ ├── generate_lines_spec.rb │ │ │ │ │ │ │ │ ├── generate_method_step_lines_spec.rb │ │ │ │ │ │ │ │ ├── generate_result_lines_spec.rb │ │ │ │ │ │ │ │ ├── generate_service_lines_spec.rb │ │ │ │ │ │ │ │ └── generate_service_step_lines_spec.rb │ │ │ │ │ │ ├── code_spec.rb │ │ │ │ │ │ ├── settings_spec.rb │ │ │ │ │ │ └── template_spec.rb │ │ │ │ │ └── templates │ │ │ │ │ │ └── flowchart_spec.rb │ │ │ │ │ └── flowchart_spec.rb │ │ │ │ ├── has_negated_j_send_result │ │ │ │ └── concern_spec.rb │ │ │ │ ├── has_negated_result │ │ │ │ ├── concern_spec.rb │ │ │ │ └── exceptions_spec.rb │ │ │ │ ├── has_result │ │ │ │ ├── concern_spec.rb │ │ │ │ └── exceptions_spec.rb │ │ │ │ ├── raises_on_double_result │ │ │ │ ├── exceptions_spec.rb │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── raises_on_not_result_return_value │ │ │ │ ├── exceptions_spec.rb │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── rescues_result_unhandled_exceptions │ │ │ │ ├── commands │ │ │ │ │ ├── format_backtrace_spec.rb │ │ │ │ │ ├── format_exception_spec.rb │ │ │ │ │ └── format_line_spec.rb │ │ │ │ ├── constants_spec.rb │ │ │ │ └── middleware_spec.rb │ │ │ │ ├── sets_parent_to_foreign_result │ │ │ │ └── middleware_spec.rb │ │ │ │ └── wraps_result_in_d_b_transaction │ │ │ │ └── using_active_record_base_transaction │ │ │ │ └── middleware_spec.rb │ │ ├── specification_spec.rb │ │ ├── support │ │ │ ├── abstract_method │ │ │ │ └── exceptions_spec.rb │ │ │ ├── abstract_method_spec.rb │ │ │ ├── arguments │ │ │ │ ├── exceptions_spec.rb │ │ │ │ └── null_arguments_spec.rb │ │ │ ├── arguments_spec.rb │ │ │ ├── backtrace_cleaner_spec.rb │ │ │ ├── cache │ │ │ │ ├── constants_spec.rb │ │ │ │ ├── entities │ │ │ │ │ ├── caches │ │ │ │ │ │ ├── array │ │ │ │ │ │ │ └── entities │ │ │ │ │ │ │ │ └── pair_spec.rb │ │ │ │ │ │ ├── array_spec.rb │ │ │ │ │ │ ├── base_spec.rb │ │ │ │ │ │ ├── hash_spec.rb │ │ │ │ │ │ ├── thread_safe_array_spec.rb │ │ │ │ │ │ └── thread_safe_hash_spec.rb │ │ │ │ │ └── key_spec.rb │ │ │ │ └── exceptions_spec.rb │ │ │ ├── cache_spec.rb │ │ │ ├── castable │ │ │ │ └── exceptions_spec.rb │ │ │ ├── castable_spec.rb │ │ │ ├── command_spec.rb │ │ │ ├── copyable_spec.rb │ │ │ ├── counter_spec.rb │ │ │ ├── delegate_spec.rb │ │ │ ├── dependency_container │ │ │ │ ├── commands │ │ │ │ │ ├── assert_valid_container_spec.rb │ │ │ │ │ ├── assert_valid_method_spec.rb │ │ │ │ │ ├── assert_valid_scope_spec.rb │ │ │ │ │ └── import_method_spec.rb │ │ │ │ ├── constants_spec.rb │ │ │ │ ├── container_spec.rb │ │ │ │ ├── entities │ │ │ │ │ ├── method_collection_spec.rb │ │ │ │ │ ├── method_spec.rb │ │ │ │ │ ├── namespace_collection_spec.rb │ │ │ │ │ └── namespace_spec.rb │ │ │ │ ├── exceptions_spec.rb │ │ │ │ ├── export_spec.rb │ │ │ │ └── import_spec.rb │ │ │ ├── finite_loop_spec.rb │ │ │ ├── method_parameters_spec.rb │ │ │ ├── middleware │ │ │ │ ├── stack_builder │ │ │ │ │ ├── constants_spec.rb │ │ │ │ │ ├── entities │ │ │ │ │ │ └── builders │ │ │ │ │ │ │ ├── rack │ │ │ │ │ │ │ └── exceptions_spec.rb │ │ │ │ │ │ │ ├── rack_spec.rb │ │ │ │ │ │ │ ├── ruby_middleware_spec.rb │ │ │ │ │ │ │ ├── stateful │ │ │ │ │ │ │ └── exceptions_spec.rb │ │ │ │ │ │ │ └── stateful_spec.rb │ │ │ │ │ └── exceptions_spec.rb │ │ │ │ └── stack_builder_spec.rb │ │ │ ├── never_reach_here_spec.rb │ │ │ ├── not_passed_spec.rb │ │ │ ├── raw_value_spec.rb │ │ │ ├── safe_method_spec.rb │ │ │ ├── thread_safe_counter_spec.rb │ │ │ ├── undefined_spec.rb │ │ │ ├── unique_value_spec.rb │ │ │ └── value_spec.rb │ │ ├── utils │ │ │ ├── array │ │ │ │ ├── contain_exactly_spec.rb │ │ │ │ ├── drop_while_spec.rb │ │ │ │ ├── exceptions_spec.rb │ │ │ │ ├── find_last_spec.rb │ │ │ │ ├── find_yield_spec.rb │ │ │ │ ├── keep_after_spec.rb │ │ │ │ ├── limited_push_spec.rb │ │ │ │ ├── merge_spec.rb │ │ │ │ ├── rjust_spec.rb │ │ │ │ └── wrap_spec.rb │ │ │ ├── array_spec.rb │ │ │ ├── bool │ │ │ │ ├── to_bool_spec.rb │ │ │ │ └── to_env_bool_spec.rb │ │ │ ├── bool_spec.rb │ │ │ ├── class │ │ │ │ ├── display_name_spec.rb │ │ │ │ └── get_attached_object_spec.rb │ │ │ ├── class_spec.rb │ │ │ ├── hash │ │ │ │ ├── assert_valid_keys_spec.rb │ │ │ │ ├── except_spec.rb │ │ │ │ └── triple_equality_compare_spec.rb │ │ │ ├── hash_spec.rb │ │ │ ├── kernel │ │ │ │ └── silence_warnings_spec.rb │ │ │ ├── kernel_spec.rb │ │ │ ├── method │ │ │ │ ├── defined_spec.rb │ │ │ │ ├── name │ │ │ │ │ └── append_spec.rb │ │ │ │ ├── name_spec.rb │ │ │ │ └── remove_spec.rb │ │ │ ├── method_spec.rb │ │ │ ├── module │ │ │ │ ├── class_method_defined_spec.rb │ │ │ │ ├── exceptions_spec.rb │ │ │ │ ├── fetch_own_const_spec.rb │ │ │ │ ├── get_namespace_spec.rb │ │ │ │ ├── get_own_const_spec.rb │ │ │ │ ├── get_own_instance_method_spec.rb │ │ │ │ ├── has_own_instance_method_spec.rb │ │ │ │ ├── include_module_spec.rb │ │ │ │ └── instance_method_defined_spec.rb │ │ │ ├── module_spec.rb │ │ │ ├── object │ │ │ │ ├── clamp_class_spec.rb │ │ │ │ ├── duck_class_spec.rb │ │ │ │ ├── get_own_method_spec.rb │ │ │ │ ├── instance_variable_delete_spec.rb │ │ │ │ ├── instance_variable_fetch_spec.rb │ │ │ │ ├── memoize_including_falsy_values_spec.rb │ │ │ │ ├── resolve_type_spec.rb │ │ │ │ ├── safe_send_spec.rb │ │ │ │ └── with_one_time_object_spec.rb │ │ │ ├── object_spec.rb │ │ │ ├── proc │ │ │ │ ├── conjunct_spec.rb │ │ │ │ ├── display_spec.rb │ │ │ │ └── exec_config_spec.rb │ │ │ ├── proc_spec.rb │ │ │ ├── string │ │ │ │ ├── camelize_spec.rb │ │ │ │ ├── demodulize_spec.rb │ │ │ │ ├── enclose_spec.rb │ │ │ │ ├── split_spec.rb │ │ │ │ └── truncate_spec.rb │ │ │ └── string_spec.rb │ │ └── utils_spec.rb │ └── convenient_service_spec.rb ├── memo_wise_helper.rb ├── rails_helper.rb ├── spec_helper.rb ├── standard_helper.rb └── support │ ├── break.rb │ ├── convenient_service.rb │ ├── convenient_service │ ├── amazing_print.rb │ ├── awesome_print.rb │ ├── dry.rb │ ├── memo_wise.rb │ ├── rails.rb │ └── standard.rb │ ├── faker.rb │ ├── shoulda_matchers.rb │ ├── shoulda_matchers │ └── rails.rb │ ├── thread_backtraces.rb │ └── timeout_debug.rb ├── test ├── coverage_helper.rb ├── lib │ └── convenient_service │ │ ├── dependencies │ │ └── extractions │ │ │ ├── active_support_backtrace_cleaner │ │ │ └── backtrace_cleaner_test.rb │ │ │ └── active_support_concern │ │ │ └── concern_test.rb │ │ ├── feature │ │ └── configs │ │ │ └── standard_test.rb │ │ ├── service │ │ └── configs │ │ │ └── standard_test.rb │ │ └── support │ │ └── gems │ │ └── rspec_test.rb └── test_helper.rb └── yard ├── yard-convenient_service_concern.rb └── yard-convenient_service_exclude_self_classes.rb /.dockerignore: -------------------------------------------------------------------------------- 1 | Gemfile.lock 2 | -------------------------------------------------------------------------------- /.gem_release.yml: -------------------------------------------------------------------------------- 1 | quiet: false 2 | 3 | ## 4 | # NOTE: `release` options. 5 | # https://github.com/svenfuchs/gem-release#gem-release 6 | # 7 | release: 8 | color: true 9 | host: https://rubygems.org 10 | recurse: false 11 | key: convenient_service 12 | -------------------------------------------------------------------------------- /.inch.yml: -------------------------------------------------------------------------------- 1 | ## 2 | # Configures Inch (inch gives you hints where to improve your docs). 3 | # https://github.com/rrrene/inch#configuration 4 | # 5 | files: 6 | included: 7 | - lib/**/*.rb 8 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 3.4.0 2 | -------------------------------------------------------------------------------- /.tool-versions: -------------------------------------------------------------------------------- 1 | ruby 3.4.0 2 | -------------------------------------------------------------------------------- /.vscode/yservice.code-snippets: -------------------------------------------------------------------------------- 1 | /** 2 | * AUTHOR: Marian Kostyk 3 | * LICENSE: LGPLv3 4 | */ 5 | 6 | { 7 | //// 8 | // NOTE: `.code-snippets` files support only C-style comments. 9 | // NOTE: More information about VS Code Snippets can be found here: 10 | // - https://code.visualstudio.com/docs/editor/userdefinedsnippets 11 | // 12 | "YARD type for ConvenientService::Service": { 13 | "scope": "ruby", 14 | "prefix": "yservice", 15 | "body": [ 16 | "[ConvenientService::Service]", 17 | ], 18 | "description": "YARD type for ConvenientService::Service" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /.yardopts: -------------------------------------------------------------------------------- 1 | --markup markdown 2 | --markup-provider commonmarker 3 | --output-dir docs/api 4 | --no-private 5 | --tag internal 6 | --hide-tag internal 7 | --tag license 8 | --hide-tag license 9 | --plugin convenient_service_concern 10 | --plugin convenient_service_exclude_self_classes 11 | 'lib/**/*.rb' 12 | - 13 | README.md 14 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) Convenient Service Organization 2 | 3 | Convenient Service is an Open Source project licensed under the terms of 4 | the LGPLv3 license. Please see 5 | for license text. 6 | 7 | Convenient Service Pro has a commercial-friendly license. 8 | You can find the commercial license in COMM-LICENSE.txt. 9 | Please see http://convenientservice.org for purchasing options. 10 | -------------------------------------------------------------------------------- /benchmark/implementation/commit_config/ips.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "bundler/setup" 9 | require "convenient_service" 10 | require "benchmark/ips" 11 | 12 | class Service 13 | include ConvenientService::Standard::Config 14 | end 15 | 16 | Service.commit_config! # Warmup. 17 | 18 | Benchmark.ips do |x| 19 | x.time = 10 # Seconds. 20 | x.warmup = 0 # No additional warmup required. It is already performed outside. 21 | 22 | x.report("`.commit_config?`") { Service.commit_config! } 23 | end 24 | -------------------------------------------------------------------------------- /coverage/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marian13/convenient_service/b870265562f6969a78e6b69df49cb23d10d21da8/coverage/.gitkeep -------------------------------------------------------------------------------- /docs/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marian13/convenient_service/b870265562f6969a78e6b69df49cb23d10d21da8/docs/.gitkeep -------------------------------------------------------------------------------- /docs/api/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marian13/convenient_service/b870265562f6969a78e6b69df49cb23d10d21da8/docs/api/.gitkeep -------------------------------------------------------------------------------- /lib/convenient_service/aliases.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ## 9 | # @internal 10 | # NOTE: Aliases hide the full constants path from the end-users in order to increase DX. 11 | # - https://en.wikipedia.org/wiki/User_experience#Developer_experience 12 | # 13 | module ConvenientService 14 | Command = ::ConvenientService::Support::Command 15 | Concern = ::ConvenientService::Support::Concern 16 | DependencyContainer = ::ConvenientService::Support::DependencyContainer 17 | end 18 | -------------------------------------------------------------------------------- /lib/convenient_service/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/is_service_class" 9 | require_relative "commands/is_service" 10 | 11 | require_relative "commands/is_feature_class" 12 | require_relative "commands/is_feature" 13 | -------------------------------------------------------------------------------- /lib/convenient_service/common.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "common/plugins" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/aliases.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Plugins 10 | Common = ::ConvenientService::Common::Plugins 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/assigns_attributes_in_constructor/using_active_model_attribute_assignment.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "using_active_model_attribute_assignment/concern" 9 | require_relative "using_active_model_attribute_assignment/middleware" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/assigns_attributes_in_constructor/using_dry_initializer.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "using_dry_initializer/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/caches_constructor_arguments.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "caches_constructor_arguments/concern" 9 | require_relative "caches_constructor_arguments/middleware" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/caches_return_value.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "caches_return_value/middleware" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/can_be_copied.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_be_copied/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/can_have_callbacks.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_have_callbacks/concern" 9 | require_relative "can_have_callbacks/entities" 10 | require_relative "can_have_callbacks/exceptions" 11 | require_relative "can_have_callbacks/middleware" 12 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/can_have_callbacks/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/callback_collection" 9 | require_relative "entities/callback" 10 | require_relative "entities/type_collection" 11 | require_relative "entities/type" 12 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/can_have_not_passed_arguments.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_have_not_passed_arguments/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/can_have_user_provided_entity.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_have_user_provided_entity/commands" 9 | require_relative "can_have_user_provided_entity/container" 10 | require_relative "can_have_user_provided_entity/exceptions" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/can_have_user_provided_entity/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/find_or_create_entity" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/can_have_user_provided_entity/container.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Common 10 | module Plugins 11 | module CanHaveUserProvidedEntity 12 | module Container 13 | include Support::DependencyContainer::Export 14 | 15 | export :"commands.FindOrCreateEntity" do 16 | Commands::FindOrCreateEntity 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/can_utilize_finite_loop.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_utilize_finite_loop/concern" 9 | require_relative "can_utilize_finite_loop/constants" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/cleans_exception_backtrace.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "cleans_exception_backtrace/middleware" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/ensures_negated_j_send_result.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "ensures_negated_j_send_result/middleware" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/has_attributes/using_active_model_attributes.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "using_active_model_attributes/concern" 9 | require_relative "using_active_model_attributes/patches" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/has_attributes/using_active_model_attributes/concern.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Common 10 | module Plugins 11 | module HasAttributes 12 | module UsingActiveModelAttributes 13 | module Concern 14 | include Support::Concern 15 | 16 | included do |service_class| 17 | service_class.include Patches::ActiveModelAttributes 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/has_attributes/using_active_model_attributes/patches.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "patches/active_model_attributes" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/has_constructor.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_constructor/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/has_constructor_without_initialize.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_constructor_without_initialize/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/has_instance_proxy.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_instance_proxy/commands" 9 | require_relative "has_instance_proxy/concern" 10 | require_relative "has_instance_proxy/entities" 11 | require_relative "has_instance_proxy/middleware" 12 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/has_instance_proxy/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/create_instance_proxy_class" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/has_instance_proxy/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/instance_proxy" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/has_internals.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_internals/commands" 9 | require_relative "has_internals/concern" 10 | require_relative "has_internals/entities" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/has_internals/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/create_internals_class" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/has_internals/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/internals" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/has_internals/entities/internals.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "internals/concern" 9 | require_relative "internals/plugins" 10 | 11 | module ConvenientService 12 | module Common 13 | module Plugins 14 | module HasInternals 15 | module Entities 16 | class Internals 17 | include Concern 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/has_internals/entities/internals/plugins.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "plugins/has_cache" 9 | 10 | require_relative "plugins/aliases" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/has_internals/entities/internals/plugins/aliases.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Plugins 10 | Internals = ::ConvenientService::Common::Plugins::HasInternals::Entities::Internals::Plugins 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/has_internals/entities/internals/plugins/has_cache.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_cache/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/has_j_send_result_duck_short_syntax.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_j_send_result_duck_short_syntax/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/has_memoization/using_memo_wise.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "using_memo_wise/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/common/plugins/has_memoization/using_memo_wise/concern.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Common 10 | module Plugins 11 | module HasMemoization 12 | module UsingMemoWise 13 | module Concern 14 | include Support::Concern 15 | 16 | included do 17 | prepend ::MemoWise 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /lib/convenient_service/config/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/normalize_options" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/config/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/options" 9 | require_relative "entities/option" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/core/aliases.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | ConcernMiddleware = ::ConvenientService::Core::Entities::Config::Entities::Concerns::Entities::Middleware 10 | 11 | MethodClassicMiddleware = ::ConvenientService::Core::Entities::Config::Entities::MethodMiddlewares::Entities::Middlewares::Classic 12 | MethodChainMiddleware = ::ConvenientService::Core::Entities::Config::Entities::MethodMiddlewares::Entities::Middlewares::Chain 13 | end 14 | -------------------------------------------------------------------------------- /lib/convenient_service/core/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/config" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/core/entities/config/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/create_entity_class" 9 | require_relative "commands/find_entity_class" 10 | require_relative "commands/find_or_create_entity_class" 11 | require_relative "commands/track_method_missing_commit_trigger" 12 | -------------------------------------------------------------------------------- /lib/convenient_service/core/entities/config/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/concerns" 9 | require_relative "entities/method_middlewares" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/core/entities/config/entities/concerns/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/default_concern" 9 | require_relative "entities/stack" 10 | require_relative "entities/middleware" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/core/entities/config/entities/concerns/entities/default_concern.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Core 10 | module Entities 11 | class Config 12 | module Entities 13 | class Concerns 14 | module Entities 15 | module DefaultConcern 16 | end 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/convenient_service/core/entities/config/entities/concerns/entities/middleware/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/cast_middleware" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/core/entities/config/entities/method_middlewares/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/generate_stack_name" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/core/entities/config/entities/method_middlewares/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/caller" 9 | require_relative "entities/container" 10 | require_relative "entities/middleware_creators" 11 | require_relative "entities/middlewares" 12 | require_relative "entities/stack" 13 | -------------------------------------------------------------------------------- /lib/convenient_service/core/entities/config/entities/method_middlewares/entities/caller/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/cast_caller" 9 | require_relative "commands/define_method_callers" 10 | require_relative "commands/undefine_method_callers" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/core/entities/config/entities/method_middlewares/entities/container/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/cast_container" 9 | require_relative "commands/resolve_methods_middlewares_callers" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware_creators.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "middleware_creators/base" 9 | 10 | require_relative "middleware_creators/observable" 11 | require_relative "middleware_creators/with" 12 | -------------------------------------------------------------------------------- /lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware_creators/observable/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/event" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "middlewares/base" 9 | 10 | require_relative "middlewares/classic" 11 | require_relative "middlewares/chain" 12 | -------------------------------------------------------------------------------- /lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/base/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/create_observable_middleware" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/base/structs.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "structs/intended_method" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/chain/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/create_observable_middleware" 9 | require_relative "commands/normalize_env" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/chain/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/method_chain" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/dependencies.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "dependencies/built_in" 9 | require_relative "dependencies/extractions" 10 | require_relative "dependencies/queries" 11 | 12 | ## 13 | # `ConvenientService::Dependencies` can dynamically require plugins/extensions that have external dependencies. 14 | # 15 | # @internal 16 | # https://github.com/marian13/convenient_service/wiki/Docs:-Dependencies 17 | # 18 | module ConvenientService 19 | module Dependencies 20 | extend Queries 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/convenient_service/dependencies/extractions.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ## 9 | # This file load extracted dependencies. 10 | # 11 | # @internal 12 | # https://github.com/marian13/convenient_service/wiki/Docs:-Dependencies 13 | # 14 | require_relative "extractions/active_support_concern" 15 | require_relative "extractions/active_support_backtrace_cleaner" 16 | require_relative "extractions/ruby_middleware" 17 | -------------------------------------------------------------------------------- /lib/convenient_service/dependencies/extractions/b.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ## 9 | # Works in a similar way as `p`, but for `byebug`. 10 | # @see https://ruby-doc.org/core-2.7.0/Kernel.html#method-i-p 11 | # 12 | def b(*args) 13 | require "byebug" 14 | require "byebug/core" 15 | 16 | ::Byebug.attach 17 | 18 | args.one? ? args.first : args 19 | end 20 | -------------------------------------------------------------------------------- /lib/convenient_service/dependencies/extractions/bb.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ## 9 | # Works in a similar way as `p`, but for `binding.break`. 10 | # @see https://ruby-doc.org/core-2.7.0/Kernel.html#method-i-p 11 | # @see https://github.com/ruby/debug/blob/v1.10.0/lib/debug/prelude.rb#L11 12 | # 13 | def bb(*args) 14 | require "debug" 15 | 16 | binding.break(up_level: 2) 17 | 18 | args.one? ? args.first : args 19 | end 20 | -------------------------------------------------------------------------------- /lib/convenient_service/dependencies/extractions/ce.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ## 9 | # @note `ce` is short for `catch_exception`. 10 | # 11 | # @example 12 | # ce { some_code } 13 | # e = ce { some_code } 14 | # 15 | def ce 16 | yield 17 | 18 | nil 19 | rescue => exception 20 | exception 21 | end 22 | -------------------------------------------------------------------------------- /lib/convenient_service/dependencies/queries/gems.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "gems/active_model" 9 | require_relative "gems/logger" 10 | require_relative "gems/paint" 11 | require_relative "gems/rspec" 12 | -------------------------------------------------------------------------------- /lib/convenient_service/examples/dry/gemfile/dry_service.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "dry_service/config" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/examples/dry/v1/gemfile/dry_service.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "dry_service/config" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/examples/rails/gemfile/rails_service.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "rails_service/config" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/examples/rails/v1/gemfile/rails_service.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "rails_service/config" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/examples/standard/cowsay/services.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "services/build_cloud" 9 | require_relative "services/build_cow" 10 | require_relative "services/print" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/examples/standard/date_time/services.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "services/safe_parse" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/examples/standard/factorial/services.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "services/calculate" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/examples/standard/factorial/utils.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "utils/timeout" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/examples/standard/factorial/utils/timeout.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "timeout/with_timeout" 9 | 10 | module ConvenientService 11 | module Examples 12 | module Standard 13 | class Factorial 14 | module Utils 15 | module Timeout 16 | class << self 17 | def with_timeout(...) 18 | WithTimeout.call(...) 19 | end 20 | end 21 | end 22 | end 23 | end 24 | end 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /lib/convenient_service/examples/standard/request_params/constants.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Examples 10 | module Standard 11 | class RequestParams 12 | module Constants 13 | module Tags 14 | EMPTY = "" 15 | end 16 | end 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /lib/convenient_service/examples/standard/request_params/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/logger" 9 | require_relative "entities/request" 10 | 11 | require_relative "entities/description" 12 | require_relative "entities/format" 13 | require_relative "entities/id" 14 | require_relative "entities/source" 15 | require_relative "entities/tag" 16 | require_relative "entities/title" 17 | -------------------------------------------------------------------------------- /lib/convenient_service/examples/standard/request_params/entities/logger.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Examples 10 | module Standard 11 | class RequestParams 12 | module Entities 13 | class Logger 14 | class << self 15 | def log(message, out: $stdout) 16 | out.puts message 17 | 18 | message 19 | end 20 | end 21 | end 22 | end 23 | end 24 | end 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /lib/convenient_service/examples/standard/request_params/utils.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "utils/array" 9 | require_relative "utils/http" 10 | require_relative "utils/integer" 11 | require_relative "utils/json" 12 | require_relative "utils/object" 13 | require_relative "utils/url" 14 | -------------------------------------------------------------------------------- /lib/convenient_service/examples/standard/request_params/utils/array.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "array/wrap" 9 | 10 | module ConvenientService 11 | module Examples 12 | module Standard 13 | class RequestParams 14 | module Utils 15 | module Array 16 | class << self 17 | def wrap(object) 18 | Wrap.call(object) 19 | end 20 | end 21 | end 22 | end 23 | end 24 | end 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /lib/convenient_service/examples/standard/request_params/utils/http.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "http/request" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/examples/standard/request_params/utils/url.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "url/valid" 9 | 10 | module ConvenientService 11 | module Examples 12 | module Standard 13 | class RequestParams 14 | module Utils 15 | module URL 16 | class << self 17 | def valid?(url) 18 | Valid.call(url) 19 | end 20 | end 21 | end 22 | end 23 | end 24 | end 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /lib/convenient_service/examples/standard/v1/cowsay/services.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "services/build_cloud" 9 | require_relative "services/build_cow" 10 | require_relative "services/print" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/examples/standard/v1/date_time/services.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "services/safe_parse" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/examples/standard/v1/factorial/services.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "services/calculate" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/examples/standard/v1/factorial/utils.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "utils/timeout" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/examples/standard/v1/request_params/constants.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Examples 10 | module Standard 11 | module V1 12 | class RequestParams 13 | module Constants 14 | module Tags 15 | EMPTY = "" 16 | end 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/convenient_service/examples/standard/v1/request_params/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/logger" 9 | require_relative "entities/request" 10 | 11 | require_relative "entities/description" 12 | require_relative "entities/format" 13 | require_relative "entities/id" 14 | require_relative "entities/source" 15 | require_relative "entities/tag" 16 | require_relative "entities/title" 17 | -------------------------------------------------------------------------------- /lib/convenient_service/examples/standard/v1/request_params/utils.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "utils/array" 9 | require_relative "utils/http" 10 | require_relative "utils/integer" 11 | require_relative "utils/json" 12 | require_relative "utils/object" 13 | require_relative "utils/url" 14 | -------------------------------------------------------------------------------- /lib/convenient_service/examples/standard/v1/request_params/utils/http.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "http/request" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/extras/alias.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ## 9 | # NOTE: This file is loaded by `require "convenient_service/alias"`. 10 | # NOTE: This file is expected to be called from app entry points like `initializers` in Rails. 11 | ## 12 | 13 | require "convenient_service" 14 | 15 | ConvenientService::Dependencies.require_alias 16 | -------------------------------------------------------------------------------- /lib/convenient_service/extras/plugins/assigns_attributes_in_constructor/using_dry_initializer.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ## 9 | # NOTE: This file is loaded by `require "convenient_service/extras/plugins/assigns_attributes_in_constructor/using_dry_initializer"`. 10 | # NOTE: This file is expected to be called from app entry points like `initializers` in Rails. 11 | ## 12 | 13 | require "convenient_service" 14 | 15 | ConvenientService::Dependencies.require_assigns_attributes_in_constructor_using_dry_initializer_plugin 16 | -------------------------------------------------------------------------------- /lib/convenient_service/extras/plugins/has_attributes/using_active_model_attributes.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ## 9 | # NOTE: This file is loaded by `require "convenient_service/extras/plugins/has_attributes/using_active_model_attributes"`. 10 | # NOTE: This file is expected to be called from app entry points like `initializers` in Rails. 11 | ## 12 | 13 | require "convenient_service" 14 | 15 | ConvenientService::Dependencies.require_has_attributes_using_active_model_attributes_plugin 16 | -------------------------------------------------------------------------------- /lib/convenient_service/extras/plugins/has_j_send_result_params_validations/using_active_model_validations.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ## 9 | # NOTE: This file is loaded by `require "convenient_service/extras/plugins/has_j_send_result_params_validations/using_active_model_validations"`. 10 | # NOTE: This file is expected to be called from app entry points like `initializers` in Rails. 11 | ## 12 | 13 | require "convenient_service" 14 | 15 | ConvenientService::Dependencies.require_has_j_send_result_params_validations_using_active_model_validations_plugin 16 | -------------------------------------------------------------------------------- /lib/convenient_service/extras/plugins/has_j_send_result_params_validations/using_dry_validation.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ## 9 | # NOTE: This file is loaded by `require "convenient_service/extras/plugins/has_j_send_result_params_validations/using_dry_validation"`. 10 | # NOTE: This file is expected to be called from app entry points like `initializers` in Rails. 11 | ## 12 | 13 | require "convenient_service" 14 | 15 | ConvenientService::Dependencies.require_has_j_send_result_params_validations_using_dry_validation_plugin 16 | -------------------------------------------------------------------------------- /lib/convenient_service/extras/plugins/has_memoization/using_memo_wise.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ## 9 | # NOTE: This file is loaded by `require "convenient_service/extras/plugins/has_memoization/using_memo_wise"`. 10 | # NOTE: This file is expected to be called from app entry points like `initializers` in Rails. 11 | ## 12 | 13 | require "convenient_service" 14 | 15 | ConvenientService::Dependencies.require_has_memoization_using_memo_wise_plugin 16 | -------------------------------------------------------------------------------- /lib/convenient_service/extras/plugins/wraps_result_in_db_transaction/using_active_record_base_transaction.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ## 9 | # NOTE: This file is loaded by `require "convenient_service/extras/plugins/wraps_result_in_db_transaction/using_active_record_base_transaction"`. 10 | # NOTE: This file is expected to be called from app entry points like `initializers` in Rails. 11 | ## 12 | 13 | require "convenient_service" 14 | 15 | ConvenientService::Dependencies.require_wraps_result_in_db_transaction_using_active_record_base_transaction_plugin 16 | -------------------------------------------------------------------------------- /lib/convenient_service/extras/rspec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ## 9 | # NOTE: This file is loaded by `require "convenient_service/extras/rspec"`. 10 | # NOTE: This file is expected to be called from RSpec entry points like `spec_helper.rb`. 11 | ## 12 | 13 | require "convenient_service" 14 | 15 | ConvenientService::Dependencies.require_rspec_extentions 16 | -------------------------------------------------------------------------------- /lib/convenient_service/extras/standard/config/options/active_model_validations.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ## 9 | # NOTE: This file is loaded by `require "convenient_service/extras/standard/config/options/active_model_validations"`. 10 | # NOTE: This file is expected to be called from app entry points like `initializers` in Rails. 11 | ## 12 | 13 | require "convenient_service" 14 | 15 | ConvenientService::Dependencies.require_active_model_validations_standard_config_option 16 | -------------------------------------------------------------------------------- /lib/convenient_service/extras/standard/config/options/amazing_print_inspect.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ## 9 | # NOTE: This file is loaded by `require "convenient_service/extras/standard/config/options/amazing_print_inspect"`. 10 | # NOTE: This file is expected to be called from app entry points like `initializers` in Rails. 11 | ## 12 | 13 | require "convenient_service" 14 | 15 | ConvenientService::Dependencies.require_amazing_print_inspect_standard_config_option 16 | -------------------------------------------------------------------------------- /lib/convenient_service/extras/standard/config/options/awesome_print_inspect.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ## 9 | # NOTE: This file is loaded by `require "convenient_service/extras/standard/config/options/awesome_print_inspect"`. 10 | # NOTE: This file is expected to be called from app entry points like `initializers` in Rails. 11 | ## 12 | 13 | require "convenient_service" 14 | 15 | ConvenientService::Dependencies.require_awesome_print_inspect_standard_config_option 16 | -------------------------------------------------------------------------------- /lib/convenient_service/extras/standard/config/options/dry_initializer.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ## 9 | # NOTE: This file is loaded by `require "convenient_service/extras/standard/config/options/dry_initializer"`. 10 | # NOTE: This file is expected to be called from app entry points like `initializers` in Rails. 11 | ## 12 | 13 | require "convenient_service" 14 | 15 | ConvenientService::Dependencies.require_dry_initializer_standard_config_option 16 | -------------------------------------------------------------------------------- /lib/convenient_service/extras/standard/config/options/memo_wise.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ## 9 | # NOTE: This file is loaded by `require "convenient_service/extras/standard/config/options/memo_wise"`. 10 | # NOTE: This file is expected to be called from app entry points like `initializers` in Rails. 11 | ## 12 | 13 | require "convenient_service" 14 | 15 | ConvenientService::Dependencies.require_memo_wise_standard_config_option 16 | -------------------------------------------------------------------------------- /lib/convenient_service/feature.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "feature/core" 9 | require_relative "feature/plugins" 10 | require_relative "feature/configs" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/feature/configs.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "configs/standard" 9 | 10 | require_relative "configs/aliases" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/feature/configs/aliases.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Feature 10 | module Standard 11 | Config = ::ConvenientService::Feature::Configs::Standard 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /lib/convenient_service/feature/configs/standard/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/is_feature_class" 9 | require_relative "commands/is_feature" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/feature/core.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Feature 10 | module Core 11 | include Support::Concern 12 | 13 | included do 14 | include ::ConvenientService::Core 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/convenient_service/feature/plugins.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "plugins/can_have_entries" 9 | require_relative "plugins/can_have_stubbed_entries" 10 | 11 | require_relative "plugins/aliases" 12 | -------------------------------------------------------------------------------- /lib/convenient_service/feature/plugins/aliases.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Plugins 10 | Feature = ::ConvenientService::Feature::Plugins 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /lib/convenient_service/feature/plugins/can_have_entries.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_have_entries/commands" 9 | require_relative "can_have_entries/concern" 10 | require_relative "can_have_entries/exceptions" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/feature/plugins/can_have_entries/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/define_entries" 9 | require_relative "commands/define_entry" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/feature/plugins/can_have_stubbed_entries.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_have_stubbed_entries/commands" 9 | require_relative "can_have_stubbed_entries/concern" 10 | require_relative "can_have_stubbed_entries/container" 11 | require_relative "can_have_stubbed_entries/middleware" 12 | -------------------------------------------------------------------------------- /lib/convenient_service/feature/plugins/can_have_stubbed_entries/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/fetch_all_features_stubbed_entries_cache" 9 | require_relative "commands/fetch_feature_stubbed_entries_cache" 10 | require_relative "commands/set_feature_stubbed_entry" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/feature/plugins/can_have_stubbed_entries/container.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Feature 10 | module Plugins 11 | module CanHaveStubbedEntries 12 | module Container 13 | include Support::DependencyContainer::Export 14 | 15 | export :"commands.SetFeatureStubbedEntry" do 16 | Commands::SetFeatureStubbedEntry 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "rspec/primitive_helpers" 9 | require_relative "rspec/helpers" 10 | 11 | require_relative "rspec/primitive_matchers" 12 | require_relative "rspec/matchers" 13 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/helpers/classes.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "classes/stub_service" 9 | require_relative "classes/stub_entry" 10 | require_relative "classes/wrap_method" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/helpers/classes/stub_entry/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/stubbed_feature" 9 | require_relative "entities/value_spec" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/helpers/classes/stub_service/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/stubbed_service" 9 | require_relative "entities/result_spec" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/helpers/classes/wrap_method/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/wrapped_method" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/helpers/ignoring_exception.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module Helpers 11 | module IgnoringException 12 | def ignoring_exception(...) 13 | RSpec::PrimitiveHelpers::Classes::IgnoringException.call(...) 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/helpers/wrap_method.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module Helpers 11 | module WrapMethod 12 | def wrap_method(...) 13 | Classes::WrapMethod.call(...) 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/matchers/call_chain_next.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module Matchers 11 | module CallChainNext 12 | def call_chain_next(...) 13 | Classes::CallChainNext.new(...) 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/matchers/classes.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "classes/call_chain_next" 9 | require_relative "classes/export" 10 | require_relative "classes/include_config" 11 | require_relative "classes/results" 12 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/matchers/classes/results.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "results/base" 9 | 10 | require_relative "results/be_error" 11 | require_relative "results/be_failure" 12 | require_relative "results/be_success" 13 | 14 | require_relative "results/be_not_error" 15 | require_relative "results/be_not_failure" 16 | require_relative "results/be_not_success" 17 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/matchers/classes/results/base/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/chain" 9 | require_relative "entities/printers" 10 | require_relative "entities/validator" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/matchers/classes/results/base/entities/printers/error/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/generate_got_jsend_attributes_part" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/matchers/classes/results/base/entities/printers/failure/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/generate_got_jsend_attributes_part" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/matchers/classes/results/base/entities/printers/success/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/generate_got_jsend_attributes_part" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/matchers/delegate_to.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module Matchers 11 | module DelegateTo 12 | def delegate_to(...) 13 | RSpec::PrimitiveMatchers::Classes::DelegateTo.new(...) 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/matchers/export.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module Matchers 11 | module Export 12 | def export(...) 13 | Classes::Export.new(...) 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/matchers/include_config.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module Matchers 11 | module IncludeConfig 12 | def include_config(...) 13 | RSpec::Matchers::Classes::IncludeConfig.new(...) 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/matchers/include_module.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module Matchers 11 | module IncludeModule 12 | def include_module(...) 13 | RSpec::PrimitiveMatchers::Classes::IncludeModule.new(...) 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/matchers/results/be_error.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module Matchers 11 | module Results 12 | module BeError 13 | ## 14 | # @api public 15 | # 16 | def be_error(...) 17 | Classes::Results::BeError.new(...) 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/matchers/results/be_failure.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module Matchers 11 | module Results 12 | module BeFailure 13 | ## 14 | # @api public 15 | # 16 | def be_failure(...) 17 | Classes::Results::BeFailure.new(...) 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/matchers/results/be_not_error.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module Matchers 11 | module Results 12 | module BeNotError 13 | ## 14 | # @api public 15 | # 16 | def be_not_error(...) 17 | Classes::Results::BeNotError.new(...) 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/matchers/results/be_not_failure.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module Matchers 11 | module Results 12 | module BeNotFailure 13 | ## 14 | # @api public 15 | # 16 | def be_not_failure(...) 17 | Classes::Results::BeNotFailure.new(...) 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/matchers/results/be_not_success.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module Matchers 11 | module Results 12 | module BeNotSuccess 13 | ## 14 | # @api public 15 | # 16 | def be_not_success(...) 17 | Classes::Results::BeNotSuccess.new(...) 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/matchers/results/be_success.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module Matchers 11 | module Results 12 | module BeSuccess 13 | ## 14 | # @api public 15 | # 16 | def be_success(...) 17 | Classes::Results::BeSuccess.new(...) 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/primitive_helpers.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "primitive_helpers/classes" 9 | 10 | require_relative "primitive_helpers/ignoring_exception" 11 | require_relative "primitive_helpers/in_threads" 12 | 13 | module ConvenientService 14 | module RSpec 15 | module PrimitiveHelpers 16 | include Support::Concern 17 | 18 | included do 19 | include IgnoringException 20 | include InThreads 21 | end 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/primitive_helpers/classes.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "classes/ignoring_exception" 9 | require_relative "classes/in_threads" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/primitive_helpers/ignoring_exception.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module PrimitiveHelpers 11 | module IgnoringException 12 | def ignoring_exception(...) 13 | Classes::IgnoringException.call(...) 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/primitive_helpers/in_threads.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module PrimitiveHelpers 11 | module InThreads 12 | def in_threads(...) 13 | Classes::InThreads.call(...) 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/primitive_matchers/be_descendant_of.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module PrimitiveMatchers 11 | module BeDescendantOf 12 | def be_descendant_of(...) 13 | Classes::BeDescendantOf.new(...) 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/primitive_matchers/be_direct_descendant_of.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module PrimitiveMatchers 11 | module BeDirectDescendantOf 12 | def be_direct_descendant_of(...) 13 | Classes::BeDirectDescendantOf.new(...) 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/primitive_matchers/cache_its_value.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module PrimitiveMatchers 11 | module CacheItsValue 12 | def cache_its_value(...) 13 | Classes::CacheItsValue.new(...) 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/generate_printable_method" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/delegation" 9 | require_relative "entities/inputs" 10 | require_relative "entities/outputs" 11 | require_relative "entities/sub_matcher_collection" 12 | require_relative "entities/sub_matchers" 13 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "sub_matchers/base" 9 | 10 | require_relative "sub_matchers/arguments" 11 | require_relative "sub_matchers/with_any_arguments" 12 | require_relative "sub_matchers/with_concrete_arguments" 13 | require_relative "sub_matchers/without_arguments" 14 | 15 | require_relative "sub_matchers/return_delegation_value" 16 | require_relative "sub_matchers/return_custom_value" 17 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/arguments/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/apply_stub_to_track_delegations" 9 | require_relative "commands/generate_printable_arguments" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/primitive_matchers/delegate_to.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module PrimitiveMatchers 11 | module DelegateTo 12 | def delegate_to(...) 13 | Classes::DelegateTo.new(...) 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/primitive_matchers/extend_module.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module PrimitiveMatchers 11 | module ExtendModule 12 | def extend_module(...) 13 | Classes::ExtendModule.new(...) 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/primitive_matchers/have_abstract_method.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module PrimitiveMatchers 11 | module HaveAbstractMethod 12 | def have_abstract_method(...) 13 | Classes::HaveAbstractMethod.new(...) 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/primitive_matchers/have_alias_method.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module PrimitiveMatchers 11 | module HaveAliasMethod 12 | def have_alias_method(...) 13 | Classes::HaveAliasMethod.new(...) 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/primitive_matchers/have_attr_accessor.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module PrimitiveMatchers 11 | module HaveAttrAccessor 12 | def have_attr_accessor(...) 13 | Classes::HaveAttrAccessor.new(...) 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/primitive_matchers/have_attr_reader.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module PrimitiveMatchers 11 | module HaveAttrReader 12 | def have_attr_reader(...) 13 | Classes::HaveAttrReader.new(...) 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/primitive_matchers/have_attr_writer.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module PrimitiveMatchers 11 | module HaveAttrWriter 12 | def have_attr_writer(...) 13 | Classes::HaveAttrWriter.new(...) 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/primitive_matchers/include_module.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module PrimitiveMatchers 11 | module IncludeModule 12 | def include_module(...) 13 | Classes::IncludeModule.new(...) 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/primitive_matchers/prepend_module.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module PrimitiveMatchers 11 | module PrependModule 12 | def prepend_module(...) 13 | Classes::PrependModule.new(...) 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/convenient_service/rspec/primitive_matchers/singleton_prepend_module.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module RSpec 10 | module PrimitiveMatchers 11 | module SingletonPrependModule 12 | def singleton_prepend_module(...) 13 | Classes::SingletonPrependModule.new(...) 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/convenient_service/service.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "service/core" 9 | require_relative "service/plugins" 10 | require_relative "service/configs" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/service/configs.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "configs/standard" 9 | 10 | require_relative "configs/aliases" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/service/configs/aliases.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Standard 10 | Config = ::ConvenientService::Service::Configs::Standard 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /lib/convenient_service/service/configs/standard/aliases.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Standard 10 | module V1 11 | Config = ::ConvenientService::Service::Configs::Standard::V1 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /lib/convenient_service/service/configs/standard/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/is_service_class" 9 | require_relative "commands/is_service" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/core.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Service 10 | module Core 11 | include Support::Concern 12 | 13 | included do 14 | include ::ConvenientService::Core 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/aliases.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Plugins 10 | Service = ::ConvenientService::Service::Plugins 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_after_step_callbacks.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_have_after_step_callbacks/middleware" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_around_step_callbacks.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_have_around_step_callbacks/middleware" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_before_step_callbacks.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_have_before_step_callbacks/middleware" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_connected_steps.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_have_connected_steps/concern" 9 | require_relative "can_have_connected_steps/entities" 10 | require_relative "can_have_connected_steps/exceptions" 11 | require_relative "can_have_connected_steps/middleware" 12 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_connected_steps/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/expressions" 9 | require_relative "entities/step_collection" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "expressions/base" 9 | 10 | require_relative "expressions/empty" 11 | require_relative "expressions/scalar" 12 | require_relative "expressions/not" 13 | require_relative "expressions/and" 14 | require_relative "expressions/or" 15 | require_relative "expressions/group" 16 | 17 | require_relative "expressions/if" 18 | require_relative "expressions/else" 19 | require_relative "expressions/complex_if" 20 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_fallbacks.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_have_fallbacks/concern" 9 | require_relative "can_have_fallbacks/exceptions" 10 | require_relative "can_have_fallbacks/middleware" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_recalculations.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_have_recalculations/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_rollbacks.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_have_rollbacks/middleware" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_sequential_steps.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_have_sequential_steps/concern" 9 | require_relative "can_have_sequential_steps/middleware" 10 | require_relative "can_have_sequential_steps/entities" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_sequential_steps/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/step_collection" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_step_aware_collections.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_have_step_aware_enumerables/concern" 9 | require_relative "can_have_step_aware_enumerables/entities" 10 | require_relative "can_have_step_aware_enumerables/exceptions" 11 | 12 | require_relative "can_have_step_aware_enumerables/commands" 13 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_step_aware_enumerables.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_have_step_aware_enumerables/concern" 9 | require_relative "can_have_step_aware_enumerables/entities" 10 | require_relative "can_have_step_aware_enumerables/exceptions" 11 | 12 | require_relative "can_have_step_aware_enumerables/commands" 13 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_step_aware_enumerables/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/cast_step_aware_enumerable" 9 | require_relative "commands/cast_step_aware_enumerator" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_step_aware_enumerables/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/step_aware_enumerables" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/create_step_class" 9 | require_relative "commands/is_step" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/service" 9 | require_relative "entities/method" 10 | require_relative "entities/step" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/method.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "method/commands" 9 | require_relative "method/concern" 10 | require_relative "method/entities" 11 | require_relative "method/exceptions" 12 | 13 | module ConvenientService 14 | module Service 15 | module Plugins 16 | module CanHaveSteps 17 | module Entities 18 | class Method 19 | include Concern 20 | end 21 | end 22 | end 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/method/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/cast_method_factory" 9 | require_relative "commands/cast_method_direction" 10 | require_relative "commands/cast_method" 11 | require_relative "commands/define_method_in_container" 12 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/method/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/directions" 9 | require_relative "entities/factories" 10 | require_relative "entities/callers" 11 | require_relative "entities/key" 12 | require_relative "entities/name" 13 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "callers/base" 9 | require_relative "callers/alias" 10 | require_relative "callers/proc" 11 | require_relative "callers/raw" 12 | require_relative "callers/usual" 13 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/directions.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "directions/base" 9 | require_relative "directions/input" 10 | require_relative "directions/output" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/factories.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "factories/base" 9 | require_relative "factories/hash" 10 | require_relative "factories/method" 11 | require_relative "factories/string" 12 | require_relative "factories/symbol" 13 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/factories/hash.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "hash/base" 9 | require_relative "hash/proc_value" 10 | require_relative "hash/raw_value" 11 | require_relative "hash/string_value" 12 | require_relative "hash/symbol_value" 13 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/step.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "step/commands" 9 | require_relative "step/concern" 10 | require_relative "step/exceptions" 11 | require_relative "step/plugins" 12 | require_relative "step/structs" 13 | 14 | module ConvenientService 15 | module Service 16 | module Plugins 17 | module CanHaveSteps 18 | module Entities 19 | class Step 20 | include Concern 21 | end 22 | end 23 | end 24 | end 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/step/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/extract_params" 9 | require_relative "commands/cast_params" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "plugins/has_result" 9 | 10 | require_relative "plugins/can_be_completed" 11 | require_relative "plugins/can_be_service_step" 12 | require_relative "plugins/can_be_method_step" 13 | require_relative "plugins/can_have_fallbacks" 14 | require_relative "plugins/can_have_parent_result" 15 | require_relative "plugins/has_inspect" 16 | require_relative "plugins/raises_on_not_result_return_value" 17 | 18 | require_relative "plugins/aliases" 19 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/aliases.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Plugins 10 | Step = ::ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Plugins 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_completed.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_be_completed/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_method_step.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_be_method_step/commands" 9 | require_relative "can_be_method_step/concern" 10 | require_relative "can_be_method_step/exceptions" 11 | require_relative "can_be_method_step/middleware" 12 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_method_step/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/calculate_method_result" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_service_step.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_be_service_step/commands" 9 | require_relative "can_be_service_step/concern" 10 | require_relative "can_be_service_step/exceptions" 11 | require_relative "can_be_service_step/middleware" 12 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_service_step/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/calculate_service_result" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_alternative_steps.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_have_alternative_steps/middleware" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_fallbacks.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_have_fallbacks/concern" 9 | require_relative "can_have_fallbacks/exceptions" 10 | require_relative "can_have_fallbacks/middleware" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_parent_result.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_have_parent_result/middleware" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_amazing_print_inspect.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_amazing_print_inspect/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_awesome_print_inspect.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_awesome_print_inspect/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_inspect.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_inspect/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_result.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_result/concern" 9 | require_relative "has_result/exceptions" 10 | require_relative "has_result/middleware" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/raises_on_not_result_return_value.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "raises_on_not_result_return_value/exceptions" 9 | require_relative "raises_on_not_result_return_value/middleware" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_steps/entities/step/structs.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "structs/params" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_stubbed_results.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_have_stubbed_results/commands" 9 | require_relative "can_have_stubbed_results/concern" 10 | require_relative "can_have_stubbed_results/container" 11 | require_relative "can_have_stubbed_results/middleware" 12 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_stubbed_results/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/fetch_all_services_stubbed_results_cache" 9 | require_relative "commands/fetch_service_stubbed_results_cache" 10 | require_relative "commands/set_service_stubbed_result" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_have_stubbed_results/container.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Service 10 | module Plugins 11 | module CanHaveStubbedResults 12 | module Container 13 | include Support::DependencyContainer::Export 14 | 15 | export :"commands.SetServiceStubbedResult" do 16 | Commands::SetServiceStubbedResult 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/can_not_be_inherited.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_not_be_inherited/concern" 9 | require_relative "can_not_be_inherited/exceptions" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/collects_services_in_exception.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "collects_services_in_exception/commands" 9 | require_relative "collects_services_in_exception/constants" 10 | require_relative "collects_services_in_exception/middleware" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/collects_services_in_exception/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/extract_service_details" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/collects_services_in_exception/constants.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Service 10 | module Plugins 11 | module CollectsServicesInException 12 | module Constants 13 | ## 14 | # @return [Integer] 15 | # 16 | DEFAULT_MAX_SERVICES_SIZE = 1_000 17 | end 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/counts_stubbed_results_invocations.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "counts_stubbed_results_invocations/middleware" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/forbids_convenient_service_entities_as_constructor_arguments.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "forbids_convenient_service_entities_as_constructor_arguments/exceptions" 9 | require_relative "forbids_convenient_service_entities_as_constructor_arguments/middleware" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_amazing_print_inspect.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_amazing_print_inspect/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_awesome_print_inspect.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_awesome_print_inspect/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_inspect.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_inspect/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_inspect/concern.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Service 10 | module Plugins 11 | module HasInspect 12 | module Concern 13 | include Support::Concern 14 | 15 | instance_methods do 16 | ## 17 | # @return [String] 18 | # 19 | def inspect 20 | "<#{Utils::Class.display_name(self.class)}>" 21 | end 22 | end 23 | end 24 | end 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/create_result_class" 9 | require_relative "commands/is_result" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/result" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "result/concern" 9 | require_relative "result/plugins" 10 | 11 | module ConvenientService 12 | module Service 13 | module Plugins 14 | module HasJSendResult 15 | module Entities 16 | class Result 17 | include Concern 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/aliases.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Plugins 10 | Result = ::ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_be_from_exception.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_be_from_exception/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_be_from_fallback.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_be_from_fallback/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_be_own_result.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_be_own_result/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_be_stubbed_result.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_be_stubbed_result/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_checked_status.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_have_checked_status/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_parent_result.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_have_parent_result/concern" 9 | require_relative "can_have_parent_result/constants" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_step.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_have_step/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_amazing_print_inspect.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_amazing_print_inspect/commands" 9 | require_relative "has_amazing_print_inspect/concern" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_amazing_print_inspect/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/generate_inspect_output" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_awesome_print_inspect.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_awesome_print_inspect/commands" 9 | require_relative "has_awesome_print_inspect/concern" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_awesome_print_inspect/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/generate_inspect_output" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_inspect.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_inspect/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_j_send_status_and_attributes/commands" 9 | require_relative "has_j_send_status_and_attributes/concern" 10 | require_relative "has_j_send_status_and_attributes/entities" 11 | require_relative "has_j_send_status_and_attributes/exceptions" 12 | require_relative "has_j_send_status_and_attributes/middleware" 13 | require_relative "has_j_send_status_and_attributes/structs" 14 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/cast_j_send_attributes" 9 | require_relative "commands/create_code_class" 10 | require_relative "commands/create_data_class" 11 | require_relative "commands/create_message_class" 12 | require_relative "commands/create_status_class" 13 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/data" 9 | require_relative "entities/code" 10 | require_relative "entities/message" 11 | require_relative "entities/status" 12 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/is_code" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/plugins.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "plugins/has_inspect" 9 | 10 | require_relative "plugins/aliases" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/plugins/aliases.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Plugins 10 | Code = ::ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Code::Plugins 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/plugins/has_amazing_print_inspect.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_amazing_print_inspect/concern" 9 | -------------------------------------------------------------------------------- /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: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_awesome_print_inspect/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/plugins/has_inspect.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_inspect/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/is_data" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/plugins.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "plugins/has_inspect" 9 | require_relative "plugins/has_method_readers" 10 | 11 | require_relative "plugins/aliases" 12 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/plugins/aliases.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Plugins 10 | Data = ::ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Data::Plugins 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/plugins/has_amazing_print_inspect.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_amazing_print_inspect/concern" 9 | -------------------------------------------------------------------------------- /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: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_awesome_print_inspect/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/plugins/has_inspect.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_inspect/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/plugins/has_method_readers.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_method_readers/middleware" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/is_message" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/plugins.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "plugins/has_inspect" 9 | 10 | require_relative "plugins/aliases" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/plugins/aliases.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Plugins 10 | Message = ::ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Message::Plugins 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/plugins/has_amazing_print_inspect.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_amazing_print_inspect/concern" 9 | -------------------------------------------------------------------------------- /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: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_awesome_print_inspect/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/plugins/has_inspect.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_inspect/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/is_status" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "plugins/can_be_checked" 9 | require_relative "plugins/has_inspect" 10 | 11 | require_relative "plugins/aliases" 12 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins/aliases.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Plugins 10 | Status = ::ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Status::Plugins 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins/can_be_checked.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "can_be_checked/concern" 9 | require_relative "can_be_checked/middleware" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins/has_amazing_print_inspect.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_amazing_print_inspect/concern" 9 | -------------------------------------------------------------------------------- /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: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_awesome_print_inspect/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins/has_inspect.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_inspect/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/structs.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "structs/j_send_attributes" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_negated_result.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_negated_result/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_pattern_matching_support.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_pattern_matching_support/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_stubbed_result_invocations_counter.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_stubbed_result_invocations_counter/concern" 9 | require_relative "has_stubbed_result_invocations_counter/middleware" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/helps_to_learn_similarities_with_common_objects.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "helps_to_learn_similarities_with_common_objects/concern" 9 | require_relative "helps_to_learn_similarities_with_common_objects/exceptions" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/raises_on_not_checked_result_status.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "raises_on_not_checked_result_status/exceptions" 9 | require_relative "raises_on_not_checked_result_status/middleware" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result_params_validations/using_active_model_validations.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "using_active_model_validations/concern" 9 | require_relative "using_active_model_validations/middleware" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result_params_validations/using_dry_validation.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "using_dry_validation/concern" 9 | require_relative "using_dry_validation/middleware" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result_short_syntax.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_j_send_result_short_syntax/concern" 9 | require_relative "has_j_send_result_short_syntax/success" 10 | require_relative "has_j_send_result_short_syntax/failure" 11 | require_relative "has_j_send_result_short_syntax/error" 12 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result_short_syntax/error.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "error/exceptions" 9 | require_relative "error/middleware" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result_short_syntax/failure.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "failure/exceptions" 9 | require_relative "failure/middleware" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result_short_syntax/success.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "success/commands" 9 | require_relative "success/exceptions" 10 | require_relative "success/middleware" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result_short_syntax/success/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/refute_kwargs_contain_j_send_and_extra_keys" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_j_send_result_status_check_short_syntax.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_j_send_result_status_check_short_syntax/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_mermaid_flowchart.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_mermaid_flowchart/concern" 9 | require_relative "has_mermaid_flowchart/entities" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_mermaid_flowchart/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/flowchart" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/code" 9 | require_relative "entities/settings" 10 | require_relative "entities/template" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/code/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/generate_lines" 9 | require_relative "commands/generate_method_step_lines" 10 | require_relative "commands/generate_result_lines" 11 | require_relative "commands/generate_service_lines" 12 | require_relative "commands/generate_service_step_lines" 13 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_negated_j_send_result.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_negated_j_send_result/concern" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_negated_result.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_negated_result/concern" 9 | require_relative "has_negated_result/exceptions" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/has_result.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "has_result/concern" 9 | require_relative "has_result/exceptions" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/raises_on_double_result.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "raises_on_double_result/exceptions" 9 | require_relative "raises_on_double_result/middleware" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/raises_on_not_result_return_value.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "raises_on_not_result_return_value/exceptions" 9 | require_relative "raises_on_not_result_return_value/middleware" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "rescues_result_unhandled_exceptions/commands" 9 | require_relative "rescues_result_unhandled_exceptions/constants" 10 | require_relative "rescues_result_unhandled_exceptions/middleware" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/format_backtrace" 9 | require_relative "commands/format_cause" 10 | require_relative "commands/format_class" 11 | require_relative "commands/format_line" 12 | require_relative "commands/format_message" 13 | 14 | require_relative "commands/format_exception" 15 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/constants.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Service 10 | module Plugins 11 | module RescuesResultUnhandledExceptions 12 | module Constants 13 | ## 14 | # @return [Integer] 15 | # 16 | DEFAULT_MAX_BACKTRACE_SIZE = 10 17 | 18 | ## 19 | # @return [String] 20 | # 21 | MESSAGE_LINE_PREFIX = " " * 2 22 | end 23 | end 24 | end 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/sets_parent_to_foreign_result.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "sets_parent_to_foreign_result/middleware" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/wraps_result_in_db_transaction.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "wraps_result_in_db_transaction/using_active_record_base_transaction" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/service/plugins/wraps_result_in_db_transaction/using_active_record_base_transaction.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "using_active_record_base_transaction/middleware" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/support/cache/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/caches" 9 | require_relative "entities/key" 10 | -------------------------------------------------------------------------------- /lib/convenient_service/support/cache/entities/caches.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "caches/base" 9 | 10 | require_relative "caches/array" 11 | require_relative "caches/hash" 12 | 13 | require_relative "caches/thread_safe_array" 14 | require_relative "caches/thread_safe_hash" 15 | -------------------------------------------------------------------------------- /lib/convenient_service/support/cache/entities/caches/array/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/pair" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/support/concern.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Support 10 | module Concern 11 | def self.included(klass) 12 | klass.extend Dependencies::Extractions::ActiveSupportConcern::Concern 13 | end 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /lib/convenient_service/support/dependency_container.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "dependency_container/commands" 9 | require_relative "dependency_container/constants" 10 | require_relative "dependency_container/entities" 11 | require_relative "dependency_container/exceptions" 12 | 13 | require_relative "dependency_container/export" 14 | require_relative "dependency_container/import" 15 | 16 | require_relative "dependency_container/container" 17 | -------------------------------------------------------------------------------- /lib/convenient_service/support/dependency_container/commands.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "commands/assert_valid_scope" 9 | require_relative "commands/assert_valid_container" 10 | require_relative "commands/assert_valid_method" 11 | require_relative "commands/create_methods_module" 12 | require_relative "commands/import_method" 13 | -------------------------------------------------------------------------------- /lib/convenient_service/support/dependency_container/constants.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Support 10 | module DependencyContainer 11 | module Constants 12 | SCOPES = [ 13 | INSTANCE_SCOPE = :instance, 14 | CLASS_SCOPE = :class 15 | ] 16 | 17 | DEFAULT_SCOPE = Constants::INSTANCE_SCOPE 18 | DEFAULT_PREPEND = false 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/convenient_service/support/dependency_container/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/method_collection" 9 | require_relative "entities/method" 10 | require_relative "entities/namespace_collection" 11 | require_relative "entities/namespace" 12 | -------------------------------------------------------------------------------- /lib/convenient_service/support/middleware.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "middleware/stack_builder" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/support/middleware/stack_builder/entities.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "entities/builders" 9 | -------------------------------------------------------------------------------- /lib/convenient_service/support/middleware/stack_builder/entities/builders.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "builders/ruby_middleware" 9 | require_relative "builders/rack" 10 | require_relative "builders/stateful" 11 | -------------------------------------------------------------------------------- /lib/convenient_service/support/not_passed.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Support 10 | class NotPassed < Support::UniqueValue 11 | ## 12 | # @param value [Object] Can be any type. 13 | # @return [Boolean] 14 | # 15 | def [](value) 16 | equal?(value) 17 | end 18 | end 19 | 20 | ## 21 | # @return [ConvenientService::Support::UniqueValue] 22 | # 23 | NOT_PASSED = Support::NotPassed.new("not_passed") 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/convenient_service/support/undefined.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Support 10 | class Undefined < Support::UniqueValue 11 | ## 12 | # @param value [Object] Can be any type. 13 | # @return [Boolean] 14 | # 15 | def [](value) 16 | equal?(value) 17 | end 18 | end 19 | 20 | ## 21 | # @return [ConvenientService::Support::UniqueValue] 22 | # 23 | UNDEFINED = Support::Undefined.new("undefined") 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/convenient_service/utils/array/exceptions.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | module Utils 10 | module Array 11 | module Exceptions 12 | class NonIntegerIndex < ::ConvenientService::Exception 13 | def initialize_with_kwargs(index:) 14 | message = <<~TEXT 15 | Index `#{index.inspect}` is NOT an integer. 16 | TEXT 17 | 18 | initialize(message) 19 | end 20 | end 21 | end 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /lib/convenient_service/utils/bool.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "bool/to_bool" 9 | require_relative "bool/to_env_bool" 10 | 11 | module ConvenientService 12 | module Utils 13 | module Bool 14 | class << self 15 | def to_bool(...) 16 | ToBool.call(...) 17 | end 18 | 19 | def to_env_bool(...) 20 | ToEnvBool.call(...) 21 | end 22 | end 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/convenient_service/utils/kernel.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "kernel/silence_warnings" 9 | 10 | module ConvenientService 11 | module Utils 12 | module Kernel 13 | class << self 14 | def silence_warnings(...) 15 | SilenceWarnings.call(...) 16 | end 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /lib/convenient_service/utils/method.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "method/defined" 9 | require_relative "method/name" 10 | require_relative "method/remove" 11 | 12 | module ConvenientService 13 | module Utils 14 | module Method 15 | class << self 16 | def defined?(...) 17 | Defined.call(...) 18 | end 19 | 20 | def remove(...) 21 | Remove.call(...) 22 | end 23 | end 24 | end 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /lib/convenient_service/utils/method/name.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "name/append" 9 | 10 | module ConvenientService 11 | module Utils 12 | module Method 13 | module Name 14 | class << self 15 | def append(...) 16 | Append.call(...) 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/convenient_service/version.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | module ConvenientService 9 | VERSION = "0.19.1" 10 | end 11 | -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marian13/convenient_service/b870265562f6969a78e6b69df49cb23d10d21da8/logo.png -------------------------------------------------------------------------------- /spec/amazing_print_helper.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "spec_helper" 9 | 10 | require_relative "support/convenient_service/amazing_print" 11 | 12 | ## 13 | # NOTE: Runs only spec with specific tag. 14 | # - https://github.com/rspec/rspec-core/blob/main/Filtering.md#rspecconfigure 15 | # 16 | RSpec.configure do |config| 17 | config.filter_run_including type: :amazing_print 18 | end 19 | -------------------------------------------------------------------------------- /spec/awesome_print_helper.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "spec_helper" 9 | 10 | require_relative "support/convenient_service/awesome_print" 11 | 12 | ## 13 | # NOTE: Runs only spec with specific tag. 14 | # - https://github.com/rspec/rspec-core/blob/main/Filtering.md#rspecconfigure 15 | # 16 | RSpec.configure do |config| 17 | config.filter_run_including type: :awesome_print 18 | end 19 | -------------------------------------------------------------------------------- /spec/dry_helper.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "spec_helper" 9 | 10 | require_relative "support/convenient_service/dry" 11 | 12 | ## 13 | # NOTE: Runs only spec with specific tag. 14 | # - https://github.com/rspec/rspec-core/blob/main/Filtering.md#rspecconfigure 15 | # 16 | RSpec.configure do |config| 17 | config.filter_run_including type: :dry 18 | end 19 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/common/plugins/aliases_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | # rubocop:disable RSpec/DescribeClass 13 | RSpec.describe "convenient_service/common/plugins/aliases", type: :standard do 14 | specify { expect(ConvenientService::Plugins::Common).to eq(ConvenientService::Common::Plugins) } 15 | end 16 | # rubocop:enable RSpec/DescribeClass 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/common/plugins/assigns_attributes_in_constructor/using_active_model_attribute_assignment_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Integration spec. 4 | # 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/common/plugins/assigns_attributes_in_constructor/using_dry_initializer_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Integration spec. 4 | # 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/common/plugins/can_have_callbacks/exceptions_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Common::Plugins::CanHaveCallbacks::Exceptions, type: :standard do 13 | include ConvenientService::RSpec::PrimitiveMatchers::BeDescendantOf 14 | 15 | specify { expect(described_class::AroundCallbackChainIsNotContinued).to be_descendant_of(ConvenientService::Exception) } 16 | end 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/common/plugins/has_attributes/using_active_model_attributes_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Integration spec. 4 | # 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/common/plugins/has_internals/entities/internals/plugins/aliases_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | # rubocop:disable RSpec/DescribeClass 13 | RSpec.describe "convenient_service/common/plugins/has_internals/entities/internals/plugins/aliases", type: :standard do 14 | specify { expect(ConvenientService::Plugins::Internals).to eq(ConvenientService::Common::Plugins::HasInternals::Entities::Internals::Plugins) } 15 | end 16 | # rubocop:enable RSpec/DescribeClass 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/common/plugins/has_internals/entities/internals_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Common::Plugins::HasInternals::Entities::Internals, type: :standard do 13 | example_group "modules" do 14 | include ConvenientService::RSpec::Matchers::IncludeModule 15 | 16 | subject { described_class } 17 | 18 | it { is_expected.to include_module(described_class::Concern) } 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/config/entities/options_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ## 9 | # TODO: Specs. 10 | ## 11 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/config/exceptions_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | # rubocop:disable RSpec/NestedGroups 13 | RSpec.describe ConvenientService::Config::Exceptions, type: :standard do 14 | include ConvenientService::RSpec::PrimitiveMatchers::BeDescendantOf 15 | 16 | specify { expect(described_class::OptionCanNotBeNormalized).to be_descendant_of(ConvenientService::Exception) } 17 | end 18 | # rubocop:enable RSpec/NestedGroups 19 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/caller_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Core::Entities::Config::Entities::MethodMiddlewares::Entities::Caller, type: :standard do 13 | example_group "modules" do 14 | include ConvenientService::RSpec::Matchers::IncludeModule 15 | 16 | subject { described_class } 17 | 18 | it { is_expected.to include_module(described_class::Concern) } 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/container_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Core::Entities::Config::Entities::MethodMiddlewares::Entities::Container, type: :standard do 13 | example_group "modules" do 14 | include ConvenientService::RSpec::Matchers::IncludeModule 15 | 16 | subject { described_class } 17 | 18 | it { is_expected.to include_module(described_class::Concern) } 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/base/commands/create_observable_middleware_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Direct specs. 4 | # 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/chain/commands/create_observable_middleware_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Direct specs. 4 | # 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/examples/standard/request_params/constants_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | return unless defined? ConvenientService::Examples::Standard 13 | 14 | RSpec.describe ConvenientService::Examples::Standard::RequestParams::Constants, type: :standard do 15 | example_group "constants" do 16 | describe "Tags::EMPTY" do 17 | it "returns empty string" do 18 | expect(described_class::Tags::EMPTY).to eq("") 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/examples/standard/request_params/utils/http/request/parse_body_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Specs. 4 | # 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/examples/standard/request_params/utils/http/request/parse_path_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Specs. 4 | # 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/examples/standard/request_params/utils/integer/safe_parse_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Specs. 4 | # 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/examples/standard/request_params/utils/object/blank_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Specs. 4 | # 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/examples/standard/request_params/utils/object/present_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Specs. 4 | # 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/examples/standard/request_params/utils/url/valid_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Specs. 4 | ## 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/examples/standard/v1/request_params/utils/http/request/parse_body_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Specs. 4 | # 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/examples/standard/v1/request_params/utils/http/request/parse_path_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Specs. 4 | # 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/examples/standard/v1/request_params/utils/integer/safe_parse_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Specs. 4 | # 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/examples/standard/v1/request_params/utils/object/blank_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Specs. 4 | # 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/examples/standard/v1/request_params/utils/object/present_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Specs. 4 | # 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/examples/standard/v1/request_params/utils/url/valid_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Specs. 4 | ## 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/feature/configs/aliases_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | # rubocop:disable RSpec/DescribeClass 13 | RSpec.describe "convenient_service/feature/configs/aliases", type: :standard do 14 | specify { expect(ConvenientService::Feature::Standard::Config).to eq(ConvenientService::Feature::Configs::Standard) } 15 | end 16 | # rubocop:enable RSpec/DescribeClass 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/feature/plugins/aliases_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | # rubocop:disable RSpec/DescribeClass 13 | RSpec.describe "convenient_service/feature/plugins/aliases", type: :standard do 14 | specify { expect(ConvenientService::Plugins::Feature).to eq(ConvenientService::Feature::Plugins) } 15 | end 16 | # rubocop:enable RSpec/DescribeClass 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/feature/plugins/can_have_entries/exceptions_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Feature::Plugins::CanHaveEntries::Exceptions, type: :standard do 13 | include ConvenientService::RSpec::PrimitiveMatchers::BeDescendantOf 14 | 15 | specify { expect(described_class::NotDefinedEntryMethod).to be_descendant_of(ConvenientService::Exception) } 16 | end 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/rspec/helpers/classes/wrap_method/exceptions_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::RSpec::Helpers::Classes::WrapMethod::Exceptions, type: :standard do 13 | include ConvenientService::RSpec::PrimitiveMatchers::BeDescendantOf 14 | 15 | specify { expect(described_class::ChainAttributePreliminaryAccess).to be_descendant_of(ConvenientService::Exception) } 16 | end 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/rspec/matchers/classes/call_chain_next_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Specs. 4 | # 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/rspec/primitive_helpers/classes/ignoring_exception/exceptions_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::RSpec::PrimitiveHelpers::Classes::IgnoringException::Exceptions, type: :standard do 13 | include ConvenientService::RSpec::PrimitiveMatchers::BeDescendantOf 14 | 15 | specify { expect(described_class::IgnoredExceptionIsNotRaised).to be_descendant_of(ConvenientService::Exception) } 16 | end 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/service/configs/aliases_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | # rubocop:disable RSpec/DescribeClass 13 | RSpec.describe "convenient_service/service/configs/aliases", type: :standard do 14 | specify { expect(ConvenientService::Standard::Config).to eq(ConvenientService::Service::Configs::Standard) } 15 | end 16 | # rubocop:enable RSpec/DescribeClass 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/service/configs/standard/aliases_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | # rubocop:disable RSpec/DescribeClass 13 | RSpec.describe "convenient_service/service/configs/standard/aliases", type: :standard do 14 | specify { expect(ConvenientService::Standard::V1::Config).to eq(ConvenientService::Service::Configs::Standard::V1) } 15 | end 16 | # rubocop:enable RSpec/DescribeClass 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/service/plugins/aliases_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | # rubocop:disable RSpec/DescribeClass 13 | RSpec.describe "convenient_service/service/plugins/aliases", type: :standard do 14 | specify { expect(ConvenientService::Plugins::Service).to eq(ConvenientService::Service::Plugins) } 15 | end 16 | # rubocop:enable RSpec/DescribeClass 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/service/plugins/can_have_steps/entities/method_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Specs. 4 | # 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/service/plugins/can_have_steps/entities/service_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Service::Plugins::CanHaveSteps::Entities::Service, type: :standard do 13 | example_group "modules" do 14 | include ConvenientService::RSpec::Matchers::IncludeModule 15 | 16 | subject { described_class } 17 | 18 | it { is_expected.to include_module(described_class::Concern) } 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/aliases_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | # rubocop:disable RSpec/DescribeClass 13 | RSpec.describe "convenient_service/service/plugins/can_have_steps/entities/step/plugins/aliases", type: :standard do 14 | specify { expect(ConvenientService::Plugins::Step).to eq(ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Plugins) } 15 | end 16 | # rubocop:enable RSpec/DescribeClass 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_service_step/exceptions_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Plugins::CanBeServiceStep::Exceptions, type: :standard do 13 | include ConvenientService::RSpec::PrimitiveMatchers::BeDescendantOf 14 | 15 | specify { expect(described_class::StepIsNotServiceStep).to be_descendant_of(ConvenientService::Exception) } 16 | end 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_result/exceptions_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Plugins::HasResult::Exceptions, type: :standard do 13 | include ConvenientService::RSpec::PrimitiveMatchers::BeDescendantOf 14 | 15 | specify { expect(described_class::StepHasUnknownType).to be_descendant_of(ConvenientService::Exception) } 16 | end 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/service/plugins/can_not_be_inherited/exceptions_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Service::Plugins::CanNotBeInherited::Exceptions, type: :standard do 13 | include ConvenientService::RSpec::PrimitiveMatchers::BeDescendantOf 14 | 15 | specify { expect(described_class::ServiceIsInherited).to be_descendant_of(ConvenientService::Exception) } 16 | end 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/service/plugins/collects_services_in_exception/constants_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Service::Plugins::CollectsServicesInException::Constants, type: :standard do 13 | example_group "constants" do 14 | describe "DEFAULT_MAX_SERVICES_SIZE" do 15 | it "returns `1_000`" do 16 | expect(described_class::DEFAULT_MAX_SERVICES_SIZE).to eq(1_000) 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/aliases_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | # rubocop:disable RSpec/DescribeClass 13 | RSpec.describe "convenient_service/service/plugins/has_j_send_result/entities/result/plugins/aliases", type: :standard do 14 | specify { expect(ConvenientService::Plugins::Result).to eq(ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins) } 15 | end 16 | # rubocop:enable RSpec/DescribeClass 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/service/plugins/has_j_send_result_short_syntax/success/exceptions_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Service::Plugins::HasJSendResultShortSyntax::Success::Exceptions, type: :standard do 13 | include ConvenientService::RSpec::PrimitiveMatchers::BeDescendantOf 14 | 15 | specify { expect(described_class::KwargsContainJSendAndExtraKeys).to be_descendant_of(ConvenientService::Exception) } 16 | end 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/code/commands/generate_lines_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Specs. 4 | ## 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/code/commands/generate_method_step_lines_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Specs. 4 | ## 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/code/commands/generate_result_lines_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Specs. 4 | ## 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/code/commands/generate_service_lines_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Specs. 4 | ## 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/code/commands/generate_service_step_lines_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Specs. 4 | ## 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/code_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Specs. 4 | ## 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/service/plugins/has_negated_result/exceptions_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Service::Plugins::HasNegatedResult::Exceptions, type: :standard do 13 | include ConvenientService::RSpec::PrimitiveMatchers::BeDescendantOf 14 | 15 | specify { expect(described_class::NegatedResultIsNotOverridden).to be_descendant_of(ConvenientService::Exception) } 16 | end 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/service/plugins/has_result/exceptions_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Service::Plugins::HasResult::Exceptions, type: :standard do 13 | include ConvenientService::RSpec::PrimitiveMatchers::BeDescendantOf 14 | 15 | specify { expect(described_class::ResultIsNotOverridden).to be_descendant_of(ConvenientService::Exception) } 16 | end 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/service/plugins/raises_on_double_result/exceptions_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Service::Plugins::RaisesOnDoubleResult::Exceptions, type: :standard do 13 | include ConvenientService::RSpec::PrimitiveMatchers::BeDescendantOf 14 | 15 | specify { expect(described_class::DoubleResult).to be_descendant_of(ConvenientService::Exception) } 16 | end 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/service/plugins/raises_on_not_result_return_value/exceptions_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Service::Plugins::RaisesOnNotResultReturnValue::Exceptions, type: :standard do 13 | include ConvenientService::RSpec::PrimitiveMatchers::BeDescendantOf 14 | 15 | specify { expect(described_class::ReturnValueNotKindOfResult).to be_descendant_of(ConvenientService::Exception) } 16 | end 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/support/abstract_method/exceptions_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Support::AbstractMethod::Exceptions, type: :standard do 13 | include ConvenientService::RSpec::PrimitiveMatchers::BeDescendantOf 14 | 15 | specify { expect(described_class::AbstractMethodNotOverridden).to be_descendant_of(ConvenientService::Exception) } 16 | end 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/support/arguments/exceptions_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Support::Arguments::Exceptions, type: :standard do 13 | include ConvenientService::RSpec::PrimitiveMatchers::BeDescendantOf 14 | 15 | specify { expect(described_class::InvalidKeyType).to be_descendant_of(ConvenientService::Exception) } 16 | end 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/support/cache/exceptions_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Support::Cache::Exceptions, type: :standard do 13 | include ConvenientService::RSpec::PrimitiveMatchers::BeDescendantOf 14 | 15 | specify { expect(described_class::NotSupportedBackend).to be_descendant_of(ConvenientService::Exception) } 16 | end 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/support/castable/exceptions_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Support::Castable::Exceptions, type: :standard do 13 | include ConvenientService::RSpec::PrimitiveMatchers::BeDescendantOf 14 | 15 | specify { expect(described_class::CastIsNotOverridden).to be_descendant_of(ConvenientService::Exception) } 16 | specify { expect(described_class::FailedToCast).to be_descendant_of(ConvenientService::Exception) } 17 | end 18 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/support/middleware/stack_builder/entities/builders/rack/exceptions_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Support::Middleware::StackBuilder::Entities::Builders::Rack::Exceptions, type: :standard do 13 | include ConvenientService::RSpec::PrimitiveMatchers::BeDescendantOf 14 | 15 | specify { expect(described_class::MissingMiddleware).to be_descendant_of(ConvenientService::Exception) } 16 | end 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/support/middleware/stack_builder/entities/builders/stateful/exceptions_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Support::Middleware::StackBuilder::Entities::Builders::Stateful::Exceptions, type: :standard do 13 | include ConvenientService::RSpec::PrimitiveMatchers::BeDescendantOf 14 | 15 | specify { expect(described_class::MissingMiddleware).to be_descendant_of(ConvenientService::Exception) } 16 | end 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/support/middleware/stack_builder/exceptions_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Support::Middleware::StackBuilder::Exceptions, type: :standard do 13 | include ConvenientService::RSpec::PrimitiveMatchers::BeDescendantOf 14 | 15 | specify { expect(described_class::NotSupportedBackend).to be_descendant_of(ConvenientService::Exception) } 16 | end 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/utils/array/exceptions_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Utils::Array::Exceptions, type: :standard do 13 | include ConvenientService::RSpec::PrimitiveMatchers::BeDescendantOf 14 | 15 | specify { expect(described_class::NonIntegerIndex).to be_descendant_of(ConvenientService::Exception) } 16 | end 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/utils/bool/to_env_bool_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ## 9 | # TODO: Specs. 10 | ## 11 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/utils/hash/assert_valid_keys_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | ## 3 | # TODO: Specs. 4 | # 5 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/utils/module/exceptions_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Utils::Module::Exceptions, type: :standard do 13 | include ConvenientService::RSpec::PrimitiveMatchers::BeDescendantOf 14 | 15 | specify { expect(described_class::NestingUnderAnonymousNamespace).to be_descendant_of(ConvenientService::Exception) } 16 | end 17 | -------------------------------------------------------------------------------- /spec/lib/convenient_service/utils/proc/display_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "spec_helper" 9 | 10 | require "convenient_service" 11 | 12 | RSpec.describe ConvenientService::Utils::Proc::Display, type: :standard do 13 | describe ".call" do 14 | subject(:display) { described_class.call(proc) } 15 | 16 | let(:proc) { -> { :foo } } 17 | 18 | it "returns `{ ... }`" do 19 | expect(display).to eq("{ ... }") 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /spec/memo_wise_helper.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "spec_helper" 9 | 10 | require_relative "support/convenient_service/memo_wise" 11 | 12 | ## 13 | # NOTE: Runs only spec with specific tag. 14 | # - https://github.com/rspec/rspec-core/blob/main/Filtering.md#rspecconfigure 15 | # 16 | RSpec.configure do |config| 17 | config.filter_run_including type: :memo_wise 18 | end 19 | -------------------------------------------------------------------------------- /spec/rails_helper.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "spec_helper" 9 | 10 | require_relative "support/convenient_service/rails" 11 | 12 | ## 13 | # NOTE: Waits for `should-matchers` full support. 14 | # 15 | # require_relative "support/shoulda_matchers/rails" 16 | 17 | ## 18 | # NOTE: Runs only spec with specific tag. 19 | # - https://github.com/rspec/rspec-core/blob/main/Filtering.md#rspecconfigure 20 | # 21 | RSpec.configure do |config| 22 | config.filter_run_including type: :rails 23 | end 24 | -------------------------------------------------------------------------------- /spec/standard_helper.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require_relative "spec_helper" 9 | 10 | require_relative "support/convenient_service/standard" 11 | 12 | ## 13 | # NOTE: Runs only spec with specific tag. 14 | # - https://github.com/rspec/rspec-core/blob/main/Filtering.md#rspecconfigure 15 | # 16 | RSpec.configure do |config| 17 | config.filter_run_including type: :standard 18 | end 19 | -------------------------------------------------------------------------------- /spec/support/break.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ## 9 | # NOTE: `JRUBY_OPTS='--debug'` helps to avoid the follwing warning. 10 | # /usr/local/bundle/gems/break-0.40.0/lib/break/commands/tracepoint_command.rb:26: warning: tracing (e.g. set_trace_func) will not capture all events without --debug flag 11 | # 12 | # - https://github.com/gsamokovarov/break 13 | # - https://github.com/jruby/jruby/wiki/Environment-Flag 14 | # 15 | puts "TIP: Prefix command with `JRUBY_OPTS='--debug'` in order to debug JRuby code with the `break` gem." 16 | -------------------------------------------------------------------------------- /spec/support/convenient_service/amazing_print.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ConvenientService::Dependencies.require_development_tools(amazing_print: true, awesome_print: false) 9 | 10 | require "convenient_service/extras/standard/config/options/amazing_print_inspect" 11 | -------------------------------------------------------------------------------- /spec/support/convenient_service/awesome_print.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ConvenientService::Dependencies.require_development_tools(amazing_print: false, awesome_print: true) 9 | 10 | require "convenient_service/extras/standard/config/options/awesome_print_inspect" 11 | -------------------------------------------------------------------------------- /spec/support/convenient_service/dry.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ConvenientService::Dependencies.require_development_tools 9 | 10 | require "convenient_service/extras/standard/config/options/dry_initializer" 11 | 12 | ConvenientService::Dependencies.require_has_j_send_result_params_validations_using_dry_validation_plugin 13 | 14 | ConvenientService::Dependencies.require_dry_examples 15 | ConvenientService::Dependencies.require_dry_examples(version: "v1") 16 | -------------------------------------------------------------------------------- /spec/support/convenient_service/memo_wise.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ConvenientService::Dependencies.require_development_tools 9 | 10 | require "convenient_service/extras/standard/config/options/memo_wise" 11 | -------------------------------------------------------------------------------- /spec/support/convenient_service/standard.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ConvenientService::Dependencies.require_development_tools 9 | 10 | ConvenientService::Dependencies.require_standard_examples 11 | ConvenientService::Dependencies.require_standard_examples(version: "v1") 12 | -------------------------------------------------------------------------------- /spec/support/faker.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | ## 9 | # Reset `faker` seed before every spec to have deterministic results. 10 | # - https://github.com/faker-ruby/faker#deterministic-random 11 | # 12 | # NOTE: `ffaker` is NOT currently used by `ConveninetService`, but its tutorials are very useful. 13 | # - https://github.com/ffaker/ffaker/blob/main/RANDOM.md#rspec 14 | # 15 | RSpec.configure do |config| 16 | config.before do 17 | Faker::Config.random = Random.new(42) 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /spec/support/shoulda_matchers.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ## 4 | # @author Marian Kostyk 5 | # @license LGPLv3 6 | ## 7 | 8 | require "shoulda-matchers" 9 | --------------------------------------------------------------------------------