convenient_service 0.17.0 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/convenient_service/common/plugins/ensures_negated_j_send_result/middleware.rb +22 -0
- data/lib/convenient_service/common/plugins/ensures_negated_j_send_result.rb +3 -0
- data/lib/convenient_service/common/plugins/has_around_callbacks/concern.rb +8 -1
- data/lib/convenient_service/common/plugins/has_around_callbacks/middleware.rb +28 -7
- data/lib/convenient_service/common/plugins/has_callbacks/concern.rb +19 -9
- data/lib/convenient_service/common/plugins/has_callbacks/entities/callback_collection.rb +49 -1
- data/lib/convenient_service/common/plugins/has_callbacks/middleware.rb +21 -3
- data/lib/convenient_service/common/plugins/has_callbacks.rb +0 -1
- data/lib/convenient_service/common/plugins/has_instance_proxy/entities/instance_proxy.rb +1 -1
- data/lib/convenient_service/common/plugins/has_internals/entities/internals/plugins/has_cache/concern.rb +12 -0
- data/lib/convenient_service/common/plugins.rb +1 -0
- data/lib/convenient_service/core/entities/config/exceptions.rb +2 -0
- data/lib/convenient_service/core/entities/config.rb +3 -0
- data/lib/convenient_service/dependencies.rb +11 -3
- data/lib/convenient_service/logger.rb +9 -1
- data/lib/convenient_service/rspec/matchers/classes/call_chain_next.rb +41 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/commands/generate_printable_method.rb +46 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/delegation.rb +89 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/inputs.rb +223 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/outputs.rb +38 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matcher_collection.rb +157 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/arguments/commands/apply_stub_to_track_delegations.rb +77 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/arguments/commands/generate_printable_arguments.rb +94 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/arguments.rb +89 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/base.rb +99 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/return_custom_value.rb +91 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/return_delegation_value.rb +129 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/with_any_arguments.rb +31 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/with_concrete_arguments.rb +31 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/without_arguments.rb +31 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers.rb +11 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities.rb +5 -1
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/exceptions.rb +65 -0
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to.rb +163 -41
- data/lib/convenient_service/service/configs/minimal.rb +85 -33
- data/lib/convenient_service/service/configs/standard/v1.rb +42 -24
- data/lib/convenient_service/service/configs/standard.rb +60 -46
- data/lib/convenient_service/service/plugins/can_have_connected_steps/concern.rb +503 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/and.rb +133 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/base.rb +126 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/empty.rb +104 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/group.rb +118 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb +118 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/or.rb +145 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/scalar.rb +133 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions.rb +10 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/step_collection.rb +217 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps/entities.rb +4 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps/exceptions.rb +95 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps/middleware.rb +30 -0
- data/lib/convenient_service/service/plugins/can_have_connected_steps.rb +6 -0
- data/lib/convenient_service/service/plugins/can_have_sequential_steps/concern.rb +76 -0
- data/lib/convenient_service/service/plugins/{can_have_steps → can_have_sequential_steps}/entities/step_collection.rb +54 -10
- data/lib/convenient_service/service/plugins/can_have_sequential_steps/entities.rb +3 -0
- data/lib/convenient_service/service/plugins/{can_have_steps → can_have_sequential_steps}/middleware.rb +7 -3
- data/lib/convenient_service/service/plugins/can_have_sequential_steps.rb +5 -0
- data/lib/convenient_service/service/plugins/can_have_steps/concern.rb +4 -57
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/define_method_in_container.rb +45 -26
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/reassignment.rb +0 -2
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/exceptions.rb +4 -24
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb +155 -80
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/exceptions.rb +19 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/{can_be_result_step → can_be_method_step}/can_be_executed/exceptions.rb +1 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_method_step/can_be_executed/middleware.rb +64 -4
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_method_step/can_be_executed.rb +1 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_method_step/concern.rb +7 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_alternative_steps.rb +3 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_fallbacks/concern.rb +0 -46
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_fallbacks/middleware.rb +26 -2
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_parent_result/middleware.rb +13 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/{can_be_result_step → has_result}/concern.rb +8 -4
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_result/middleware.rb +33 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_result.rb +4 -0
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins.rb +2 -1
- data/lib/convenient_service/service/plugins/can_have_steps/entities.rb +0 -1
- data/lib/convenient_service/service/plugins/can_have_steps.rb +0 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_checked_status/concern.rb +2 -2
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_checked_status.rb +0 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/concern/instance_methods.rb +135 -2
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/concern/instance_methods.rb +45 -17
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins/can_be_checked/concern.rb +38 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins/can_be_checked/middleware.rb +51 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins/can_be_checked.rb +4 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins.rb +1 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/exceptions.rb +15 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_negated_result/concern.rb +72 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_negated_result.rb +3 -0
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/raises_on_not_checked_result_status/middleware.rb +1 -1
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins.rb +1 -0
- data/lib/convenient_service/service/plugins/has_j_send_result.rb +0 -1
- data/lib/convenient_service/service/plugins/has_j_send_result_params_validations/using_dry_validation/middleware.rb +4 -0
- data/lib/convenient_service/service/plugins/has_negated_j_send_result/concern.rb +23 -0
- data/lib/convenient_service/service/plugins/has_negated_j_send_result.rb +3 -0
- data/lib/convenient_service/service/plugins/has_negated_result/concern.rb +33 -0
- data/lib/convenient_service/service/plugins/{has_j_send_result → has_negated_result}/exceptions.rb +3 -3
- data/lib/convenient_service/service/plugins/has_negated_result.rb +4 -0
- data/lib/convenient_service/service/plugins/{wraps_result_in_db_transaction → wraps_result_in_d_b_transaction}/middleware.rb +1 -1
- data/lib/convenient_service/service/plugins.rb +7 -2
- data/lib/convenient_service/specification.rb +28 -0
- data/lib/convenient_service/support/backtrace_cleaner.rb +6 -1
- data/lib/convenient_service/support/cache/entities/caches/base.rb +3 -0
- data/lib/convenient_service/support/method_parameters.rb +121 -0
- data/lib/convenient_service/support/never_reach_here.rb +21 -0
- data/lib/convenient_service/support/unique_value.rb +3 -0
- data/lib/convenient_service/support/value.rb +78 -0
- data/lib/convenient_service/support.rb +3 -0
- data/lib/convenient_service/utils/array/find_last.rb +8 -3
- data/lib/convenient_service/utils/object/instance_variable_delete.rb +1 -1
- data/lib/convenient_service/version.rb +1 -1
- data/lib/convenient_service.rb +23 -0
- metadata +109 -308
- data/.dev/.tmuxinator.yml +0 -22
- data/.dockerignore +0 -1
- data/.gem_release.yml +0 -11
- data/.github/contributing.md +0 -15
- data/.github/issue_template.md +0 -35
- data/.github/pull_request_template.md +0 -31
- data/.github/workflows/cd.yml +0 -68
- data/.github/workflows/ci.yml +0 -212
- data/.gitignore +0 -66
- data/.inch.yml +0 -7
- data/.rspec +0 -3
- data/.rubocop.yml +0 -45
- data/.rubocop_rspec.yml +0 -58
- data/.ruby-version +0 -1
- data/.tool-versions +0 -1
- data/.vscode/CacheItsValue.code-snippets +0 -15
- data/.vscode/DelegateTo.code-snippets +0 -15
- data/.vscode/cache_its_value.code-snippets +0 -17
- data/.vscode/comparison.code-snippets +0 -41
- data/.vscode/delegate_to.code-snippets +0 -20
- data/.yardopts +0 -16
- data/Appraisals +0 -146
- data/CHANGELOG.md +0 -504
- data/Gemfile +0 -17
- data/ROADMAP.md +0 -92
- data/Rakefile +0 -54
- data/Taskfile.yml +0 -679
- data/benchmark/commit_config/ips.rb +0 -18
- data/benchmark/commit_config/profile.rb +0 -30
- data/benchmark/empty_service/ips.rb +0 -123
- data/benchmark/has_committed_config/ips.rb +0 -78
- data/benchmark/has_committed_config/profile.rb +0 -30
- data/convenient_service.gemspec +0 -233
- data/coverage/.gitkeep +0 -0
- data/docker/2.7/Dockerfile +0 -73
- data/docker/3.0/Dockerfile +0 -73
- data/docker/3.1/Dockerfile +0 -73
- data/docker/3.2/Dockerfile +0 -73
- data/docker/jruby-9.4/Dockerfile +0 -88
- data/docker/truffleruby-22.3/Dockerfile +0 -91
- data/docs/.gitkeep +0 -0
- data/docs/api/.gitkeep +0 -0
- data/env.rb +0 -23
- data/gemfiles/.gitkeep +0 -0
- data/lib/convenient_service/common/plugins/has_callbacks/container.rb +0 -17
- data/lib/convenient_service/examples/dry/gemfile/dry_service/config.rb +0 -45
- data/lib/convenient_service/examples/dry/gemfile/dry_service.rb +0 -3
- data/lib/convenient_service/examples/dry/gemfile/services/assert_file_exists.rb +0 -29
- data/lib/convenient_service/examples/dry/gemfile/services/assert_file_not_empty.rb +0 -29
- data/lib/convenient_service/examples/dry/gemfile/services/assert_node_available.rb +0 -26
- data/lib/convenient_service/examples/dry/gemfile/services/assert_npm_package_available.rb +0 -39
- data/lib/convenient_service/examples/dry/gemfile/services/assert_valid_ruby_syntax.rb +0 -41
- data/lib/convenient_service/examples/dry/gemfile/services/format.rb +0 -37
- data/lib/convenient_service/examples/dry/gemfile/services/format_body.rb +0 -93
- data/lib/convenient_service/examples/dry/gemfile/services/format_gems_with_envs.rb +0 -96
- data/lib/convenient_service/examples/dry/gemfile/services/format_gems_without_envs.rb +0 -84
- data/lib/convenient_service/examples/dry/gemfile/services/format_header.rb +0 -74
- data/lib/convenient_service/examples/dry/gemfile/services/parse_content.rb +0 -93
- data/lib/convenient_service/examples/dry/gemfile/services/print_shell_command.rb +0 -44
- data/lib/convenient_service/examples/dry/gemfile/services/read_file_content.rb +0 -31
- data/lib/convenient_service/examples/dry/gemfile/services/run_shell_command.rb +0 -45
- data/lib/convenient_service/examples/dry/gemfile/services/strip_comments.rb +0 -109
- data/lib/convenient_service/examples/dry/gemfile/services.rb +0 -18
- data/lib/convenient_service/examples/dry/gemfile.rb +0 -27
- data/lib/convenient_service/examples/dry/v1/gemfile/dry_service/config.rb +0 -47
- data/lib/convenient_service/examples/dry/v1/gemfile/dry_service.rb +0 -3
- data/lib/convenient_service/examples/dry/v1/gemfile/services/assert_file_exists.rb +0 -31
- data/lib/convenient_service/examples/dry/v1/gemfile/services/assert_file_not_empty.rb +0 -31
- data/lib/convenient_service/examples/dry/v1/gemfile/services/assert_node_available.rb +0 -28
- data/lib/convenient_service/examples/dry/v1/gemfile/services/assert_npm_package_available.rb +0 -41
- data/lib/convenient_service/examples/dry/v1/gemfile/services/assert_valid_ruby_syntax.rb +0 -43
- data/lib/convenient_service/examples/dry/v1/gemfile/services/format.rb +0 -39
- data/lib/convenient_service/examples/dry/v1/gemfile/services/format_body.rb +0 -95
- data/lib/convenient_service/examples/dry/v1/gemfile/services/format_gems_with_envs.rb +0 -98
- data/lib/convenient_service/examples/dry/v1/gemfile/services/format_gems_without_envs.rb +0 -86
- data/lib/convenient_service/examples/dry/v1/gemfile/services/format_header.rb +0 -76
- data/lib/convenient_service/examples/dry/v1/gemfile/services/parse_content.rb +0 -95
- data/lib/convenient_service/examples/dry/v1/gemfile/services/read_file_content.rb +0 -33
- data/lib/convenient_service/examples/dry/v1/gemfile/services/run_shell_command.rb +0 -43
- data/lib/convenient_service/examples/dry/v1/gemfile/services/strip_comments.rb +0 -111
- data/lib/convenient_service/examples/dry/v1/gemfile/services.rb +0 -17
- data/lib/convenient_service/examples/dry/v1/gemfile.rb +0 -29
- data/lib/convenient_service/examples/rails/gemfile/rails_service/config.rb +0 -56
- data/lib/convenient_service/examples/rails/gemfile/rails_service.rb +0 -3
- data/lib/convenient_service/examples/rails/gemfile/services/assert_file_exists.rb +0 -25
- data/lib/convenient_service/examples/rails/gemfile/services/assert_file_not_empty.rb +0 -25
- data/lib/convenient_service/examples/rails/gemfile/services/assert_node_available.rb +0 -26
- data/lib/convenient_service/examples/rails/gemfile/services/assert_npm_package_available.rb +0 -35
- data/lib/convenient_service/examples/rails/gemfile/services/assert_valid_ruby_syntax.rb +0 -35
- data/lib/convenient_service/examples/rails/gemfile/services/format.rb +0 -66
- data/lib/convenient_service/examples/rails/gemfile/services/format_body.rb +0 -79
- data/lib/convenient_service/examples/rails/gemfile/services/format_gems_with_envs.rb +0 -82
- data/lib/convenient_service/examples/rails/gemfile/services/format_gems_without_envs.rb +0 -70
- data/lib/convenient_service/examples/rails/gemfile/services/format_header.rb +0 -68
- data/lib/convenient_service/examples/rails/gemfile/services/merge_sections.rb +0 -25
- data/lib/convenient_service/examples/rails/gemfile/services/parse_content.rb +0 -89
- data/lib/convenient_service/examples/rails/gemfile/services/print_shell_command.rb +0 -40
- data/lib/convenient_service/examples/rails/gemfile/services/read_file_content.rb +0 -27
- data/lib/convenient_service/examples/rails/gemfile/services/replace_file_content.rb +0 -37
- data/lib/convenient_service/examples/rails/gemfile/services/run_shell_command.rb +0 -40
- data/lib/convenient_service/examples/rails/gemfile/services/strip_comments.rb +0 -107
- data/lib/convenient_service/examples/rails/gemfile/services.rb +0 -21
- data/lib/convenient_service/examples/rails/gemfile.rb +0 -27
- data/lib/convenient_service/examples/rails/v1/gemfile/rails_service/config.rb +0 -58
- data/lib/convenient_service/examples/rails/v1/gemfile/rails_service.rb +0 -3
- data/lib/convenient_service/examples/rails/v1/gemfile/services/assert_file_exists.rb +0 -27
- data/lib/convenient_service/examples/rails/v1/gemfile/services/assert_file_not_empty.rb +0 -27
- data/lib/convenient_service/examples/rails/v1/gemfile/services/assert_node_available.rb +0 -28
- data/lib/convenient_service/examples/rails/v1/gemfile/services/assert_npm_package_available.rb +0 -37
- data/lib/convenient_service/examples/rails/v1/gemfile/services/assert_valid_ruby_syntax.rb +0 -37
- data/lib/convenient_service/examples/rails/v1/gemfile/services/format.rb +0 -68
- data/lib/convenient_service/examples/rails/v1/gemfile/services/format_body.rb +0 -81
- data/lib/convenient_service/examples/rails/v1/gemfile/services/format_gems_with_envs.rb +0 -84
- data/lib/convenient_service/examples/rails/v1/gemfile/services/format_gems_without_envs.rb +0 -72
- data/lib/convenient_service/examples/rails/v1/gemfile/services/format_header.rb +0 -70
- data/lib/convenient_service/examples/rails/v1/gemfile/services/merge_sections.rb +0 -27
- data/lib/convenient_service/examples/rails/v1/gemfile/services/parse_content.rb +0 -91
- data/lib/convenient_service/examples/rails/v1/gemfile/services/read_file_content.rb +0 -29
- data/lib/convenient_service/examples/rails/v1/gemfile/services/replace_file_content.rb +0 -39
- data/lib/convenient_service/examples/rails/v1/gemfile/services/run_shell_command.rb +0 -38
- data/lib/convenient_service/examples/rails/v1/gemfile/services/strip_comments.rb +0 -109
- data/lib/convenient_service/examples/rails/v1/gemfile/services.rb +0 -20
- data/lib/convenient_service/examples/rails/v1/gemfile.rb +0 -29
- data/lib/convenient_service/examples/standard/cowsay/services/build_cloud.rb +0 -42
- data/lib/convenient_service/examples/standard/cowsay/services/build_cow.rb +0 -38
- data/lib/convenient_service/examples/standard/cowsay/services/print.rb +0 -32
- data/lib/convenient_service/examples/standard/cowsay/services.rb +0 -5
- data/lib/convenient_service/examples/standard/cowsay.rb +0 -26
- data/lib/convenient_service/examples/standard/date_time/services/safe_parse.rb +0 -31
- data/lib/convenient_service/examples/standard/date_time/services.rb +0 -3
- data/lib/convenient_service/examples/standard/date_time.rb +0 -25
- data/lib/convenient_service/examples/standard/factorial/services/calculate.rb +0 -55
- data/lib/convenient_service/examples/standard/factorial/services.rb +0 -3
- data/lib/convenient_service/examples/standard/factorial/utils/timeout/with_timeout.rb +0 -50
- data/lib/convenient_service/examples/standard/factorial/utils/timeout.rb +0 -21
- data/lib/convenient_service/examples/standard/factorial/utils.rb +0 -3
- data/lib/convenient_service/examples/standard/factorial.rb +0 -26
- data/lib/convenient_service/examples/standard/gemfile/services/assert_file_exists.rb +0 -30
- data/lib/convenient_service/examples/standard/gemfile/services/assert_file_not_empty.rb +0 -30
- data/lib/convenient_service/examples/standard/gemfile/services/assert_node_available.rb +0 -26
- data/lib/convenient_service/examples/standard/gemfile/services/assert_npm_package_available.rb +0 -48
- data/lib/convenient_service/examples/standard/gemfile/services/assert_valid_ruby_syntax.rb +0 -39
- data/lib/convenient_service/examples/standard/gemfile/services/format.rb +0 -80
- data/lib/convenient_service/examples/standard/gemfile/services/format_body.rb +0 -83
- data/lib/convenient_service/examples/standard/gemfile/services/format_gems_with_envs.rb +0 -86
- data/lib/convenient_service/examples/standard/gemfile/services/format_gems_without_envs.rb +0 -74
- data/lib/convenient_service/examples/standard/gemfile/services/format_header.rb +0 -66
- data/lib/convenient_service/examples/standard/gemfile/services/merge_sections.rb +0 -52
- data/lib/convenient_service/examples/standard/gemfile/services/parse_content.rb +0 -101
- data/lib/convenient_service/examples/standard/gemfile/services/print_shell_command.rb +0 -45
- data/lib/convenient_service/examples/standard/gemfile/services/read_file_content.rb +0 -39
- data/lib/convenient_service/examples/standard/gemfile/services/replace_file_content.rb +0 -48
- data/lib/convenient_service/examples/standard/gemfile/services/run_shell_command.rb +0 -54
- data/lib/convenient_service/examples/standard/gemfile/services/strip_comments.rb +0 -111
- data/lib/convenient_service/examples/standard/gemfile/services.rb +0 -21
- data/lib/convenient_service/examples/standard/gemfile.rb +0 -26
- data/lib/convenient_service/examples/standard/request_params/constants.rb +0 -15
- data/lib/convenient_service/examples/standard/request_params/entities/description.rb +0 -40
- data/lib/convenient_service/examples/standard/request_params/entities/format.rb +0 -40
- data/lib/convenient_service/examples/standard/request_params/entities/id.rb +0 -47
- data/lib/convenient_service/examples/standard/request_params/entities/logger.rb +0 -21
- data/lib/convenient_service/examples/standard/request_params/entities/request.rb +0 -23
- data/lib/convenient_service/examples/standard/request_params/entities/source.rb +0 -40
- data/lib/convenient_service/examples/standard/request_params/entities/tag.rb +0 -40
- data/lib/convenient_service/examples/standard/request_params/entities/title.rb +0 -40
- data/lib/convenient_service/examples/standard/request_params/entities.rb +0 -11
- data/lib/convenient_service/examples/standard/request_params/services/apply_default_param_values.rb +0 -26
- data/lib/convenient_service/examples/standard/request_params/services/cast_params.rb +0 -38
- data/lib/convenient_service/examples/standard/request_params/services/extract_params_from_body.rb +0 -70
- data/lib/convenient_service/examples/standard/request_params/services/extract_params_from_path.rb +0 -62
- data/lib/convenient_service/examples/standard/request_params/services/filter_out_unpermitted_params.rb +0 -26
- data/lib/convenient_service/examples/standard/request_params/services/log_request_params.rb +0 -54
- data/lib/convenient_service/examples/standard/request_params/services/merge_params.rb +0 -26
- data/lib/convenient_service/examples/standard/request_params/services/prepare.rb +0 -65
- data/lib/convenient_service/examples/standard/request_params/services/validate_casted_params.rb +0 -94
- data/lib/convenient_service/examples/standard/request_params/services/validate_uncasted_params.rb +0 -72
- data/lib/convenient_service/examples/standard/request_params/services.rb +0 -13
- data/lib/convenient_service/examples/standard/request_params/utils/array/wrap.rb +0 -46
- data/lib/convenient_service/examples/standard/request_params/utils/array.rb +0 -21
- data/lib/convenient_service/examples/standard/request_params/utils/http/request/parse_body.rb +0 -42
- data/lib/convenient_service/examples/standard/request_params/utils/http/request/parse_path.rb +0 -40
- data/lib/convenient_service/examples/standard/request_params/utils/http/request.rb +0 -28
- data/lib/convenient_service/examples/standard/request_params/utils/http.rb +0 -3
- data/lib/convenient_service/examples/standard/request_params/utils/integer/safe_parse.rb +0 -31
- data/lib/convenient_service/examples/standard/request_params/utils/integer.rb +0 -25
- data/lib/convenient_service/examples/standard/request_params/utils/json/safe_parse.rb +0 -40
- data/lib/convenient_service/examples/standard/request_params/utils/json.rb +0 -21
- data/lib/convenient_service/examples/standard/request_params/utils/object/blank.rb +0 -34
- data/lib/convenient_service/examples/standard/request_params/utils/object/present.rb +0 -31
- data/lib/convenient_service/examples/standard/request_params/utils/object.rb +0 -26
- data/lib/convenient_service/examples/standard/request_params/utils/url/valid.rb +0 -47
- data/lib/convenient_service/examples/standard/request_params/utils/url.rb +0 -21
- data/lib/convenient_service/examples/standard/request_params/utils.rb +0 -8
- data/lib/convenient_service/examples/standard/request_params.rb +0 -49
- data/lib/convenient_service/examples/standard/v1/cowsay/services/build_cloud.rb +0 -44
- data/lib/convenient_service/examples/standard/v1/cowsay/services/build_cow.rb +0 -40
- data/lib/convenient_service/examples/standard/v1/cowsay/services/print.rb +0 -34
- data/lib/convenient_service/examples/standard/v1/cowsay/services.rb +0 -5
- data/lib/convenient_service/examples/standard/v1/cowsay.rb +0 -26
- data/lib/convenient_service/examples/standard/v1/date_time/services/safe_parse.rb +0 -33
- data/lib/convenient_service/examples/standard/v1/date_time/services.rb +0 -3
- data/lib/convenient_service/examples/standard/v1/date_time.rb +0 -25
- data/lib/convenient_service/examples/standard/v1/factorial/services/calculate.rb +0 -51
- data/lib/convenient_service/examples/standard/v1/factorial/services.rb +0 -3
- data/lib/convenient_service/examples/standard/v1/factorial/utils/timeout/with_timeout.rb +0 -52
- data/lib/convenient_service/examples/standard/v1/factorial/utils/timeout.rb +0 -23
- data/lib/convenient_service/examples/standard/v1/factorial/utils.rb +0 -3
- data/lib/convenient_service/examples/standard/v1/factorial.rb +0 -26
- data/lib/convenient_service/examples/standard/v1/gemfile/services/assert_file_exists.rb +0 -32
- data/lib/convenient_service/examples/standard/v1/gemfile/services/assert_file_not_empty.rb +0 -32
- data/lib/convenient_service/examples/standard/v1/gemfile/services/assert_node_available.rb +0 -28
- data/lib/convenient_service/examples/standard/v1/gemfile/services/assert_npm_package_available.rb +0 -50
- data/lib/convenient_service/examples/standard/v1/gemfile/services/assert_valid_ruby_syntax.rb +0 -41
- data/lib/convenient_service/examples/standard/v1/gemfile/services/format.rb +0 -82
- data/lib/convenient_service/examples/standard/v1/gemfile/services/format_body.rb +0 -85
- data/lib/convenient_service/examples/standard/v1/gemfile/services/format_gems_with_envs.rb +0 -88
- data/lib/convenient_service/examples/standard/v1/gemfile/services/format_gems_without_envs.rb +0 -76
- data/lib/convenient_service/examples/standard/v1/gemfile/services/format_header.rb +0 -68
- data/lib/convenient_service/examples/standard/v1/gemfile/services/merge_sections.rb +0 -54
- data/lib/convenient_service/examples/standard/v1/gemfile/services/parse_content.rb +0 -103
- data/lib/convenient_service/examples/standard/v1/gemfile/services/read_file_content.rb +0 -41
- data/lib/convenient_service/examples/standard/v1/gemfile/services/replace_file_content.rb +0 -50
- data/lib/convenient_service/examples/standard/v1/gemfile/services/run_shell_command.rb +0 -52
- data/lib/convenient_service/examples/standard/v1/gemfile/services/strip_comments.rb +0 -113
- data/lib/convenient_service/examples/standard/v1/gemfile/services.rb +0 -20
- data/lib/convenient_service/examples/standard/v1/gemfile.rb +0 -26
- data/lib/convenient_service/examples/standard/v1/request_params/constants.rb +0 -17
- data/lib/convenient_service/examples/standard/v1/request_params/entities/description.rb +0 -42
- data/lib/convenient_service/examples/standard/v1/request_params/entities/format.rb +0 -42
- data/lib/convenient_service/examples/standard/v1/request_params/entities/id.rb +0 -49
- data/lib/convenient_service/examples/standard/v1/request_params/entities/logger.rb +0 -23
- data/lib/convenient_service/examples/standard/v1/request_params/entities/request.rb +0 -25
- data/lib/convenient_service/examples/standard/v1/request_params/entities/source.rb +0 -42
- data/lib/convenient_service/examples/standard/v1/request_params/entities/tag.rb +0 -42
- data/lib/convenient_service/examples/standard/v1/request_params/entities/title.rb +0 -42
- data/lib/convenient_service/examples/standard/v1/request_params/entities.rb +0 -11
- data/lib/convenient_service/examples/standard/v1/request_params/services/apply_default_param_values.rb +0 -28
- data/lib/convenient_service/examples/standard/v1/request_params/services/cast_params.rb +0 -40
- data/lib/convenient_service/examples/standard/v1/request_params/services/extract_params_from_body.rb +0 -72
- data/lib/convenient_service/examples/standard/v1/request_params/services/extract_params_from_path.rb +0 -64
- data/lib/convenient_service/examples/standard/v1/request_params/services/filter_out_unpermitted_params.rb +0 -28
- data/lib/convenient_service/examples/standard/v1/request_params/services/log_request_params.rb +0 -56
- data/lib/convenient_service/examples/standard/v1/request_params/services/merge_params.rb +0 -28
- data/lib/convenient_service/examples/standard/v1/request_params/services/prepare.rb +0 -67
- data/lib/convenient_service/examples/standard/v1/request_params/services/validate_casted_params.rb +0 -96
- data/lib/convenient_service/examples/standard/v1/request_params/services/validate_uncasted_params.rb +0 -74
- data/lib/convenient_service/examples/standard/v1/request_params/services.rb +0 -13
- data/lib/convenient_service/examples/standard/v1/request_params/utils/array/wrap.rb +0 -48
- data/lib/convenient_service/examples/standard/v1/request_params/utils/array.rb +0 -23
- data/lib/convenient_service/examples/standard/v1/request_params/utils/http/request/parse_body.rb +0 -44
- data/lib/convenient_service/examples/standard/v1/request_params/utils/http/request/parse_path.rb +0 -42
- data/lib/convenient_service/examples/standard/v1/request_params/utils/http/request.rb +0 -30
- data/lib/convenient_service/examples/standard/v1/request_params/utils/http.rb +0 -3
- data/lib/convenient_service/examples/standard/v1/request_params/utils/integer/safe_parse.rb +0 -33
- data/lib/convenient_service/examples/standard/v1/request_params/utils/integer.rb +0 -27
- data/lib/convenient_service/examples/standard/v1/request_params/utils/json/safe_parse.rb +0 -42
- data/lib/convenient_service/examples/standard/v1/request_params/utils/json.rb +0 -23
- data/lib/convenient_service/examples/standard/v1/request_params/utils/object/blank.rb +0 -36
- data/lib/convenient_service/examples/standard/v1/request_params/utils/object/present.rb +0 -33
- data/lib/convenient_service/examples/standard/v1/request_params/utils/object.rb +0 -28
- data/lib/convenient_service/examples/standard/v1/request_params/utils/url/valid.rb +0 -49
- data/lib/convenient_service/examples/standard/v1/request_params/utils/url.rb +0 -23
- data/lib/convenient_service/examples/standard/v1/request_params/utils.rb +0 -8
- data/lib/convenient_service/examples/standard/v1/request_params.rb +0 -49
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/commands/generate_printable_method.rb +0 -50
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/arguments/commands/apply_stub_to_track_delegations.rb +0 -82
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/arguments/commands/generate_printable_arguments.rb +0 -100
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/arguments.rb +0 -95
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/base.rb +0 -87
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/return_its_value.rb +0 -132
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/with_any_arguments.rb +0 -37
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/with_concrete_arguments.rb +0 -37
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/without_arguments.rb +0 -37
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/values/base.rb +0 -41
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/values/with_calling_original.rb +0 -30
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/values/without_calling_original.rb +0 -30
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings.rb +0 -12
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings_collection/exceptions.rb +0 -57
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings_collection.rb +0 -171
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/delegation.rb +0 -79
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities.rb +0 -5
- data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher.rb +0 -276
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/reassignment/commands/define_method_in_container.rb +0 -74
- data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/reassignment/commands.rb +0 -3
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_result_step/can_be_executed/middleware.rb +0 -72
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_result_step/can_be_executed.rb +0 -4
- data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_result_step.rb +0 -5
- data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_checked_status/middleware.rb +0 -43
- data/logo.png +0 -0
- data/minitest.rb +0 -30
- data/yard/yard-convenient_service_concern.rb +0 -45
- /data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/{entities/matcher/commands.rb → commands.rb} +0 -0
- /data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/{matcher/entities/chainings/sub_matchers → sub_matchers}/arguments/commands.rb +0 -0
data/docker/3.1/Dockerfile
DELETED
@@ -1,73 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# Ruby 3.1 with Node.js 16.x.
|
3
|
-
#
|
4
|
-
# NOTE: Linted by hadolint.
|
5
|
-
#
|
6
|
-
# docker run --rm -i ghcr.io/hadolint/hadolint < docker/3.1/Dockerfile
|
7
|
-
#
|
8
|
-
# NOTE: A command to build image.
|
9
|
-
#
|
10
|
-
# cd convenient_service
|
11
|
-
# cp Gemfile Gemfile.3.1
|
12
|
-
# docker build . -f docker/3.1/Dockerfile -t convenient_service:3.1
|
13
|
-
# # or `task docker:build:ruby_3.1`
|
14
|
-
#
|
15
|
-
# NOTE: A command to run bash in container.
|
16
|
-
#
|
17
|
-
# cd convenient_service
|
18
|
-
# docker run --rm -it -v $(pwd):/gem convenient_service:3.1 bash
|
19
|
-
# # or `task docker:bash:ruby_3.1`
|
20
|
-
#
|
21
|
-
# NOTE: If there are no memory, performance, or cost constraints, prefer to use as standard Linux distribution as it is possible.
|
22
|
-
# In a general case, you simply won't have enough time to resolve all the "quirks" of more specific distributions if you are an application developer.
|
23
|
-
# That is why a `slim` version is used instead of `alpine`.
|
24
|
-
# Also `slim` is more similar to Ubuntu.
|
25
|
-
# - https://github.com/timbru31/docker-ruby-node/tree/master/3.1/16
|
26
|
-
# - https://medium.com/swlh/alpine-slim-stretch-buster-jessie-bullseye-bookworm-what-are-the-differences-in-docker-62171ed4531d
|
27
|
-
# - https://hub.docker.com/r/timbru31/ruby-node/tags
|
28
|
-
#
|
29
|
-
# NOTE: Gallium means Node.js 16.x.
|
30
|
-
# https://github.com/nodejs/Release
|
31
|
-
#
|
32
|
-
FROM timbru31/ruby-node:3.1-slim-gallium
|
33
|
-
|
34
|
-
##
|
35
|
-
# NOTE: `bundle install` dependencies.
|
36
|
-
#
|
37
|
-
RUN apt-get update -qq \
|
38
|
-
&& apt-get install --no-install-recommends -y git \
|
39
|
-
&& apt-get install --no-install-recommends -y make \
|
40
|
-
&& apt-get install --no-install-recommends -y gcc \
|
41
|
-
&& apt-get clean \
|
42
|
-
&& rm -rf /var/lib/apt/lists/*
|
43
|
-
|
44
|
-
RUN mkdir -p /gem
|
45
|
-
|
46
|
-
WORKDIR /gem
|
47
|
-
|
48
|
-
COPY . /gem
|
49
|
-
|
50
|
-
##
|
51
|
-
# NOTE: Every container has its own copy of `Gemfile`. This way a developer doesn't need to delete `Gemfile.lock` all the time when changing containers.
|
52
|
-
# - https://docs.docker.com/engine/reference/builder/#env
|
53
|
-
# - https://stackoverflow.com/questions/48863711/is-it-possible-to-override-gemfile-for-local-development
|
54
|
-
#
|
55
|
-
ENV BUNDLE_GEMFILE=Gemfile.3.1
|
56
|
-
|
57
|
-
RUN bundle install
|
58
|
-
|
59
|
-
RUN bundle exec appraisal install
|
60
|
-
|
61
|
-
##
|
62
|
-
# NOTE: Installs `task`.
|
63
|
-
# https://taskfile.dev/installation/#install-script
|
64
|
-
#
|
65
|
-
# NOTE: `task` is installed into `~/bin`. That is why `-b /bin` is used. See `echo ${PATH}` to debug.
|
66
|
-
#
|
67
|
-
RUN sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /bin
|
68
|
-
|
69
|
-
##
|
70
|
-
# NOTE: Is used to check whether a command is executed inside a Docker container. See Rakefile for examples.
|
71
|
-
# https://stackoverflow.com/a/65942222/12201472
|
72
|
-
#
|
73
|
-
ENV IN_DOCKER_CONTAINER=true
|
data/docker/3.2/Dockerfile
DELETED
@@ -1,73 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# Ruby 3.2 with Node.js 16.x.
|
3
|
-
#
|
4
|
-
# NOTE: Linted by hadolint.
|
5
|
-
#
|
6
|
-
# docker run --rm -i ghcr.io/hadolint/hadolint < docker/3.2/Dockerfile
|
7
|
-
#
|
8
|
-
# NOTE: A command to build image.
|
9
|
-
#
|
10
|
-
# cd convenient_service
|
11
|
-
# cp Gemfile Gemfile.3.2
|
12
|
-
# docker build . -f docker/3.2/Dockerfile -t convenient_service:3.2
|
13
|
-
# # or `task docker:build:ruby_3.2`
|
14
|
-
#
|
15
|
-
# NOTE: A command to run bash in container.
|
16
|
-
#
|
17
|
-
# cd convenient_service
|
18
|
-
# docker run --rm -it -v $(pwd):/gem convenient_service:3.2 bash
|
19
|
-
# # or `task docker:bash:ruby_3.2`
|
20
|
-
#
|
21
|
-
# NOTE: If there are no memory, performance, or cost constraints, prefer to use as standard Linux distribution as it is possible.
|
22
|
-
# In a general case, you simply won't have enough time to resolve all the "quirks" of more specific distributions if you are an application developer.
|
23
|
-
# That is why a `slim` version is used instead of `alpine`.
|
24
|
-
# Also `slim` is more similar to Ubuntu.
|
25
|
-
# - https://github.com/timbru31/docker-ruby-node/tree/master/3.2/16
|
26
|
-
# - https://medium.com/swlh/alpine-slim-stretch-buster-jessie-bullseye-bookworm-what-are-the-differences-in-docker-62171ed4531d
|
27
|
-
# - https://hub.docker.com/r/timbru31/ruby-node/tags
|
28
|
-
#
|
29
|
-
# NOTE: Gallium means Node.js 16.x.
|
30
|
-
# https://github.com/nodejs/Release
|
31
|
-
#
|
32
|
-
FROM timbru31/ruby-node:3.2-slim-gallium
|
33
|
-
|
34
|
-
##
|
35
|
-
# NOTE: `bundle install` dependencies.
|
36
|
-
#
|
37
|
-
RUN apt-get update -qq \
|
38
|
-
&& apt-get install --no-install-recommends -y git \
|
39
|
-
&& apt-get install --no-install-recommends -y make \
|
40
|
-
&& apt-get install --no-install-recommends -y gcc \
|
41
|
-
&& apt-get clean \
|
42
|
-
&& rm -rf /var/lib/apt/lists/*
|
43
|
-
|
44
|
-
RUN mkdir -p /gem
|
45
|
-
|
46
|
-
WORKDIR /gem
|
47
|
-
|
48
|
-
COPY . /gem
|
49
|
-
|
50
|
-
##
|
51
|
-
# NOTE: Every container has its own copy of `Gemfile`. This way a developer doesn't need to delete `Gemfile.lock` all the time when changing containers.
|
52
|
-
# - https://docs.docker.com/engine/reference/builder/#env
|
53
|
-
# - https://stackoverflow.com/questions/48863711/is-it-possible-to-override-gemfile-for-local-development
|
54
|
-
#
|
55
|
-
ENV BUNDLE_GEMFILE=Gemfile.3.2
|
56
|
-
|
57
|
-
RUN bundle install
|
58
|
-
|
59
|
-
RUN bundle exec appraisal install
|
60
|
-
|
61
|
-
##
|
62
|
-
# NOTE: Installs `task`.
|
63
|
-
# https://taskfile.dev/installation/#install-script
|
64
|
-
#
|
65
|
-
# NOTE: `task` is installed into `~/bin`. That is why `-b /bin` is used. See `echo ${PATH}` to debug.
|
66
|
-
#
|
67
|
-
RUN sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /bin
|
68
|
-
|
69
|
-
##
|
70
|
-
# NOTE: Is used to check whether a command is executed inside a Docker container. See Rakefile for examples.
|
71
|
-
# https://stackoverflow.com/a/65942222/12201472
|
72
|
-
#
|
73
|
-
ENV IN_DOCKER_CONTAINER=true
|
data/docker/jruby-9.4/Dockerfile
DELETED
@@ -1,88 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# JRuby 9.4 (CRuby 3.1 compatible) with Node.js 16.x.
|
3
|
-
# - https://www.jruby.org/download
|
4
|
-
#
|
5
|
-
# NOTE: Linted by hadolint.
|
6
|
-
#
|
7
|
-
# docker run --rm -i ghcr.io/hadolint/hadolint < docker/jruby-9.4/Dockerfile
|
8
|
-
#
|
9
|
-
# NOTE: A command to build image.
|
10
|
-
#
|
11
|
-
# cd convenient_service
|
12
|
-
# cp Gemfile Gemfile.jruby-9.4
|
13
|
-
# docker build . -f docker/jruby-9.4/Dockerfile -t convenient_service:jruby-9.4
|
14
|
-
# # or `task docker:build:jruby_9.4`
|
15
|
-
#
|
16
|
-
# NOTE: A command to run bash in container.
|
17
|
-
#
|
18
|
-
# cd convenient_service
|
19
|
-
# docker run --rm -it -v $(pwd):/gem convenient_service:jruby-9.4 bash
|
20
|
-
# # or `task docker:bash:jruby_9.4`
|
21
|
-
#
|
22
|
-
# NOTE: If there are no memory, performance, or cost constraints, prefer to use as standard Linux distribution as it is possible.
|
23
|
-
# In a general case, you simply won't have enough time to resolve all the "quirks" of more specific distributions if you are an application developer.
|
24
|
-
# `jruby:9.4` uses Ubuntu under the hood.s
|
25
|
-
# - https://hub.docker.com/_/jruby/tags
|
26
|
-
# - https://github.com/jruby/docker-jruby/blob/master/9.4/jre8/Dockerfile
|
27
|
-
# - https://github.com/adoptium/containers/blob/main/19/jdk/ubuntu/jammy/Dockerfile.releases.full#L20
|
28
|
-
#
|
29
|
-
# NOTE: Gallium means Node.js 16.x.
|
30
|
-
# https://github.com/nodejs/Release
|
31
|
-
#
|
32
|
-
FROM jruby:9.4
|
33
|
-
|
34
|
-
##
|
35
|
-
# NOTE: `git` is `bundle install` dependency.
|
36
|
-
#
|
37
|
-
# NOTE: `curl` and `gnupg2` are Node.js 16.x dependencies.
|
38
|
-
# https://github.com/timbru31/docker-ruby-node/blob/master/3.2/16/slim/Dockerfile
|
39
|
-
#
|
40
|
-
RUN apt-get update -qq \
|
41
|
-
&& apt-get install --no-install-recommends -y git \
|
42
|
-
&& apt-get install --no-install-recommends -y curl \
|
43
|
-
&& apt-get install --no-install-recommends -y gnupg2 \
|
44
|
-
&& apt-get clean \
|
45
|
-
&& rm -rf /var/lib/apt/lists/*
|
46
|
-
|
47
|
-
RUN mkdir -p /gem
|
48
|
-
|
49
|
-
WORKDIR /gem
|
50
|
-
|
51
|
-
COPY . /gem
|
52
|
-
|
53
|
-
##
|
54
|
-
# NOTE: Every container has its own copy of `Gemfile`. This way a developer doesn't need to delete `Gemfile.lock` all the time when changing containers.
|
55
|
-
# - https://docs.docker.com/engine/reference/builder/#env
|
56
|
-
# - https://stackoverflow.com/questions/48863711/is-it-possible-to-koverride-gemfile-for-local-development
|
57
|
-
#
|
58
|
-
ENV BUNDLE_GEMFILE=Gemfile.jruby-9.4
|
59
|
-
|
60
|
-
RUN bundle install
|
61
|
-
|
62
|
-
RUN bundle exec appraisal install
|
63
|
-
|
64
|
-
##
|
65
|
-
# NOTE: Installs `task`.
|
66
|
-
# https://taskfile.dev/installation/#install-script
|
67
|
-
#
|
68
|
-
# NOTE: `task` is installed into `~/bin`. That is why `-b /bin` is used. See `echo ${PATH}` to debug.
|
69
|
-
#
|
70
|
-
RUN sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /bin
|
71
|
-
|
72
|
-
##
|
73
|
-
# NOTE: Intalls Node.js 16.x and `yarn`.
|
74
|
-
# https://github.com/timbru31/docker-ruby-node/blob/master/3.2/16/slim/Dockerfile
|
75
|
-
#
|
76
|
-
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -\
|
77
|
-
&& apt-get update -qq \
|
78
|
-
&& apt-get install -qq --no-install-recommends nodejs \
|
79
|
-
&& apt-get upgrade -qq \
|
80
|
-
&& apt-get clean \
|
81
|
-
&& rm -rf /var/lib/apt/lists/*\
|
82
|
-
&& npm install -g yarn@1
|
83
|
-
|
84
|
-
##
|
85
|
-
# NOTE: Is used to check whether a command is executed inside a Docker container. See Rakefile for examples.
|
86
|
-
# https://stackoverflow.com/a/65942222/12201472
|
87
|
-
#
|
88
|
-
ENV IN_DOCKER_CONTAINER=true
|
@@ -1,91 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# TruffleRuby 22.3 (CRuby 3.1 compatible) with Node.js 16.x.
|
3
|
-
# - https://github.com/graalvm/container/blob/master/truffleruby/README.md
|
4
|
-
# - https://github.com/oracle/truffleruby/blob/master/doc/user/compatibility.md
|
5
|
-
#
|
6
|
-
# NOTE: Linted by hadolint.
|
7
|
-
#
|
8
|
-
# docker run --rm -i ghcr.io/hadolint/hadolint < docker/truffleruby-22.3/Dockerfile
|
9
|
-
#
|
10
|
-
# NOTE: A command to build image.
|
11
|
-
#
|
12
|
-
# cd convenient_service
|
13
|
-
# cp Gemfile Gemfile.truffleruby-22.3
|
14
|
-
# docker build . -f docker/truffleruby-22.3/Dockerfile -t convenient_service:truffleruby-22.3
|
15
|
-
# # or `task docker:build:jruby_9.4`
|
16
|
-
#
|
17
|
-
# NOTE: A command to run bash in container.
|
18
|
-
#
|
19
|
-
# cd convenient_service
|
20
|
-
# docker run --rm -it -v $(pwd):/gem convenient_service:truffleruby-22.3 bash
|
21
|
-
# # or `task docker:bash:jruby_9.4`
|
22
|
-
#
|
23
|
-
# NOTE: If there are no memory, performance, or cost constraints, prefer to use as standard Linux distribution as it is possible.
|
24
|
-
# In a general case, you simply won't have enough time to resolve all the "quirks" of more specific distributions if you are an application developer.
|
25
|
-
# `ghcr.io/graalvm/truffleruby:debian-22.3` uses Debian (that is similar to Ubuntu) under the hood.
|
26
|
-
# - https://github.com/graalvm/container/pkgs/container/truffleruby/65464856?tag=debian-22.3
|
27
|
-
# - https://github.com/graalvm/container/blob/master/truffleruby/Dockerfile.debian#L6
|
28
|
-
# - https://www.graalvm.org/latest/docs/getting-started/container-images/
|
29
|
-
#
|
30
|
-
# NOTE: Gallium means Node.js 16.x.
|
31
|
-
# https://github.com/nodejs/Release
|
32
|
-
#
|
33
|
-
FROM ghcr.io/graalvm/truffleruby:debian-22.3
|
34
|
-
|
35
|
-
##
|
36
|
-
# NOTE: `git`, `make`, `gcc` are `bundle install` dependencies.
|
37
|
-
#
|
38
|
-
# NOTE: `curl` and `gnupg2` are Node.js 16.x dependencies.
|
39
|
-
# https://github.com/timbru31/docker-ruby-node/blob/master/3.2/16/slim/Dockerfile
|
40
|
-
#
|
41
|
-
RUN apt-get update -qq \
|
42
|
-
&& apt-get install --no-install-recommends -y git \
|
43
|
-
&& apt-get install --no-install-recommends -y make \
|
44
|
-
&& apt-get install --no-install-recommends -y gcc \
|
45
|
-
&& apt-get install --no-install-recommends -y curl \
|
46
|
-
&& apt-get install --no-install-recommends -y gnupg2 \
|
47
|
-
&& apt-get clean \
|
48
|
-
&& rm -rf /var/lib/apt/lists/*
|
49
|
-
|
50
|
-
RUN mkdir -p /gem
|
51
|
-
|
52
|
-
WORKDIR /gem
|
53
|
-
|
54
|
-
COPY . /gem
|
55
|
-
|
56
|
-
##
|
57
|
-
# NOTE: Every container has its own copy of `Gemfile`. This way a developer doesn't need to delete `Gemfile.lock` all the time when changing containers.
|
58
|
-
# - https://docs.docker.com/engine/reference/builder/#env
|
59
|
-
# - https://stackoverflow.com/questions/48863711/is-it-possible-to-koverride-gemfile-for-local-development
|
60
|
-
#
|
61
|
-
ENV BUNDLE_GEMFILE=Gemfile.truffleruby-22.3
|
62
|
-
|
63
|
-
RUN bundle install
|
64
|
-
|
65
|
-
RUN bundle exec appraisal install
|
66
|
-
|
67
|
-
##
|
68
|
-
# NOTE: Installs `task`.
|
69
|
-
# https://taskfile.dev/installation/#install-script
|
70
|
-
#
|
71
|
-
# NOTE: `task` is installed into `~/bin`. That is why `-b /bin` is used. See `echo ${PATH}` to debug.
|
72
|
-
#
|
73
|
-
RUN sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /bin
|
74
|
-
|
75
|
-
##
|
76
|
-
# NOTE: Intalls Node.js 16.x and `yarn`.
|
77
|
-
# https://github.com/timbru31/docker-ruby-node/blob/master/3.2/16/slim/Dockerfile
|
78
|
-
#
|
79
|
-
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -\
|
80
|
-
&& apt-get update -qq \
|
81
|
-
&& apt-get install -qq --no-install-recommends nodejs \
|
82
|
-
&& apt-get upgrade -qq \
|
83
|
-
&& apt-get clean \
|
84
|
-
&& rm -rf /var/lib/apt/lists/*\
|
85
|
-
&& npm install -g yarn@1
|
86
|
-
|
87
|
-
##
|
88
|
-
# NOTE: Is used to check whether a command is executed inside a Docker container. See Rakefile for examples.
|
89
|
-
# https://stackoverflow.com/a/65942222/12201472
|
90
|
-
#
|
91
|
-
ENV IN_DOCKER_CONTAINER=true
|
data/docs/.gitkeep
DELETED
File without changes
|
data/docs/api/.gitkeep
DELETED
File without changes
|
data/env.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# NOTE: Appraisal sets `BUNDLE_GEMFILE` env variable.
|
3
|
-
# This is how appraisals can be differentiated from each other.
|
4
|
-
# https://github.com/thoughtbot/appraisal/blob/v2.4.1/lib/appraisal/command.rb#L36
|
5
|
-
#
|
6
|
-
# If `BUNDLE_GEMFILE` is an empty string, then `APPRAISAL_NAME` is resolved to an empty string as well.
|
7
|
-
# User passed `APPRAISAL_NAME` has a precedence.
|
8
|
-
#
|
9
|
-
# IMPORTANT: `APPRAISAL_NAME` env variable should be initialized as far as it is possible.
|
10
|
-
#
|
11
|
-
# IMPORTANT: ENV variables declared in this file should NOT be used inside the lib folder.
|
12
|
-
#
|
13
|
-
ENV["APPRAISAL_NAME"] ||= ENV["BUNDLE_GEMFILE"].to_s.then(&File.method(:basename)).then { |name| name.end_with?(".gemfile") ? name.delete_suffix(".gemfile") : "" }
|
14
|
-
|
15
|
-
puts "ENV[\"APPRAISAL_NAME\"] -> `#{ENV["APPRAISAL_NAME"]}`"
|
16
|
-
|
17
|
-
##
|
18
|
-
# NOTE: Ruby version may be set by docker.
|
19
|
-
# https://github.com/docker-library/ruby/blob/master/3.1/alpine3.16/Dockerfile#L30
|
20
|
-
#
|
21
|
-
ENV["RUBY_VERSION"] ||= ::RUBY_VERSION
|
22
|
-
|
23
|
-
puts "ENV[\"RUBY_VERSION\"] -> `#{ENV["RUBY_VERSION"]}`"
|
data/gemfiles/.gitkeep
DELETED
File without changes
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module ConvenientService
|
4
|
-
module Common
|
5
|
-
module Plugins
|
6
|
-
module HasCallbacks
|
7
|
-
module Container
|
8
|
-
include Support::DependencyContainer::Export
|
9
|
-
|
10
|
-
export :"entities.Callback" do
|
11
|
-
Entities::Callback
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,45 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
##
|
4
|
-
# Usage example:
|
5
|
-
#
|
6
|
-
# result = ConvenientService::Examples::Dry::Gemfile.format(path: "Gemfile")
|
7
|
-
# result = ConvenientService::Examples::Dry::Gemfile.format(path: "spec/cli/gemfile/format/fixtures/Gemfile")
|
8
|
-
#
|
9
|
-
module ConvenientService
|
10
|
-
module Examples
|
11
|
-
module Dry
|
12
|
-
class Gemfile
|
13
|
-
class DryService
|
14
|
-
module Config
|
15
|
-
include Support::Concern
|
16
|
-
|
17
|
-
included do
|
18
|
-
include ConvenientService::Standard::Config
|
19
|
-
|
20
|
-
##
|
21
|
-
# NOTE: `AssignsAttributesInConstructor::UsingDryInitializer` plugin.
|
22
|
-
#
|
23
|
-
concerns do
|
24
|
-
use ConvenientService::Plugins::Common::AssignsAttributesInConstructor::UsingDryInitializer::Concern
|
25
|
-
end
|
26
|
-
|
27
|
-
##
|
28
|
-
# NOTE: `HasJSendResultParamsValidations::UsingDryValidation` plugin.
|
29
|
-
#
|
30
|
-
concerns do
|
31
|
-
use ConvenientService::Plugins::Service::HasJSendResultParamsValidations::UsingDryValidation::Concern
|
32
|
-
end
|
33
|
-
|
34
|
-
middlewares :result do
|
35
|
-
insert_before \
|
36
|
-
ConvenientService::Plugins::Service::RaisesOnNotResultReturnValue::Middleware,
|
37
|
-
ConvenientService::Plugins::Service::HasJSendResultParamsValidations::UsingDryValidation::Middleware
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module ConvenientService
|
4
|
-
module Examples
|
5
|
-
module Dry
|
6
|
-
class Gemfile
|
7
|
-
module Services
|
8
|
-
class AssertFileExists
|
9
|
-
include DryService::Config
|
10
|
-
|
11
|
-
option :path
|
12
|
-
|
13
|
-
contract do
|
14
|
-
schema do
|
15
|
-
required(:path).filled(:string)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
def result
|
20
|
-
return failure("File with path `#{path}` does NOT exist") unless ::File.exist?(path)
|
21
|
-
|
22
|
-
success
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module ConvenientService
|
4
|
-
module Examples
|
5
|
-
module Dry
|
6
|
-
class Gemfile
|
7
|
-
module Services
|
8
|
-
class AssertFileNotEmpty
|
9
|
-
include DryService::Config
|
10
|
-
|
11
|
-
option :path
|
12
|
-
|
13
|
-
contract do
|
14
|
-
schema do
|
15
|
-
required(:path).filled(:string)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
def result
|
20
|
-
return failure("File with path `#{path}` is empty") if ::File.zero?(path)
|
21
|
-
|
22
|
-
success
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
##
|
4
|
-
# Usage example:
|
5
|
-
#
|
6
|
-
# ConvenientService::Examples::Dry::Gemfile::Services::AssertNodeAvailable.result
|
7
|
-
#
|
8
|
-
module ConvenientService
|
9
|
-
module Examples
|
10
|
-
module Dry
|
11
|
-
class Gemfile
|
12
|
-
module Services
|
13
|
-
class AssertNodeAvailable
|
14
|
-
include DryService::Config
|
15
|
-
|
16
|
-
##
|
17
|
-
# NOTE: `> /dev/null 2>&1` is used to hide output.
|
18
|
-
# https://unix.stackexchange.com/a/119650/394253
|
19
|
-
#
|
20
|
-
step Services::RunShellCommand, in: {command: -> { "which node > /dev/null 2>&1" }}
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
@@ -1,39 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
##
|
4
|
-
# Usage example:
|
5
|
-
#
|
6
|
-
# ConvenientService::Examples::Dry::Gemfile::Services::AssertNpmPackageAvailable.result(name: "lodash")
|
7
|
-
#
|
8
|
-
module ConvenientService
|
9
|
-
module Examples
|
10
|
-
module Dry
|
11
|
-
class Gemfile
|
12
|
-
module Services
|
13
|
-
class AssertNpmPackageAvailable
|
14
|
-
include DryService::Config
|
15
|
-
|
16
|
-
option :name
|
17
|
-
|
18
|
-
contract do
|
19
|
-
schema do
|
20
|
-
required(:name).filled(:string)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
step Services::AssertNodeAvailable
|
25
|
-
|
26
|
-
##
|
27
|
-
# NOTE: `> /dev/null 2>&1` is used to hide output.
|
28
|
-
# https://unix.stackexchange.com/a/119650/394253
|
29
|
-
#
|
30
|
-
# NOTE: For `npm list` and its options docs, see
|
31
|
-
# https://docs.npmjs.com/cli/v7/commands/npm-ls
|
32
|
-
#
|
33
|
-
step Services::RunShellCommand, in: {command: -> { "npm list #{name} --depth=0 > /dev/null 2>&1" }}
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module ConvenientService
|
4
|
-
module Examples
|
5
|
-
module Dry
|
6
|
-
class Gemfile
|
7
|
-
module Services
|
8
|
-
class AssertValidRubySyntax
|
9
|
-
include DryService::Config
|
10
|
-
|
11
|
-
option :content
|
12
|
-
|
13
|
-
contract do
|
14
|
-
schema do
|
15
|
-
required(:content).value(:string)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
def result
|
20
|
-
##
|
21
|
-
# NOTE: `> /dev/null 2>&1` is used to hide output.
|
22
|
-
# https://unix.stackexchange.com/a/119650/394253
|
23
|
-
#
|
24
|
-
check_ruby_syntax_result = Services::RunShellCommand.result(command: "ruby -c #{file.path} > /dev/null 2>&1")
|
25
|
-
|
26
|
-
return error("`#{content}` contains invalid Ruby syntax") unless check_ruby_syntax_result.success?
|
27
|
-
|
28
|
-
success
|
29
|
-
end
|
30
|
-
|
31
|
-
private
|
32
|
-
|
33
|
-
def file
|
34
|
-
@file ||= ::Tempfile.new.tap { |tempfile| tempfile.write(content) }.tap(&:close)
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
@@ -1,37 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
##
|
4
|
-
# Usage example:
|
5
|
-
#
|
6
|
-
# result = ConvenientService::Examples::Dry::Gemfile::Services::Format.result(path: "Gemfile")
|
7
|
-
# result = ConvenientService::Examples::Dry::Gemfile::Services::Format.result(path: "spec/cli/gemfile/format/fixtures/Gemfile")
|
8
|
-
#
|
9
|
-
module ConvenientService
|
10
|
-
module Examples
|
11
|
-
module Dry
|
12
|
-
class Gemfile
|
13
|
-
module Services
|
14
|
-
class Format
|
15
|
-
include DryService::Config
|
16
|
-
|
17
|
-
option :path
|
18
|
-
|
19
|
-
step Services::ReadFileContent, in: :path, out: :content
|
20
|
-
step Services::StripComments, in: :content, out: :content_without_comments
|
21
|
-
step Services::ParseContent, in: {content: :content_without_comments}, out: :parsed_content
|
22
|
-
step Services::FormatHeader, in: :parsed_content, out: {formatted_content: :formatted_header_content}
|
23
|
-
step Services::FormatBody, in: :parsed_content, out: {formatted_content: :formatted_body_content}
|
24
|
-
|
25
|
-
before :result do
|
26
|
-
@progressbar = ::ProgressBar.create(title: "Formatting", total: steps.count)
|
27
|
-
end
|
28
|
-
|
29
|
-
after :step do |step_result|
|
30
|
-
@progressbar.increment
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|