decouplio 1.0.0alpha3 → 1.0.0alpha7

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 (51) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +11 -1
  3. data/.rubocop.yml +6 -0
  4. data/.ruby-version +1 -1
  5. data/README.md +2 -17
  6. data/decouplio.gemspec +4 -4
  7. data/lib/decouplio/action.rb +13 -3
  8. data/lib/decouplio/composer.rb +24 -3
  9. data/lib/decouplio/const/doby_aide_options.rb +1 -0
  10. data/lib/decouplio/const/error_messages.rb +9 -0
  11. data/lib/decouplio/const/step_options.rb +16 -0
  12. data/lib/decouplio/default_error_handler.rb +21 -6
  13. data/lib/decouplio/errors/execution_error.rb +20 -0
  14. data/lib/decouplio/errors/step_is_not_defined_for_pass_error.rb +27 -0
  15. data/lib/decouplio/logic_dsl.rb +52 -3
  16. data/lib/decouplio/options_validator.rb +46 -10
  17. data/lib/decouplio/steps/base_resq.rb +13 -3
  18. data/lib/decouplio/steps/service_fail.rb +4 -2
  19. data/lib/decouplio/steps/service_pass.rb +4 -2
  20. data/lib/decouplio/steps/service_step.rb +4 -2
  21. data/lib/decouplio/version.rb +1 -1
  22. metadata +14 -39
  23. data/docs/_config.yml +0 -1
  24. data/docs/aide.rb +0 -59
  25. data/docs/benchmarks.md +0 -1
  26. data/docs/context.md +0 -74
  27. data/docs/context.rb +0 -62
  28. data/docs/doby.rb +0 -38
  29. data/docs/doby_aide.md +0 -208
  30. data/docs/error_store.md +0 -347
  31. data/docs/error_store.rb +0 -202
  32. data/docs/fail.md +0 -1159
  33. data/docs/fail.rb +0 -859
  34. data/docs/index.md +0 -25
  35. data/docs/inner_action.md +0 -63
  36. data/docs/inner_action.rb +0 -43
  37. data/docs/logic_block.md +0 -29
  38. data/docs/octo.md +0 -326
  39. data/docs/octo.rb +0 -164
  40. data/docs/pass.md +0 -309
  41. data/docs/pass.rb +0 -213
  42. data/docs/quick_start.md +0 -71
  43. data/docs/quick_start.rb +0 -38
  44. data/docs/resq.md +0 -263
  45. data/docs/resq.rb +0 -176
  46. data/docs/step.md +0 -885
  47. data/docs/step.rb +0 -627
  48. data/docs/step_as_a_service.md +0 -123
  49. data/docs/step_as_a_service.rb +0 -77
  50. data/docs/wrap.md +0 -240
  51. data/docs/wrap.rb +0 -137
