decouplio 1.0.0alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. checksums.yaml +7 -0
  2. data/.circleci/config.yml +53 -0
  3. data/.dockerignore +12 -0
  4. data/.gitignore +13 -0
  5. data/.rspec +3 -0
  6. data/.rubocop.yml +106 -0
  7. data/.rubocop_todo.yml +147 -0
  8. data/.ruby-version +1 -0
  9. data/.vscode/settings.json +3 -0
  10. data/Dockerfile +12 -0
  11. data/Gemfile +8 -0
  12. data/LICENSE +21 -0
  13. data/LICENSE.txt +21 -0
  14. data/README.md +29 -0
  15. data/Rakefile +8 -0
  16. data/benchmarks/.ruby-version +1 -0
  17. data/benchmarks/Dockerfile +12 -0
  18. data/benchmarks/Gemfile +11 -0
  19. data/benchmarks/benchmarks.rb +527 -0
  20. data/bin/console +15 -0
  21. data/bin/setup +8 -0
  22. data/decouplio.gemspec +40 -0
  23. data/docker-compose.yml +18 -0
  24. data/docs/_config.yml +1 -0
  25. data/docs/benchmarks.md +1 -0
  26. data/docs/context.md +74 -0
  27. data/docs/context.rb +62 -0
  28. data/docs/doby.md +80 -0
  29. data/docs/doby.rb +38 -0
  30. data/docs/error_store.md +347 -0
  31. data/docs/error_store.rb +202 -0
  32. data/docs/fail.md +1016 -0
  33. data/docs/fail.rb +762 -0
  34. data/docs/index.md +25 -0
  35. data/docs/inner_action.md +63 -0
  36. data/docs/inner_action.rb +43 -0
  37. data/docs/logic_block.md +25 -0
  38. data/docs/octo.md +269 -0
  39. data/docs/octo.rb +164 -0
  40. data/docs/pass.md +309 -0
  41. data/docs/pass.rb +213 -0
  42. data/docs/quick_start.md +71 -0
  43. data/docs/quick_start.rb +38 -0
  44. data/docs/resq.md +263 -0
  45. data/docs/resq.rb +176 -0
  46. data/docs/step.md +737 -0
  47. data/docs/step.rb +526 -0
  48. data/docs/step_as_a_service.md +109 -0
  49. data/docs/step_as_a_service.rb +77 -0
  50. data/docs/wrap.md +232 -0
  51. data/docs/wrap.rb +137 -0
  52. data/lib/decouplio/action.rb +111 -0
  53. data/lib/decouplio/composer.rb +599 -0
  54. data/lib/decouplio/const/colors.rb +25 -0
  55. data/lib/decouplio/const/reserved_methods.rb +18 -0
  56. data/lib/decouplio/const/results.rb +13 -0
  57. data/lib/decouplio/const/types.rb +173 -0
  58. data/lib/decouplio/const/validations/action_option_class.rb +17 -0
  59. data/lib/decouplio/const/validations/common.rb +14 -0
  60. data/lib/decouplio/const/validations/fail.rb +34 -0
  61. data/lib/decouplio/const/validations/logic.rb +15 -0
  62. data/lib/decouplio/const/validations/octo.rb +44 -0
  63. data/lib/decouplio/const/validations/palp.rb +20 -0
  64. data/lib/decouplio/const/validations/pass.rb +32 -0
  65. data/lib/decouplio/const/validations/resq.rb +67 -0
  66. data/lib/decouplio/const/validations/step.rb +35 -0
  67. data/lib/decouplio/const/validations/wrap.rb +41 -0
  68. data/lib/decouplio/default_error_handler.rb +24 -0
  69. data/lib/decouplio/errors/action_class_error.rb +26 -0
  70. data/lib/decouplio/errors/base_error.rb +30 -0
  71. data/lib/decouplio/errors/error_store_error.rb +17 -0
  72. data/lib/decouplio/errors/extra_key_for_fail_error.rb +26 -0
  73. data/lib/decouplio/errors/extra_key_for_octo_error.rb +26 -0
  74. data/lib/decouplio/errors/extra_key_for_pass_error.rb +26 -0
  75. data/lib/decouplio/errors/extra_key_for_resq_error.rb +29 -0
  76. data/lib/decouplio/errors/extra_key_for_step_error.rb +23 -0
  77. data/lib/decouplio/errors/extra_key_for_wrap_error.rb +23 -0
  78. data/lib/decouplio/errors/fail_controversial_keys_error.rb +26 -0
  79. data/lib/decouplio/errors/fail_finish_him_error.rb +26 -0
  80. data/lib/decouplio/errors/fail_is_first_step_error.rb +18 -0
  81. data/lib/decouplio/errors/invalid_error_class_error.rb +29 -0
  82. data/lib/decouplio/errors/invalid_wrap_name_error.rb +23 -0
  83. data/lib/decouplio/errors/logic_is_not_defined_error.rb +23 -0
  84. data/lib/decouplio/errors/logic_redefinition_error.rb +23 -0
  85. data/lib/decouplio/errors/octo_block_is_not_defined_error.rb +18 -0
  86. data/lib/decouplio/errors/octo_controversial_keys_error.rb +26 -0
  87. data/lib/decouplio/errors/options_validation_error.rb +7 -0
  88. data/lib/decouplio/errors/palp_block_is_not_defined_error.rb +18 -0
  89. data/lib/decouplio/errors/palp_is_not_defined_error.rb +26 -0
  90. data/lib/decouplio/errors/palp_validation_error.rb +21 -0
  91. data/lib/decouplio/errors/pass_controversial_keys_error.rb +26 -0
  92. data/lib/decouplio/errors/pass_finish_him_error.rb +26 -0
  93. data/lib/decouplio/errors/required_options_is_missing_for_octo_error.rb +25 -0
  94. data/lib/decouplio/errors/resq_definition_error.rb +21 -0
  95. data/lib/decouplio/errors/resq_error_class_error.rb +29 -0
  96. data/lib/decouplio/errors/resq_handler_method_error.rb +26 -0
  97. data/lib/decouplio/errors/step_controversial_keys_error.rb +26 -0
  98. data/lib/decouplio/errors/step_finish_him_error.rb +26 -0
  99. data/lib/decouplio/errors/step_is_not_defined_for_fail_error.rb +26 -0
  100. data/lib/decouplio/errors/step_is_not_defined_for_step_error.rb +27 -0
  101. data/lib/decouplio/errors/step_is_not_defined_for_wrap_error.rb +26 -0
  102. data/lib/decouplio/errors/step_name_error.rb +20 -0
  103. data/lib/decouplio/errors/wrap_block_is_not_defined_error.rb +18 -0
  104. data/lib/decouplio/errors/wrap_controversial_keys_error.rb +26 -0
  105. data/lib/decouplio/errors/wrap_finish_him_error.rb +26 -0
  106. data/lib/decouplio/errors/wrap_klass_method_error.rb +23 -0
  107. data/lib/decouplio/flow.rb +17 -0
  108. data/lib/decouplio/logic_dsl.rb +96 -0
  109. data/lib/decouplio/octo_hash_case.rb +31 -0
  110. data/lib/decouplio/octo_options_validator.rb +89 -0
  111. data/lib/decouplio/options_validator.rb +566 -0
  112. data/lib/decouplio/processor.rb +20 -0
  113. data/lib/decouplio/steps/base_resq.rb +31 -0
  114. data/lib/decouplio/steps/base_step.rb +16 -0
  115. data/lib/decouplio/steps/doby.rb +32 -0
  116. data/lib/decouplio/steps/fail.rb +50 -0
  117. data/lib/decouplio/steps/if_condition_fail.rb +28 -0
  118. data/lib/decouplio/steps/if_condition_pass.rb +26 -0
  119. data/lib/decouplio/steps/inner_action_fail.rb +55 -0
  120. data/lib/decouplio/steps/inner_action_pass.rb +38 -0
  121. data/lib/decouplio/steps/inner_action_step.rb +51 -0
  122. data/lib/decouplio/steps/octo.rb +22 -0
  123. data/lib/decouplio/steps/pass.rb +35 -0
  124. data/lib/decouplio/steps/resq_fail.rb +10 -0
  125. data/lib/decouplio/steps/resq_pass.rb +10 -0
  126. data/lib/decouplio/steps/service_fail.rb +51 -0
  127. data/lib/decouplio/steps/service_pass.rb +36 -0
  128. data/lib/decouplio/steps/service_step.rb +47 -0
  129. data/lib/decouplio/steps/step.rb +43 -0
  130. data/lib/decouplio/steps/unless_condition_fail.rb +28 -0
  131. data/lib/decouplio/steps/unless_condition_pass.rb +26 -0
  132. data/lib/decouplio/steps/wrap.rb +62 -0
  133. data/lib/decouplio/validators/condition.rb +49 -0
  134. data/lib/decouplio/version.rb +5 -0
  135. data/lib/decouplio.rb +7 -0
  136. metadata +266 -0
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/resq'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class ExtraKeyForResqError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Resq::VALIDATION_ERROR_MESSAGE
11
+ end
12
+
13
+ def interpolation_values
14
+ [
15
+ format(
16
+ Decouplio::Const::Validations::Resq::NOT_ALLOWED_HANDLER_METHOD_VALUE,
17
+ @errored_option
18
+ ),
19
+ format(
20
+ Decouplio::Const::Validations::Resq::DOES_NOT_ALLOW_OPTIONS,
21
+ @details
22
+ ),
23
+ Decouplio::Const::Validations::Resq::ALLOWED_OPTIONS_MESSAGE,
24
+ Decouplio::Const::Validations::Resq::MANUAL_URL
25
+ ]
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/step'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class ExtraKeyForStepError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Step::VALIDATION_ERROR_MESSAGE
11
+ end
12
+
13
+ def interpolation_values
14
+ [
15
+ @errored_option,
16
+ Decouplio::Const::Validations::Step::EXTRA_KEYS_ARE_NOT_ALLOWED,
17
+ Decouplio::Const::Validations::Step::ALLOWED_OPTIONS_MESSAGE,
18
+ Decouplio::Const::Validations::Step::MANUAL_URL
19
+ ]
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/wrap'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class ExtraKeyForWrapError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Wrap::VALIDATION_ERROR_MESSAGE
11
+ end
12
+
13
+ def interpolation_values
14
+ [
15
+ @errored_option,
16
+ Decouplio::Const::Validations::Wrap::EXTRA_KEYS_ARE_NOT_ALLOWED,
17
+ Decouplio::Const::Validations::Wrap::ALLOWED_OPTIONS_MESSAGE,
18
+ Decouplio::Const::Validations::Wrap::MANUAL_URL
19
+ ]
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/fail'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class FailControversialKeysError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Fail::VALIDATION_ERROR_MESSAGE
11
+ end
12
+
13
+ def interpolation_values
14
+ [
15
+ @errored_option,
16
+ format(
17
+ Decouplio::Const::Validations::Fail::CONTROVERSIAL_KEYS,
18
+ *@details
19
+ ),
20
+ Decouplio::Const::Validations::Fail::ALLOWED_OPTIONS_MESSAGE,
21
+ Decouplio::Const::Validations::Fail::MANUAL_URL
22
+ ]
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/fail'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class FailFinishHimError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Fail::VALIDATION_ERROR_MESSAGE
11
+ end
12
+
13
+ def interpolation_values
14
+ [
15
+ @errored_option,
16
+ format(
17
+ Decouplio::Const::Validations::Common::WRONG_FINISH_HIM_VALUE,
18
+ @details
19
+ ),
20
+ Decouplio::Const::Validations::Fail::ALLOWED_OPTIONS_MESSAGE,
21
+ Decouplio::Const::Validations::Fail::MANUAL_URL
22
+ ]
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/fail'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class FailCanNotBeTheFirstStepError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Fail::FIRST_STEP
11
+ end
12
+
13
+ def interpolation_values
14
+ []
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/resq'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class InvalidErrorClassError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Resq::VALIDATION_ERROR_MESSAGE
11
+ end
12
+
13
+ def interpolation_values
14
+ [
15
+ format(
16
+ Decouplio::Const::Validations::Resq::NOT_ALLOWED_EXCEPTION_CLASS,
17
+ @errored_option
18
+ ),
19
+ format(
20
+ Decouplio::Const::Validations::Resq::ERROR_CLASS_INHERITANCE,
21
+ @details
22
+ ),
23
+ Decouplio::Const::Validations::Resq::ALLOWED_OPTIONS_MESSAGE,
24
+ Decouplio::Const::Validations::Resq::MANUAL_URL
25
+ ]
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/wrap'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class InvalidWrapNameError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Wrap::VALIDATION_ERROR_MESSAGE
11
+ end
12
+
13
+ def interpolation_values
14
+ [
15
+ Decouplio::Const::Validations::Wrap::NAME_IS_EMPTY,
16
+ Decouplio::Const::Validations::Wrap::SPECIFY_NAME,
17
+ Decouplio::Const::Validations::Wrap::ALLOWED_OPTIONS_MESSAGE,
18
+ Decouplio::Const::Validations::Wrap::MANUAL_URL
19
+ ]
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/logic'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class LogicIsNotDefinedError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Logic::VALIDATION_ERROR_MESSAGE
11
+ end
12
+
13
+ def interpolation_values
14
+ [
15
+ format(
16
+ Decouplio::Const::Validations::Logic::NOT_DEFINED,
17
+ @errored_option
18
+ )
19
+ ]
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/logic'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class LogicRedefinitionError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Logic::VALIDATION_ERROR_MESSAGE
11
+ end
12
+
13
+ def interpolation_values
14
+ [
15
+ format(
16
+ Decouplio::Const::Validations::Logic::REDEFINITION,
17
+ @errored_option
18
+ )
19
+ ]
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/octo'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class OctoBlockIsNotDefinedError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Octo::OCTO_BLOCK
11
+ end
12
+
13
+ def interpolation_values
14
+ []
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/octo'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class OctoControversialKeysError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Octo::VALIDATION_ERROR_MESSAGE
11
+ end
12
+
13
+ def interpolation_values
14
+ [
15
+ @errored_option,
16
+ format(
17
+ Decouplio::Const::Validations::Octo::CONTROVERSIAL_KEYS,
18
+ *@details
19
+ ),
20
+ Decouplio::Const::Validations::Octo::ALLOWED_OPTIONS_MESSAGE,
21
+ Decouplio::Const::Validations::Octo::MANUAL_URL
22
+ ]
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decouplio
4
+ module Errors
5
+ class OptionsValidationError < StandardError; end
6
+ end
7
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/palp'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class PalpBlockIsNotDefinedError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Palp::NOT_DEFINED
11
+ end
12
+
13
+ def interpolation_values
14
+ []
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/octo'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class PalpIsNotDefinedError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Octo::VALIDATION_ERROR_MESSAGE
11
+ end
12
+
13
+ def interpolation_values
14
+ [
15
+ @errored_option.join("\n"),
16
+ format(
17
+ Decouplio::Const::Validations::Octo::PALPS_IS_NOT_DEFINED,
18
+ @details.join(', ')
19
+ ),
20
+ Decouplio::Const::Validations::Octo::ALLOWED_OPTIONS_MESSAGE,
21
+ Decouplio::Const::Validations::Octo::MANUAL_URL
22
+ ]
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/palp'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class PalpValidationError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Palp::VALIDATION_ERROR_MESSAGE
11
+ end
12
+
13
+ def interpolation_values
14
+ [
15
+ Decouplio::Const::Validations::Palp::DOES_NOT_ALLOW_ANY_OPTION,
16
+ Decouplio::Const::Validations::Palp::MANUAL_URL
17
+ ]
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/pass'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class PassControversialKeysError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Pass::VALIDATION_ERROR_MESSAGE
11
+ end
12
+
13
+ def interpolation_values
14
+ [
15
+ @errored_option,
16
+ format(
17
+ Decouplio::Const::Validations::Pass::CONTROVERSIAL_KEYS,
18
+ *@details
19
+ ),
20
+ Decouplio::Const::Validations::Pass::ALLOWED_OPTIONS_MESSAGE,
21
+ Decouplio::Const::Validations::Pass::MANUAL_URL
22
+ ]
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/pass'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class PassFinishHimError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Pass::VALIDATION_ERROR_MESSAGE
11
+ end
12
+
13
+ def interpolation_values
14
+ [
15
+ @errored_option,
16
+ format(
17
+ Decouplio::Const::Validations::Common::WRONG_FINISH_HIM_VALUE,
18
+ @details
19
+ ),
20
+ Decouplio::Const::Validations::Pass::ALLOWED_OPTIONS_MESSAGE,
21
+ Decouplio::Const::Validations::Pass::MANUAL_URL
22
+ ]
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/octo'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class RequiredOptionsIsMissingForOctoError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Octo::REQUIRED_VALIDATION_ERROR_MESSAGE
11
+ end
12
+
13
+ def interpolation_values
14
+ [
15
+ format(
16
+ Decouplio::Const::Validations::Octo::OPTIONS_IS_REQUIRED,
17
+ @details
18
+ ),
19
+ Decouplio::Const::Validations::Octo::ALLOWED_OPTIONS_MESSAGE,
20
+ Decouplio::Const::Validations::Octo::MANUAL_URL
21
+ ]
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/resq'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class ResqDefinitionError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Resq::DEFINITION_ERROR_MESSAGE
11
+ end
12
+
13
+ def interpolation_values
14
+ [
15
+ Decouplio::Const::Types::MAIN_FLOW_TYPES.join("\n"),
16
+ Decouplio::Const::Validations::Resq::MANUAL_URL
17
+ ]
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/resq'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class ResqErrorClassError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Resq::VALIDATION_ERROR_MESSAGE
11
+ end
12
+
13
+ def interpolation_values
14
+ [
15
+ format(
16
+ Decouplio::Const::Validations::Resq::INVALID_ERROR_CLASS_VALUE,
17
+ @errored_option
18
+ ),
19
+ format(
20
+ Decouplio::Const::Validations::Resq::WRONG_ERROR_CLASS,
21
+ @details
22
+ ),
23
+ Decouplio::Const::Validations::Resq::ALLOWED_OPTIONS_MESSAGE,
24
+ Decouplio::Const::Validations::Resq::MANUAL_URL
25
+ ]
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/resq'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class ResqHandlerMethodError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Resq::VALIDATION_ERROR_MESSAGE
11
+ end
12
+
13
+ def interpolation_values
14
+ [
15
+ format(
16
+ Decouplio::Const::Validations::Resq::NOT_ALLOWED_HANDLER_METHOD_VALUE,
17
+ @errored_option
18
+ ),
19
+ Decouplio::Const::Validations::Resq::HANDLER_METHOD_SHOULD_BE_A_SYMBOL,
20
+ Decouplio::Const::Validations::Resq::ALLOWED_OPTIONS_MESSAGE,
21
+ Decouplio::Const::Validations::Resq::MANUAL_URL
22
+ ]
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/step'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class StepControversialKeysError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Step::VALIDATION_ERROR_MESSAGE
11
+ end
12
+
13
+ def interpolation_values
14
+ [
15
+ @errored_option,
16
+ format(
17
+ Decouplio::Const::Validations::Step::CONTROVERSIAL_KEYS,
18
+ *@details
19
+ ),
20
+ Decouplio::Const::Validations::Step::ALLOWED_OPTIONS_MESSAGE,
21
+ Decouplio::Const::Validations::Step::MANUAL_URL
22
+ ]
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/step'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class StepFinishHimError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Step::VALIDATION_ERROR_MESSAGE
11
+ end
12
+
13
+ def interpolation_values
14
+ [
15
+ @errored_option,
16
+ format(
17
+ Decouplio::Const::Validations::Common::WRONG_FINISH_HIM_VALUE,
18
+ @details
19
+ ),
20
+ Decouplio::Const::Validations::Step::ALLOWED_OPTIONS_MESSAGE,
21
+ Decouplio::Const::Validations::Step::MANUAL_URL
22
+ ]
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/fail'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class StepIsNotDefinedForFailError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Fail::VALIDATION_ERROR_MESSAGE
11
+ end
12
+
13
+ def interpolation_values
14
+ [
15
+ @errored_option,
16
+ format(
17
+ Decouplio::Const::Validations::Common::STEP_IS_NOT_DEFINED,
18
+ @details
19
+ ),
20
+ Decouplio::Const::Validations::Fail::ALLOWED_OPTIONS_MESSAGE,
21
+ Decouplio::Const::Validations::Fail::MANUAL_URL
22
+ ]
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/step'
5
+ require_relative '../const/validations/common'
6
+
7
+ module Decouplio
8
+ module Errors
9
+ class StepIsNotDefinedForStepError < Decouplio::Errors::BaseError
10
+ def template
11
+ Decouplio::Const::Validations::Step::VALIDATION_ERROR_MESSAGE
12
+ end
13
+
14
+ def interpolation_values
15
+ [
16
+ @errored_option,
17
+ format(
18
+ Decouplio::Const::Validations::Common::STEP_IS_NOT_DEFINED,
19
+ @details
20
+ ),
21
+ Decouplio::Const::Validations::Step::ALLOWED_OPTIONS_MESSAGE,
22
+ Decouplio::Const::Validations::Step::MANUAL_URL
23
+ ]
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_error'
4
+ require_relative '../const/validations/wrap'
5
+
6
+ module Decouplio
7
+ module Errors
8
+ class StepIsNotDefinedForWrapError < Decouplio::Errors::BaseError
9
+ def template
10
+ Decouplio::Const::Validations::Wrap::VALIDATION_ERROR_MESSAGE
11
+ end
12
+
13
+ def interpolation_values
14
+ [
15
+ @errored_option,
16
+ format(
17
+ Decouplio::Const::Validations::Common::STEP_IS_NOT_DEFINED,
18
+ @details
19
+ ),
20
+ Decouplio::Const::Validations::Wrap::ALLOWED_OPTIONS_MESSAGE,
21
+ Decouplio::Const::Validations::Wrap::MANUAL_URL
22
+ ]
23
+ end
24
+ end
25
+ end
26
+ end