convenient_service 0.16.0 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (486) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -5
  3. data/lib/convenient_service/common/plugins/can_have_user_provided_entity/commands/find_or_create_entity.rb +7 -2
  4. data/lib/convenient_service/common/plugins/can_have_user_provided_entity/exceptions.rb +4 -4
  5. data/lib/convenient_service/common/plugins/ensures_negated_j_send_result/middleware.rb +22 -0
  6. data/lib/convenient_service/common/plugins/ensures_negated_j_send_result.rb +3 -0
  7. data/lib/convenient_service/common/plugins/has_around_callbacks/concern.rb +8 -1
  8. data/lib/convenient_service/common/plugins/has_around_callbacks/exceptions.rb +2 -2
  9. data/lib/convenient_service/common/plugins/has_around_callbacks/middleware.rb +30 -9
  10. data/lib/convenient_service/common/plugins/has_callbacks/concern.rb +19 -9
  11. data/lib/convenient_service/common/plugins/has_callbacks/entities/callback_collection.rb +49 -1
  12. data/lib/convenient_service/common/plugins/has_callbacks/middleware.rb +21 -3
  13. data/lib/convenient_service/common/plugins/has_callbacks.rb +0 -1
  14. data/lib/convenient_service/common/plugins/has_instance_proxy/commands/create_instance_proxy_class.rb +83 -0
  15. data/lib/convenient_service/common/plugins/has_instance_proxy/commands.rb +3 -0
  16. data/lib/convenient_service/common/plugins/has_instance_proxy/concern.rb +22 -0
  17. data/lib/convenient_service/common/plugins/has_instance_proxy/entities/instance_proxy.rb +76 -0
  18. data/lib/convenient_service/common/plugins/has_instance_proxy/entities.rb +3 -0
  19. data/lib/convenient_service/common/plugins/has_instance_proxy/middleware.rb +20 -0
  20. data/lib/convenient_service/common/plugins/has_instance_proxy.rb +6 -0
  21. data/lib/convenient_service/common/plugins/has_internals/entities/internals/plugins/has_cache/concern.rb +12 -0
  22. data/lib/convenient_service/common/plugins.rb +2 -0
  23. data/lib/convenient_service/core/concern/class_methods.rb +7 -2
  24. data/lib/convenient_service/core/concern/instance_methods.rb +7 -2
  25. data/lib/convenient_service/core/entities/config/commands/track_method_missing_commit_trigger.rb +1 -1
  26. data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/caller/commands/define_method_middlewares_caller.rb +2 -2
  27. data/lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middlewares/base/commands/create_observable_middleware.rb +3 -0
  28. data/lib/convenient_service/core/entities/config/exceptions.rb +6 -4
  29. data/lib/convenient_service/core/entities/config.rb +4 -1
  30. data/lib/convenient_service/dependencies/extractions/active_support_backtrace_cleaner/backtrace_cleaner.rb +28 -8
  31. data/lib/convenient_service/dependencies/extractions/active_support_backtrace_cleaner.rb +3 -3
  32. data/lib/convenient_service/dependencies/extractions/b.rb +2 -0
  33. data/lib/convenient_service/dependencies/extractions/ce.rb +16 -0
  34. data/lib/convenient_service/dependencies/extractions.rb +1 -0
  35. data/lib/convenient_service/dependencies.rb +17 -4
  36. data/lib/convenient_service/exception.rb +98 -10
  37. data/lib/convenient_service/feature/configs/standard.rb +8 -0
  38. data/lib/convenient_service/feature/plugins/can_have_entries/commands/define_entries.rb +49 -0
  39. data/lib/convenient_service/feature/plugins/can_have_entries/commands/define_entry.rb +18 -4
  40. data/lib/convenient_service/feature/plugins/can_have_entries/commands.rb +1 -0
  41. data/lib/convenient_service/feature/plugins/can_have_entries/concern.rb +13 -4
  42. data/lib/convenient_service/feature/plugins/can_have_entries/exceptions.rb +14 -4
  43. data/lib/convenient_service/logger.rb +13 -2
  44. data/lib/convenient_service/rspec/helpers/classes/stub_service/entities/result_spec.rb +0 -8
  45. data/lib/convenient_service/rspec/helpers/classes/wrap_method/entities/wrapped_method.rb +5 -5
  46. data/lib/convenient_service/rspec/helpers/classes/wrap_method/exceptions.rb +2 -2
  47. data/lib/convenient_service/rspec/matchers/classes/call_chain_next.rb +41 -0
  48. data/lib/convenient_service/rspec/matchers/classes/results/base/entities/validator/commands/validate_result_step.rb +1 -1
  49. data/lib/convenient_service/rspec/matchers/classes/results/base/exceptions.rb +2 -2
  50. data/lib/convenient_service/rspec/primitive_helpers/classes/ignoring_exception/exceptions.rb +2 -2
  51. data/lib/convenient_service/rspec/primitive_helpers/classes/ignoring_exception.rb +1 -1
  52. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/commands/generate_printable_method.rb +46 -0
  53. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/delegation.rb +89 -0
  54. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/inputs.rb +223 -0
  55. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/outputs.rb +38 -0
  56. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matcher_collection.rb +157 -0
  57. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/arguments/commands/apply_stub_to_track_delegations.rb +77 -0
  58. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/arguments/commands/generate_printable_arguments.rb +94 -0
  59. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/arguments.rb +89 -0
  60. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/base.rb +99 -0
  61. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/return_custom_value.rb +91 -0
  62. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/return_delegation_value.rb +129 -0
  63. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/with_any_arguments.rb +31 -0
  64. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/with_concrete_arguments.rb +31 -0
  65. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/without_arguments.rb +31 -0
  66. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers.rb +11 -0
  67. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities.rb +5 -1
  68. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/exceptions.rb +65 -0
  69. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to.rb +163 -41
  70. data/lib/convenient_service/service/configs/minimal.rb +85 -33
  71. data/lib/convenient_service/service/configs/standard/v1.rb +42 -24
  72. data/lib/convenient_service/service/configs/standard.rb +60 -46
  73. data/lib/convenient_service/service/plugins/can_have_connected_steps/concern.rb +503 -0
  74. data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/and.rb +133 -0
  75. data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/base.rb +126 -0
  76. data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/empty.rb +104 -0
  77. data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/group.rb +118 -0
  78. data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb +118 -0
  79. data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/or.rb +145 -0
  80. data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/scalar.rb +133 -0
  81. data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions.rb +10 -0
  82. data/lib/convenient_service/service/plugins/can_have_connected_steps/entities/step_collection.rb +217 -0
  83. data/lib/convenient_service/service/plugins/can_have_connected_steps/entities.rb +4 -0
  84. data/lib/convenient_service/service/plugins/can_have_connected_steps/exceptions.rb +95 -0
  85. data/lib/convenient_service/service/plugins/can_have_connected_steps/middleware.rb +30 -0
  86. data/lib/convenient_service/service/plugins/can_have_connected_steps.rb +6 -0
  87. data/lib/convenient_service/service/plugins/can_have_fallbacks/concern.rb +2 -2
  88. data/lib/convenient_service/service/plugins/can_have_fallbacks/exceptions.rb +4 -4
  89. data/lib/convenient_service/service/plugins/can_have_fallbacks/middleware.rb +1 -1
  90. data/lib/convenient_service/service/plugins/can_have_sequential_steps/concern.rb +76 -0
  91. data/lib/convenient_service/service/plugins/{can_have_steps → can_have_sequential_steps}/entities/step_collection.rb +54 -10
  92. data/lib/convenient_service/service/plugins/can_have_sequential_steps/entities.rb +3 -0
  93. data/lib/convenient_service/service/plugins/{can_have_steps → can_have_sequential_steps}/middleware.rb +7 -3
  94. data/lib/convenient_service/service/plugins/can_have_sequential_steps.rb +5 -0
  95. data/lib/convenient_service/service/plugins/can_have_steps/concern.rb +5 -58
  96. data/lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/define_method_in_container.rb +45 -26
  97. data/lib/convenient_service/service/plugins/can_have_steps/entities/method/concern/instance_methods.rb +1 -1
  98. data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/alias.rb +2 -2
  99. data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/proc.rb +1 -1
  100. data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/raw.rb +1 -1
  101. data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/reassignment.rb +2 -4
  102. data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/usual.rb +2 -2
  103. data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/directions/input.rb +2 -2
  104. data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/directions/output.rb +1 -1
  105. data/lib/convenient_service/service/plugins/can_have_steps/entities/method/exceptions.rb +27 -47
  106. data/lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb +156 -81
  107. data/lib/convenient_service/service/plugins/can_have_steps/entities/step/exceptions.rb +21 -2
  108. 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 +3 -3
  109. data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_method_step/can_be_executed/middleware.rb +64 -4
  110. data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_method_step/can_be_executed.rb +1 -0
  111. data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_method_step/concern.rb +7 -0
  112. data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_alternative_steps.rb +3 -0
  113. data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_fallbacks/concern.rb +0 -46
  114. data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_fallbacks/middleware.rb +26 -2
  115. data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_parent_result/middleware.rb +13 -1
  116. data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/{can_be_result_step → has_result}/concern.rb +8 -4
  117. data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_result/middleware.rb +33 -0
  118. data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_result.rb +4 -0
  119. data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/raises_on_not_result_return_value/exceptions.rb +2 -2
  120. data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/raises_on_not_result_return_value/middleware.rb +1 -1
  121. data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins.rb +2 -1
  122. data/lib/convenient_service/service/plugins/can_have_steps/entities.rb +0 -1
  123. data/lib/convenient_service/service/plugins/can_have_steps.rb +0 -1
  124. data/lib/convenient_service/service/plugins/has_inspect/concern.rb +0 -1
  125. data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_checked_status/concern.rb +2 -2
  126. data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_checked_status.rb +0 -1
  127. data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/concern/instance_methods.rb +140 -0
  128. data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/concern/instance_methods.rb +1 -1
  129. 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 -3
  130. 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
  131. 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
  132. 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
  133. 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
  134. data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/exceptions.rb +17 -2
  135. data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_negated_result/concern.rb +72 -0
  136. data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_negated_result.rb +3 -0
  137. data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/raises_on_not_checked_result_status/exceptions.rb +2 -2
  138. data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/raises_on_not_checked_result_status/middleware.rb +2 -2
  139. data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins.rb +1 -0
  140. data/lib/convenient_service/service/plugins/has_j_send_result.rb +39 -1
  141. data/lib/convenient_service/service/plugins/has_j_send_result_params_validations/using_dry_validation/middleware.rb +4 -0
  142. data/lib/convenient_service/service/plugins/has_j_send_result_short_syntax/error/exceptions.rb +6 -6
  143. data/lib/convenient_service/service/plugins/has_j_send_result_short_syntax/error/middleware.rb +3 -3
  144. data/lib/convenient_service/service/plugins/has_j_send_result_short_syntax/failure/exceptions.rb +6 -6
  145. data/lib/convenient_service/service/plugins/has_j_send_result_short_syntax/failure/middleware.rb +3 -3
  146. data/lib/convenient_service/service/plugins/has_j_send_result_short_syntax/success/commands/refute_kwargs_contain_j_send_and_extra_keys.rb +1 -1
  147. data/lib/convenient_service/service/plugins/has_j_send_result_short_syntax/success/exceptions.rb +2 -2
  148. data/lib/convenient_service/service/plugins/has_j_send_result_status_check_short_syntax/concern.rb +0 -8
  149. data/lib/convenient_service/service/plugins/has_negated_j_send_result/concern.rb +23 -0
  150. data/lib/convenient_service/service/plugins/has_negated_j_send_result.rb +3 -0
  151. data/lib/convenient_service/service/plugins/has_negated_result/concern.rb +33 -0
  152. data/lib/convenient_service/service/plugins/has_negated_result/exceptions.rb +21 -0
  153. data/lib/convenient_service/service/plugins/has_negated_result.rb +4 -0
  154. data/lib/convenient_service/service/plugins/has_result/concern.rb +1 -1
  155. data/lib/convenient_service/service/plugins/has_result/exceptions.rb +2 -2
  156. data/lib/convenient_service/service/plugins/raises_on_double_result/exceptions.rb +2 -2
  157. data/lib/convenient_service/service/plugins/raises_on_double_result/middleware.rb +1 -1
  158. data/lib/convenient_service/service/plugins/raises_on_not_result_return_value/exceptions.rb +2 -2
  159. data/lib/convenient_service/service/plugins/raises_on_not_result_return_value/middleware.rb +1 -1
  160. data/lib/convenient_service/service/plugins/{wraps_result_in_db_transaction → wraps_result_in_d_b_transaction}/middleware.rb +1 -1
  161. data/lib/convenient_service/service/plugins.rb +7 -2
  162. data/lib/convenient_service/specification.rb +28 -0
  163. data/lib/convenient_service/support/abstract_method/exceptions.rb +2 -2
  164. data/lib/convenient_service/support/abstract_method.rb +1 -1
  165. data/lib/convenient_service/support/backtrace_cleaner.rb +128 -0
  166. data/lib/convenient_service/support/cache/entities/caches/base.rb +3 -0
  167. data/lib/convenient_service/support/cache/exceptions.rb +2 -2
  168. data/lib/convenient_service/support/cache.rb +1 -1
  169. data/lib/convenient_service/support/castable/exceptions.rb +4 -4
  170. data/lib/convenient_service/support/castable.rb +1 -1
  171. data/lib/convenient_service/support/command.rb +3 -3
  172. data/lib/convenient_service/support/counter.rb +6 -6
  173. data/lib/convenient_service/support/dependency_container/commands/assert_valid_container.rb +1 -1
  174. data/lib/convenient_service/support/dependency_container/commands/assert_valid_method.rb +1 -1
  175. data/lib/convenient_service/support/dependency_container/commands/assert_valid_scope.rb +1 -1
  176. data/lib/convenient_service/support/dependency_container/exceptions.rb +8 -8
  177. data/lib/convenient_service/support/dependency_container/export.rb +1 -1
  178. data/lib/convenient_service/support/finite_loop.rb +6 -6
  179. data/lib/convenient_service/support/method_parameters.rb +121 -0
  180. data/lib/convenient_service/support/never_reach_here.rb +21 -0
  181. data/lib/convenient_service/support/unique_value.rb +3 -0
  182. data/lib/convenient_service/support/value.rb +78 -0
  183. data/lib/convenient_service/support.rb +4 -0
  184. data/lib/convenient_service/utils/array/exceptions.rb +2 -2
  185. data/lib/convenient_service/utils/array/find_last.rb +8 -3
  186. data/lib/convenient_service/utils/array/merge.rb +1 -1
  187. data/lib/convenient_service/utils/hash/assert_valid_keys.rb +1 -1
  188. data/lib/convenient_service/utils/object/instance_variable_delete.rb +1 -1
  189. data/lib/convenient_service/version.rb +1 -1
  190. data/lib/convenient_service.rb +121 -0
  191. metadata +129 -347
  192. data/.dev/.tmuxinator.yml +0 -22
  193. data/.dockerignore +0 -1
  194. data/.gem_release.yml +0 -11
  195. data/.github/contributing.md +0 -15
  196. data/.github/issue_template.md +0 -35
  197. data/.github/pull_request_template.md +0 -31
  198. data/.github/workflows/cd.yml +0 -68
  199. data/.github/workflows/ci.yml +0 -212
  200. data/.gitignore +0 -66
  201. data/.inch.yml +0 -7
  202. data/.rspec +0 -3
  203. data/.rubocop.yml +0 -45
  204. data/.rubocop_rspec.yml +0 -58
  205. data/.ruby-version +0 -1
  206. data/.tool-versions +0 -1
  207. data/.vscode/CacheItsValue.code-snippets +0 -15
  208. data/.vscode/DelegateTo.code-snippets +0 -15
  209. data/.vscode/cache_its_value.code-snippets +0 -17
  210. data/.vscode/comparison.code-snippets +0 -41
  211. data/.vscode/delegate_to.code-snippets +0 -20
  212. data/.yardopts +0 -16
  213. data/Appraisals +0 -146
  214. data/CHANGELOG.md +0 -474
  215. data/Gemfile +0 -17
  216. data/ROADMAP.md +0 -92
  217. data/Rakefile +0 -54
  218. data/Taskfile.yml +0 -679
  219. data/benchmark/commit_config/ips.rb +0 -18
  220. data/benchmark/commit_config/profile.rb +0 -30
  221. data/benchmark/empty_service/ips.rb +0 -123
  222. data/benchmark/has_committed_config/ips.rb +0 -78
  223. data/benchmark/has_committed_config/profile.rb +0 -30
  224. data/convenient_service.gemspec +0 -214
  225. data/coverage/.gitkeep +0 -0
  226. data/docker/2.7/Dockerfile +0 -73
  227. data/docker/3.0/Dockerfile +0 -73
  228. data/docker/3.1/Dockerfile +0 -73
  229. data/docker/3.2/Dockerfile +0 -73
  230. data/docker/jruby-9.4/Dockerfile +0 -88
  231. data/docker/truffleruby-22.3/Dockerfile +0 -91
  232. data/docs/.gitkeep +0 -0
  233. data/docs/api/.gitkeep +0 -0
  234. data/env.rb +0 -23
  235. data/gemfiles/.gitkeep +0 -0
  236. data/lib/convenient_service/common/plugins/has_callbacks/container.rb +0 -17
  237. data/lib/convenient_service/examples/dry/gemfile/dry_service/config.rb +0 -45
  238. data/lib/convenient_service/examples/dry/gemfile/dry_service.rb +0 -3
  239. data/lib/convenient_service/examples/dry/gemfile/services/assert_file_exists.rb +0 -29
  240. data/lib/convenient_service/examples/dry/gemfile/services/assert_file_not_empty.rb +0 -29
  241. data/lib/convenient_service/examples/dry/gemfile/services/assert_node_available.rb +0 -26
  242. data/lib/convenient_service/examples/dry/gemfile/services/assert_npm_package_available.rb +0 -39
  243. data/lib/convenient_service/examples/dry/gemfile/services/assert_valid_ruby_syntax.rb +0 -41
  244. data/lib/convenient_service/examples/dry/gemfile/services/format.rb +0 -37
  245. data/lib/convenient_service/examples/dry/gemfile/services/format_body.rb +0 -93
  246. data/lib/convenient_service/examples/dry/gemfile/services/format_gems_with_envs.rb +0 -96
  247. data/lib/convenient_service/examples/dry/gemfile/services/format_gems_without_envs.rb +0 -84
  248. data/lib/convenient_service/examples/dry/gemfile/services/format_header.rb +0 -74
  249. data/lib/convenient_service/examples/dry/gemfile/services/parse_content.rb +0 -93
  250. data/lib/convenient_service/examples/dry/gemfile/services/print_shell_command.rb +0 -44
  251. data/lib/convenient_service/examples/dry/gemfile/services/read_file_content.rb +0 -31
  252. data/lib/convenient_service/examples/dry/gemfile/services/run_shell_command.rb +0 -45
  253. data/lib/convenient_service/examples/dry/gemfile/services/strip_comments.rb +0 -109
  254. data/lib/convenient_service/examples/dry/gemfile/services.rb +0 -18
  255. data/lib/convenient_service/examples/dry/gemfile.rb +0 -27
  256. data/lib/convenient_service/examples/dry/v1/gemfile/dry_service/config.rb +0 -47
  257. data/lib/convenient_service/examples/dry/v1/gemfile/dry_service.rb +0 -3
  258. data/lib/convenient_service/examples/dry/v1/gemfile/services/assert_file_exists.rb +0 -31
  259. data/lib/convenient_service/examples/dry/v1/gemfile/services/assert_file_not_empty.rb +0 -31
  260. data/lib/convenient_service/examples/dry/v1/gemfile/services/assert_node_available.rb +0 -28
  261. data/lib/convenient_service/examples/dry/v1/gemfile/services/assert_npm_package_available.rb +0 -41
  262. data/lib/convenient_service/examples/dry/v1/gemfile/services/assert_valid_ruby_syntax.rb +0 -43
  263. data/lib/convenient_service/examples/dry/v1/gemfile/services/format.rb +0 -39
  264. data/lib/convenient_service/examples/dry/v1/gemfile/services/format_body.rb +0 -95
  265. data/lib/convenient_service/examples/dry/v1/gemfile/services/format_gems_with_envs.rb +0 -98
  266. data/lib/convenient_service/examples/dry/v1/gemfile/services/format_gems_without_envs.rb +0 -86
  267. data/lib/convenient_service/examples/dry/v1/gemfile/services/format_header.rb +0 -76
  268. data/lib/convenient_service/examples/dry/v1/gemfile/services/parse_content.rb +0 -95
  269. data/lib/convenient_service/examples/dry/v1/gemfile/services/read_file_content.rb +0 -33
  270. data/lib/convenient_service/examples/dry/v1/gemfile/services/run_shell_command.rb +0 -43
  271. data/lib/convenient_service/examples/dry/v1/gemfile/services/strip_comments.rb +0 -111
  272. data/lib/convenient_service/examples/dry/v1/gemfile/services.rb +0 -17
  273. data/lib/convenient_service/examples/dry/v1/gemfile.rb +0 -29
  274. data/lib/convenient_service/examples/rails/gemfile/rails_service/config.rb +0 -56
  275. data/lib/convenient_service/examples/rails/gemfile/rails_service.rb +0 -3
  276. data/lib/convenient_service/examples/rails/gemfile/services/assert_file_exists.rb +0 -25
  277. data/lib/convenient_service/examples/rails/gemfile/services/assert_file_not_empty.rb +0 -25
  278. data/lib/convenient_service/examples/rails/gemfile/services/assert_node_available.rb +0 -26
  279. data/lib/convenient_service/examples/rails/gemfile/services/assert_npm_package_available.rb +0 -35
  280. data/lib/convenient_service/examples/rails/gemfile/services/assert_valid_ruby_syntax.rb +0 -35
  281. data/lib/convenient_service/examples/rails/gemfile/services/format.rb +0 -66
  282. data/lib/convenient_service/examples/rails/gemfile/services/format_body.rb +0 -79
  283. data/lib/convenient_service/examples/rails/gemfile/services/format_gems_with_envs.rb +0 -82
  284. data/lib/convenient_service/examples/rails/gemfile/services/format_gems_without_envs.rb +0 -70
  285. data/lib/convenient_service/examples/rails/gemfile/services/format_header.rb +0 -68
  286. data/lib/convenient_service/examples/rails/gemfile/services/merge_sections.rb +0 -25
  287. data/lib/convenient_service/examples/rails/gemfile/services/parse_content.rb +0 -89
  288. data/lib/convenient_service/examples/rails/gemfile/services/print_shell_command.rb +0 -40
  289. data/lib/convenient_service/examples/rails/gemfile/services/read_file_content.rb +0 -27
  290. data/lib/convenient_service/examples/rails/gemfile/services/replace_file_content.rb +0 -37
  291. data/lib/convenient_service/examples/rails/gemfile/services/run_shell_command.rb +0 -40
  292. data/lib/convenient_service/examples/rails/gemfile/services/strip_comments.rb +0 -107
  293. data/lib/convenient_service/examples/rails/gemfile/services.rb +0 -21
  294. data/lib/convenient_service/examples/rails/gemfile.rb +0 -27
  295. data/lib/convenient_service/examples/rails/v1/gemfile/rails_service/config.rb +0 -58
  296. data/lib/convenient_service/examples/rails/v1/gemfile/rails_service.rb +0 -3
  297. data/lib/convenient_service/examples/rails/v1/gemfile/services/assert_file_exists.rb +0 -27
  298. data/lib/convenient_service/examples/rails/v1/gemfile/services/assert_file_not_empty.rb +0 -27
  299. data/lib/convenient_service/examples/rails/v1/gemfile/services/assert_node_available.rb +0 -28
  300. data/lib/convenient_service/examples/rails/v1/gemfile/services/assert_npm_package_available.rb +0 -37
  301. data/lib/convenient_service/examples/rails/v1/gemfile/services/assert_valid_ruby_syntax.rb +0 -37
  302. data/lib/convenient_service/examples/rails/v1/gemfile/services/format.rb +0 -68
  303. data/lib/convenient_service/examples/rails/v1/gemfile/services/format_body.rb +0 -81
  304. data/lib/convenient_service/examples/rails/v1/gemfile/services/format_gems_with_envs.rb +0 -84
  305. data/lib/convenient_service/examples/rails/v1/gemfile/services/format_gems_without_envs.rb +0 -72
  306. data/lib/convenient_service/examples/rails/v1/gemfile/services/format_header.rb +0 -70
  307. data/lib/convenient_service/examples/rails/v1/gemfile/services/merge_sections.rb +0 -27
  308. data/lib/convenient_service/examples/rails/v1/gemfile/services/parse_content.rb +0 -91
  309. data/lib/convenient_service/examples/rails/v1/gemfile/services/read_file_content.rb +0 -29
  310. data/lib/convenient_service/examples/rails/v1/gemfile/services/replace_file_content.rb +0 -39
  311. data/lib/convenient_service/examples/rails/v1/gemfile/services/run_shell_command.rb +0 -38
  312. data/lib/convenient_service/examples/rails/v1/gemfile/services/strip_comments.rb +0 -109
  313. data/lib/convenient_service/examples/rails/v1/gemfile/services.rb +0 -20
  314. data/lib/convenient_service/examples/rails/v1/gemfile.rb +0 -29
  315. data/lib/convenient_service/examples/standard/cowsay/services/build_cloud.rb +0 -42
  316. data/lib/convenient_service/examples/standard/cowsay/services/build_cow.rb +0 -38
  317. data/lib/convenient_service/examples/standard/cowsay/services/print.rb +0 -32
  318. data/lib/convenient_service/examples/standard/cowsay/services.rb +0 -5
  319. data/lib/convenient_service/examples/standard/cowsay.rb +0 -26
  320. data/lib/convenient_service/examples/standard/date_time/services/safe_parse.rb +0 -31
  321. data/lib/convenient_service/examples/standard/date_time/services.rb +0 -3
  322. data/lib/convenient_service/examples/standard/date_time.rb +0 -25
  323. data/lib/convenient_service/examples/standard/factorial/services/calculate.rb +0 -55
  324. data/lib/convenient_service/examples/standard/factorial/services.rb +0 -3
  325. data/lib/convenient_service/examples/standard/factorial/utils/timeout/with_timeout.rb +0 -50
  326. data/lib/convenient_service/examples/standard/factorial/utils/timeout.rb +0 -21
  327. data/lib/convenient_service/examples/standard/factorial/utils.rb +0 -3
  328. data/lib/convenient_service/examples/standard/factorial.rb +0 -26
  329. data/lib/convenient_service/examples/standard/gemfile/services/assert_file_exists.rb +0 -30
  330. data/lib/convenient_service/examples/standard/gemfile/services/assert_file_not_empty.rb +0 -30
  331. data/lib/convenient_service/examples/standard/gemfile/services/assert_node_available.rb +0 -26
  332. data/lib/convenient_service/examples/standard/gemfile/services/assert_npm_package_available.rb +0 -48
  333. data/lib/convenient_service/examples/standard/gemfile/services/assert_valid_ruby_syntax.rb +0 -39
  334. data/lib/convenient_service/examples/standard/gemfile/services/format.rb +0 -80
  335. data/lib/convenient_service/examples/standard/gemfile/services/format_body.rb +0 -83
  336. data/lib/convenient_service/examples/standard/gemfile/services/format_gems_with_envs.rb +0 -86
  337. data/lib/convenient_service/examples/standard/gemfile/services/format_gems_without_envs.rb +0 -74
  338. data/lib/convenient_service/examples/standard/gemfile/services/format_header.rb +0 -66
  339. data/lib/convenient_service/examples/standard/gemfile/services/merge_sections.rb +0 -52
  340. data/lib/convenient_service/examples/standard/gemfile/services/parse_content.rb +0 -101
  341. data/lib/convenient_service/examples/standard/gemfile/services/print_shell_command.rb +0 -45
  342. data/lib/convenient_service/examples/standard/gemfile/services/read_file_content.rb +0 -39
  343. data/lib/convenient_service/examples/standard/gemfile/services/replace_file_content.rb +0 -48
  344. data/lib/convenient_service/examples/standard/gemfile/services/run_shell_command.rb +0 -54
  345. data/lib/convenient_service/examples/standard/gemfile/services/strip_comments.rb +0 -111
  346. data/lib/convenient_service/examples/standard/gemfile/services.rb +0 -21
  347. data/lib/convenient_service/examples/standard/gemfile.rb +0 -26
  348. data/lib/convenient_service/examples/standard/request_params/constants.rb +0 -15
  349. data/lib/convenient_service/examples/standard/request_params/entities/description.rb +0 -40
  350. data/lib/convenient_service/examples/standard/request_params/entities/format.rb +0 -40
  351. data/lib/convenient_service/examples/standard/request_params/entities/id.rb +0 -47
  352. data/lib/convenient_service/examples/standard/request_params/entities/logger.rb +0 -21
  353. data/lib/convenient_service/examples/standard/request_params/entities/request.rb +0 -23
  354. data/lib/convenient_service/examples/standard/request_params/entities/source.rb +0 -40
  355. data/lib/convenient_service/examples/standard/request_params/entities/tag.rb +0 -40
  356. data/lib/convenient_service/examples/standard/request_params/entities/title.rb +0 -40
  357. data/lib/convenient_service/examples/standard/request_params/entities.rb +0 -11
  358. data/lib/convenient_service/examples/standard/request_params/services/apply_default_param_values.rb +0 -26
  359. data/lib/convenient_service/examples/standard/request_params/services/cast_params.rb +0 -38
  360. data/lib/convenient_service/examples/standard/request_params/services/extract_params_from_body.rb +0 -70
  361. data/lib/convenient_service/examples/standard/request_params/services/extract_params_from_path.rb +0 -62
  362. data/lib/convenient_service/examples/standard/request_params/services/filter_out_unpermitted_params.rb +0 -26
  363. data/lib/convenient_service/examples/standard/request_params/services/log_request_params.rb +0 -54
  364. data/lib/convenient_service/examples/standard/request_params/services/merge_params.rb +0 -26
  365. data/lib/convenient_service/examples/standard/request_params/services/prepare.rb +0 -65
  366. data/lib/convenient_service/examples/standard/request_params/services/validate_casted_params.rb +0 -94
  367. data/lib/convenient_service/examples/standard/request_params/services/validate_uncasted_params.rb +0 -72
  368. data/lib/convenient_service/examples/standard/request_params/services.rb +0 -13
  369. data/lib/convenient_service/examples/standard/request_params/utils/array/wrap.rb +0 -46
  370. data/lib/convenient_service/examples/standard/request_params/utils/array.rb +0 -21
  371. data/lib/convenient_service/examples/standard/request_params/utils/http/request/parse_body.rb +0 -42
  372. data/lib/convenient_service/examples/standard/request_params/utils/http/request/parse_path.rb +0 -40
  373. data/lib/convenient_service/examples/standard/request_params/utils/http/request.rb +0 -28
  374. data/lib/convenient_service/examples/standard/request_params/utils/http.rb +0 -3
  375. data/lib/convenient_service/examples/standard/request_params/utils/integer/safe_parse.rb +0 -31
  376. data/lib/convenient_service/examples/standard/request_params/utils/integer.rb +0 -25
  377. data/lib/convenient_service/examples/standard/request_params/utils/json/safe_parse.rb +0 -40
  378. data/lib/convenient_service/examples/standard/request_params/utils/json.rb +0 -21
  379. data/lib/convenient_service/examples/standard/request_params/utils/object/blank.rb +0 -34
  380. data/lib/convenient_service/examples/standard/request_params/utils/object/present.rb +0 -31
  381. data/lib/convenient_service/examples/standard/request_params/utils/object.rb +0 -26
  382. data/lib/convenient_service/examples/standard/request_params/utils/url/valid.rb +0 -47
  383. data/lib/convenient_service/examples/standard/request_params/utils/url.rb +0 -21
  384. data/lib/convenient_service/examples/standard/request_params/utils.rb +0 -8
  385. data/lib/convenient_service/examples/standard/request_params.rb +0 -50
  386. data/lib/convenient_service/examples/standard/v1/cowsay/services/build_cloud.rb +0 -44
  387. data/lib/convenient_service/examples/standard/v1/cowsay/services/build_cow.rb +0 -40
  388. data/lib/convenient_service/examples/standard/v1/cowsay/services/print.rb +0 -34
  389. data/lib/convenient_service/examples/standard/v1/cowsay/services.rb +0 -5
  390. data/lib/convenient_service/examples/standard/v1/cowsay.rb +0 -26
  391. data/lib/convenient_service/examples/standard/v1/date_time/services/safe_parse.rb +0 -33
  392. data/lib/convenient_service/examples/standard/v1/date_time/services.rb +0 -3
  393. data/lib/convenient_service/examples/standard/v1/date_time.rb +0 -25
  394. data/lib/convenient_service/examples/standard/v1/factorial/services/calculate.rb +0 -51
  395. data/lib/convenient_service/examples/standard/v1/factorial/services.rb +0 -3
  396. data/lib/convenient_service/examples/standard/v1/factorial/utils/timeout/with_timeout.rb +0 -52
  397. data/lib/convenient_service/examples/standard/v1/factorial/utils/timeout.rb +0 -23
  398. data/lib/convenient_service/examples/standard/v1/factorial/utils.rb +0 -3
  399. data/lib/convenient_service/examples/standard/v1/factorial.rb +0 -26
  400. data/lib/convenient_service/examples/standard/v1/gemfile/services/assert_file_exists.rb +0 -32
  401. data/lib/convenient_service/examples/standard/v1/gemfile/services/assert_file_not_empty.rb +0 -32
  402. data/lib/convenient_service/examples/standard/v1/gemfile/services/assert_node_available.rb +0 -28
  403. data/lib/convenient_service/examples/standard/v1/gemfile/services/assert_npm_package_available.rb +0 -50
  404. data/lib/convenient_service/examples/standard/v1/gemfile/services/assert_valid_ruby_syntax.rb +0 -41
  405. data/lib/convenient_service/examples/standard/v1/gemfile/services/format.rb +0 -82
  406. data/lib/convenient_service/examples/standard/v1/gemfile/services/format_body.rb +0 -85
  407. data/lib/convenient_service/examples/standard/v1/gemfile/services/format_gems_with_envs.rb +0 -88
  408. data/lib/convenient_service/examples/standard/v1/gemfile/services/format_gems_without_envs.rb +0 -76
  409. data/lib/convenient_service/examples/standard/v1/gemfile/services/format_header.rb +0 -68
  410. data/lib/convenient_service/examples/standard/v1/gemfile/services/merge_sections.rb +0 -54
  411. data/lib/convenient_service/examples/standard/v1/gemfile/services/parse_content.rb +0 -103
  412. data/lib/convenient_service/examples/standard/v1/gemfile/services/print_shell_command.rb +0 -47
  413. data/lib/convenient_service/examples/standard/v1/gemfile/services/read_file_content.rb +0 -41
  414. data/lib/convenient_service/examples/standard/v1/gemfile/services/replace_file_content.rb +0 -50
  415. data/lib/convenient_service/examples/standard/v1/gemfile/services/run_shell_command.rb +0 -52
  416. data/lib/convenient_service/examples/standard/v1/gemfile/services/strip_comments.rb +0 -113
  417. data/lib/convenient_service/examples/standard/v1/gemfile/services.rb +0 -20
  418. data/lib/convenient_service/examples/standard/v1/gemfile.rb +0 -26
  419. data/lib/convenient_service/examples/standard/v1/request_params/constants.rb +0 -17
  420. data/lib/convenient_service/examples/standard/v1/request_params/entities/description.rb +0 -42
  421. data/lib/convenient_service/examples/standard/v1/request_params/entities/format.rb +0 -42
  422. data/lib/convenient_service/examples/standard/v1/request_params/entities/id.rb +0 -49
  423. data/lib/convenient_service/examples/standard/v1/request_params/entities/logger.rb +0 -23
  424. data/lib/convenient_service/examples/standard/v1/request_params/entities/request.rb +0 -25
  425. data/lib/convenient_service/examples/standard/v1/request_params/entities/source.rb +0 -42
  426. data/lib/convenient_service/examples/standard/v1/request_params/entities/tag.rb +0 -42
  427. data/lib/convenient_service/examples/standard/v1/request_params/entities/title.rb +0 -42
  428. data/lib/convenient_service/examples/standard/v1/request_params/entities.rb +0 -11
  429. data/lib/convenient_service/examples/standard/v1/request_params/services/apply_default_param_values.rb +0 -28
  430. data/lib/convenient_service/examples/standard/v1/request_params/services/cast_params.rb +0 -40
  431. data/lib/convenient_service/examples/standard/v1/request_params/services/extract_params_from_body.rb +0 -72
  432. data/lib/convenient_service/examples/standard/v1/request_params/services/extract_params_from_path.rb +0 -64
  433. data/lib/convenient_service/examples/standard/v1/request_params/services/filter_out_unpermitted_params.rb +0 -28
  434. data/lib/convenient_service/examples/standard/v1/request_params/services/log_request_params.rb +0 -56
  435. data/lib/convenient_service/examples/standard/v1/request_params/services/merge_params.rb +0 -28
  436. data/lib/convenient_service/examples/standard/v1/request_params/services/prepare.rb +0 -67
  437. data/lib/convenient_service/examples/standard/v1/request_params/services/validate_casted_params.rb +0 -96
  438. data/lib/convenient_service/examples/standard/v1/request_params/services/validate_uncasted_params.rb +0 -74
  439. data/lib/convenient_service/examples/standard/v1/request_params/services.rb +0 -13
  440. data/lib/convenient_service/examples/standard/v1/request_params/utils/array/wrap.rb +0 -48
  441. data/lib/convenient_service/examples/standard/v1/request_params/utils/array.rb +0 -23
  442. data/lib/convenient_service/examples/standard/v1/request_params/utils/http/request/parse_body.rb +0 -44
  443. data/lib/convenient_service/examples/standard/v1/request_params/utils/http/request/parse_path.rb +0 -42
  444. data/lib/convenient_service/examples/standard/v1/request_params/utils/http/request.rb +0 -30
  445. data/lib/convenient_service/examples/standard/v1/request_params/utils/http.rb +0 -3
  446. data/lib/convenient_service/examples/standard/v1/request_params/utils/integer/safe_parse.rb +0 -33
  447. data/lib/convenient_service/examples/standard/v1/request_params/utils/integer.rb +0 -27
  448. data/lib/convenient_service/examples/standard/v1/request_params/utils/json/safe_parse.rb +0 -42
  449. data/lib/convenient_service/examples/standard/v1/request_params/utils/json.rb +0 -23
  450. data/lib/convenient_service/examples/standard/v1/request_params/utils/object/blank.rb +0 -36
  451. data/lib/convenient_service/examples/standard/v1/request_params/utils/object/present.rb +0 -33
  452. data/lib/convenient_service/examples/standard/v1/request_params/utils/object.rb +0 -28
  453. data/lib/convenient_service/examples/standard/v1/request_params/utils/url/valid.rb +0 -49
  454. data/lib/convenient_service/examples/standard/v1/request_params/utils/url.rb +0 -23
  455. data/lib/convenient_service/examples/standard/v1/request_params/utils.rb +0 -8
  456. data/lib/convenient_service/examples/standard/v1/request_params.rb +0 -50
  457. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/commands/generate_printable_method.rb +0 -50
  458. 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 -78
  459. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/arguments/commands/generate_printable_arguments.rb +0 -100
  460. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/arguments.rb +0 -95
  461. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/base.rb +0 -87
  462. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/return_its_value.rb +0 -132
  463. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/with_any_arguments.rb +0 -37
  464. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/with_concrete_arguments.rb +0 -37
  465. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/without_arguments.rb +0 -37
  466. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/values/base.rb +0 -41
  467. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/values/with_calling_original.rb +0 -30
  468. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/values/without_calling_original.rb +0 -30
  469. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings.rb +0 -12
  470. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings_collection/exceptions.rb +0 -57
  471. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings_collection.rb +0 -171
  472. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/delegation.rb +0 -79
  473. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities.rb +0 -5
  474. data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher.rb +0 -276
  475. data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/reassignment/commands/define_method_in_container.rb +0 -74
  476. data/lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/reassignment/commands.rb +0 -3
  477. data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_result_step/can_be_executed/middleware.rb +0 -72
  478. data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_result_step/can_be_executed.rb +0 -4
  479. data/lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_result_step.rb +0 -5
  480. data/lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_checked_status/middleware.rb +0 -43
  481. data/lib/convenient_service/service/plugins/has_j_send_result/exceptions.rb +0 -21
  482. data/logo.png +0 -0
  483. data/minitest.rb +0 -30
  484. data/yard/yard-convenient_service_concern.rb +0 -45
  485. /data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/{entities/matcher/commands.rb → commands.rb} +0 -0
  486. /data/lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/{matcher/entities/chainings/sub_matchers → sub_matchers}/arguments/commands.rb +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f1f1683a178b667d76adabe5735fa7361e7946f3a9aa7d3bcfffca62ed4d7b4
