dynflow 0.8.13 → 0.8.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -0
- data/.rubocop_todo.yml +635 -0
- data/.travis.yml +1 -0
- data/Gemfile +4 -0
- data/examples/remote_executor.rb +2 -2
- data/examples/sub_plan_concurrency_control.rb +1 -1
- data/lib/dynflow/action/rescue.rb +13 -6
- data/lib/dynflow/delayed_plan.rb +5 -5
- data/lib/dynflow/execution_plan.rb +4 -1
- data/lib/dynflow/executors/parallel/worker.rb +1 -1
- data/lib/dynflow/version.rb +1 -1
- data/lib/dynflow/web/console_helpers.rb +2 -2
- data/test/action_test.rb +1 -1
- data/test/middleware_test.rb +6 -6
- data/test/rescue_test.rb +57 -21
- data/test/semaphores_test.rb +2 -2
- data/test/support/rescue_example.rb +29 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10c16849649c62a6f0754fdbde3a7fe85adf36fd
|
4
|
+
data.tar.gz: 62bf44e0fce93610906a347d46f9573cdb5dee57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b2160f687df87809778801247a9fb3b58001f4c8fa7763f0403c5bd81d2a49d0a84afad33071d70dc799b7f5b4e517311402a4c1eb708c6944d566b8a0bb644
|
7
|
+
data.tar.gz: b4fbc38656f85f2040015e0c9c5b3099071595badb7e15d59d16da7cfde9e930083688105ef4913c74151d125ce036c0e4e1e580da0c4d92ab3818a3c32e2534
|
data/.rubocop.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,635 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config --exclude-limit 0`
|
3
|
+
# on 2016-08-24 10:37:35 -0400 using RuboCop version 0.39.0.
|
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: 7
|
10
|
+
Lint/AmbiguousOperator:
|
11
|
+
Enabled: false
|
12
|
+
|
13
|
+
# Offense count: 2
|
14
|
+
Lint/AmbiguousRegexpLiteral:
|
15
|
+
Enabled: false
|
16
|
+
|
17
|
+
# Offense count: 7
|
18
|
+
# Configuration parameters: AllowSafeAssignment.
|
19
|
+
Lint/AssignmentInCondition:
|
20
|
+
Enabled: false
|
21
|
+
|
22
|
+
# Offense count: 3
|
23
|
+
# Cop supports --auto-correct.
|
24
|
+
# Configuration parameters: AlignWith, SupportedStyles.
|
25
|
+
# SupportedStyles: either, start_of_block, start_of_line
|
26
|
+
Lint/BlockAlignment:
|
27
|
+
Enabled: false
|
28
|
+
|
29
|
+
# Offense count: 1
|
30
|
+
Lint/DuplicateMethods:
|
31
|
+
Enabled: false
|
32
|
+
|
33
|
+
# Offense count: 1
|
34
|
+
# Cop supports --auto-correct.
|
35
|
+
# Configuration parameters: AlignWith, SupportedStyles, AutoCorrect.
|
36
|
+
# SupportedStyles: keyword, variable, start_of_line
|
37
|
+
Lint/EndAlignment:
|
38
|
+
Enabled: false
|
39
|
+
|
40
|
+
# Offense count: 6
|
41
|
+
Lint/IneffectiveAccessModifier:
|
42
|
+
Enabled: false
|
43
|
+
|
44
|
+
# Offense count: 5
|
45
|
+
Lint/ParenthesesAsGroupedExpression:
|
46
|
+
Enabled: false
|
47
|
+
|
48
|
+
# Offense count: 1
|
49
|
+
Lint/RandOne:
|
50
|
+
Enabled: false
|
51
|
+
|
52
|
+
# Offense count: 3
|
53
|
+
Lint/RescueException:
|
54
|
+
Enabled: false
|
55
|
+
|
56
|
+
# Offense count: 1
|
57
|
+
Lint/ShadowingOuterLocalVariable:
|
58
|
+
Enabled: false
|
59
|
+
|
60
|
+
# Offense count: 1
|
61
|
+
Lint/UnderscorePrefixedVariableName:
|
62
|
+
Enabled: false
|
63
|
+
|
64
|
+
# Offense count: 17
|
65
|
+
# Cop supports --auto-correct.
|
66
|
+
# Configuration parameters: IgnoreEmptyBlocks.
|
67
|
+
Lint/UnusedBlockArgument:
|
68
|
+
Enabled: false
|
69
|
+
|
70
|
+
# Offense count: 78
|
71
|
+
# Cop supports --auto-correct.
|
72
|
+
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
|
73
|
+
Lint/UnusedMethodArgument:
|
74
|
+
Enabled: false
|
75
|
+
|
76
|
+
# Offense count: 3
|
77
|
+
Lint/UselessAccessModifier:
|
78
|
+
Enabled: false
|
79
|
+
|
80
|
+
# Offense count: 5
|
81
|
+
Lint/UselessAssignment:
|
82
|
+
Enabled: false
|
83
|
+
|
84
|
+
# Offense count: 73
|
85
|
+
Metrics/AbcSize:
|
86
|
+
Max: 207
|
87
|
+
|
88
|
+
# Offense count: 9
|
89
|
+
# Configuration parameters: CountComments.
|
90
|
+
Metrics/ClassLength:
|
91
|
+
Max: 402
|
92
|
+
|
93
|
+
# Offense count: 11
|
94
|
+
Metrics/CyclomaticComplexity:
|
95
|
+
Max: 11
|
96
|
+
|
97
|
+
# Offense count: 521
|
98
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
|
99
|
+
# URISchemes: http, https
|
100
|
+
Metrics/LineLength:
|
101
|
+
Max: 166
|
102
|
+
|
103
|
+
# Offense count: 99
|
104
|
+
# Configuration parameters: CountComments.
|
105
|
+
Metrics/MethodLength:
|
106
|
+
Max: 104
|
107
|
+
|
108
|
+
# Offense count: 14
|
109
|
+
# Configuration parameters: CountComments.
|
110
|
+
Metrics/ModuleLength:
|
111
|
+
Max: 548
|
112
|
+
|
113
|
+
# Offense count: 3
|
114
|
+
# Configuration parameters: CountKeywordArgs.
|
115
|
+
Metrics/ParameterLists:
|
116
|
+
Max: 13
|
117
|
+
|
118
|
+
# Offense count: 9
|
119
|
+
Metrics/PerceivedComplexity:
|
120
|
+
Max: 11
|
121
|
+
|
122
|
+
# Offense count: 16
|
123
|
+
# Cop supports --auto-correct.
|
124
|
+
Performance/RedundantBlockCall:
|
125
|
+
Enabled: false
|
126
|
+
|
127
|
+
# Offense count: 4
|
128
|
+
# Cop supports --auto-correct.
|
129
|
+
Performance/TimesMap:
|
130
|
+
Enabled: false
|
131
|
+
|
132
|
+
# Offense count: 8
|
133
|
+
Style/AccessorMethodName:
|
134
|
+
Enabled: false
|
135
|
+
|
136
|
+
# Offense count: 13
|
137
|
+
# Cop supports --auto-correct.
|
138
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
139
|
+
# SupportedStyles: prefer_alias, prefer_alias_method
|
140
|
+
Style/Alias:
|
141
|
+
Enabled: false
|
142
|
+
|
143
|
+
# Offense count: 1
|
144
|
+
# Cop supports --auto-correct.
|
145
|
+
# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles.
|
146
|
+
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
147
|
+
Style/AlignHash:
|
148
|
+
Enabled: false
|
149
|
+
|
150
|
+
# Offense count: 51
|
151
|
+
# Cop supports --auto-correct.
|
152
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
153
|
+
# SupportedStyles: with_first_parameter, with_fixed_indentation
|
154
|
+
Style/AlignParameters:
|
155
|
+
Enabled: false
|
156
|
+
|
157
|
+
# Offense count: 11
|
158
|
+
# Cop supports --auto-correct.
|
159
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
160
|
+
# SupportedStyles: always, conditionals
|
161
|
+
Style/AndOr:
|
162
|
+
Enabled: false
|
163
|
+
|
164
|
+
# Offense count: 2
|
165
|
+
# Cop supports --auto-correct.
|
166
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
167
|
+
# SupportedStyles: percent_q, bare_percent
|
168
|
+
Style/BarePercentLiterals:
|
169
|
+
Enabled: false
|
170
|
+
|
171
|
+
# Offense count: 3
|
172
|
+
# Cop supports --auto-correct.
|
173
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
|
174
|
+
# SupportedStyles: line_count_based, semantic, braces_for_chaining
|
175
|
+
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
176
|
+
# FunctionalMethods: let, let!, subject, watch
|
177
|
+
# IgnoredMethods: lambda, proc, it
|
178
|
+
Style/BlockDelimiters:
|
179
|
+
Enabled: false
|
180
|
+
|
181
|
+
# Offense count: 18
|
182
|
+
# Cop supports --auto-correct.
|
183
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
184
|
+
# SupportedStyles: braces, no_braces, context_dependent
|
185
|
+
Style/BracesAroundHashParameters:
|
186
|
+
Enabled: false
|
187
|
+
|
188
|
+
# Offense count: 13
|
189
|
+
Style/CaseEquality:
|
190
|
+
Enabled: false
|
191
|
+
|
192
|
+
# Offense count: 24
|
193
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
194
|
+
# SupportedStyles: nested, compact
|
195
|
+
Style/ClassAndModuleChildren:
|
196
|
+
Enabled: false
|
197
|
+
|
198
|
+
# Offense count: 3
|
199
|
+
# Cop supports --auto-correct.
|
200
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
201
|
+
# SupportedStyles: is_a?, kind_of?
|
202
|
+
Style/ClassCheck:
|
203
|
+
Enabled: false
|
204
|
+
|
205
|
+
# Offense count: 4
|
206
|
+
# Cop supports --auto-correct.
|
207
|
+
Style/ColonMethodCall:
|
208
|
+
Enabled: false
|
209
|
+
|
210
|
+
# Offense count: 5
|
211
|
+
# Cop supports --auto-correct.
|
212
|
+
# Configuration parameters: Keywords.
|
213
|
+
# Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW
|
214
|
+
Style/CommentAnnotation:
|
215
|
+
Enabled: false
|
216
|
+
|
217
|
+
# Offense count: 4
|
218
|
+
Style/ConstantName:
|
219
|
+
Enabled: false
|
220
|
+
|
221
|
+
# Offense count: 3
|
222
|
+
# Cop supports --auto-correct.
|
223
|
+
Style/DeprecatedHashMethods:
|
224
|
+
Enabled: false
|
225
|
+
|
226
|
+
# Offense count: 172
|
227
|
+
Style/Documentation:
|
228
|
+
Enabled: false
|
229
|
+
|
230
|
+
# Offense count: 20
|
231
|
+
# Cop supports --auto-correct.
|
232
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
233
|
+
# SupportedStyles: leading, trailing
|
234
|
+
Style/DotPosition:
|
235
|
+
Enabled: false
|
236
|
+
|
237
|
+
# Offense count: 3
|
238
|
+
Style/DoubleNegation:
|
239
|
+
Enabled: false
|
240
|
+
|
241
|
+
# Offense count: 1
|
242
|
+
Style/EachWithObject:
|
243
|
+
Enabled: false
|
244
|
+
|
245
|
+
# Offense count: 2
|
246
|
+
# Cop supports --auto-correct.
|
247
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
248
|
+
# SupportedStyles: empty, nil, both
|
249
|
+
Style/EmptyElse:
|
250
|
+
Enabled: false
|
251
|
+
|
252
|
+
# Offense count: 5
|
253
|
+
# Cop supports --auto-correct.
|
254
|
+
# Configuration parameters: AllowAdjacentOneLineDefs.
|
255
|
+
Style/EmptyLineBetweenDefs:
|
256
|
+
Enabled: false
|
257
|
+
|
258
|
+
# Offense count: 14
|
259
|
+
# Cop supports --auto-correct.
|
260
|
+
Style/EmptyLines:
|
261
|
+
Enabled: false
|
262
|
+
|
263
|
+
# Offense count: 1
|
264
|
+
# Cop supports --auto-correct.
|
265
|
+
Style/EmptyLinesAroundAccessModifier:
|
266
|
+
Enabled: false
|
267
|
+
|
268
|
+
# Offense count: 91
|
269
|
+
# Cop supports --auto-correct.
|
270
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
271
|
+
# SupportedStyles: empty_lines, no_empty_lines
|
272
|
+
Style/EmptyLinesAroundBlockBody:
|
273
|
+
Enabled: false
|
274
|
+
|
275
|
+
# Offense count: 143
|
276
|
+
# Cop supports --auto-correct.
|
277
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
278
|
+
# SupportedStyles: empty_lines, no_empty_lines
|
279
|
+
Style/EmptyLinesAroundClassBody:
|
280
|
+
Enabled: false
|
281
|
+
|
282
|
+
# Offense count: 2
|
283
|
+
# Cop supports --auto-correct.
|
284
|
+
Style/EmptyLinesAroundMethodBody:
|
285
|
+
Enabled: false
|
286
|
+
|
287
|
+
# Offense count: 52
|
288
|
+
# Cop supports --auto-correct.
|
289
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
290
|
+
# SupportedStyles: empty_lines, no_empty_lines
|
291
|
+
Style/EmptyLinesAroundModuleBody:
|
292
|
+
Enabled: false
|
293
|
+
|
294
|
+
# Offense count: 25
|
295
|
+
# Cop supports --auto-correct.
|
296
|
+
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
|
297
|
+
Style/ExtraSpacing:
|
298
|
+
Enabled: false
|
299
|
+
|
300
|
+
# Offense count: 9
|
301
|
+
# Cop supports --auto-correct.
|
302
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
|
303
|
+
# SupportedStyles: consistent, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
|
304
|
+
Style/FirstParameterIndentation:
|
305
|
+
Enabled: false
|
306
|
+
|
307
|
+
# Offense count: 4
|
308
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
309
|
+
# SupportedStyles: format, sprintf, percent
|
310
|
+
Style/FormatString:
|
311
|
+
Enabled: false
|
312
|
+
|
313
|
+
# Offense count: 7
|
314
|
+
# Configuration parameters: AllowedVariables.
|
315
|
+
Style/GlobalVars:
|
316
|
+
Enabled: false
|
317
|
+
|
318
|
+
# Offense count: 13
|
319
|
+
# Configuration parameters: MinBodyLength.
|
320
|
+
Style/GuardClause:
|
321
|
+
Enabled: false
|
322
|
+
|
323
|
+
# Offense count: 106
|
324
|
+
# Cop supports --auto-correct.
|
325
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues.
|
326
|
+
# SupportedStyles: ruby19, ruby19_no_mixed_keys, hash_rockets
|
327
|
+
Style/HashSyntax:
|
328
|
+
Enabled: false
|
329
|
+
|
330
|
+
# Offense count: 4
|
331
|
+
Style/IfInsideElse:
|
332
|
+
Enabled: false
|
333
|
+
|
334
|
+
# Offense count: 22
|
335
|
+
# Cop supports --auto-correct.
|
336
|
+
# Configuration parameters: MaxLineLength.
|
337
|
+
Style/IfUnlessModifier:
|
338
|
+
Enabled: false
|
339
|
+
|
340
|
+
# Offense count: 4
|
341
|
+
# Cop supports --auto-correct.
|
342
|
+
# Configuration parameters: IndentationWidth.
|
343
|
+
Style/IndentAssignment:
|
344
|
+
Enabled: false
|
345
|
+
|
346
|
+
# Offense count: 2
|
347
|
+
# Cop supports --auto-correct.
|
348
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
|
349
|
+
# SupportedStyles: special_inside_parentheses, consistent, align_braces
|
350
|
+
Style/IndentHash:
|
351
|
+
Enabled: false
|
352
|
+
|
353
|
+
# Offense count: 8
|
354
|
+
# Cop supports --auto-correct.
|
355
|
+
Style/Lambda:
|
356
|
+
Enabled: false
|
357
|
+
|
358
|
+
# Offense count: 13
|
359
|
+
# Cop supports --auto-correct.
|
360
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
361
|
+
# SupportedStyles: call, braces
|
362
|
+
Style/LambdaCall:
|
363
|
+
Enabled: false
|
364
|
+
|
365
|
+
# Offense count: 3
|
366
|
+
# Cop supports --auto-correct.
|
367
|
+
Style/LineEndConcatenation:
|
368
|
+
Enabled: false
|
369
|
+
|
370
|
+
# Offense count: 3
|
371
|
+
# Cop supports --auto-correct.
|
372
|
+
Style/MethodCallParentheses:
|
373
|
+
Enabled: false
|
374
|
+
|
375
|
+
# Offense count: 2
|
376
|
+
# Cop supports --auto-correct.
|
377
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
378
|
+
# SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline
|
379
|
+
Style/MethodDefParentheses:
|
380
|
+
Enabled: false
|
381
|
+
|
382
|
+
# Offense count: 6
|
383
|
+
Style/MultilineBlockChain:
|
384
|
+
Enabled: false
|
385
|
+
|
386
|
+
# Offense count: 1
|
387
|
+
# Cop supports --auto-correct.
|
388
|
+
Style/MultilineIfThen:
|
389
|
+
Enabled: false
|
390
|
+
|
391
|
+
# Offense count: 23
|
392
|
+
# Cop supports --auto-correct.
|
393
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
|
394
|
+
# SupportedStyles: aligned, indented
|
395
|
+
Style/MultilineMethodCallIndentation:
|
396
|
+
Enabled: false
|
397
|
+
|
398
|
+
# Offense count: 9
|
399
|
+
# Cop supports --auto-correct.
|
400
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
|
401
|
+
# SupportedStyles: aligned, indented
|
402
|
+
Style/MultilineOperationIndentation:
|
403
|
+
Enabled: false
|
404
|
+
|
405
|
+
# Offense count: 9
|
406
|
+
# Cop supports --auto-correct.
|
407
|
+
Style/MutableConstant:
|
408
|
+
Enabled: false
|
409
|
+
|
410
|
+
# Offense count: 5
|
411
|
+
# Cop supports --auto-correct.
|
412
|
+
Style/NegatedIf:
|
413
|
+
Enabled: false
|
414
|
+
|
415
|
+
# Offense count: 9
|
416
|
+
Style/NestedParenthesizedCalls:
|
417
|
+
Enabled: false
|
418
|
+
|
419
|
+
# Offense count: 2
|
420
|
+
# Cop supports --auto-correct.
|
421
|
+
# Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
|
422
|
+
# SupportedStyles: skip_modifier_ifs, always
|
423
|
+
Style/Next:
|
424
|
+
Enabled: false
|
425
|
+
|
426
|
+
# Offense count: 2
|
427
|
+
# Cop supports --auto-correct.
|
428
|
+
Style/Not:
|
429
|
+
Enabled: false
|
430
|
+
|
431
|
+
# Offense count: 2
|
432
|
+
Style/OpMethod:
|
433
|
+
Enabled: false
|
434
|
+
|
435
|
+
# Offense count: 5
|
436
|
+
# Cop supports --auto-correct.
|
437
|
+
Style/ParallelAssignment:
|
438
|
+
Enabled: false
|
439
|
+
|
440
|
+
# Offense count: 24
|
441
|
+
# Cop supports --auto-correct.
|
442
|
+
# Configuration parameters: PreferredDelimiters.
|
443
|
+
Style/PercentLiteralDelimiters:
|
444
|
+
Enabled: false
|
445
|
+
|
446
|
+
# Offense count: 1
|
447
|
+
# Cop supports --auto-correct.
|
448
|
+
Style/PerlBackrefs:
|
449
|
+
Enabled: false
|
450
|
+
|
451
|
+
# Offense count: 4
|
452
|
+
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
|
453
|
+
# NamePrefix: is_, has_, have_
|
454
|
+
# NamePrefixBlacklist: is_, has_, have_
|
455
|
+
# NameWhitelist: is_a?
|
456
|
+
Style/PredicateName:
|
457
|
+
Enabled: false
|
458
|
+
|
459
|
+
# Offense count: 6
|
460
|
+
# Cop supports --auto-correct.
|
461
|
+
Style/Proc:
|
462
|
+
Enabled: false
|
463
|
+
|
464
|
+
# Offense count: 4
|
465
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
466
|
+
# SupportedStyles: compact, exploded
|
467
|
+
Style/RaiseArgs:
|
468
|
+
Enabled: false
|
469
|
+
|
470
|
+
# Offense count: 1
|
471
|
+
# Cop supports --auto-correct.
|
472
|
+
Style/RedundantBegin:
|
473
|
+
Enabled: false
|
474
|
+
|
475
|
+
# Offense count: 2
|
476
|
+
# Cop supports --auto-correct.
|
477
|
+
Style/RedundantParentheses:
|
478
|
+
Enabled: false
|
479
|
+
|
480
|
+
# Offense count: 43
|
481
|
+
# Cop supports --auto-correct.
|
482
|
+
# Configuration parameters: AllowMultipleReturnValues.
|
483
|
+
Style/RedundantReturn:
|
484
|
+
Enabled: false
|
485
|
+
|
486
|
+
# Offense count: 87
|
487
|
+
# Cop supports --auto-correct.
|
488
|
+
Style/RedundantSelf:
|
489
|
+
Enabled: false
|
490
|
+
|
491
|
+
# Offense count: 1
|
492
|
+
# Cop supports --auto-correct.
|
493
|
+
Style/RescueModifier:
|
494
|
+
Enabled: false
|
495
|
+
|
496
|
+
# Offense count: 6
|
497
|
+
# Cop supports --auto-correct.
|
498
|
+
# Configuration parameters: AllowAsExpressionSeparator.
|
499
|
+
Style/Semicolon:
|
500
|
+
Enabled: false
|
501
|
+
|
502
|
+
# Offense count: 3
|
503
|
+
# Cop supports --auto-correct.
|
504
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
505
|
+
# SupportedStyles: only_raise, only_fail, semantic
|
506
|
+
Style/SignalException:
|
507
|
+
Enabled: false
|
508
|
+
|
509
|
+
# Offense count: 6
|
510
|
+
# Configuration parameters: Methods.
|
511
|
+
# Methods: {"reduce"=>["a", "e"]}, {"inject"=>["a", "e"]}
|
512
|
+
Style/SingleLineBlockParams:
|
513
|
+
Enabled: false
|
514
|
+
|
515
|
+
# Offense count: 6
|
516
|
+
# Cop supports --auto-correct.
|
517
|
+
# Configuration parameters: AllowIfMethodIsEmpty.
|
518
|
+
Style/SingleLineMethods:
|
519
|
+
Enabled: false
|
520
|
+
|
521
|
+
# Offense count: 42
|
522
|
+
# Cop supports --auto-correct.
|
523
|
+
# Configuration parameters: AllowForAlignment.
|
524
|
+
Style/SpaceAroundOperators:
|
525
|
+
Enabled: false
|
526
|
+
|
527
|
+
# Offense count: 1
|
528
|
+
# Cop supports --auto-correct.
|
529
|
+
Style/SpaceBeforeComma:
|
530
|
+
Enabled: false
|
531
|
+
|
532
|
+
# Offense count: 3
|
533
|
+
# Cop supports --auto-correct.
|
534
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
|
535
|
+
# SupportedStyles: space, no_space
|
536
|
+
Style/SpaceInsideBlockBraces:
|
537
|
+
Enabled: false
|
538
|
+
|
539
|
+
# Offense count: 7
|
540
|
+
# Cop supports --auto-correct.
|
541
|
+
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
|
542
|
+
# SupportedStyles: space, no_space
|
543
|
+
Style/SpaceInsideHashLiteralBraces:
|
544
|
+
Enabled: false
|
545
|
+
|
546
|
+
# Offense count: 7
|
547
|
+
# Cop supports --auto-correct.
|
548
|
+
Style/SpaceInsideParens:
|
549
|
+
Enabled: false
|
550
|
+
|
551
|
+
# Offense count: 8
|
552
|
+
# Cop supports --auto-correct.
|
553
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
554
|
+
# SupportedStyles: space, no_space
|
555
|
+
Style/SpaceInsideStringInterpolation:
|
556
|
+
Enabled: false
|
557
|
+
|
558
|
+
# Offense count: 9
|
559
|
+
# Cop supports --auto-correct.
|
560
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
561
|
+
# SupportedStyles: use_perl_names, use_english_names
|
562
|
+
Style/SpecialGlobalVars:
|
563
|
+
Enabled: false
|
564
|
+
|
565
|
+
# Offense count: 5
|
566
|
+
# Cop supports --auto-correct.
|
567
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
568
|
+
# SupportedStyles: require_parentheses, require_no_parentheses
|
569
|
+
Style/StabbyLambdaParentheses:
|
570
|
+
Enabled: false
|
571
|
+
|
572
|
+
# Offense count: 230
|
573
|
+
# Cop supports --auto-correct.
|
574
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
|
575
|
+
# SupportedStyles: single_quotes, double_quotes
|
576
|
+
Style/StringLiterals:
|
577
|
+
Enabled: false
|
578
|
+
|
579
|
+
# Offense count: 2
|
580
|
+
# Cop supports --auto-correct.
|
581
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
582
|
+
# SupportedStyles: single_quotes, double_quotes
|
583
|
+
Style/StringLiteralsInInterpolation:
|
584
|
+
Enabled: false
|
585
|
+
|
586
|
+
# Offense count: 9
|
587
|
+
# Cop supports --auto-correct.
|
588
|
+
# Configuration parameters: IgnoredMethods.
|
589
|
+
# IgnoredMethods: respond_to
|
590
|
+
Style/SymbolProc:
|
591
|
+
Enabled: false
|
592
|
+
|
593
|
+
# Offense count: 6
|
594
|
+
# Cop supports --auto-correct.
|
595
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
596
|
+
# SupportedStyles: final_newline, final_blank_line
|
597
|
+
Style/TrailingBlankLines:
|
598
|
+
Enabled: false
|
599
|
+
|
600
|
+
# Offense count: 2
|
601
|
+
# Cop supports --auto-correct.
|
602
|
+
# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist.
|
603
|
+
# Whitelist: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
|
604
|
+
Style/TrivialAccessors:
|
605
|
+
Enabled: false
|
606
|
+
|
607
|
+
# Offense count: 1
|
608
|
+
# Cop supports --auto-correct.
|
609
|
+
Style/UnneededCapitalW:
|
610
|
+
Enabled: false
|
611
|
+
|
612
|
+
# Offense count: 2
|
613
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
614
|
+
# SupportedStyles: snake_case, camelCase
|
615
|
+
Style/VariableName:
|
616
|
+
Enabled: false
|
617
|
+
|
618
|
+
# Offense count: 1
|
619
|
+
# Cop supports --auto-correct.
|
620
|
+
# Configuration parameters: MaxLineLength.
|
621
|
+
Style/WhileUntilModifier:
|
622
|
+
Enabled: false
|
623
|
+
|
624
|
+
# Offense count: 7
|
625
|
+
# Cop supports --auto-correct.
|
626
|
+
# Configuration parameters: SupportedStyles, WordRegex.
|
627
|
+
# SupportedStyles: percent, brackets
|
628
|
+
Style/WordArray:
|
629
|
+
EnforcedStyle: percent
|
630
|
+
MinSize: 4
|
631
|
+
|
632
|
+
# Offense count: 1
|
633
|
+
# Cop supports --auto-correct.
|
634
|
+
Style/ZeroLengthPredicate:
|
635
|
+
Enabled: false
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/examples/remote_executor.rb
CHANGED
@@ -91,7 +91,7 @@ if $0 == __FILE__
|
|
91
91
|
puts <<MSG
|
92
92
|
The observer starting…. You can see what's going on there
|
93
93
|
MSG
|
94
|
-
|
94
|
+
RemoteExecutorExample.run_observer
|
95
95
|
when 'server'
|
96
96
|
puts <<MSG
|
97
97
|
The server is starting…. You can send the work to it by running:
|
@@ -99,7 +99,7 @@ The server is starting…. You can send the work to it by running:
|
|
99
99
|
#{$0} client
|
100
100
|
|
101
101
|
MSG
|
102
|
-
|
102
|
+
RemoteExecutorExample.run_server
|
103
103
|
when 'client'
|
104
104
|
RemoteExecutorExample.run_client
|
105
105
|
else
|
@@ -2,7 +2,7 @@ module Dynflow
|
|
2
2
|
module Action::Rescue
|
3
3
|
|
4
4
|
Strategy = Algebrick.type do
|
5
|
-
variants Skip = atom, Pause = atom
|
5
|
+
variants Skip = atom, Pause = atom, Fail = atom
|
6
6
|
end
|
7
7
|
|
8
8
|
SuggestedStrategy = Algebrick.type do
|
@@ -21,7 +21,8 @@ module Dynflow
|
|
21
21
|
def rescue_strategy
|
22
22
|
suggested_strategies = []
|
23
23
|
|
24
|
-
if self.steps.compact.any? { |step| step.state == :error }
|
24
|
+
if self.steps.compact.any? { |step| step.state == :error } ||
|
25
|
+
self.steps.compact.all? { |step| [:pending, :success].include? step.state }
|
25
26
|
suggested_strategies << SuggestedStrategy[self, rescue_strategy_for_self]
|
26
27
|
end
|
27
28
|
|
@@ -44,14 +45,20 @@ module Dynflow
|
|
44
45
|
action.rescue_strategy
|
45
46
|
end
|
46
47
|
|
47
|
-
# Override when different
|
48
|
+
# Override when different approach should be taken for combining
|
48
49
|
# the suggested strategies
|
49
50
|
def combine_suggested_strategies(suggested_strategies)
|
50
|
-
if suggested_strategies.empty?
|
51
|
-
suggested_strategies.all? { |suggested_strategy| suggested_strategy.strategy == Skip }
|
51
|
+
if suggested_strategies.empty?
|
52
52
|
return Skip
|
53
53
|
else
|
54
|
-
|
54
|
+
# TODO: Find the safest rescue strategy among the suggested ones
|
55
|
+
if suggested_strategies.all? { |suggested_strategy| suggested_strategy.strategy == Skip }
|
56
|
+
return Skip
|
57
|
+
elsif suggested_strategies.all? { |suggested_strategy| suggested_strategy.strategy == Fail }
|
58
|
+
return Fail
|
59
|
+
else
|
60
|
+
return Pause # We don't know how to handle this case, so we'll just pause
|
61
|
+
end
|
55
62
|
end
|
56
63
|
end
|
57
64
|
end
|
data/lib/dynflow/delayed_plan.rb
CHANGED
@@ -48,11 +48,11 @@ module Dynflow
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def to_hash
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
51
|
+
recursive_to_hash :execution_plan_uuid => @execution_plan_uuid,
|
52
|
+
:start_at => time_to_str(@start_at),
|
53
|
+
:start_before => time_to_str(@start_before),
|
54
|
+
:serialized_args => @args_serializer.serialized_args,
|
55
|
+
:args_serializer => @args_serializer.class.name
|
56
56
|
end
|
57
57
|
|
58
58
|
# @api private
|
@@ -29,7 +29,7 @@ module Dynflow
|
|
29
29
|
planning: [:planned, :stopped],
|
30
30
|
planned: [:running, :stopped],
|
31
31
|
running: [:paused, :stopped],
|
32
|
-
paused: [:running],
|
32
|
+
paused: [:running, :stopped],
|
33
33
|
stopped: [] }
|
34
34
|
end
|
35
35
|
|
@@ -124,6 +124,9 @@ module Dynflow
|
|
124
124
|
case rescue_strategy
|
125
125
|
when Action::Rescue::Pause
|
126
126
|
nil
|
127
|
+
when Action::Rescue::Fail
|
128
|
+
update_state :stopped
|
129
|
+
nil
|
127
130
|
when Action::Rescue::Skip
|
128
131
|
failed_steps.each { |step| self.skip(step) }
|
129
132
|
self.id
|
data/lib/dynflow/version.rb
CHANGED
@@ -17,7 +17,7 @@ module Dynflow
|
|
17
17
|
value = prettyprint_references(value)
|
18
18
|
if value
|
19
19
|
pretty_value = prettify_value(value)
|
20
|
-
|
20
|
+
<<-HTML
|
21
21
|
<pre class="prettyprint lang-yaml">#{h(pretty_value)}</pre>
|
22
22
|
HTML
|
23
23
|
else
|
@@ -68,7 +68,7 @@ module Dynflow
|
|
68
68
|
def show_action_data(label, value)
|
69
69
|
value_html = prettyprint(value)
|
70
70
|
if !value_html.empty?
|
71
|
-
|
71
|
+
<<-HTML
|
72
72
|
<p>
|
73
73
|
<b>#{h(label)}</b>
|
74
74
|
#{value_html}
|
data/test/action_test.rb
CHANGED
data/test/middleware_test.rb
CHANGED
@@ -51,12 +51,12 @@ module Dynflow
|
|
51
51
|
end
|
52
52
|
|
53
53
|
it "puts the middleware to the beginning of the stack" do
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
54
|
+
world_with_middleware.trigger(Support::MiddlewareExample::Action, {}).finished.wait
|
55
|
+
log.must_equal %w[AnotherLogRunMiddleware::before_run
|
56
|
+
LogRunMiddleware::before_run
|
57
|
+
run
|
58
|
+
LogRunMiddleware::after_run
|
59
|
+
AnotherLogRunMiddleware::after_run]
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
data/test/rescue_test.rb
CHANGED
@@ -32,7 +32,7 @@ module Dynflow
|
|
32
32
|
rescued_plan.state.must_equal :stopped
|
33
33
|
rescued_plan.result.must_equal :warning
|
34
34
|
rescued_plan.entry_action.output[:message].
|
35
|
-
|
35
|
+
must_equal "skipped because some error as you wish"
|
36
36
|
end
|
37
37
|
|
38
38
|
end
|
@@ -113,6 +113,27 @@ module Dynflow
|
|
113
113
|
|
114
114
|
end
|
115
115
|
|
116
|
+
describe 'of complex action with fail' do
|
117
|
+
|
118
|
+
let :execution_plan do
|
119
|
+
execute(Example::ComplexActionWithFail, :error_on_run)
|
120
|
+
end
|
121
|
+
|
122
|
+
it 'suggests failing the plan' do
|
123
|
+
execution_plan.rescue_strategy.must_equal Action::Rescue::Fail
|
124
|
+
end
|
125
|
+
|
126
|
+
it 'fails rescuing' do
|
127
|
+
proc { rescued_plan }.must_raise Errors::RescueError
|
128
|
+
execution_plan.state.must_equal :stopped
|
129
|
+
execution_plan.result.must_equal :error
|
130
|
+
execution_plan.steps_in_state(:success).count.must_equal 5
|
131
|
+
execution_plan.steps_in_state(:pending).count.must_equal 4
|
132
|
+
execution_plan.steps_in_state(:error).count.must_equal 1
|
133
|
+
end
|
134
|
+
|
135
|
+
end
|
136
|
+
|
116
137
|
describe 'auto rescue' do
|
117
138
|
|
118
139
|
let(:world) do
|
@@ -123,43 +144,58 @@ module Dynflow
|
|
123
144
|
|
124
145
|
describe 'of plan with skips' do
|
125
146
|
|
126
|
-
|
127
|
-
|
128
|
-
|
147
|
+
let :execution_plan do
|
148
|
+
execute(Example::ComplexActionWithSkip, :error_on_run)
|
149
|
+
end
|
129
150
|
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
151
|
+
it 'skips the action and continues automatically' do
|
152
|
+
execution_plan.state.must_equal :stopped
|
153
|
+
execution_plan.result.must_equal :warning
|
154
|
+
end
|
134
155
|
|
135
156
|
end
|
136
157
|
|
137
158
|
describe 'of plan faild on auto-rescue' do
|
138
159
|
|
139
|
-
|
140
|
-
|
141
|
-
|
160
|
+
let :execution_plan do
|
161
|
+
execute(Example::ActionWithSkip, 1, :error_on_skip)
|
162
|
+
end
|
142
163
|
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
164
|
+
it 'tried to rescue only once' do
|
165
|
+
execution_plan.state.must_equal :paused
|
166
|
+
execution_plan.result.must_equal :error
|
167
|
+
end
|
147
168
|
|
148
169
|
end
|
149
170
|
|
150
171
|
describe 'of plan without skips' do
|
151
172
|
|
152
173
|
let :execution_plan do
|
153
|
-
|
154
|
-
|
174
|
+
execute(Example::ComplexActionWithoutSkip, :error_on_run)
|
175
|
+
end
|
155
176
|
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
177
|
+
it 'skips the action and continues automatically' do
|
178
|
+
execution_plan.state.must_equal :paused
|
179
|
+
execution_plan.result.must_equal :error
|
180
|
+
end
|
160
181
|
|
161
182
|
end
|
162
183
|
|
184
|
+
describe 'of plan with fail' do
|
185
|
+
|
186
|
+
let :execution_plan do
|
187
|
+
execute(Example::ComplexActionWithFail, :error_on_run)
|
188
|
+
end
|
189
|
+
|
190
|
+
it 'fails the execution plan automatically' do
|
191
|
+
execution_plan.state.must_equal :stopped
|
192
|
+
execution_plan.result.must_equal :error
|
193
|
+
execution_plan.steps_in_state(:success).count.must_equal 5
|
194
|
+
execution_plan.steps_in_state(:pending).count.must_equal 4
|
195
|
+
execution_plan.steps_in_state(:error).count.must_equal 1
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
163
199
|
end
|
164
200
|
end
|
165
201
|
end
|
data/test/semaphores_test.rb
CHANGED
@@ -40,7 +40,7 @@ module Dynflow
|
|
40
40
|
waiting = semaphore.get_waiting
|
41
41
|
waiting.must_equal 3
|
42
42
|
end
|
43
|
-
|
43
|
+
|
44
44
|
end
|
45
45
|
|
46
46
|
describe ::Dynflow::Semaphores::Dummy do
|
@@ -93,6 +93,6 @@ module Dynflow
|
|
93
93
|
assert_semaphore_state semaphore, 0, 0
|
94
94
|
end
|
95
95
|
end
|
96
|
-
|
96
|
+
|
97
97
|
end
|
98
98
|
end
|
@@ -14,6 +14,11 @@ module Support
|
|
14
14
|
plan_action(ActionWithSkip, 5, :success)
|
15
15
|
end
|
16
16
|
end
|
17
|
+
|
18
|
+
def rescue_strategy_for_self
|
19
|
+
Dynflow::Action::Rescue::Skip
|
20
|
+
end
|
21
|
+
|
17
22
|
end
|
18
23
|
|
19
24
|
class ComplexActionWithoutSkip < ComplexActionWithSkip
|
@@ -69,5 +74,29 @@ module Support
|
|
69
74
|
end
|
70
75
|
|
71
76
|
end
|
77
|
+
|
78
|
+
class ActionWithFail < AbstractAction
|
79
|
+
|
80
|
+
def rescue_strategy_for_self
|
81
|
+
Dynflow::Action::Rescue::Fail
|
82
|
+
end
|
83
|
+
|
84
|
+
end
|
85
|
+
|
86
|
+
class ComplexActionWithFail < ActionWithFail
|
87
|
+
|
88
|
+
def plan(error_state)
|
89
|
+
sequence do
|
90
|
+
concurrence do
|
91
|
+
plan_action(ActionWithFail, 3, :success)
|
92
|
+
plan_action(ActionWithFail, 4, error_state)
|
93
|
+
end
|
94
|
+
plan_action(ActionWithFail, 5, :success)
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
end
|
99
|
+
|
100
|
+
|
72
101
|
end
|
73
102
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Necas
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-08-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|
@@ -201,6 +201,8 @@ extensions: []
|
|
201
201
|
extra_rdoc_files: []
|
202
202
|
files:
|
203
203
|
- ".gitignore"
|
204
|
+
- ".rubocop.yml"
|
205
|
+
- ".rubocop_todo.yml"
|
204
206
|
- ".travis.yml"
|
205
207
|
- Gemfile
|
206
208
|
- MIT-LICENSE
|