trailblazer-operation 0.4.1 → 0.6.0
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.
- checksums.yaml +4 -4
- data/.rubocop.yml +8 -0
- data/.rubocop_todo.yml +223 -0
- data/.travis.yml +6 -7
- data/CHANGES.md +16 -12
- data/Gemfile +5 -3
- data/README.md +13 -2
- data/Rakefile +2 -2
- data/lib/trailblazer/operation.rb +52 -67
- data/lib/trailblazer/operation/class_dependencies.rb +1 -1
- data/lib/trailblazer/operation/container.rb +14 -0
- data/lib/trailblazer/operation/deprecated_macro.rb +2 -2
- data/lib/trailblazer/operation/public_call.rb +23 -20
- data/lib/trailblazer/operation/railway.rb +2 -3
- data/lib/trailblazer/operation/railway/macaroni.rb +2 -2
- data/lib/trailblazer/operation/result.rb +14 -1
- data/lib/trailblazer/operation/trace.rb +9 -12
- data/lib/trailblazer/operation/version.rb +4 -2
- data/test/benchmark/skill_resolver_benchmark.rb +8 -9
- data/test/call_test.rb +57 -31
- data/test/callable_test.rb +147 -147
- data/test/class_dependencies_test.rb +6 -7
- data/test/docs/doormat_test.rb +13 -12
- data/test/docs/macaroni_test.rb +7 -9
- data/test/docs/operation_test.rb +69 -4
- data/test/docs/wiring_test.rb +85 -153
- data/test/dry_container_test.rb +4 -3
- data/test/fast_track_test.rb +24 -44
- data/test/inheritance_test.rb +13 -12
- data/test/introspect_test.rb +6 -6
- data/test/operation_test.rb +17 -25
- data/test/result_test.rb +4 -4
- data/test/ruby-2.0.0/operation_test.rb +9 -9
- data/test/ruby-2.0.0/step_test.rb +17 -16
- data/test/step_test.rb +55 -50
- data/test/test_helper.rb +7 -13
- data/test/trace_test.rb +27 -27
- data/test/wiring/defaults_test.rb +29 -33
- data/trailblazer-operation.gemspec +9 -7
- metadata +46 -27
- data/lib/trailblazer/operation/heritage.rb +0 -30
- data/lib/trailblazer/operation/inject.rb +0 -36
- data/lib/trailblazer/operation/inspect.rb +0 -79
- data/lib/trailblazer/operation/railway/fast_track.rb +0 -13
- data/lib/trailblazer/operation/railway/normalizer.rb +0 -58
- data/lib/trailblazer/operation/railway/task_builder.rb +0 -37
- data/test/inspect_test.rb +0 -43
- data/test/macro_test.rb +0 -60
- data/test/task_wrap_test.rb +0 -97
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 228e261fc19eec5d741437141b0eae01552aaaf08caa617c2ad2a3f226e5fa94
|
4
|
+
data.tar.gz: f316ca1a182fc7f8b730f89d59b0e575e9a43365b571486079f7b95e6749717d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca04555c63aabc959539399ae7daf3e11b79c5ffb946326abb9abbf1db284379f4bacc19f7ee9013bacbb7735f35b350e42f2e17b38278fed9f9c259524264b1
|
7
|
+
data.tar.gz: 54ba90ec3dd1f4977fffc95ab20a93a625b341fd74f110416ae4dd28cd3a9fb2e6960378e6e3deb93ac7b39decccc4011c7e5716233ab928ca70e0295206c628
|
data/.rubocop.yml
ADDED
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,223 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2019-04-05 17:28:56 +1100 using RuboCop version 0.58.1.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 1
|
10
|
+
# Configuration parameters: Include.
|
11
|
+
# Include: **/*.gemspec
|
12
|
+
Gemspec/RequiredRubyVersion:
|
13
|
+
Exclude:
|
14
|
+
- 'trailblazer-operation.gemspec'
|
15
|
+
|
16
|
+
# Offense count: 5
|
17
|
+
# Cop supports --auto-correct.
|
18
|
+
Layout/CommentIndentation:
|
19
|
+
Exclude:
|
20
|
+
- 'lib/trailblazer/operation/version.rb'
|
21
|
+
- 'test/wiring/defaults_test.rb'
|
22
|
+
|
23
|
+
# Offense count: 3
|
24
|
+
# Cop supports --auto-correct.
|
25
|
+
# Configuration parameters: AllowAdjacentOneLineDefs, NumberOfEmptyLines.
|
26
|
+
Layout/EmptyLineBetweenDefs:
|
27
|
+
Exclude:
|
28
|
+
- 'lib/trailblazer/operation.rb'
|
29
|
+
|
30
|
+
# Offense count: 1
|
31
|
+
# Cop supports --auto-correct.
|
32
|
+
Layout/EmptyLines:
|
33
|
+
Exclude:
|
34
|
+
- 'lib/trailblazer/operation.rb'
|
35
|
+
|
36
|
+
# Offense count: 1
|
37
|
+
# Cop supports --auto-correct.
|
38
|
+
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
|
39
|
+
Layout/ExtraSpacing:
|
40
|
+
Exclude:
|
41
|
+
- 'lib/trailblazer/operation.rb'
|
42
|
+
|
43
|
+
# Offense count: 2
|
44
|
+
# Cop supports --auto-correct.
|
45
|
+
Layout/SpaceBeforeSemicolon:
|
46
|
+
Exclude:
|
47
|
+
- 'lib/trailblazer/operation.rb'
|
48
|
+
|
49
|
+
# Offense count: 2
|
50
|
+
# Cop supports --auto-correct.
|
51
|
+
# Configuration parameters: EnforcedStyle.
|
52
|
+
# SupportedStyles: space, no_space
|
53
|
+
Layout/SpaceInsideParens:
|
54
|
+
Exclude:
|
55
|
+
- 'lib/trailblazer/operation.rb'
|
56
|
+
|
57
|
+
# Offense count: 2
|
58
|
+
Lint/ShadowingOuterLocalVariable:
|
59
|
+
Exclude:
|
60
|
+
- 'lib/trailblazer/operation/deprecated_macro.rb'
|
61
|
+
- 'lib/trailblazer/operation/public_call.rb'
|
62
|
+
|
63
|
+
# Offense count: 1
|
64
|
+
# Cop supports --auto-correct.
|
65
|
+
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
|
66
|
+
Lint/UnusedBlockArgument:
|
67
|
+
Exclude:
|
68
|
+
- 'lib/trailblazer/operation/inspect.rb'
|
69
|
+
|
70
|
+
# Offense count: 2
|
71
|
+
Lint/UselessAssignment:
|
72
|
+
Exclude:
|
73
|
+
- 'lib/trailblazer/operation/public_call.rb'
|
74
|
+
- 'lib/trailblazer/operation/trace.rb'
|
75
|
+
|
76
|
+
# Offense count: 46
|
77
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
78
|
+
# URISchemes: http, https
|
79
|
+
Metrics/LineLength:
|
80
|
+
Max: 255
|
81
|
+
|
82
|
+
# Offense count: 2
|
83
|
+
Naming/ConstantName:
|
84
|
+
Exclude:
|
85
|
+
- 'lib/trailblazer/operation/inspect.rb'
|
86
|
+
- 'lib/trailblazer/operation/version.rb'
|
87
|
+
|
88
|
+
# Offense count: 1
|
89
|
+
# Cop supports --auto-correct.
|
90
|
+
Performance/StringReplacement:
|
91
|
+
Exclude:
|
92
|
+
- 'lib/trailblazer/operation/inspect.rb'
|
93
|
+
|
94
|
+
# Offense count: 2
|
95
|
+
# Cop supports --auto-correct.
|
96
|
+
Style/BlockComments:
|
97
|
+
Exclude:
|
98
|
+
- 'test/docs/wiring_test.rb'
|
99
|
+
|
100
|
+
# Offense count: 3
|
101
|
+
# Cop supports --auto-correct.
|
102
|
+
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods.
|
103
|
+
# SupportedStyles: line_count_based, semantic, braces_for_chaining
|
104
|
+
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
105
|
+
# FunctionalMethods: let, let!, subject, watch
|
106
|
+
# IgnoredMethods: lambda, proc, it
|
107
|
+
Style/BlockDelimiters:
|
108
|
+
Exclude:
|
109
|
+
- 'lib/trailblazer/operation/inspect.rb'
|
110
|
+
- 'test/step_test.rb'
|
111
|
+
|
112
|
+
# Offense count: 1
|
113
|
+
# Cop supports --auto-correct.
|
114
|
+
# Configuration parameters: EnforcedStyle.
|
115
|
+
# SupportedStyles: braces, no_braces, context_dependent
|
116
|
+
Style/BracesAroundHashParameters:
|
117
|
+
Exclude:
|
118
|
+
- 'lib/trailblazer/operation/public_call.rb'
|
119
|
+
|
120
|
+
# Offense count: 1
|
121
|
+
# Cop supports --auto-correct.
|
122
|
+
# Configuration parameters: EnforcedStyle.
|
123
|
+
# SupportedStyles: is_a?, kind_of?
|
124
|
+
Style/ClassCheck:
|
125
|
+
Exclude:
|
126
|
+
- 'lib/trailblazer/operation/railway.rb'
|
127
|
+
|
128
|
+
# Offense count: 2
|
129
|
+
Style/CommentedKeyword:
|
130
|
+
Exclude:
|
131
|
+
- 'lib/trailblazer/operation/railway.rb'
|
132
|
+
|
133
|
+
# Offense count: 1
|
134
|
+
# Cop supports --auto-correct.
|
135
|
+
Style/DefWithParentheses:
|
136
|
+
Exclude:
|
137
|
+
- 'lib/trailblazer/operation.rb'
|
138
|
+
|
139
|
+
# Offense count: 1
|
140
|
+
# Cop supports --auto-correct.
|
141
|
+
Style/ExpandPathArguments:
|
142
|
+
Exclude:
|
143
|
+
- 'trailblazer-operation.gemspec'
|
144
|
+
|
145
|
+
# Offense count: 3
|
146
|
+
# Cop supports --auto-correct.
|
147
|
+
# Configuration parameters: EnforcedStyle.
|
148
|
+
# SupportedStyles: format, sprintf, percent
|
149
|
+
Style/FormatString:
|
150
|
+
Exclude:
|
151
|
+
- 'lib/trailblazer/operation/inspect.rb'
|
152
|
+
|
153
|
+
# Offense count: 1
|
154
|
+
# Configuration parameters: .
|
155
|
+
# SupportedStyles: annotated, template, unannotated
|
156
|
+
Style/FormatStringToken:
|
157
|
+
EnforcedStyle: unannotated
|
158
|
+
|
159
|
+
# Offense count: 3
|
160
|
+
Style/MethodCalledOnDoEndBlock:
|
161
|
+
Exclude:
|
162
|
+
- 'lib/trailblazer/operation/inspect.rb'
|
163
|
+
- 'test/step_test.rb'
|
164
|
+
|
165
|
+
# Offense count: 2
|
166
|
+
# Cop supports --auto-correct.
|
167
|
+
Style/MutableConstant:
|
168
|
+
Exclude:
|
169
|
+
- 'lib/trailblazer/operation/inspect.rb'
|
170
|
+
- 'lib/trailblazer/operation/version.rb'
|
171
|
+
|
172
|
+
# Offense count: 1
|
173
|
+
# Cop supports --auto-correct.
|
174
|
+
Style/ParallelAssignment:
|
175
|
+
Exclude:
|
176
|
+
- 'lib/trailblazer/operation/result.rb'
|
177
|
+
|
178
|
+
# Offense count: 4
|
179
|
+
# Cop supports --auto-correct.
|
180
|
+
# Configuration parameters: PreferredDelimiters.
|
181
|
+
Style/PercentLiteralDelimiters:
|
182
|
+
Exclude:
|
183
|
+
- 'Rakefile'
|
184
|
+
|
185
|
+
# Offense count: 4
|
186
|
+
# Cop supports --auto-correct.
|
187
|
+
# Configuration parameters: EnforcedStyle.
|
188
|
+
# SupportedStyles: only_raise, only_fail, semantic
|
189
|
+
Style/SignalException:
|
190
|
+
Exclude:
|
191
|
+
- 'test/operation_test.rb'
|
192
|
+
- 'test/ruby-2.0.0/operation_test.rb'
|
193
|
+
|
194
|
+
# Offense count: 1
|
195
|
+
# Cop supports --auto-correct.
|
196
|
+
# Configuration parameters: EnforcedStyle.
|
197
|
+
# SupportedStyles: use_perl_names, use_english_names
|
198
|
+
Style/SpecialGlobalVars:
|
199
|
+
Exclude:
|
200
|
+
- 'trailblazer-operation.gemspec'
|
201
|
+
|
202
|
+
# Offense count: 3
|
203
|
+
# Cop supports --auto-correct.
|
204
|
+
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
205
|
+
# SupportedStyles: single_quotes, double_quotes
|
206
|
+
Style/StringLiterals:
|
207
|
+
Exclude:
|
208
|
+
- 'Gemfile'
|
209
|
+
- 'trailblazer-operation.gemspec'
|
210
|
+
|
211
|
+
# Offense count: 1
|
212
|
+
# Cop supports --auto-correct.
|
213
|
+
# Configuration parameters: EnforcedStyleForMultiline.
|
214
|
+
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
|
215
|
+
Style/TrailingCommaInHashLiteral:
|
216
|
+
Exclude:
|
217
|
+
- 'lib/trailblazer/operation.rb'
|
218
|
+
|
219
|
+
# Offense count: 2
|
220
|
+
# Cop supports --auto-correct.
|
221
|
+
Style/UnneededPercentQ:
|
222
|
+
Exclude:
|
223
|
+
- 'trailblazer-operation.gemspec'
|
data/.travis.yml
CHANGED
@@ -1,17 +1,16 @@
|
|
1
1
|
language: ruby
|
2
2
|
before_install:
|
3
|
-
- gem install bundler
|
3
|
+
- gem install bundler -v 1.17.3
|
4
4
|
matrix:
|
5
5
|
include:
|
6
|
-
# - rvm: 2.
|
7
|
-
# gemfile:
|
8
|
-
- rvm: 2.1
|
9
|
-
gemfile: Gemfile
|
6
|
+
# - rvm: 2.1.0
|
7
|
+
# gemfile: Gemfile
|
10
8
|
- rvm: 2.2.4
|
11
9
|
gemfile: Gemfile
|
12
10
|
- rvm: 2.3.3
|
13
11
|
gemfile: Gemfile
|
14
12
|
- rvm: 2.4.0
|
15
13
|
gemfile: Gemfile
|
16
|
-
- rvm:
|
17
|
-
|
14
|
+
- rvm: 2.5.0
|
15
|
+
gemfile: Gemfile
|
16
|
+
script: bundle exec rake test
|
data/CHANGES.md
CHANGED
@@ -1,18 +1,22 @@
|
|
1
|
-
|
2
|
-
* api to add your own task.
|
1
|
+
## 0.6.0
|
3
2
|
|
4
|
-
|
5
|
-
Graph and Sequence to make it easier to wire anything.
|
6
|
-
macros can now add/modify the wiring, e.g. their end to the our end or the next task.
|
7
|
-
[ use circuit for actual step_args/initialize process, too? ]
|
8
|
-
You can now add an unlimited number of "your own" end events, which can then be interpreted on the outside (e.g. Endpoint)
|
9
|
-
* Introduced the `fast_track: true` option for steps. If you were returning `Railway.fail_fast!` and the like, you now need to declare that option, e.g.
|
3
|
+
* Require newest `activity` gem.
|
10
4
|
|
11
|
-
|
12
|
-
step :my_validate!, fast_track: true
|
13
|
-
```
|
5
|
+
## 0.5.3
|
14
6
|
|
15
|
-
|
7
|
+
* New `context` API.
|
8
|
+
|
9
|
+
## 0.5.2
|
10
|
+
|
11
|
+
* Use `trailblazer-activity-dsl-linear-0.1.6.`
|
12
|
+
|
13
|
+
## 0.5.1
|
14
|
+
|
15
|
+
* Remove Inspect. this now sits in the `developer` gem as `Developer.railway`.
|
16
|
+
|
17
|
+
## 0.5.0
|
18
|
+
|
19
|
+
* Minimal API around `Activity::FastTrack` to support the old public call style.
|
16
20
|
|
17
21
|
|
18
22
|
## 0.4.1
|
data/Gemfile
CHANGED
@@ -7,9 +7,11 @@ gem "multi_json"
|
|
7
7
|
|
8
8
|
gem "dry-auto_inject"
|
9
9
|
|
10
|
-
gem "minitest-line"
|
11
10
|
gem "benchmark-ips"
|
11
|
+
gem "minitest-line"
|
12
12
|
|
13
|
-
# gem "trailblazer-developer", path: "../developer"
|
13
|
+
# gem "trailblazer-developer", path: "../trailblazer-developer"
|
14
14
|
# gem "trailblazer-developer", git: "https://github.com/trailblazer/trailblazer-developer"
|
15
|
-
gem "trailblazer-activity", path: "../trailblazer-activity"
|
15
|
+
# gem "trailblazer-activity", path: "../trailblazer-activity"
|
16
|
+
# gem "trailblazer-activity-dsl-linear", path: "../trailblazer-activity-dsl-linear"
|
17
|
+
# gem "trailblazer-activity", github: "trailblazer/trailblazer-activity"
|
data/README.md
CHANGED
@@ -1,6 +1,17 @@
|
|
1
|
-
|
1
|
+
# Trailblazer-operation
|
2
2
|
|
3
|
-
|
3
|
+
_Trailblazer's Operation implementation._
|
4
|
+
|
5
|
+
## Overview
|
6
|
+
|
7
|
+
An operation is a pattern from the Trailblazer architecture. It implements a public function such as "create user" or "archive blog post". Internally, an operation is simply a generic _activity_ that uses an existing DSL to help you creating the operation's flow.
|
8
|
+
|
9
|
+
An operation is identical to an activity with two additions.
|
10
|
+
|
11
|
+
* A public `call` method with a simplified signature `Create.call(params: params, current_user: @user)`
|
12
|
+
* It produces a `Result` object with the popular `success?` API.
|
13
|
+
|
14
|
+
An operation can be used exaclty like an activity, including nesting, tracing, etc.
|
4
15
|
|
5
16
|
## Copyright
|
6
17
|
|
data/Rakefile
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
require "rake/testtask"
|
3
3
|
|
4
|
-
task :default => [:test]
|
5
|
-
|
6
4
|
Rake::TestTask.new(:test) do |test|
|
7
5
|
test.libs << "test"
|
8
6
|
test.verbose = true
|
@@ -19,3 +17,5 @@ Rake::TestTask.new(:test) do |test|
|
|
19
17
|
|
20
18
|
test.test_files = test_files
|
21
19
|
end
|
20
|
+
|
21
|
+
task :default => %i[test]
|
@@ -1,91 +1,76 @@
|
|
1
|
-
require "forwardable"
|
2
|
-
|
3
|
-
# trailblazer-context
|
4
1
|
require "trailblazer/option"
|
5
2
|
require "trailblazer/context"
|
6
3
|
require "trailblazer/container_chain"
|
7
4
|
|
8
5
|
require "trailblazer/activity"
|
9
|
-
require "trailblazer/activity/dsl/
|
10
|
-
|
11
|
-
|
12
|
-
require "trailblazer/operation/callable"
|
6
|
+
require "trailblazer/activity/dsl/linear"
|
13
7
|
|
14
|
-
require "trailblazer/operation/heritage"
|
15
|
-
require "trailblazer/operation/public_call" # TODO: Remove in 3.0.
|
16
|
-
require "trailblazer/operation/class_dependencies"
|
17
|
-
require "trailblazer/operation/deprecated_macro" # TODO: remove in 2.2.
|
18
|
-
require "trailblazer/operation/result"
|
19
|
-
require "trailblazer/operation/railway"
|
20
|
-
|
21
|
-
require "trailblazer/operation/railway/fast_track"
|
22
|
-
require "trailblazer/operation/railway/normalizer"
|
23
|
-
require "trailblazer/operation/trace"
|
24
|
-
|
25
|
-
require "trailblazer/operation/railway/macaroni"
|
26
8
|
|
27
9
|
module Trailblazer
|
28
|
-
#
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
extend Activity::FastTrack( pipeline: Railway::Normalizer::Pipeline, builder_options: builder_options )
|
10
|
+
# DISCUSS: I don't know where else to put this. It's not part of the {Activity} concept
|
11
|
+
class Activity
|
12
|
+
class Railway
|
13
|
+
module End
|
14
|
+
# @private
|
15
|
+
class Success < Activity::End; end
|
16
|
+
class Failure < Activity::End; end
|
17
|
+
|
18
|
+
class FailFast < Failure; end
|
19
|
+
class PassFast < Success; end
|
20
|
+
end
|
41
21
|
end
|
42
22
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
23
|
+
module Operation
|
24
|
+
def self.OptionsForState()
|
25
|
+
{
|
26
|
+
end_task: Activity::Railway::End::Success.new(semantic: :success),
|
27
|
+
failure_end: Activity::Railway::End::Failure.new(semantic: :failure),
|
28
|
+
fail_fast_end: Activity::Railway::End::FailFast.new(semantic: :fail_fast),
|
29
|
+
pass_fast_end: Activity::Railway::End::PassFast.new(semantic: :pass_fast),
|
30
|
+
}
|
31
|
+
end
|
49
32
|
end
|
33
|
+
end
|
50
34
|
|
51
|
-
|
52
|
-
|
35
|
+
def self.Operation(options)
|
36
|
+
Class.new(Activity::FastTrack( Activity::Operation.OptionsForState.merge(options) )) do
|
37
|
+
extend Operation::PublicCall
|
53
38
|
end
|
39
|
+
end
|
54
40
|
|
41
|
+
# The Trailblazer-style operation.
|
42
|
+
# Note that you don't have to use our "opinionated" version with result object, skills, etc.
|
43
|
+
class Operation < Activity::FastTrack(Activity::Operation.OptionsForState)
|
44
|
+
# extend Skill::Accessors # ::[] and ::[]= # TODO: fade out this usage.
|
55
45
|
|
56
|
-
|
57
|
-
|
58
|
-
module Process
|
59
|
-
def to_h
|
60
|
-
@activity.to_h.merge( activity: @activity )
|
61
|
-
end
|
46
|
+
class << self
|
47
|
+
alias_method :strategy_call, :call
|
62
48
|
end
|
63
49
|
|
64
|
-
|
50
|
+
require "trailblazer/operation/public_call" # TODO: Remove in 3.0.
|
51
|
+
extend PublicCall # ::call(params, { current_user: .. })
|
65
52
|
|
66
|
-
|
53
|
+
require "trailblazer/operation/trace"
|
54
|
+
extend Trace # ::trace
|
67
55
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
56
|
+
module Railway
|
57
|
+
def self.fail! ; Activity::Left end
|
58
|
+
def self.pass! ; Activity::Right end
|
59
|
+
def self.fail_fast!; Activity::FastTrack::FailFast end
|
60
|
+
def self.pass_fast!; Activity::FastTrack::PassFast end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
72
64
|
|
73
|
-
|
74
|
-
|
75
|
-
def fail(task, options={}, &block); add_task!(:fail, task, options, &block) end
|
65
|
+
require "trailblazer/operation/class_dependencies"
|
66
|
+
require "trailblazer/operation/deprecated_macro" # TODO: remove in 2.2.
|
76
67
|
|
77
|
-
|
78
|
-
|
68
|
+
require "trailblazer/operation/result"
|
69
|
+
require "trailblazer/operation/railway"
|
79
70
|
|
80
|
-
|
81
|
-
|
82
|
-
@activity.send(name, task, options, &block)
|
83
|
-
end
|
84
|
-
end
|
71
|
+
require "trailblazer/developer"
|
72
|
+
require "trailblazer/operation/trace"
|
85
73
|
|
86
|
-
|
87
|
-
extend Trace # ::trace
|
88
|
-
end
|
89
|
-
end
|
74
|
+
require "trailblazer/operation/railway/macaroni"
|
90
75
|
|
91
|
-
require "trailblazer/operation/
|
76
|
+
require "trailblazer/operation/container"
|