4
- data.tar.gz: 0d64f2e78e0ef56707d8efcdcb66dafd9386a118c44d96139c699a4517cb7bcb
3
+ metadata.gz: a908de0164e680bc5926c42eeeea9df2afdcddd065dcad74dcaf403aacfe22f5
4
+ data.tar.gz: f10f0debfa96eeef7bf37ff35332606cd8a936833ab0f3ff98490bc0f8e6af37
5
5
  SHA512:
6
- metadata.gz: e16ab9be69fb6721ec9fdc290c857d8da8db77bc46702aad4179f6ce04df3d73a0119befec63c13d04d0c24d15ad5d46310fd243f4d3bb214b7153dfdc1d688e
7
- data.tar.gz: cef563d9e931f10f766e6ae5f7eb0136a96ab0c892f28a13ddf9db3860a19fcb984a7e514f6b6430750df8287ec9da4df0f4d75ea7a7e620321a72569b08c29e
6
+ metadata.gz: 4f172f536a57db46fd16a29ac859a59f32060c910db5ee568249be5a74328d001b152ad71cd81c35344085b41ea85f6e66f5dd8d9fdc414ed2fbe24433a3e002
7
+ data.tar.gz: a64c8dda2bce2f27f1462f485c3b62268d06c48367d464486fd7a51c2fba01b0ba96da27c5d66a4f467b053b556631d395a25735833c7c448ad733e474b28540
data/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  <!-- stand_with_ukraine:end -->
8
8
 
