clomp 0.0.10 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/clomp/executor.rb +16 -2
- data/lib/clomp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f3b495be69cf45ef6f945664149599b3966e937
|
4
|
+
data.tar.gz: 42249a2784393668c08a4874d0d9b8eb26968bc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecf15b609fa0cf5f0fcb081954ca0610d544525270b04cec6ebe43f1b8bc44062c0e4ae3ba0735dad4ba2a982ea159148e722de807ae61dc76e3b7bf077f4a4a
|
7
|
+
data.tar.gz: '084ec7df8cb9c8ab2c922a33a3d8648d4f6681d3f1ff1e5eebe9a8c193684545074cd5363c0ec4904864ba18d5e216dfdf803e7e5935c42fc8ca7a37ed98a4fd'
|
data/lib/clomp/executor.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'pp'
|
2
|
+
require 'securerandom'
|
2
3
|
|
3
4
|
module Clomp
|
4
5
|
class Executor
|
@@ -7,10 +8,11 @@ module Clomp
|
|
7
8
|
#
|
8
9
|
def [](result = {}, options, _self:)
|
9
10
|
result['tracks'].each_with_index do |track, i|
|
11
|
+
|
12
|
+
break if break?(result['tracks'], i)
|
13
|
+
|
10
14
|
next if _self.successful? && track.left_track?
|
11
15
|
next if _self.failed? && track.right_track?
|
12
|
-
break if i > 0 && result['tracks'][i -1].track_options[:fail_fast]
|
13
|
-
break if i > 0 && result['tracks'][i -1].track_options[:pass_fast]
|
14
16
|
|
15
17
|
_callable_object = Callable[track, options, _self]
|
16
18
|
|
@@ -21,6 +23,18 @@ module Clomp
|
|
21
23
|
|
22
24
|
_self
|
23
25
|
end
|
26
|
+
|
27
|
+
def break?(tracks, index)
|
28
|
+
track = index > 0 && tracks[index -1] || Track.new(name: SecureRandom.hex(5)).tap {|track| track.mark_as_success! && track.executed = true }
|
29
|
+
|
30
|
+
if track.right_track? && track.failure?
|
31
|
+
return true if track.track_options[:fail_fast]
|
32
|
+
elsif track.left_track?
|
33
|
+
return true if track.track_options[:fail_fast]
|
34
|
+
end
|
35
|
+
|
36
|
+
true if track.track_options[:pass_fast]
|
37
|
+
end
|
24
38
|
end
|
25
39
|
end
|
26
40
|
end
|
data/lib/clomp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clomp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Irfan Ahmed
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|