cooperator 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1126a977ce9e418bcf524f6eb304c3442412cd7d
4
- data.tar.gz: 7a73e69cb3ad4f3b38f0f38a4de4bde779f5b51f
3
+ metadata.gz: bb6c7e817991eb67a8d46d5b66b56658444b9ad7
4
+ data.tar.gz: dc828b0e627ff3203c4b66943f30619ae3a47f22
5
5
  SHA512:
6
- metadata.gz: b1763de19405d4de874dc86bceaea2700cc23dee9473d0fa853d63aead6eef65a8fa3e05bf11e912f1da0905a0fd74acbcba36cfdde71299599808aee1fe3fb7
7
- data.tar.gz: 6a8ee780dee4c7b2542f77562360d7e6ca707d619333e505a18b5867bc2e4c99f5f67710ab3742457a4cc1f0eb8d0abd9cc881d2d6577846997d61bfde05b8dd
6
+ metadata.gz: 8e3a94a307194b45601fd01794a6ab1db0932ae3ae84eed924ed2b0246b07f8c32efd8b568eee03421961e2fa908533f9088e09a59e224148ca35e292e8dbb18
7
+ data.tar.gz: 592557aaa4bfa7778c51a75917614eb96009498b93ef25987d81854bd78a0f9b5fe72f182f4807c237dee02e55df85f08a0361fc19128c29c1f6fde35b0f1eb6
@@ -1,3 +1,3 @@
1
1
  module Cooperator
2
- VERSION = '0.2.4'
2
+ VERSION = '0.2.5'
3
3
  end
data/lib/cooperator.rb CHANGED
@@ -56,8 +56,10 @@ module Cooperator
56
56
  action.perform
57
57
  end
58
58
 
59
- committed.each do |property|
60
- raise Exception, "missing committed property: #{property}" unless action.context.include? property
59
+ unless action.context.failure?
60
+ committed.each do |property|
61
+ raise Exception, "missing committed property: #{property}" unless action.context.include? property
62
+ end
61
63
  end
62
64
 
63
65
  action.context
data/spec/perform.rb CHANGED
@@ -28,6 +28,16 @@ class CommitsWithCommit
28
28
  end
29
29
  end
30
30
 
31
+ class CommitsWithoutCommitButFailure
32
+ prepend Cooperator
33
+
34
+ commits :output
35
+
36
+ def perform
37
+ failure!
38
+ end
39
+ end
40
+
31
41
  scope '.perform' do
32
42
  spec 'raises an exception when an expected input is missing' do
33
43
  raises Exception do
@@ -48,4 +58,8 @@ scope '.perform' do
48
58
  spec 'runs when a committed output exists' do
49
59
  CommitsWithCommit.perform
50
60
  end
61
+
62
+ spec 'finishes when a committed output is missing but the action raised a failure' do
63
+ CommitsWithoutCommitButFailure.perform
64
+ end
51
65
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cooperator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erol Fornoles
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-14 00:00:00.000000000 Z
11
+ date: 2014-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler