clomp 0.0.9 → 0.0.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a1a7097edec0d066d18846301a419ce9ed2c067e
4
- data.tar.gz: 15a99e0ad2b724321e23b333e200fb6c0f36c258
3
+ metadata.gz: e80866684e8ed7bfb98c419cf2602810e5e35a01
4
+ data.tar.gz: a4b8f6d72954c4038e53850814c2275933630b0d
5
5
  SHA512:
6
- metadata.gz: 364506a2f73e2546626135f18b8d8cb1f280333632d622103fed4cfcdbc80bd0a0ce00c9a6d82228491c4e7dfa9de5a4bf77b8eb58f9b4e221b2e775e8e92eaa
7
- data.tar.gz: 8ad9a6a374658565c7b6870ebb6db3ecf46dbb4efdbc0a883332978015f10bd979aea8961ee0e182a255a55f9e58df46acf26a9c3f51b866d0e4a40b699738ce
6
+ metadata.gz: e4d7a41991a09f099ffc616c2185ffd7329e42f3b229a6af06ec6b1889a25bd9ac72cf9a5d974a5943e8a652bc018b16a29b15b91401dc66c41951b614cc5cf3
7
+ data.tar.gz: 866453fb2cd08d139bbd06bb7efee5703d66046476cb1355c18b2ed780e6afda91c9bda0be39cdcc0f748ae61886fd38774ec294d2a223708f44495cb46a1b05
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- clomp (0.0.9)
4
+ clomp (0.0.10)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -6,23 +6,17 @@ module Clomp
6
6
  # _self = operation
7
7
  #
8
8
  def [](result = {}, options, _self:)
9
- result['tracks'].each do |track|
9
+ result['tracks'].each_with_index do |track, i|
10
10
  next if _self.successful? && track.left_track?
11
11
  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]
12
14
 
13
15
  _callable_object = Callable[track, options, _self]
14
16
 
15
17
  raise Errors::TrackNotDefined, "Please define the track in your operation/service: #{track.name} in #{_callable_object.class}" unless _callable_object.respond_to?(track.name)
16
18
 
17
19
  _track = track.exec!(_callable_object, options)
18
-
19
- _track.executed = true
20
-
21
- # Considering pass first on success state
22
- break if _track.success? && (_track.track_options[:pass_fast])
23
-
24
- # Consider both local or global configuration
25
- break if _track.failure? && (_track.track_options[:fail_fast])
26
20
  end
27
21
 
28
22
  _self
data/lib/clomp/track.rb CHANGED
@@ -48,11 +48,15 @@ module Clomp
48
48
  end
49
49
 
50
50
  @block.(options) if success? && @block
51
-
51
+
52
+ self.executed = true
53
+
52
54
  self
53
55
 
54
56
  rescue => e
55
57
  @error = e.message
58
+
59
+ self.executed = false
56
60
 
57
61
  mark_as_failure!
58
62
 
data/lib/clomp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Clomp
2
- VERSION = '0.0.9'
2
+ VERSION = '0.0.10'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clomp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Irfan Ahmed