decouplio 1.0.0alpha7 → 1.0.0rc

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 (143) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +313 -15
  3. data/decouplio.gemspec +8 -2
  4. data/lib/decouplio/action.rb +34 -74
  5. data/lib/decouplio/action_state_printer.rb +34 -0
  6. data/lib/decouplio/const/flows.rb +59 -0
  7. data/lib/decouplio/const/reserved_methods.rb +6 -13
  8. data/lib/decouplio/const/types.rb +1 -165
  9. data/lib/decouplio/const/validations/common.rb +10 -0
  10. data/lib/decouplio/const/validations/octo.rb +16 -0
  11. data/lib/decouplio/const/validations/resq.rb +12 -1
  12. data/lib/decouplio/ctx.rb +13 -0
  13. data/lib/decouplio/default_meta_store.rb +37 -0
  14. data/lib/decouplio/errors/action_class_error.rb +0 -3
  15. data/lib/decouplio/errors/base_error.rb +0 -3
  16. data/lib/decouplio/errors/execution_error.rb +0 -2
  17. data/lib/decouplio/errors/extra_key_for_pass_error.rb +0 -3
  18. data/lib/decouplio/errors/fail_can_not_be_first_step_error.rb +0 -3
  19. data/lib/decouplio/errors/fail_controversial_keys_error.rb +0 -3
  20. data/lib/decouplio/errors/fail_finish_him_error.rb +0 -3
  21. data/lib/decouplio/errors/invalid_error_class_error.rb +0 -3
  22. data/lib/decouplio/errors/invalid_options_for_resq_step.rb +18 -0
  23. data/lib/decouplio/errors/invalid_wrap_name_error.rb +0 -3
  24. data/lib/decouplio/errors/logic_is_not_defined_error.rb +0 -3
  25. data/lib/decouplio/errors/logic_redefinition_error.rb +0 -3
  26. data/lib/decouplio/errors/octo_block_is_not_defined_error.rb +0 -3
  27. data/lib/decouplio/errors/octo_case_is_not_defined_error.rb +19 -0
  28. data/lib/decouplio/errors/octo_controversial_keys_error.rb +0 -3
  29. data/lib/decouplio/errors/{error_store_error.rb → octo_finish_him_is_not_allowed_error.rb} +2 -4
  30. data/lib/decouplio/errors/options_validation_error.rb +13 -1
  31. data/lib/decouplio/errors/palp_block_is_not_defined_error.rb +0 -3
  32. data/lib/decouplio/errors/palp_validation_error.rb +0 -3
  33. data/lib/decouplio/errors/pass_controversial_keys_error.rb +0 -3
  34. data/lib/decouplio/errors/pass_finish_him_error.rb +0 -3
  35. data/lib/decouplio/errors/required_options_is_missing_for_octo_error.rb +0 -3
  36. data/lib/decouplio/errors/resq_definition_error.rb +0 -3
  37. data/lib/decouplio/errors/resq_error_class_error.rb +0 -3
  38. data/lib/decouplio/errors/resq_handler_method_error.rb +0 -3
  39. data/lib/decouplio/errors/step_controversial_keys_error.rb +0 -3
  40. data/lib/decouplio/errors/step_definition_error.rb +17 -0
  41. data/lib/decouplio/errors/step_finish_him_error.rb +0 -3
  42. data/lib/decouplio/errors/step_is_not_defined_for_fail_error.rb +0 -3
  43. data/lib/decouplio/errors/step_is_not_defined_for_pass_error.rb +0 -4
  44. data/lib/decouplio/errors/step_is_not_defined_for_step_error.rb +0 -4
  45. data/lib/decouplio/errors/step_is_not_defined_for_wrap_error.rb +0 -3
  46. data/lib/decouplio/errors/step_name_error.rb +0 -3
  47. data/lib/decouplio/errors/wrap_block_is_not_defined_error.rb +0 -3
  48. data/lib/decouplio/errors/wrap_controversial_keys_error.rb +0 -3
  49. data/lib/decouplio/errors/wrap_finish_him_error.rb +0 -3
  50. data/lib/decouplio/errors/wrap_klass_method_error.rb +0 -3
  51. data/lib/decouplio/graph.rb +9 -0
  52. data/lib/decouplio/logic_dsl.rb +337 -107
  53. data/lib/decouplio/new_flow.rb +283 -0
  54. data/lib/decouplio/octo_hash_case.rb +20 -5
  55. data/lib/decouplio/octo_options_validator.rb +10 -64
  56. data/lib/decouplio/step_validator.rb +200 -0
  57. data/lib/decouplio/steps/base_condition.rb +21 -0
  58. data/lib/decouplio/steps/base_if_condition.rb +11 -0
  59. data/lib/decouplio/steps/base_inner_action.rb +42 -0
  60. data/lib/decouplio/steps/base_octo.rb +26 -0
  61. data/lib/decouplio/steps/base_resq.rb +25 -28
  62. data/lib/decouplio/steps/base_resq_with_mapping.rb +34 -0
  63. data/lib/decouplio/steps/base_service_step.rb +39 -0
  64. data/lib/decouplio/steps/base_step.rb +33 -6
  65. data/lib/decouplio/steps/base_unless_condition.rb +11 -0
  66. data/lib/decouplio/steps/base_wrap.rb +27 -0
  67. data/lib/decouplio/steps/fail.rb +1 -28
  68. data/lib/decouplio/steps/if_condition_fail.rb +1 -21
  69. data/lib/decouplio/steps/if_condition_pass.rb +1 -19
  70. data/lib/decouplio/steps/inner_action_fail.rb +1 -33
  71. data/lib/decouplio/steps/inner_action_pass.rb +12 -30
  72. data/lib/decouplio/steps/inner_action_step.rb +1 -33
  73. data/lib/decouplio/steps/octo_by_key.rb +31 -0
  74. data/lib/decouplio/steps/octo_by_method.rb +31 -0
  75. data/lib/decouplio/steps/pass.rb +5 -26
  76. data/lib/decouplio/steps/resq_fail.rb +0 -2
  77. data/lib/decouplio/steps/resq_pass.rb +1 -3
  78. data/lib/decouplio/steps/resq_with_mapping_fail.rb +8 -0
  79. data/lib/decouplio/steps/resq_with_mapping_pass.rb +8 -0
  80. data/lib/decouplio/steps/service_as_fail.rb +8 -0
  81. data/lib/decouplio/steps/service_as_pass.rb +16 -0
  82. data/lib/decouplio/steps/service_as_step.rb +8 -0
  83. data/lib/decouplio/steps/step.rb +0 -24
  84. data/lib/decouplio/steps/unless_condition_fail.rb +1 -21
  85. data/lib/decouplio/steps/unless_condition_pass.rb +1 -19
  86. data/lib/decouplio/steps/wrap.rb +25 -37
  87. data/lib/decouplio/steps/wrap_with_class.rb +43 -0
  88. data/lib/decouplio/steps/wrap_with_class_method.rb +45 -0
  89. data/lib/decouplio/utils/prepare_resq_mappings.rb +17 -0
  90. data/lib/decouplio/version.rb +1 -1
  91. data/lib/decouplio.rb +93 -0
  92. metadata +32 -55
  93. data/.circleci/config.yml +0 -63
  94. data/.dockerignore +0 -12
  95. data/.gitignore +0 -13
  96. data/.rspec +0 -3
  97. data/.rubocop.yml +0 -116
  98. data/.rubocop_todo.yml +0 -147
  99. data/.ruby-version +0 -1
  100. data/.vscode/settings.json +0 -3
  101. data/Dockerfile +0 -12
  102. data/Gemfile +0 -8
  103. data/benchmarks/.ruby-version +0 -1
  104. data/benchmarks/Dockerfile +0 -12
  105. data/benchmarks/Gemfile +0 -12
  106. data/benchmarks/multi_step_benchmark.rb +0 -336
  107. data/benchmarks/single_step_benchmark.rb +0 -159
  108. data/bin/console +0 -15
  109. data/bin/setup +0 -8
  110. data/docker-compose.yml +0 -29
  111. data/lib/decouplio/composer.rb +0 -691
  112. data/lib/decouplio/const/colors.rb +0 -25
  113. data/lib/decouplio/const/doby_aide_options.rb +0 -16
  114. data/lib/decouplio/const/results.rb +0 -15
  115. data/lib/decouplio/const/step_options.rb +0 -16
  116. data/lib/decouplio/const/validations/aide.rb +0 -38
  117. data/lib/decouplio/const/validations/doby.rb +0 -36
  118. data/lib/decouplio/default_error_handler.rb +0 -39
  119. data/lib/decouplio/errors/aide_can_not_be_first_step_error.rb +0 -18
  120. data/lib/decouplio/errors/aide_controversial_keys_error.rb +0 -26
  121. data/lib/decouplio/errors/aide_finish_him_error.rb +0 -26
  122. data/lib/decouplio/errors/doby_controversial_keys_error.rb +0 -26
  123. data/lib/decouplio/errors/doby_finish_him_error.rb +0 -26
  124. data/lib/decouplio/errors/extra_key_for_fail_error.rb +0 -26
  125. data/lib/decouplio/errors/extra_key_for_octo_error.rb +0 -26
  126. data/lib/decouplio/errors/extra_key_for_resq_error.rb +0 -29
  127. data/lib/decouplio/errors/extra_key_for_step_error.rb +0 -23
  128. data/lib/decouplio/errors/extra_key_for_wrap_error.rb +0 -23
  129. data/lib/decouplio/errors/palp_is_not_defined_error.rb +0 -26
  130. data/lib/decouplio/errors/step_is_not_defined_for_aide_error.rb +0 -26
  131. data/lib/decouplio/errors/step_is_not_defined_for_doby_error.rb +0 -27
  132. data/lib/decouplio/flow.rb +0 -17
  133. data/lib/decouplio/options_validator.rb +0 -716
  134. data/lib/decouplio/processor.rb +0 -20
  135. data/lib/decouplio/steps/aide.rb +0 -37
  136. data/lib/decouplio/steps/doby.rb +0 -37
  137. data/lib/decouplio/steps/octo.rb +0 -27
  138. data/lib/decouplio/steps/service_fail.rb +0 -41
  139. data/lib/decouplio/steps/service_pass.rb +0 -41
  140. data/lib/decouplio/steps/service_step.rb +0 -41
  141. data/lib/decouplio/steps/shared/fail_resolver.rb +0 -40
  142. data/lib/decouplio/steps/shared/step_resolver.rb +0 -43
  143. data/lib/decouplio/validators/condition.rb +0 -59
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decouplio
4
- module Const
5
- module Colors
6
- BLACK = "\033[0;30m"
7
- DARK_GRAY = "\033[1;30m"
8
- RED = "\033[0;31m"
9
- LIGHT_RED = "\033[1;31m"
10
- GREEN = "\033[0;32m"
11
- LIGHT_GREEN = "\033[1;32m"
12
- BROWN_ORANGE = "\033[0;33m"
13
- YELLOW = "\033[1;33m"
14
- BLUE = "\033[0;34m"
15
- LIGHT_BLUE = "\033[1;34m"
16
- PURPLE = "\033[0;35m"
17
- LIGHT_PURPLE = "\033[1;35m"
18
- CYAN = "\033[0;36m"
19
- LIGHT_CYAN = "\033[1;36m"
20
- LIGHT_GRAY = "\033[0;37m"
21
- WHITE = "\033[1;37m"
22
- NO_COLOR = "\033[0m"
23
- end
24
- end
25
- end
@@ -1,16 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decouplio
4
- module Const
5
- module DobyAideOptions
6
- ALLOWED = %i[
7
- on_success
8
- on_failure
9
- on_error
10
- finish_him
11
- if
12
- unless
13
- ].freeze
14
- end
15
- end
16
- end
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decouplio
4
- module Const
5
- module Results
6
- PASS = true
7
- FAIL = false
8
- ERROR = :error
9
- FINISH_HIM = :finish_him
10
- NO_STEP = nil
11
- STEP_PASS = :PASS
12
- STEP_FAIL = :FAIL
13
- end
14
- end
15
- end
@@ -1,16 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decouplio
4
- module Const
5
- module StepOptions
6
- ALLOWED = %i[
7
- on_success
8
- on_failure
9
- on_error
10
- finish_him
11
- if
12
- unless
13
- ].freeze
14
- end
15
- end
16
- end
@@ -1,38 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decouplio
4
- module Const
5
- module Validations
6
- module Aide
7
- VALIDATION_ERROR_MESSAGE = <<~ERROR_MESSAGE
8
- Next options are not allowed for "aide":
9
- %s
10
-
11
- Details:
12
- %s
13
-
14
- Allowed options are:
15
- %s
16
-
17
- Please read the manual about allowed options here:
18
- %s
19
- ERROR_MESSAGE
20
-
21
- ALLOWED_OPTIONS_MESSAGE = <<~ALLOWED_OPTIONS
22
- on_success: <step name OR :finish_him>
23
- on_failure: <step name OR :finish_him>
24
- finish_him: :on_success
25
- finish_him: :on_failure
26
- finish_him: true
27
- if: <instance method symbol>
28
- unless: <instance method symbol>
29
- ALLOWED_OPTIONS
30
- MANUAL_URL = 'https://stub.aide.manual.url'
31
- OPTIONS_IS_NOT_ALLOWED = '"%s" option(s) is not allowed for "aide"'
32
- METHOD_NOT_DEFINED = 'aide :%s'
33
- CONTROVERSIAL_KEYS = '"%s" option(s) is not allowed along with "%s" option(s)'
34
- FIRST_STEP = '"aide" can not be the first step'
35
- end
36
- end
37
- end
38
- end
@@ -1,36 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decouplio
4
- module Const
5
- module Validations
6
- module Doby
7
- VALIDATION_ERROR_MESSAGE = <<~ERROR_MESSAGE
8
- Next options are not allowed for "doby":
9
- %s
10
-
11
- Details:
12
- %s
13
-
14
- Allowed options are:
15
- %s
16
-
17
- Please read the manual about allowed options here:
18
- %s
19
- ERROR_MESSAGE
20
-
21
- ALLOWED_OPTIONS_MESSAGE = <<~ALLOWED_OPTIONS
22
- on_success: <step name OR :finish_him>
23
- on_failure: <step name OR :finish_him>
24
- finish_him: :on_success
25
- finish_him: :on_failure
26
- if: <instance method symbol>
27
- unless: <instance method symbol>
28
- ALLOWED_OPTIONS
29
- MANUAL_URL = 'https://stub.doby.manual.url'
30
- OPTIONS_IS_NOT_ALLOWED = '"%s" option(s) is not allowed for "doby"'
31
- METHOD_NOT_DEFINED = 'doby :%s'
32
- CONTROVERSIAL_KEYS = '"%s" option(s) is not allowed along with "%s" option(s)'
33
- end
34
- end
35
- end
36
- end
@@ -1,39 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decouplio
4
- class DefaultErrorHandler
5
- attr_reader :errors, :status
6
-
7
- def initialize
8
- @errors = {}
9
- @status = nil
10
- end
11
-
12
- def add_error(*args)
13
- case args.size
14
- when 1
15
- args[0].each do |key, message|
16
- @errors.store(
17
- key,
18
- (@errors[key] || []) + [message].flatten
19
- )
20
- end
21
- when 2
22
- @errors.store(
23
- args[0],
24
- (@errors[args[0]] || []) + [args[1]].flatten
25
- )
26
- end
27
- end
28
-
29
- def error_status(err_st)
30
- @status = err_st
31
- end
32
-
33
- def merge(error_store)
34
- @errors = @errors.merge(error_store.errors) do |_key, this_val, other_val|
35
- this_val + other_val
36
- end
37
- end
38
- end
39
- end
@@ -1,18 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'base_error'
4
- require_relative '../const/validations/aide'
5
-
6
- module Decouplio
7
- module Errors
8
- class AideCanNotBeFirstStepError < Decouplio::Errors::BaseError
9
- def template
10
- Decouplio::Const::Validations::Aide::FIRST_STEP
11
- end
12
-
13
- def interpolation_values
14
- []
15
- end
16
- end
17
- end
18
- end
@@ -1,26 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'base_error'
4
- require_relative '../const/validations/aide'
5
-
6
- module Decouplio
7
- module Errors
8
- class AideControversialKeysError < Decouplio::Errors::BaseError
9
- def template
10
- Decouplio::Const::Validations::Aide::VALIDATION_ERROR_MESSAGE
11
- end
12
-
13
- def interpolation_values
14
- [
15
- @errored_option,
16
- format(
17
- Decouplio::Const::Validations::Aide::CONTROVERSIAL_KEYS,
18
- *@details
19
- ),
20
- Decouplio::Const::Validations::Aide::ALLOWED_OPTIONS_MESSAGE,
21
- Decouplio::Const::Validations::Aide::MANUAL_URL
22
- ]
23
- end
24
- end
25
- end
26
- end
@@ -1,26 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'base_error'
4
- require_relative '../const/validations/aide'
5
-
6
- module Decouplio
7
- module Errors
8
- class AideFinishHimError < Decouplio::Errors::BaseError
9
- def template
10
- Decouplio::Const::Validations::Aide::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::Aide::ALLOWED_OPTIONS_MESSAGE,
21
- Decouplio::Const::Validations::Aide::MANUAL_URL
22
- ]
23
- end
24
- end
25
- end
26
- end
@@ -1,26 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'base_error'
4
- require_relative '../const/validations/doby'
5
-
6
- module Decouplio
7
- module Errors
8
- class DobyControversialKeysError < Decouplio::Errors::BaseError
9
- def template
10
- Decouplio::Const::Validations::Doby::VALIDATION_ERROR_MESSAGE
11
- end
12
-
13
- def interpolation_values
14
- [
15
- @errored_option,
16
- format(
17
- Decouplio::Const::Validations::Doby::CONTROVERSIAL_KEYS,
18
- *@details
19
- ),
20
- Decouplio::Const::Validations::Doby::ALLOWED_OPTIONS_MESSAGE,
21
- Decouplio::Const::Validations::Doby::MANUAL_URL
22
- ]
23
- end
24
- end
25
- end
26
- end
@@ -1,26 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'base_error'
4
- require_relative '../const/validations/doby'
5
-
6
- module Decouplio
7
- module Errors
8
- class DobyFinishHimError < Decouplio::Errors::BaseError
9
- def template
10
- Decouplio::Const::Validations::Doby::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::Doby::ALLOWED_OPTIONS_MESSAGE,
21
- Decouplio::Const::Validations::Doby::MANUAL_URL
22
- ]
23
- end
24
- end
25
- end
26
- end
@@ -1,26 +0,0 @@
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 ExtraKeyForFailError < 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::OPTIONS_IS_NOT_ALLOWED,
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
@@ -1,26 +0,0 @@
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 ExtraKeyForOctoError < 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::OPTIONS_IS_NOT_ALLOWED,
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
@@ -1,29 +0,0 @@
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
@@ -1,23 +0,0 @@
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
@@ -1,23 +0,0 @@
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
@@ -1,26 +0,0 @@
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
@@ -1,26 +0,0 @@
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 StepIsNotDefinedForAideError < Decouplio::Errors::BaseError
9
- def template
10
- Decouplio::Const::Validations::Aide::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::Aide::ALLOWED_OPTIONS_MESSAGE,
21
- Decouplio::Const::Validations::Aide::MANUAL_URL
22
- ]
23
- end
24
- end
25
- end
26
- end
@@ -1,27 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'base_error'
4
- require_relative '../const/validations/doby'
5
- require_relative '../const/validations/common'
6
-
7
- module Decouplio
8
- module Errors
9
- class StepIsNotDefinedForDobyError < Decouplio::Errors::BaseError
10
- def template
11
- Decouplio::Const::Validations::Doby::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::Doby::ALLOWED_OPTIONS_MESSAGE,
22
- Decouplio::Const::Validations::Doby::MANUAL_URL
23
- ]
24
- end
25
- end
26
- end
27
- end
@@ -1,17 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'logic_dsl'
4
- require_relative 'composer'
5
-
6
- module Decouplio
7
- class Flow
8
- def self.call(logic:, action_class:)
9
- logic_container_raw_data = Class.new(Decouplio::LogicDsl, &logic)
10
-
11
- Decouplio::Composer.compose(
12
- logic_container_raw_data: logic_container_raw_data,
13
- action_class: action_class
14
- )
15
- end
16
- end
17
- end