9
9
  <!-- header:start -->
10
- <!-- TODO: Remove html to display in YARD with commonmark -->
10
+ <!-- TODO: Remove html to display in YARD with common mark -->
11
11
  <h1 align="center">
12
12
  Convenient Service
13
13
  </h1>
@@ -27,7 +27,7 @@
27
27
  <!-- badges:end -->
28
28
 
29
29
  <!-- logo:start -->
30
- <!-- TODO: Remove html to display in YARD with commonmark -->
30
+ <!-- TODO: Remove html to display in YARD with common mark -->
31
31
  <p align="center">
32
32
  <img src="https://raw.githubusercontent.com/marian13/convenient_service/main/logo.png" width="300">
33
33
  </p>
@@ -49,9 +49,9 @@ This library is under heavy development. Public API may be subject to change. Th
49
49
 
50
50
  - Visit the [All-in-One Presentation](https://marian13.github.io/static_content/convenient_service/presentations/all_in_one) to get a quick overview.
51
51
 
52
- - Check out [Convenient Service Official User Docs](https://marian13.github.io/convenient_service_docs) for installation, requirements, and usage guides.
52
+ - Check out [Convenient Service Official User Docs](https://userdocs.convenientservice.org/) for installation, requirements, and usage guides.
53
53
 
54
- - Read [the API docs](https://marian13.github.io/convenient_service) to get familiar with the newest functionality that is not documented yet.
54
+ - Read [the API docs](https://apidocs.convenientservice.org/) to get familiar with the newest functionality that is not documented yet.
55
55
 
56
56
  - Create [an issue](https://github.com/marian13/convenient_service/issues) if you are going to report a bug.
57
57
 
@@ -70,5 +70,5 @@ This library is under heavy development. Public API may be subject to change. Th
70
70
  ---
71
71
 
72
72
  <!-- author:start -->
73
- Copyright (c) 2022-2023 [Marian Kostyk](http://mariankostyk.com).
73
+ Copyright (c) 2022-2024 Marian Kostyk.
74
74
  <!-- author:end -->
@@ -32,8 +32,8 @@ module ConvenientService
32
32
  # @return [void]
33
33
  #
34
34
  def call
35
- raise Exceptions::ProtoEntityHasNoName.new(proto_entity: proto_entity) unless proto_entity_name
36
- raise Exceptions::ProtoEntityHasNoConcern.new(proto_entity: proto_entity) unless proto_entity_concern
35
+ ::ConvenientService.raise Exceptions::ProtoEntityHasNoName.new(proto_entity: proto_entity) unless proto_entity_name
36
+ ::ConvenientService.raise Exceptions::ProtoEntityHasNoConcern.new(proto_entity: proto_entity) unless proto_entity_concern
37
37
 
38
38
  entity.include Core
39
39
 
@@ -71,6 +71,11 @@ module ConvenientService
71
71
  #
72
72
  entity.class_exec(proto_entity) do |proto_entity|
73
73
  define_singleton_method(:proto_entity) { proto_entity }
74
+
75
+ ##
76
+ # @internal
77
+ # TODO: Try `self.proto_entity == other.proto_entity if self < proto_entity_concern`.
78
+ #
74
79
  define_singleton_method(:==) { |other| self.proto_entity == other.proto_entity if other.respond_to?(:proto_entity) }
75
80
 
76
81
  ##
@@ -6,7 +6,7 @@ module ConvenientService
6
6
  module CanHaveUserProvidedEntity
7
7
  module Exceptions
8
8
  class ProtoEntityHasNoName < ::ConvenientService::Exception
9
- def initialize(proto_entity:)
9
+ def initialize_with_kwargs(proto_entity:)
10
10
  message = <<~TEXT
11
11
  Proto entity `#{proto_entity}` has no name.
12
12
 
@@ -18,12 +18,12 @@ module ConvenientService
18
18
  NOTE: Anonymous classes do NOT have names. Are you passing an anonymous class?
19
19
  TEXT
20
20
 
21
- super(message)
21
+ initialize(message)
22
22
  end
23
23
  end
24
24
 
25
25
  class ProtoEntityHasNoConcern < ::ConvenientService::Exception
26
- def initialize(proto_entity:)
26
+ def initialize_with_kwargs(proto_entity:)
27
27
  message = <<~TEXT
28
28
  Proto entity `#{proto_entity}` has no concern.
29
29
 
@@ -32,7 +32,7 @@ module ConvenientService
32
32
  It is an example of a valid proto entity.
33
33
  TEXT
34
34
 
35
- super(message)
35
+ initialize(message)
36
36
  end
37
37
  end
38
38
  end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ConvenientService
4
+ module Common
5
+ module Plugins
6
+ module EnsuresNegatedJSendResult
7
+ class Middleware < MethodChainMiddleware
8
+ intended_for :negated_result, entity: any_entity
9
+
10
+ ##
11
+ # @return [ConvenientService::Service::Plugins::HasJSendResult::Entities::Result]
12
+ #
13
+ def next(...)
14
+ result = chain.next(...)
15
+
16
+ result.negated? ? result : result.copy(overrides: {kwargs: {negated: true}})
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "ensures_negated_j_send_result/middleware"
@@ -8,8 +8,15 @@ module ConvenientService
8
8
  include Support::Concern
9
9
 
10
10
  class_methods do
11
+ ##
12
+ # @api public
13
+ #
14
+ # @param type [Symbol]
15
+ # @param block [Proc]
16
+ # @return [ConvenientService::Common::Plugins::HasCallbacks::Entities::Callback]
17
+ #
11
18
  def around(type, &block)
12
- Plugins::HasCallbacks::Entities::Callback.new(types: [:around, type], block: block).tap { |callback| callbacks << callback }
19
+ callbacks.create(types: [:around, type], block: block)
13
20
  end
14
21
  end
15
22
  end
@@ -6,7 +6,7 @@ module ConvenientService
6
6
  module HasAroundCallbacks
7
7
  module Exceptions
8
8
  class AroundCallbackChainIsNotContinued < ::ConvenientService::Exception
9
- def initialize(callback:)
9
+ def initialize_with_kwargs(callback:)
10
10
  message = <<~TEXT
11
11
  Around callback chain is NOT continued from `#{callback.block.source_location}`.
12
12
 
@@ -19,7 +19,7 @@ module ConvenientService
19
19
  end
20
20
  TEXT
21
21
 
22
- super(message)
22
+ initialize(message)
23
23
  end
24
24
  end
25
25
  end
@@ -5,16 +5,28 @@ module ConvenientService
5
5
  module Plugins
6
6
  module HasAroundCallbacks
7
7
  class Middleware < MethodChainMiddleware
8
+ include Support::Delegate
9
+
8
10
  ##
9
11
  # @internal
10
- # TODO: Move to command.
12
+ # TODO: Support of callbacks for class methods.
11
13
  #
12
- include Support::DependencyContainer::Import
14
+ intended_for any_method, entity: any_entity
13
15
 
14
- import :"entities.Callback", from: Common::Plugins::HasCallbacks::Container
15
-
16
- intended_for any_method, scope: any_scope, entity: any_entity
16
+ ##
17
+ # @return [Class<ConvenientService::Common::Plugins::HasCallbacks::Entities::Callback>]
18
+ #
19
+ delegate :callback_class, to: :callbacks
17
20
 
21
+ ##
22
+ # @param args [Array<Object>]
23
+ # @param kwargs [Hash{Symbol => Object}]
24
+ # @param block [Proc, nil]
25
+ # @return [Object] Can be any type.
26
+ #
27
+ # @internal
28
+ # TODO: Move to command.
29
+ #
18
30
  def next(*args, **kwargs, &block)
19
31
  ##
20
32
  # A variable that stores return value of middleware `chain.next` aka `original_value`.
@@ -41,12 +53,12 @@ module ConvenientService
41
53
  # end
42
54
  # end
43
55
  #
44
- around_callbacks = entity.callbacks.for([:around, method])
56
+ around_callbacks = callbacks.for([:around, method])
45
57
 
46
58
  ##
47
59
  #
48
60
  #
49
- initial_around_callback = entities.Callback.new(
61
+ initial_around_callback = callback_class.new(
50
62
  types: [:around, method],
51
63
  block: proc { original_value = chain.next(*args, **kwargs, &block) }
52
64
  )
@@ -123,15 +135,24 @@ module ConvenientService
123
135
  ##
124
136
  #
125
137
  #
126
- raise Exceptions::AroundCallbackChainIsNotContinued.new(callback: Utils::Array.find_last(around_callbacks, &:called?)) if around_callbacks.any?(&:not_called?)
138
+ ::ConvenientService.raise Exceptions::AroundCallbackChainIsNotContinued.new(callback: Utils::Array.find_last(around_callbacks, &:called?)) if around_callbacks.any?(&:not_called?)
127
139
 
128
140
  ##
129
141
  #
130
142
  #
131
- raise Exceptions::AroundCallbackChainIsNotContinued.new(callback: around_callbacks.last) if initial_around_callback.not_called?
143
+ ::ConvenientService.raise Exceptions::AroundCallbackChainIsNotContinued.new(callback: around_callbacks.last) if initial_around_callback.not_called?
132
144
 
133
145
  original_value
134
146
  end
147
+
148
+ private
149
+
150
+ ##
151
+ # @return [ConvenientService::Common::Plugins::HasCallbacks::Entities::CallbackCollection]
152
+ #
153
+ def callbacks
154
+ entity.class.callbacks
155
+ end
135
156
  end
136
157
  end
137
158
  end
@@ -7,26 +7,36 @@ module ConvenientService
7
7
  module Concern
8
8
  include Support::Concern
9
9
 
10
- instance_methods do
11
- include Support::Delegate
12
-
13
- delegate :callbacks, to: :class
14
- end
15
-
16
10
  class_methods do
17
11
  ##
18
12
  # @api private
19
13
  #
14
+ # @return [ConvenientService::Common::Plugins::HasCallbacks::Entities::CallbackCollection]
15
+ #
20
16
  def callbacks
21
- @__callbacks__ ||= Entities::CallbackCollection.new
17
+ internals_class.cache.fetch(:callbacks) { Entities::CallbackCollection.new }
22
18
  end
23
19
 
20
+ ##
21
+ # @api public
22
+ #
23
+ # @param type [Symbol]
24
+ # @param block [Proc]
25
+ # @return [ConvenientService::Common::Plugins::HasCallbacks::Entities::Callback]
26
+ #
24
27
  def before(type, &block)
25
- Entities::Callback.new(types: [:before, type], block: block).tap { |callback| callbacks << callback }
28
+ callbacks.create(types: [:before, type], block: block)
26
29
  end
27
30
 
31
+ ##
32
+ # @api public
33
+ #
34
+ # @param type [Symbol]
35
+ # @param block [Proc]
36
+ # @return [ConvenientService::Common::Plugins::HasCallbacks::Entities::Callback]
37
+ #
28
38
  def after(type, &block)
29
- Entities::Callback.new(types: [:after, type], block: block).tap { |callback| callbacks << callback }
39
+ callbacks.create(types: [:after, type], block: block)
30
40
  end
31
41
  end
32
42
  end
@@ -6,20 +6,68 @@ module ConvenientService
6
6
  module HasCallbacks
7
7
  module Entities
8
8
  class CallbackCollection
9
+ include ::Enumerable
10
+
9
11
  include Support::Delegate
10
12
 
13
+ ##
14
+ # @api private
15
+ #
16
+ # @!attribute [r] types
17
+ # @return [ConvenientService::Common::Plugins::HasCallbacks::Entities::TypeCollection]
18
+ #
11
19
  attr_reader :callbacks
12
20
 
13
- delegate :each, :include?, :<<, to: :callbacks
21
+ ##
22
+ # @api private
23
+ #
24
+ # @return [Array<ConvenientService::Common::Plugins::HasCallbacks::Entities::Callback>]
25
+ #
26
+ delegate :each, to: :callbacks
14
27
 
28
+ ##
29
+ # @api private
30
+ #
31
+ # @return [void]
32
+ #
15
33
  def initialize
16
34
  @callbacks = []
17
35
  end
18
36
 
37
+ ##
38
+ # @return [Class<ConvenientService::Common::Plugins::HasCallbacks::Entities::Callback>]
39
+ #
40
+ def callback_class
41
+ Entities::Callback
42
+ end
43
+
44
+ ##
45
+ # @api private
46
+ #
47
+ # @param types [Array<Symbol>]
48
+ # @return [Array<ConvenientService::Common::Plugins::HasCallbacks::Entities::Callback>]
49
+ #
19
50
  def for(types)
20
51
  callbacks.select { |callback| callback.types.contain_exactly?(types) }
21
52
  end
22
53
 
54
+ ##
55
+ # @api private
56
+ #
57
+ # @param kwargs [Hash{Symbol => Object}]
58
+ # @return [ConvenientService::Common::Plugins::HasCallbacks::Entities::Callback]
59
+ #
60
+ def create(**kwargs)
61
+ Entities::Callback.new(**kwargs)
62
+ .tap { |callback| callbacks << callback }
63
+ end
64
+
65
+ ##
66
+ # @api private
67
+ #
68
+ # @param other [Object] Can be any type.
69
+ # @return [Boolean]
70
+ #
23
71
  def ==(other)
24
72
  return unless other.instance_of?(self.class)
25
73
 
@@ -5,9 +5,18 @@ module ConvenientService
5
5
  module Plugins
6
6
  module HasCallbacks
7
7
  class Middleware < MethodChainMiddleware
8
- intended_for any_method, scope: any_scope, entity: any_entity
8
+ ##
9
+ # @internal
10
+ # TODO: Support of callbacks for class methods.
11
+ #
12
+ intended_for any_method, entity: any_entity
9
13
 
10
14
  ##
15
+ # @param args [Array<Object>]
16
+ # @param kwargs [Hash{Symbol => Object}]
17
+ # @param block [Proc, nil]
18
+ # @return [Object] Can be any type.
19
+ #
11
20
  # @internal
12
21
  # TODO: Move to command.
13
22
  #
@@ -21,7 +30,7 @@ module ConvenientService
21
30
  # end
22
31
  # end
23
32
  #
24
- entity.callbacks.for([:before, method]).each { |callback| callback.call_in_context_with_arguments(entity, *args, **kwargs, &block) }
33
+ callbacks.for([:before, method]).each { |callback| callback.call_in_context_with_arguments(entity, *args, **kwargs, &block) }
25
34
 
26
35
  original_value = chain.next(*args, **kwargs, &block)
27
36
 
@@ -37,10 +46,19 @@ module ConvenientService
37
46
  # end
38
47
  # end
39
48
  #
40
- entity.callbacks.for([:after, method]).reverse_each { |callback| callback.call_in_context_with_value_and_arguments(entity, original_value, *args, **kwargs, &block) }
49
+ callbacks.for([:after, method]).reverse_each { |callback| callback.call_in_context_with_value_and_arguments(entity, original_value, *args, **kwargs, &block) }
41
50
 
42
51
  original_value
43
52
  end
53
+
54
+ private
55
+
56
+ ##
57
+ # @return [ConvenientService::Common::Plugins::HasCallbacks::Entities::CallbackCollection]
58
+ #
59
+ def callbacks
60
+ entity.class.callbacks
61
+ end
44
62
  end
45
63
  end
46
64
  end
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "has_callbacks/concern"
4
- require_relative "has_callbacks/container"
5
4
  require_relative "has_callbacks/entities"
6
5
  require_relative "has_callbacks/middleware"
@@ -0,0 +1,83 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ConvenientService
4
+ module Common
5
+ module Plugins
6
+ module HasInstanceProxy
7
+ module Commands
8
+ class CreateInstanceProxyClass < Support::Command
9
+ ##
10
+ # @!attribute [r] target_class
11
+ # @return [Class]
12
+ #
13
+ attr_reader :target_class
14
+
15
+ ##
16
+ # @param target_class [Class]
17
+ # @return [void]
18
+ #
19
+ def initialize(target_class:)
20
+ @target_class = target_class
21
+ end
22
+
23
+ ##
24
+ # @return [void]
25
+ #
26
+ def call
27
+ klass = ::Class.new(Entities::InstanceProxy)
28
+
29
+ ##
30
+ # @example Result for feature.
31
+ #
32
+ # klass = ConvenientService::Common::Plugins::HasInstanceProxy::Commands::CreateInstanceProxyClass.call(
33
+ # target_class: SomeFeature
34
+ # )
35
+ #
36
+ # ##
37
+ # # `klass` is something like:
38
+ # #
39
+ # # class InstanceProxy < ConvenientService::Service::Plugins::HasInstanceProxy::Entities::InstanceProxy
40
+ # # class << self
41
+ # # def target_class
42
+ # # ##
43
+ # # # NOTE: Returns `target_class` passed to `CreateInstanceProxyClass`.
44
+ # # #
45
+ # # target_class
46
+ # # end
47
+ # #
48
+ # # def ==(other)
49
+ # # return unless other.respond_to?(:target_class)
50
+ # #
51
+ # # self.target_class == other.target_class
52
+ # # end
53
+ # # end
54
+ # # end
55
+ #
56
+ klass.class_exec(target_class) do |target_class|
57
+ ##
58
+ # @return [Class]
59
+ #
60
+ define_singleton_method(:target_class) { target_class }
61
+
62
+ ##
63
+ # @return [Boolean, nil]
64
+ #
65
+ # @internal
66
+ # TODO: Try `self.target_class == other.target_class if self < ::ConvenientService::Common::Plugins::HasInstanceProxy::Entities::InstanceProxy`.
67
+ #
68
+ define_singleton_method(:==) { |other| self.target_class == other.target_class if other.respond_to?(:target_class) }
69
+
70
+ ##
71
+ # @return [String]
72
+ #
73
+ define_singleton_method(:inspect) { "#{target_class}::InstanceProxy" }
74
+ end
75
+
76
+ klass
77
+ end
78
+ end
79
+ end
80
+ end
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "commands/create_instance_proxy_class"
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ConvenientService
4
+ module Common
5
+ module Plugins
6
+ module HasInstanceProxy
7
+ module Concern
8
+ include Support::Concern
9
+
10
+ class_methods do
11
+ ##
12
+ # @return [Class] Can be any type.
13
+ #
14
+ def instance_proxy_class
15
+ @instance_proxy_class ||= Commands::CreateInstanceProxyClass[target_class: self]
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,76 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ConvenientService
4
+ module Common
5
+ module Plugins
6
+ module HasInstanceProxy
7
+ module Entities
8
+ class InstanceProxy
9
+ ##
10
+ # @api private
11
+ #
12
+ # @param target [Object] Can be any type.
13
+ # @return [void]
14
+ #
15
+ def initialize(target:)
16
+ @__convenient_service_instance_proxy_target__ = target
17
+ end
18
+
19
+ ##
20
+ # @api public
21
+ #
22
+ # @return [Object] Can be any type.
23
+ #
24
+ def instance_proxy_target
25
+ @__convenient_service_instance_proxy_target__
26
+ end
27
+
28
+ ##
29
+ # @api public
30
+ #
31
+ # @param other [Object] Can be any type.
32
+ # @return [Boolean, nil]
33
+ #
34
+ # @internal
35
+ # TODO: Direct Specs.
36
+ #
37
+ def ==(other)
38
+ return unless other.instance_of?(self.class)
39
+
40
+ return false if instance_proxy_target != other.instance_proxy_target
41
+
42
+ true
43
+ end
44
+
45
+ private
46
+
47
+ ##
48
+ # @see https://thoughtbot.com/blog/always-define-respond-to-missing-when-overriding
49
+ # @see https://blog.marc-andre.ca/2010/11/15/methodmissing-politely
50
+ # @see https://stackoverflow.com/a/3304683/12201472
51
+ #
52
+ # @param method_name [Symbol, String]
53
+ # @param include_private [Boolean]
54
+ # @return [Boolean]
55
+ #
56
+ # @internal
57
+ # IMPORTANT: `respond_to_missing?` is like `initialize`. It is always `private`.
58
+ # - https://ruby-doc.org/core-2.7.0/Object.html#method-i-respond_to_missing-3F
59
+ # - https://github.com/ruby/spec/blob/master/language/def_spec.rb#L65
60
+ #
61
+ def respond_to_missing?(method_name, include_private = false)
62
+ instance_proxy_target.respond_to?(method_name, include_private)
63
+ end
64
+
65
+ ##
66
+ # @return [Object] Can be any type.
67
+ #
68
+ def method_missing(...)
69
+ ::ConvenientService.reraise { instance_proxy_target.public_send(...) }
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end
75
+ end
76
+ end
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "entities/instance_proxy"
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ConvenientService
4
+ module Common
5
+ module Plugins
6
+ module HasInstanceProxy
7
+ class Middleware < MethodChainMiddleware
8
+ intended_for :new, scope: :class, entity: any_entity
9
+
10
+ ##
11
+ # @return [ConvenientService::Common::Plugins::HasInstanceProxy::Entities::InstanceProxy]
12
+ #
13
+ def next(...)
14
+ entity.instance_proxy_class.new(target: chain.next(...))
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "has_instance_proxy/commands"
4
+ require_relative "has_instance_proxy/concern"
5
+ require_relative "has_instance_proxy/entities"
6
+ require_relative "has_instance_proxy/middleware"
@@ -15,6 +15,18 @@ module ConvenientService
15
15
  module Concern
16
16
  include Support::Concern
17
17
 
18
+ class_methods do
19
+ ##
20
+ # @return [ConvenientService::Support::Cache]
21
+ #
22
+ # @internal
23
+ # TODO: `Support::Cache.create(backend: :thread_safe_hash)`.
24
+ #
25
+ def cache
26
+ @cache ||= Support::Cache.create(backend: :hash)
27
+ end
28
+ end
29
+
18
30
  instance_methods do
19
31
  ##
20
32
  # @return [ConvenientService::Support::Cache]