data/docs/index.md DELETED
@@ -1,25 +0,0 @@
1
- ## Decouplio
2
-
3
- Decouplio is a zero dependency, thread safe and framework agnostic gem designed to encapsulate application business logic. It's reverse engineered through TDD and inspired by such frameworks and gems like Trailblazer, Interactor.
4
-
5
- ### Compatibility
6
- Ruby:
7
- - 2.7
8
- - 3.0
9
-
10
- ### Docs
11
-
12
- - [Quick start](https://github.com/differencialx/decouplio/blob/master/docs/quick_start.md)
13
- - [Logic block](https://github.com/differencialx/decouplio/blob/master/docs/logic_block.md)
14
- - [Context](https://github.com/differencialx/decouplio/blob/master/docs/context.md)
15
- - [Step](https://github.com/differencialx/decouplio/blob/master/docs/step.md)
16
- - [Fail](https://github.com/differencialx/decouplio/blob/master/docs/fail.md)
17
- - [Pass](https://github.com/differencialx/decouplio/blob/master/docs/pass.md)
18
- - [Octo](https://github.com/differencialx/decouplio/blob/master/docs/octo.md)
19
- - [Wrap](https://github.com/differencialx/decouplio/blob/master/docs/wrap.md)
20
- - [Resq](https://github.com/differencialx/decouplio/blob/master/docs/resq.md)
21
- - [Inner action](https://github.com/differencialx/decouplio/blob/master/docs/inner_action.md)
22
- - [Doby/Aide](https://github.com/differencialx/decouplio/blob/master/docs/doby_aide.md)
23
- - [Step as a service](https://github.com/differencialx/decouplio/blob/master/docs/step_as_a_service.md)
24
- - [Error store](https://github.com/differencialx/decouplio/blob/master/docs/error_store.md)
25
- - [Benchmarks](https://github.com/differencialx/decouplio/blob/master/docs/benchmarks.md)
data/docs/inner_action.md DELETED
@@ -1,63 +0,0 @@
1
- # Inner Action
2
-
3
- `step/fail/pass` steps can perform another action instead of method.
4
-
5
- ```ruby
6
- require 'decouplio'
7
-
8
- class InnerAction < Decouplio::Action
9
- logic do
10
- step :step_one
11
- step :step_two
12
- end
13
-
14
- def step_one(**)
15
- ctx # => ctx from parent action(SomeAction)
16
- ctx[:step_one] = 'Success'
17
- end
18
-
19
- def step_two(**)
20
- ctx # => ctx from parent action(SomeAction)
21
- ctx[:step_two] = 'Success'
22
- end
23
- end
24
-
25
-
26
- class SomeAction < Decouplio::Action
27
- logic do
28
- step InnerAction
29
- # OR
30
- # fail InnerAction
31
- # OR
32
- # pass InnerAction
33
- end
34
- end
35
-
36
- action = SomeAction.call
37
-
38
- action # =>
39
- # Result: success
40
-
41
- # Railway Flow:
42
- # InnerAction -> step_one -> step_two
43
-
44
- # Context:
45
- # {:step_one=>"Success", :step_two=>"Success"}
46
-
47
- # Errors:
48
- # {}
49
- ```
50
-
51
- ```mermaid
52
- flowchart LR
53
- 1(start)-->2(any_name);
54
- subgraph inner action;
55
- 2(step_one)-->|success track|3(step_two);
56
- end
57
- 3(step_two)-->|success track|4(finish success);
58
- ```
59
-
60
- The parent action context will be passed into inner action
61
-
62
- ## Options
63
- All options for `step/fail/pass` can be applied along with `action` option.
data/docs/inner_action.rb DELETED
@@ -1,43 +0,0 @@
1
- require_relative '../lib/decouplio'
2
-
3
- class InnerAction < Decouplio::Action
4
- logic do
5
- step :step_one
6
- step :step_two
7
- end
8
-
9
- def step_one(**)
10
- ctx # => ctx from parent action(SomeAction)
11
- ctx[:step_one] = 'Success'
12
- end
13
-
14
- def step_two(**)
15
- ctx # => ctx from parent action(SomeAction)
16
- ctx[:step_two] = 'Success'
17
- end
18
- end
19
-
20
-
21
- class SomeAction < Decouplio::Action
22
- logic do
23
- step InnerAction
24
- # OR
25
- # fail InnerAction
26
- # OR
27
- # pass InnerAction
28
- end
29
- end
30
-
31
- action = SomeAction.call
32
-
33
- puts action # =>
34
- # Result: success
35
-
36
- # Railway Flow:
37
- # InnerAction -> step_one -> step_two
38
-
39
- # Context:
40
- # {:step_one=>"Success", :step_two=>"Success"}
41
-
42
- # Errors:
43
- # {}
data/docs/logic_block.md DELETED
@@ -1,29 +0,0 @@
1
- ## Logic block
2
-
3
- It's just a block witch contains flow logic
4
-
5
- ```ruby
6
- require 'decouplio'
7
-
8
- class SomeAction < Decouplio::Action
9
- logic do
10
- # define your logic here
11
- end
12
- end
13
- ```
14
-
15
- What to put inside `logic` block?
16
-
17
- Possible logic steps:
18
- |Step kind|Docs|
19
- |---------|----|
20
- |step|[--->>>](https://github.com/differencialx/decouplio/blob/master/docs/step.md)|
21
- |fail|[--->>>](https://github.com/differencialx/decouplio/blob/master/docs/fail.md)|
22
- |pass|[--->>>](https://github.com/differencialx/decouplio/blob/master/docs/pass.md)|
23
- |octo|[--->>>](https://github.com/differencialx/decouplio/blob/master/docs/octo.md)|
24
- |wrap|[--->>>](https://github.com/differencialx/decouplio/blob/master/docs/wrap.md)|
25
- |resq|[--->>>](https://github.com/differencialx/decouplio/blob/master/docs/resq.md)|
26
- |doby|[--->>>](https://github.com/differencialx/decouplio/blob/master/docs/doby_aide.md)|
27
- |aide|[--->>>](https://github.com/differencialx/decouplio/blob/master/docs/doby_aide.md)|
28
- |inner action|[--->>>](https://github.com/differencialx/decouplio/blob/master/docs/inner_action.md)|
29
- |step as service|[--->>>](https://github.com/differencialx/decouplio/blob/master/docs/step_as_a_service.md)|
data/docs/octo.md DELETED
@@ -1,326 +0,0 @@
1
- # Octo
2
-
3
- It's a step type which helps to implement strategy pattern.
4
-
5
- ## Signature
6
-
7
- ```ruby
8
- octo(octo_name, ctx_key:, method:, **options) do
9
- on :key1, palp: :palp_name_one
10
- on :key2, palp: :palp_name_two
11
- on :key3, palp: :palp_name_three
12
- end
13
- ```
14
-
15
- ## Behavior
16
-
17
- - Depending on some value you can perform different flow. Imagine that `octo` will be replaced with another flow.
18
- - You have two options to set value for octo. By `ctx_key` and `method` options.
19
- - `ctx_key` and `method` options are controversial, so you can use only one of them.
20
- - with `ctx_key` you can specify the key inside action context with value for `octo`
21
- - with `method` you can specify method name symbol, which will be called to retrieve `octo` value, like we do for `if` and `unless` options.
22
- ```ruby
23
- logic do
24
- palp :palp_name_one do
25
- step :step_one, on_failure: :step_final
26
- step :step_two
27
- end
28
-
29
- palp :palp_name_two do
30
- step :step_two
31
- step :step_three
32
- end
33
-
34
- palp :palp_name_three do
35
- step :step_three
36
- step :step_one
37
- end
38
-
39
- step :init_step
40
-
41
- octo :octo_name, ctx_key: :some_key do
42
- on :key1, palp: :palp_name_one
43
- on :key2, palp: :palp_name_two
44
- on :key3, palp: :palp_name_three
45
- end
46
-
47
- step :step_final
48
- end
49
- ```
50
-
51
- ```mermaid
52
- flowchart TD
53
- 0(init_step)-->1(octo)
54
- 1(octo)-->|when ctx_key value == :key1 value|12(palp_name_one);
55
- 12(palp_name_one)-->3(step_one)
56
- 3(step_one)-->4(step_two);
57
- 1(octo)-->|when ctx_key value == :key2|13(palp_name_two);
58
- 13(palp_name_two)-->6(step_two);
59
- 6(step_two)-->7(step_three);
60
- 1(octo)-->|when ctx_key value == :key3|14(palp_name_three);
61
- 14(palp_name_three)-->9(step_three);
62
- 9(step_three)-->10(step_one);
63
- 4(step_two)-->11(final_step);
64
- 7(step_three)-->11(final_step);
65
- 10(step_one)-->11(final_step);
66
- ```
67
-
68
- ### Palp
69
- Currently only one possibility is present to define flow for `octo`, it's `palp`
70
-
71
- <details><summary><b>EXAMPLE (CLICK ME)</b></summary>
72
- <p>
73
-
74
- ```ruby
75
- require 'decouplio'
76
-
77
- class SomeAction < Decouplio::Action
78
- logic do
79
- # it doesn't matter where you define palp
80
- # at the beginning of logic block
81
- # or at the end or in the middle
82
- palp :option_one_palp do
83
- step :step_one, on_failure: :final_step
84
- step :step_two
85
- end
86
-
87
- palp :option_two_palp do
88
- step :step_two
89
- step :step_three
90
- end
91
-
92
- palp :option_three_palp do
93
- step :step_three
94
- step :step_one
95
- fail :fail_one
96
- end
97
-
98
- step :init_step
99
-
100
- octo :my_octo, ctx_key: :custom_key do
101
- on :option_one, palp: :option_one_palp
102
- on :option_two, palp: :option_two_palp
103
- on :option_three, palp: :option_three_palp
104
- end
105
-
106
- step :final_step
107
- fail :fail_two
108
- end
109
-
110
- def init_step(octo_key:, **)
111
- ctx[:custom_key] = octo_key
112
- end
113
-
114
- def step_one(param_for_step_one:, **)
115
- ctx[:step_one] = param_for_step_one
116
- end
117
-
118
- def step_two(param_for_step_two:, **)
119
- ctx[:step_two] = param_for_step_two
120
- end
121
-
122
- def step_three(param_for_step_three:, **)
123
- ctx[:step_three] = param_for_step_three
124
- end
125
-
126
- def fail_one(**)
127
- ctx[:fail_one] = 'Failure'
128
- end
129
-
130
- def final_step(**)
131
- ctx[:final_step] = 'Success'
132
- end
133
-
134
- def fail_two(**)
135
- ctx[:fail_two] = 'Failure'
136
- end
137
- end
138
-
139
-
140
- octo_option_one_success = SomeAction.call(
141
- octo_key: :option_one,
142
- param_for_step_one: true,
143
- param_for_step_two: true
144
- )
145
- octo_option_one_failure = SomeAction.call(
146
- octo_key: :option_one,
147
- param_for_step_one: false,
148
- param_for_step_two: true
149
- )
150
- octo_option_two_success = SomeAction.call(
151
- octo_key: :option_two,
152
- param_for_step_two: true,
153
- param_for_step_three: true
154
- )
155
- octo_option_two_failure = SomeAction.call(
156
- octo_key: :option_two,
157
- param_for_step_two: true,
158
- param_for_step_three: false
159
- )
160
- octo_option_three_success = SomeAction.call(
161
- octo_key: :option_three,
162
- param_for_step_one: true,
163
- param_for_step_three: true
164
- )
165
- octo_option_three_failure = SomeAction.call(
166
- octo_key: :option_three,
167
- param_for_step_one: false,
168
- param_for_step_three: true
169
- )
170
- octo_option_one_success # =>
171
- # Result: success
172
-
173
- # Railway Flow:
174
- # init_step -> my_octo -> step_one -> step_two -> final_step
175
-
176
- # Context:
177
- # {:octo_key=>:option_one, :param_for_step_one=>true, :param_for_step_two=>true, :custom_key=>:option_one, :step_one=>true, :step_two=>true, :final_step=>"Success"}
178
-
179
- # Errors:
180
- # {}
181
- octo_option_one_failure # =>
182
- # Result: success
183
-
184
- # Railway Flow:
185
- # init_step -> my_octo -> step_one -> final_step
186
-
187
- # Context:
188
- # {:octo_key=>:option_one, :param_for_step_one=>false, :param_for_step_two=>true, :custom_key=>:option_one, :step_one=>false, :final_step=>"Success"}
189
-
190
- # Errors:
191
- # {}
192
- octo_option_two_success # =>
193
- # Result: success
194
-
195
- # Railway Flow:
196
- # init_step -> my_octo -> step_two -> step_three -> final_step
197
-
198
- # Context:
199
- # {:octo_key=>:option_two, :param_for_step_two=>true, :param_for_step_three=>true, :custom_key=>:option_two, :step_two=>true, :step_three=>true, :final_step=>"Success"}
200
-
201
- # Errors:
202
- # {}
203
- octo_option_two_failure # =>
204
- # Result: failure
205
-
206
- # Railway Flow:
207
- # init_step -> my_octo -> step_two -> step_three -> fail_two
208
-
209
- # Context:
210
- # {:octo_key=>:option_two, :param_for_step_two=>true, :param_for_step_three=>false, :custom_key=>:option_two, :step_two=>true, :step_three=>false, :fail_two=>"Failure"}
211
-
212
- # Errors:
213
- # {}
214
- octo_option_three_success # =>
215
- # Result: success
216
-
217
- # Railway Flow:
218
- # init_step -> my_octo -> step_three -> step_one -> final_step
219
-
220
- # Context:
221
- # {:octo_key=>:option_three, :param_for_step_one=>true, :param_for_step_three=>true, :custom_key=>:option_three, :step_three=>true, :step_one=>true, :final_step=>"Success"}
222
-
223
- # Errors:
224
- # {}
225
- octo_option_three_failure # =>
226
- # Result: failure
227
-
228
- # Railway Flow:
229
- # init_step -> my_octo -> step_three -> step_one -> fail_one -> fail_two
230
-
231
- # Context:
232
- # {:octo_key=>:option_three, :param_for_step_one=>false, :param_for_step_three=>true, :custom_key=>:option_three, :step_three=>true, :step_one=>false, :fail_one=>"Failure", :fail_two=>"Failure"}
233
-
234
- # Errors:
235
- # {}
236
- ```
237
-
238
- ```mermaid
239
- flowchart TD
240
- 1(start)-->2(init_step);
241
- 2(init_step)-->|success track|3(octo);
242
- 2(init_step)-->|failure track|11(fail_two);
243
- 3(octo)-->|custom_key value == :option_one|4(option_one_palp);
244
- 4(option_one_palp)-->|success track|5(step_one);
245
- 5(step_one)-->|success track|6(step_two);
246
- 6(step_two)-->|success track|7(final_step);
247
- 5(step_one)-->|failure track|7(final_step);
248
- 6(step_two)-->|failure track|11(fail_two);
249
- 3(octo)-->|custom_key value == :option_two|8(option_two_palp);
250
- 8(option_two_palp)-->|success track|9(step_two);
251
- 9(step_two)-->|success track|10(step_three);
252
- 9(step_two)-->|failure track|11(fail_two);
253
- 10(step_three)-->|success track|7(final_step);
254
- 10(step_three)-->|failure track|11(fail_two);
255
- 3(octo)-->|custom_key value == :option_three|12(option_three_palp);
256
- 12(option_three_palp)-->|success track|13(step_three);
257
- 13(step_three)-->|success track|14(step_one);
258
- 14(step_one)-->|success track|7(final_step);
259
- 13(step_three)-->|failure track|15(fail_one);
260
- 14(step_one)-->|failure track|15(fail_one);
261
- 15(fail_one)-->|failure track|11(fail_two);
262
- ```
263
-
264
- </p>
265
- </details>
266
-
267
- ***
268
- ## Options
269
-
270
- ### ctx_key: context key with octo value
271
-
272
- See examples above
273
-
274
- ***
275
-
276
- ### method: method symbol which returns octo value
277
- <details><summary><b>EXAMPLE (CLICK ME)</b></summary>
278
- <p>
279
-
280
- ```ruby
281
- require 'decouplio'
282
-
283
- class SomeAction < Decouplio::Action
284
- logic do
285
- palp :palp_one do
286
- step :step_one
287
- end
288
-
289
- palp :palp_two do
290
- step :step_two
291
- end
292
-
293
- octo :octo_name, method: :what_is_next? do
294
- on :option_one, palp: :palp_one
295
- on :option_two, palp: :palp_two
296
- end
297
- end
298
-
299
- def step_one(**)
300
- # ...
301
- end
302
-
303
- def step_two(**)
304
- # ...
305
- end
306
-
307
- def what_is_next?(connection:, url:)
308
- connection.get(url).body[:decision]
309
- end
310
- end
311
- ```
312
-
313
- </p>
314
- </details>
315
-
316
- ***
317
-
318
- ### if: condition method name
319
- The same as for [step](https://github.com/differencialx/decouplio/blob/master/docs/step.md)
320
-
321
- ***
322
-
323
- ### unless: condition method name
324
- The same as for [step](https://github.com/differencialx/decouplio/blob/master/docs/step.md)
325
-
326
- ***
data/docs/octo.rb DELETED
@@ -1,164 +0,0 @@
1
- require_relative '../lib/decouplio'
2
-
3
-
4
- # Palp
5
-
6
- class SomeAction < Decouplio::Action
7
- logic do
8
- # it doesn't matter where you define palp
9
- # at the beginning of logic block
10
- # or at the end or in the middle
11
- palp :option_one_palp do
12
- step :step_one, on_failure: :final_step
13
- step :step_two
14
- end
15
-
16
- palp :option_two_palp do
17
- step :step_two
18
- step :step_three
19
- end
20
-
21
- palp :option_three_palp do
22
- step :step_three
23
- step :step_one
24
- fail :fail_one
25
- end
26
-
27
- step :init_step
28
-
29
- octo :my_octo, ctx_key: :custom_key do
30
- on :option_one, palp: :option_one_palp
31
- on :option_two, palp: :option_two_palp
32
- on :option_three, palp: :option_three_palp
33
- end
34
-
35
- step :final_step
36
- fail :fail_two
37
- end
38
-
39
- def init_step(octo_key:, **)
40
- ctx[:custom_key] = octo_key
41
- end
42
-
43
- def step_one(param_for_step_one:, **)
44
- ctx[:step_one] = param_for_step_one
45
- end
46
-
47
- def step_two(param_for_step_two:, **)
48
- ctx[:step_two] = param_for_step_two
49
- end
50
-
51
- def step_three(param_for_step_three:, **)
52
- ctx[:step_three] = param_for_step_three
53
- end
54
-
55
- def fail_one(**)
56
- ctx[:fail_one] = 'Failure'
57
- end
58
-
59
- def final_step(**)
60
- ctx[:final_step] = 'Success'
61
- end
62
-
63
- def fail_two(**)
64
- ctx[:fail_two] = 'Failure'
65
- end
66
- end
67
-
68
-
69
- octo_option_one_success = SomeAction.call(
70
- octo_key: :option_one,
71
- param_for_step_one: true,
72
- param_for_step_two: true
73
- )
74
- octo_option_one_failure = SomeAction.call(
75
- octo_key: :option_one,
76
- param_for_step_one: false,
77
- param_for_step_two: true
78
- )
79
- octo_option_two_success = SomeAction.call(
80
- octo_key: :option_two,
81
- param_for_step_two: true,
82
- param_for_step_three: true
83
- )
84
- octo_option_two_failure = SomeAction.call(
85
- octo_key: :option_two,
86
- param_for_step_two: true,
87
- param_for_step_three: false
88
- )
89
- octo_option_three_success = SomeAction.call(
90
- octo_key: :option_three,
91
- param_for_step_one: true,
92
- param_for_step_three: true
93
- )
94
- octo_option_three_failure = SomeAction.call(
95
- octo_key: :option_three,
96
- param_for_step_one: false,
97
- param_for_step_three: true
98
- )
99
- puts octo_option_one_success # =>
100
- # Result: success
101
-
102
- # Railway Flow:
103
- # init_step -> my_octo -> step_one -> step_two -> final_step
104
-
105
- # Context:
106
- # {:octo_key=>:option_one, :param_for_step_one=>true, :param_for_step_two=>true, :custom_key=>:option_one, :step_one=>true, :step_two=>true, :final_step=>"Success"}
107
-
108
- # Errors:
109
- # {}
110
- puts octo_option_one_failure # =>
111
- # Result: success
112
-
113
- # Railway Flow:
114
- # init_step -> my_octo -> step_one -> final_step
115
-
116
- # Context:
117
- # {:octo_key=>:option_one, :param_for_step_one=>false, :param_for_step_two=>true, :custom_key=>:option_one, :step_one=>false, :final_step=>"Success"}
118
-
119
- # Errors:
120
- # {}
121
- puts octo_option_two_success # =>
122
- # Result: success
123
-
124
- # Railway Flow:
125
- # init_step -> my_octo -> step_two -> step_three -> final_step
126
-
127
- # Context:
128
- # {:octo_key=>:option_two, :param_for_step_two=>true, :param_for_step_three=>true, :custom_key=>:option_two, :step_two=>true, :step_three=>true, :final_step=>"Success"}
129
-
130
- # Errors:
131
- # {}
132
- puts octo_option_two_failure # =>
133
- # Result: failure
134
-
135
- # Railway Flow:
136
- # init_step -> my_octo -> step_two -> step_three -> fail_two
137
-
138
- # Context:
139
- # {:octo_key=>:option_two, :param_for_step_two=>true, :param_for_step_three=>false, :custom_key=>:option_two, :step_two=>true, :step_three=>false, :fail_two=>"Failure"}
140
-
141
- # Errors:
142
- # {}
143
- puts octo_option_three_success # =>
144
- # Result: success
145
-
146
- # Railway Flow:
147
- # init_step -> my_octo -> step_three -> step_one -> final_step
148
-
149
- # Context:
150
- # {:octo_key=>:option_three, :param_for_step_one=>true, :param_for_step_three=>true, :custom_key=>:option_three, :step_three=>true, :step_one=>true, :final_step=>"Success"}
151
-
152
- # Errors:
153
- # {}
154
- puts octo_option_three_failure # =>
155
- # Result: failure
156
-
157
- # Railway Flow:
158
- # init_step -> my_octo -> step_three -> step_one -> fail_one -> fail_two
159
-
160
- # Context:
161
- # {:octo_key=>:option_three, :param_for_step_one=>false, :param_for_step_three=>true, :custom_key=>:option_three, :step_three=>true, :step_one=>false, :fail_one=>"Failure", :fail_two=>"Failure"}
162
-
163
- # Errors:
164
- # {}