trailblazer 2.1.0.beta7 → 2.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop-https---raw-githubusercontent-com-trailblazer-meta-master-rubocop-yml +73 -0
- data/.rubocop.yml +3 -1
- data/.rubocop_todo.yml +109 -61
- data/CHANGES.md +4 -0
- data/Gemfile +22 -12
- data/LICENSE.txt +23 -5
- data/lib/trailblazer.rb +0 -4
- data/lib/trailblazer/version.rb +1 -1
- data/trailblazer.gemspec +5 -5
- metadata +19 -32
- data/lib/trailblazer/operation/input_output.rb +0 -28
- data/lib/trailblazer/task.rb +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfc3429bc0df03bc91db7e24e3046d1016e7ca0535a3509fd236d6cb70df49d2
|
4
|
+
data.tar.gz: e7da32f130dab4b12c3e40f01f2ce7fbdb919ebb13d9c70e79872ba9f5959157
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4862d79d2d219ece0ecc52ab065cee15eed89a7c6af2871f156383469f1403ef8d3dd5138853e0e50a862e30b18d4e8dd1774f6fbe2e35d51a2e4c866e12a02f
|
7
|
+
data.tar.gz: 9566b38b888c2038a88cd4367342543695b00a25677c21accfdc37ccc521be3dea13f8ddc85dda3a8bafa75ad916f04f63ca10da94823e4d7b0c8e3771f27d18
|
data/.gitignore
CHANGED
@@ -0,0 +1,73 @@
|
|
1
|
+
AllCops:
|
2
|
+
DisplayCopNames: true
|
3
|
+
Layout/CaseIndentation:
|
4
|
+
IndentOneStep: true
|
5
|
+
Layout/FirstArrayElementLineBreak:
|
6
|
+
Enabled: true
|
7
|
+
Layout/FirstHashElementLineBreak:
|
8
|
+
Enabled: true
|
9
|
+
Layout/FirstMethodArgumentLineBreak:
|
10
|
+
Enabled: true
|
11
|
+
Layout/FirstMethodParameterLineBreak:
|
12
|
+
Enabled: true
|
13
|
+
Layout/MultilineAssignmentLayout:
|
14
|
+
Enabled: true
|
15
|
+
EnforcedStyle: same_line
|
16
|
+
Layout/SpaceInsideHashLiteralBraces:
|
17
|
+
EnforcedStyle: no_space
|
18
|
+
Metrics/LineLength:
|
19
|
+
Max: 130
|
20
|
+
Metrics/ParameterLists:
|
21
|
+
Max: 5
|
22
|
+
Naming/VariableNumber:
|
23
|
+
EnforcedStyle: snake_case
|
24
|
+
Style/AndOr:
|
25
|
+
EnforcedStyle: conditionals
|
26
|
+
Style/AutoResourceCleanup:
|
27
|
+
Enabled: true
|
28
|
+
Style/CollectionMethods:
|
29
|
+
Enabled: true
|
30
|
+
Style/Documentation:
|
31
|
+
Enabled: false
|
32
|
+
Style/EmptyLiteral:
|
33
|
+
Enabled: false
|
34
|
+
Style/EmptyMethod:
|
35
|
+
EnforcedStyle: expanded
|
36
|
+
Style/FormatStringToken:
|
37
|
+
EnforcedStyle: template
|
38
|
+
Style/ImplicitRuntimeError:
|
39
|
+
Enabled: true
|
40
|
+
Style/MethodCalledOnDoEndBlock:
|
41
|
+
Enabled: true
|
42
|
+
Style/MethodDefParentheses:
|
43
|
+
EnforcedStyle: require_parentheses
|
44
|
+
Style/MissingElse:
|
45
|
+
Enabled: true
|
46
|
+
EnforcedStyle: case
|
47
|
+
Style/NumericLiterals:
|
48
|
+
Enabled: false
|
49
|
+
Style/OptionHash:
|
50
|
+
Enabled: true
|
51
|
+
Style/PercentLiteralDelimiters:
|
52
|
+
PreferredDelimiters:
|
53
|
+
"%w": "[]"
|
54
|
+
"%W": "[]"
|
55
|
+
"%i": "[]"
|
56
|
+
"%I": "[]"
|
57
|
+
"%r": "()"
|
58
|
+
Style/ReturnNil:
|
59
|
+
Enabled: true
|
60
|
+
Style/SafeNavigation:
|
61
|
+
Enabled: false
|
62
|
+
Style/Send:
|
63
|
+
Enabled: true
|
64
|
+
Style/SignalException:
|
65
|
+
EnforcedStyle: semantic
|
66
|
+
Style/StringLiterals:
|
67
|
+
EnforcedStyle: double_quotes
|
68
|
+
Style/StringLiteralsInInterpolation:
|
69
|
+
EnforcedStyle: double_quotes
|
70
|
+
Style/StringMethods:
|
71
|
+
Enabled: true
|
72
|
+
Style/SymbolArray:
|
73
|
+
Enabled: true
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,12 +1,19 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2018-03
|
3
|
+
# on 2018-06-03 16:45:22 +0800 using RuboCop version 0.56.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
9
|
+
# Offense count: 9
|
10
|
+
# Configuration parameters: Include.
|
11
|
+
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
|
12
|
+
Bundler/DuplicatedGem:
|
13
|
+
Exclude:
|
14
|
+
- 'Gemfile'
|
15
|
+
|
16
|
+
# Offense count: 4
|
10
17
|
# Cop supports --auto-correct.
|
11
18
|
# Configuration parameters: Include, TreatCommentsAsGroupSeparators.
|
12
19
|
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
|
@@ -14,7 +21,7 @@ Bundler/OrderedGems:
|
|
14
21
|
Exclude:
|
15
22
|
- 'Gemfile'
|
16
23
|
|
17
|
-
# Offense count:
|
24
|
+
# Offense count: 1
|
18
25
|
# Cop supports --auto-correct.
|
19
26
|
# Configuration parameters: Include, TreatCommentsAsGroupSeparators.
|
20
27
|
# Include: **/*.gemspec
|
@@ -43,6 +50,13 @@ Layout/BlockEndNewline:
|
|
43
50
|
Exclude:
|
44
51
|
- 'lib/trailblazer/operation/module.rb'
|
45
52
|
|
53
|
+
# Offense count: 3
|
54
|
+
# Cop supports --auto-correct.
|
55
|
+
# Configuration parameters: IndentOneStep, IndentationWidth.
|
56
|
+
# SupportedStyles: case, end
|
57
|
+
Layout/CaseIndentation:
|
58
|
+
EnforcedStyle: end
|
59
|
+
|
46
60
|
# Offense count: 20
|
47
61
|
# Cop supports --auto-correct.
|
48
62
|
Layout/CommentIndentation:
|
@@ -69,13 +83,15 @@ Layout/EmptyLineBetweenDefs:
|
|
69
83
|
- 'test/docs/fast_test.rb'
|
70
84
|
- 'test/test_helper.rb'
|
71
85
|
|
72
|
-
# Offense count:
|
86
|
+
# Offense count: 18
|
73
87
|
# Cop supports --auto-correct.
|
74
88
|
Layout/EmptyLines:
|
75
89
|
Exclude:
|
90
|
+
- 'Gemfile'
|
76
91
|
- 'test/benchmark.rb'
|
77
92
|
- 'test/docs/fast_test.rb'
|
78
93
|
- 'test/docs/operation_test.rb'
|
94
|
+
- 'test/dsl/contract_test.rb'
|
79
95
|
- 'test/module_test.rb'
|
80
96
|
|
81
97
|
# Offense count: 2
|
@@ -85,13 +101,14 @@ Layout/EmptyLinesAroundAccessModifier:
|
|
85
101
|
- 'lib/trailblazer/dsl.rb'
|
86
102
|
- 'lib/trailblazer/operation/test.rb'
|
87
103
|
|
88
|
-
# Offense count:
|
104
|
+
# Offense count: 2
|
89
105
|
# Cop supports --auto-correct.
|
90
106
|
# Configuration parameters: EnforcedStyle.
|
91
107
|
# SupportedStyles: empty_lines, no_empty_lines
|
92
108
|
Layout/EmptyLinesAroundBlockBody:
|
93
109
|
Exclude:
|
94
110
|
- 'lib/trailblazer/operation/module.rb'
|
111
|
+
- 'test/dsl/contract_test.rb'
|
95
112
|
|
96
113
|
# Offense count: 1
|
97
114
|
# Cop supports --auto-correct.
|
@@ -99,7 +116,13 @@ Layout/EmptyLinesAroundMethodBody:
|
|
99
116
|
Exclude:
|
100
117
|
- 'lib/trailblazer/operation/test.rb'
|
101
118
|
|
102
|
-
# Offense count:
|
119
|
+
# Offense count: 26
|
120
|
+
# Configuration parameters: EnforcedStyle.
|
121
|
+
# SupportedStyles: native, lf, crlf
|
122
|
+
Layout/EndOfLine:
|
123
|
+
Enabled: false
|
124
|
+
|
125
|
+
# Offense count: 16
|
103
126
|
# Cop supports --auto-correct.
|
104
127
|
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
|
105
128
|
Layout/ExtraSpacing:
|
@@ -108,6 +131,7 @@ Layout/ExtraSpacing:
|
|
108
131
|
- 'test/benchmark.rb'
|
109
132
|
- 'test/docs/fast_test.rb'
|
110
133
|
- 'test/docs/operation_test.rb'
|
134
|
+
- 'test/dsl/contract_test.rb'
|
111
135
|
- 'test/variables_test.rb'
|
112
136
|
|
113
137
|
# Offense count: 1
|
@@ -130,9 +154,9 @@ Layout/IndentationConsistency:
|
|
130
154
|
# Cop supports --auto-correct.
|
131
155
|
Layout/LeadingCommentSpace:
|
132
156
|
Exclude:
|
133
|
-
- 'Gemfile'
|
134
157
|
- 'test/docs/fast_test.rb'
|
135
158
|
- 'test/docs/operation_test.rb'
|
159
|
+
- 'test/dsl/contract_test.rb'
|
136
160
|
- 'test/variables_test.rb'
|
137
161
|
|
138
162
|
# Offense count: 8
|
@@ -155,7 +179,7 @@ Layout/SpaceAfterComma:
|
|
155
179
|
Layout/SpaceAroundEqualsInParameterDefault:
|
156
180
|
EnforcedStyle: no_space
|
157
181
|
|
158
|
-
# Offense count:
|
182
|
+
# Offense count: 16
|
159
183
|
# Cop supports --auto-correct.
|
160
184
|
# Configuration parameters: AllowForAlignment.
|
161
185
|
Layout/SpaceAroundOperators:
|
@@ -164,6 +188,7 @@ Layout/SpaceAroundOperators:
|
|
164
188
|
- 'test/deprecation/call_test.rb'
|
165
189
|
- 'test/deprecation/context_test.rb'
|
166
190
|
- 'test/docs/operation_test.rb'
|
191
|
+
- 'test/dsl/contract_test.rb'
|
167
192
|
- 'test/variables_test.rb'
|
168
193
|
|
169
194
|
# Offense count: 3
|
@@ -176,8 +201,8 @@ Layout/SpaceBeforeComma:
|
|
176
201
|
# Cop supports --auto-correct.
|
177
202
|
Layout/SpaceBeforeComment:
|
178
203
|
Exclude:
|
179
|
-
- 'Gemfile'
|
180
204
|
- 'lib/trailblazer/dsl.rb'
|
205
|
+
- 'test/dsl/contract_test.rb'
|
181
206
|
|
182
207
|
# Offense count: 4
|
183
208
|
# Cop supports --auto-correct.
|
@@ -189,21 +214,22 @@ Layout/SpaceInsideArrayLiteralBrackets:
|
|
189
214
|
- 'lib/trailblazer/deprecation/context.rb'
|
190
215
|
- 'test/benchmark.rb'
|
191
216
|
|
192
|
-
# Offense count:
|
217
|
+
# Offense count: 26
|
193
218
|
# Cop supports --auto-correct.
|
194
219
|
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
|
195
220
|
# SupportedStyles: space, no_space, compact
|
196
221
|
# SupportedStylesForEmptyBraces: space, no_space
|
197
222
|
Layout/SpaceInsideHashLiteralBraces:
|
198
223
|
Exclude:
|
199
|
-
- 'lib/trailblazer/
|
200
|
-
- 'test/deprecation/
|
224
|
+
- 'lib/trailblazer/deprecation/call.rb'
|
225
|
+
- 'test/deprecation/call_test.rb'
|
201
226
|
- 'test/docs/fast_test.rb'
|
202
227
|
- 'test/docs/operation_test.rb'
|
203
|
-
- 'test/test_helper.rb'
|
204
228
|
|
205
|
-
# Offense count:
|
229
|
+
# Offense count: 93
|
206
230
|
# Cop supports --auto-correct.
|
231
|
+
# Configuration parameters: EnforcedStyle.
|
232
|
+
# SupportedStyles: space, no_space
|
207
233
|
Layout/SpaceInsideParens:
|
208
234
|
Exclude:
|
209
235
|
- 'lib/trailblazer/deprecation/call.rb'
|
@@ -213,6 +239,7 @@ Layout/SpaceInsideParens:
|
|
213
239
|
- 'test/docs/fast_test.rb'
|
214
240
|
- 'test/docs/operation_test.rb'
|
215
241
|
- 'test/docs/trace_test.rb'
|
242
|
+
- 'test/dsl/contract_test.rb'
|
216
243
|
- 'test/variables_test.rb'
|
217
244
|
|
218
245
|
# Offense count: 1
|
@@ -272,10 +299,21 @@ Lint/UselessAssignment:
|
|
272
299
|
Metrics/AbcSize:
|
273
300
|
Max: 18
|
274
301
|
|
302
|
+
# Offense count: 2
|
303
|
+
# Configuration parameters: CountComments, ExcludedMethods.
|
304
|
+
Metrics/BlockLength:
|
305
|
+
Max: 32
|
306
|
+
|
275
307
|
# Offense count: 1
|
276
308
|
Metrics/CyclomaticComplexity:
|
277
309
|
Max: 10
|
278
310
|
|
311
|
+
# Offense count: 30
|
312
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
313
|
+
# URISchemes: http, https
|
314
|
+
Metrics/LineLength:
|
315
|
+
Max: 290
|
316
|
+
|
279
317
|
# Offense count: 4
|
280
318
|
# Configuration parameters: CountComments.
|
281
319
|
Metrics/MethodLength:
|
@@ -285,25 +323,13 @@ Metrics/MethodLength:
|
|
285
323
|
Metrics/PerceivedComplexity:
|
286
324
|
Max: 11
|
287
325
|
|
288
|
-
# Offense count:
|
289
|
-
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
290
|
-
Naming/UncommunicativeBlockParamName:
|
291
|
-
Exclude:
|
292
|
-
- 'test/variables_test.rb'
|
293
|
-
|
294
|
-
# Offense count: 42
|
326
|
+
# Offense count: 10
|
295
327
|
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
296
|
-
# AllowedNames: io, id
|
328
|
+
# AllowedNames: io, id, to, by, on, in, at
|
297
329
|
Naming/UncommunicativeMethodParamName:
|
298
330
|
Exclude:
|
299
331
|
- 'test/benchmark.rb'
|
300
|
-
- 'test/deprecation/call_test.rb'
|
301
|
-
- 'test/deprecation/context_test.rb'
|
302
|
-
- 'test/docs/auto_inject_test.rb'
|
303
332
|
- 'test/docs/fast_test.rb'
|
304
|
-
- 'test/docs/operation_test.rb'
|
305
|
-
- 'test/docs/trace_test.rb'
|
306
|
-
- 'test/variables_test.rb'
|
307
333
|
|
308
334
|
# Offense count: 2
|
309
335
|
# Configuration parameters: AllowedChars.
|
@@ -318,7 +344,7 @@ Style/BlockComments:
|
|
318
344
|
- 'test/docs/operation_test.rb'
|
319
345
|
- 'test/variables_test.rb'
|
320
346
|
|
321
|
-
# Offense count:
|
347
|
+
# Offense count: 3
|
322
348
|
# Cop supports --auto-correct.
|
323
349
|
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods.
|
324
350
|
# SupportedStyles: line_count_based, semantic, braces_for_chaining
|
@@ -329,14 +355,16 @@ Style/BlockDelimiters:
|
|
329
355
|
Exclude:
|
330
356
|
- 'lib/trailblazer/operation/auto_inject.rb'
|
331
357
|
- 'lib/trailblazer/operation/module.rb'
|
358
|
+
- 'test/dsl/contract_test.rb'
|
332
359
|
|
333
|
-
# Offense count:
|
360
|
+
# Offense count: 2
|
334
361
|
# Cop supports --auto-correct.
|
335
362
|
# Configuration parameters: EnforcedStyle.
|
336
363
|
# SupportedStyles: braces, no_braces, context_dependent
|
337
364
|
Style/BracesAroundHashParameters:
|
338
365
|
Exclude:
|
339
366
|
- 'test/docs/operation_test.rb'
|
367
|
+
- 'test/dsl/contract_test.rb'
|
340
368
|
|
341
369
|
# Offense count: 12
|
342
370
|
# Cop supports --auto-correct.
|
@@ -358,6 +386,13 @@ Style/ClassCheck:
|
|
358
386
|
Exclude:
|
359
387
|
- 'lib/trailblazer/dsl.rb'
|
360
388
|
|
389
|
+
# Offense count: 1
|
390
|
+
# Cop supports --auto-correct.
|
391
|
+
# Configuration parameters: PreferredMethods.
|
392
|
+
Style/CollectionMethods:
|
393
|
+
Exclude:
|
394
|
+
- 'lib/trailblazer/deprecation/context.rb'
|
395
|
+
|
361
396
|
# Offense count: 1
|
362
397
|
# Cop supports --auto-correct.
|
363
398
|
# Configuration parameters: Keywords.
|
@@ -372,16 +407,13 @@ Style/CommentedKeyword:
|
|
372
407
|
- 'lib/trailblazer/operation/deprecations.rb'
|
373
408
|
- 'lib/trailblazer/operation/module.rb'
|
374
409
|
|
375
|
-
# Offense count:
|
376
|
-
|
410
|
+
# Offense count: 1
|
411
|
+
# Cop supports --auto-correct.
|
412
|
+
# Configuration parameters: EnforcedStyle.
|
413
|
+
# SupportedStyles: compact, expanded
|
414
|
+
Style/EmptyMethod:
|
377
415
|
Exclude:
|
378
|
-
- '
|
379
|
-
- 'test/**/*'
|
380
|
-
- 'lib/trailblazer/deprecation/context.rb'
|
381
|
-
- 'lib/trailblazer/operation/auto_inject.rb'
|
382
|
-
- 'lib/trailblazer/operation/deprecations.rb'
|
383
|
-
- 'lib/trailblazer/operation/module.rb'
|
384
|
-
- 'lib/trailblazer/operation/test.rb'
|
416
|
+
- 'test/docs/fast_test.rb'
|
385
417
|
|
386
418
|
# Offense count: 1
|
387
419
|
# Cop supports --auto-correct.
|
@@ -404,7 +436,12 @@ Style/HashSyntax:
|
|
404
436
|
- 'Rakefile'
|
405
437
|
- 'test/docs/operation_test.rb'
|
406
438
|
|
407
|
-
# Offense count:
|
439
|
+
# Offense count: 1
|
440
|
+
Style/ImplicitRuntimeError:
|
441
|
+
Exclude:
|
442
|
+
- 'lib/trailblazer/operation/test.rb'
|
443
|
+
|
444
|
+
# Offense count: 70
|
408
445
|
# Cop supports --auto-correct.
|
409
446
|
# Configuration parameters: .
|
410
447
|
# SupportedStyles: call, braces
|
@@ -412,7 +449,12 @@ Style/LambdaCall:
|
|
412
449
|
EnforcedStyle: braces
|
413
450
|
|
414
451
|
# Offense count: 1
|
415
|
-
Style/
|
452
|
+
Style/MethodMissingSuper:
|
453
|
+
Exclude:
|
454
|
+
- 'lib/trailblazer/operation/module.rb'
|
455
|
+
|
456
|
+
# Offense count: 1
|
457
|
+
Style/MissingRespondToMissing:
|
416
458
|
Exclude:
|
417
459
|
- 'lib/trailblazer/operation/module.rb'
|
418
460
|
|
@@ -433,7 +475,7 @@ Style/ParallelAssignment:
|
|
433
475
|
Exclude:
|
434
476
|
- 'lib/trailblazer/deprecation/call.rb'
|
435
477
|
|
436
|
-
# Offense count:
|
478
|
+
# Offense count: 47
|
437
479
|
# Cop supports --auto-correct.
|
438
480
|
# Configuration parameters: PreferredDelimiters.
|
439
481
|
Style/PercentLiteralDelimiters:
|
@@ -443,6 +485,7 @@ Style/PercentLiteralDelimiters:
|
|
443
485
|
- 'test/docs/fast_test.rb'
|
444
486
|
- 'test/docs/operation_test.rb'
|
445
487
|
- 'test/docs/trace_test.rb'
|
488
|
+
- 'test/dsl/contract_test.rb'
|
446
489
|
- 'test/variables_test.rb'
|
447
490
|
- 'trailblazer.gemspec'
|
448
491
|
|
@@ -461,6 +504,19 @@ Style/Semicolon:
|
|
461
504
|
Exclude:
|
462
505
|
- 'test/docs/fast_test.rb'
|
463
506
|
|
507
|
+
# Offense count: 1
|
508
|
+
Style/Send:
|
509
|
+
Exclude:
|
510
|
+
- 'lib/trailblazer/operation/module.rb'
|
511
|
+
|
512
|
+
# Offense count: 1
|
513
|
+
# Cop supports --auto-correct.
|
514
|
+
# Configuration parameters: EnforcedStyle.
|
515
|
+
# SupportedStyles: only_raise, only_fail, semantic
|
516
|
+
Style/SignalException:
|
517
|
+
Exclude:
|
518
|
+
- 'lib/trailblazer/operation/test.rb'
|
519
|
+
|
464
520
|
# Offense count: 20
|
465
521
|
# Cop supports --auto-correct.
|
466
522
|
# Configuration parameters: AllowIfMethodIsEmpty.
|
@@ -470,20 +526,15 @@ Style/SingleLineMethods:
|
|
470
526
|
- 'test/docs/operation_test.rb'
|
471
527
|
- 'test/test_helper.rb'
|
472
528
|
|
473
|
-
# Offense count:
|
474
|
-
# Cop supports --auto-correct.
|
475
|
-
# Configuration parameters: EnforcedStyle.
|
476
|
-
# SupportedStyles: use_perl_names, use_english_names
|
477
|
-
Style/SpecialGlobalVars:
|
478
|
-
Exclude:
|
479
|
-
- 'trailblazer.gemspec'
|
480
|
-
|
481
|
-
# Offense count: 274
|
529
|
+
# Offense count: 14
|
482
530
|
# Cop supports --auto-correct.
|
483
531
|
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
484
532
|
# SupportedStyles: single_quotes, double_quotes
|
485
533
|
Style/StringLiterals:
|
486
|
-
|
534
|
+
Exclude:
|
535
|
+
- 'Gemfile'
|
536
|
+
- 'Rakefile'
|
537
|
+
- 'trailblazer.gemspec'
|
487
538
|
|
488
539
|
# Offense count: 1
|
489
540
|
# Cop supports --auto-correct.
|
@@ -493,10 +544,6 @@ Style/TrailingCommaInHashLiteral:
|
|
493
544
|
Exclude:
|
494
545
|
- 'test/variables_test.rb'
|
495
546
|
|
496
|
-
Style/TrailingCommaInLiteral:
|
497
|
-
Exclude:
|
498
|
-
- 'test/variables_test.rb'
|
499
|
-
|
500
547
|
# Offense count: 2
|
501
548
|
# Cop supports --auto-correct.
|
502
549
|
# Configuration parameters: AllowNamedUnderscoreVariables.
|
@@ -510,8 +557,9 @@ Style/UnneededPercentQ:
|
|
510
557
|
Exclude:
|
511
558
|
- 'trailblazer.gemspec'
|
512
559
|
|
513
|
-
# Offense count:
|
514
|
-
#
|
515
|
-
#
|
516
|
-
|
517
|
-
|
560
|
+
# Offense count: 1
|
561
|
+
# Cop supports --auto-correct.
|
562
|
+
# Configuration parameters: MinSize, WordRegex.
|
563
|
+
# SupportedStyles: percent, brackets
|
564
|
+
Style/WordArray:
|
565
|
+
EnforcedStyle: brackets
|
data/CHANGES.md
CHANGED
@@ -30,6 +30,10 @@ document Task API and define step API
|
|
30
30
|
deprecate step->(options) ?
|
31
31
|
injectable, per-operation step arguments strategy?
|
32
32
|
|
33
|
+
# 2.1.0.rc1
|
34
|
+
|
35
|
+
* Remove `task` and `input_output`, those are implemented in `activity`.
|
36
|
+
|
33
37
|
# 2.1.0.beta7
|
34
38
|
|
35
39
|
* Use new `activity-0.3.2` where `VariableMapping` is included now.
|
data/Gemfile
CHANGED
@@ -14,20 +14,30 @@ gem "dry-auto_inject"
|
|
14
14
|
gem "dry-matcher"
|
15
15
|
gem "dry-validation"
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
17
|
+
case ENV['GEMS_SOURCE']
|
18
|
+
when 'local'
|
19
|
+
gem "reform", path: "../reform"
|
20
|
+
gem "reform-rails", path: "../reform-rails"
|
21
|
+
gem "trailblazer-operation", path: "../trailblazer-operation"
|
22
|
+
gem "trailblazer-macro", path: "../trailblazer-macro"
|
23
|
+
gem "trailblazer-macro-contract", path: "../trailblazer-macro-contract"
|
24
|
+
gem "trailblazer-activity", path: "../trailblazer-activity"
|
25
|
+
gem "trailblazer-context", path: "../trailblazer-context"
|
26
|
+
when 'github'
|
27
|
+
gem "reform", github: "trailblazer/reform"
|
28
|
+
gem "reform-rails", github: "trailblazer/reform-rails"
|
29
|
+
gem "trailblazer-operation", github: "trailblazer/trailblazer-operation"
|
30
|
+
gem "trailblazer-macro", github: "trailblazer/trailblazer-macro"
|
31
|
+
gem "trailblazer-macro-contract", github: "trailblazer/trailblazer-macro-contract"
|
32
|
+
gem "trailblazer-activity", github: "trailblazer/trailblazer-activity"
|
33
|
+
gem "trailblazer-context", github: "trailblazer/trailblazer-context"
|
34
|
+
when 'custom'
|
35
|
+
eval_gemfile('GemfileCustom')
|
36
|
+
else # use rubygems releases
|
37
|
+
gem "reform"
|
38
|
+
gem "reform-rails"
|
28
39
|
end
|
29
40
|
|
30
|
-
|
31
41
|
gem "minitest-line"
|
32
42
|
|
33
43
|
gem "rubocop", require: false
|
data/LICENSE.txt
CHANGED
@@ -1,9 +1,27 @@
|
|
1
|
-
|
1
|
+
The MIT License (MIT)
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
Copyright (c) 2018 Trailblazer GmbH
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
22
|
+
|
23
|
+
---------
|
6
24
|
|
7
25
|
Trailblazer Enterprise has a commercial-friendly license allowing private forks
|
8
26
|
and modifications of Trailblazer. Please see http://trailblazer.to/enterprise/ for
|
9
|
-
more detail.
|
27
|
+
more detail.
|
data/lib/trailblazer.rb
CHANGED
@@ -3,11 +3,7 @@ require "trailblazer/version"
|
|
3
3
|
require "trailblazer/operation"
|
4
4
|
require "trailblazer/dsl"
|
5
5
|
|
6
|
-
require "trailblazer/task"
|
7
|
-
|
8
6
|
require "trailblazer/operation/deprecations"
|
9
|
-
require "trailblazer/operation/inject"
|
10
|
-
require "trailblazer/operation/input_output"
|
11
7
|
|
12
8
|
require "trailblazer/macro"
|
13
9
|
require "trailblazer/macro/contract"
|
data/lib/trailblazer/version.rb
CHANGED
data/trailblazer.gemspec
CHANGED
@@ -7,10 +7,10 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.version = Trailblazer::VERSION
|
8
8
|
spec.authors = ["Nick Sutterer"]
|
9
9
|
spec.email = ["apotonick@gmail.com"]
|
10
|
-
spec.description = %q{A high-level architecture introducing new abstractions such as control flow,
|
10
|
+
spec.description = %q{A high-level architecture introducing new abstractions such as operations and control flow, form objects and policies.}
|
11
11
|
spec.summary = %q{A high-level architecture for Ruby and Rails.}
|
12
12
|
spec.homepage = "http://trailblazer.to"
|
13
|
-
spec.license = "
|
13
|
+
spec.license = "MIT"
|
14
14
|
|
15
15
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
16
16
|
f.match(%r{^(test|doc)/})
|
@@ -18,9 +18,9 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = `git ls-files -z test`.split("\x0")
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "trailblazer-
|
22
|
-
spec.add_dependency "trailblazer-macro", "
|
23
|
-
spec.add_dependency "trailblazer-
|
21
|
+
spec.add_dependency "trailblazer-macro", ">= 2.1.0.rc1", "< 2.2.0"
|
22
|
+
spec.add_dependency "trailblazer-macro-contract", "2.1.0.rc1"#, "< 2.2.0"
|
23
|
+
spec.add_dependency "trailblazer-operation" # TODO: why do we need this here?
|
24
24
|
|
25
25
|
spec.add_dependency "declarative"
|
26
26
|
|
metadata
CHANGED
@@ -1,75 +1,63 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trailblazer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.0.
|
4
|
+
version: 2.1.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: trailblazer-
|
14
|
+
name: trailblazer-macro
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 2.1.0.rc1
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: 2.2.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 2.1.0.rc1
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: 2.2.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
|
-
name: trailblazer-macro
|
34
|
+
name: trailblazer-macro-contract
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- -
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: 2.1.0.beta7
|
40
|
-
- - "<"
|
37
|
+
- - '='
|
41
38
|
- !ruby/object:Gem::Version
|
42
|
-
version: 2.
|
39
|
+
version: 2.1.0.rc1
|
43
40
|
type: :runtime
|
44
41
|
prerelease: false
|
45
42
|
version_requirements: !ruby/object:Gem::Requirement
|
46
43
|
requirements:
|
47
|
-
- -
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: 2.1.0.beta7
|
50
|
-
- - "<"
|
44
|
+
- - '='
|
51
45
|
- !ruby/object:Gem::Version
|
52
|
-
version: 2.
|
46
|
+
version: 2.1.0.rc1
|
53
47
|
- !ruby/object:Gem::Dependency
|
54
|
-
name: trailblazer-
|
48
|
+
name: trailblazer-operation
|
55
49
|
requirement: !ruby/object:Gem::Requirement
|
56
50
|
requirements:
|
57
51
|
- - ">="
|
58
52
|
- !ruby/object:Gem::Version
|
59
|
-
version:
|
60
|
-
- - "<"
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: 2.2.0
|
53
|
+
version: '0'
|
63
54
|
type: :runtime
|
64
55
|
prerelease: false
|
65
56
|
version_requirements: !ruby/object:Gem::Requirement
|
66
57
|
requirements:
|
67
58
|
- - ">="
|
68
59
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
70
|
-
- - "<"
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
version: 2.2.0
|
60
|
+
version: '0'
|
73
61
|
- !ruby/object:Gem::Dependency
|
74
62
|
name: declarative
|
75
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,8 +142,8 @@ dependencies:
|
|
154
142
|
- - ">="
|
155
143
|
- !ruby/object:Gem::Version
|
156
144
|
version: '0'
|
157
|
-
description: A high-level architecture introducing new abstractions such as
|
158
|
-
flow,
|
145
|
+
description: A high-level architecture introducing new abstractions such as operations
|
146
|
+
and control flow, form objects and policies.
|
159
147
|
email:
|
160
148
|
- apotonick@gmail.com
|
161
149
|
executables: []
|
@@ -163,6 +151,7 @@ extensions: []
|
|
163
151
|
extra_rdoc_files: []
|
164
152
|
files:
|
165
153
|
- ".gitignore"
|
154
|
+
- ".rubocop-https---raw-githubusercontent-com-trailblazer-meta-master-rubocop-yml"
|
166
155
|
- ".rubocop.yml"
|
167
156
|
- ".rubocop_todo.yml"
|
168
157
|
- ".travis.yml"
|
@@ -180,10 +169,8 @@ files:
|
|
180
169
|
- lib/trailblazer/dsl.rb
|
181
170
|
- lib/trailblazer/operation/auto_inject.rb
|
182
171
|
- lib/trailblazer/operation/deprecations.rb
|
183
|
-
- lib/trailblazer/operation/input_output.rb
|
184
172
|
- lib/trailblazer/operation/module.rb
|
185
173
|
- lib/trailblazer/operation/test.rb
|
186
|
-
- lib/trailblazer/task.rb
|
187
174
|
- lib/trailblazer/version.rb
|
188
175
|
- test/benchmark.rb
|
189
176
|
- test/deprecation/call_test.rb
|
@@ -200,7 +187,7 @@ files:
|
|
200
187
|
- trailblazer.gemspec
|
201
188
|
homepage: http://trailblazer.to
|
202
189
|
licenses:
|
203
|
-
-
|
190
|
+
- MIT
|
204
191
|
metadata: {}
|
205
192
|
post_install_message:
|
206
193
|
rdoc_options: []
|
@@ -1,28 +0,0 @@
|
|
1
|
-
module Trailblazer
|
2
|
-
# Add an input and output filter for a task, allowing to control what a task "sees"
|
3
|
-
# (receives as input) and returns (or, what the outer caller "sees").
|
4
|
-
#
|
5
|
-
# This works by adding two variable mappers to the taskWrap.
|
6
|
-
# One before the actual task gets called (input) and one before the end (output).
|
7
|
-
module Operation::InputOutput
|
8
|
-
# naming: Macaroni, VariableMapping
|
9
|
-
def self.plan(input, output)
|
10
|
-
default_input_filter = ->(options, *) { ctx = options }
|
11
|
-
default_output_filter = ->(options, *) { options }
|
12
|
-
|
13
|
-
input ||= default_input_filter
|
14
|
-
output ||= default_output_filter
|
15
|
-
|
16
|
-
input_filter = Activity::TaskWrap::Input.new(input)
|
17
|
-
output_filter = Activity::TaskWrap::Output.new(output)
|
18
|
-
|
19
|
-
# taskWrap extensions
|
20
|
-
Module.new do
|
21
|
-
extend Activity::Path::Plan()
|
22
|
-
|
23
|
-
task input_filter, id: ".input", before: "task_wrap.call_task"
|
24
|
-
task output_filter, id: ".output", before: "End.success", group: :end # DISCUSS: position
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
data/lib/trailblazer/task.rb
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
# module Trailblazer
|
2
|
-
# class Activity
|
3
|
-
# module Task
|
4
|
-
# # Convenience functions for tasks. Totally optional.
|
5
|
-
|
6
|
-
# # Task::Binary aka "step"
|
7
|
-
# # Step is binary task: true=> Right, false=>Left.
|
8
|
-
# # Step call proc.(options, flow_options)
|
9
|
-
# # Step is supposed to run Option::KW, so `step` should be Option::KW.
|
10
|
-
# #
|
11
|
-
# # Returns task to call the proc with (options, flow_options), omitting `direction`.
|
12
|
-
# # When called, the task always returns a direction signal.
|
13
|
-
# def self.Binary(step, on_true=Activity::Right, on_false=Activity::Left)
|
14
|
-
# ->(*args) do # Activity/Task interface.
|
15
|
-
# [ step.(*args) ? on_true : on_false, *args ] # <=> Activity/Task interface
|
16
|
-
# end
|
17
|
-
# end
|
18
|
-
# end
|
19
|
-
# end
|
20
|
-
# end
|