cooperator 0.2.4 → 0.2.5
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 +4 -4
- data/lib/cooperator/version.rb +1 -1
- data/lib/cooperator.rb +4 -2
- data/spec/perform.rb +14 -0
- 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: bb6c7e817991eb67a8d46d5b66b56658444b9ad7
|
|
4
|
+
data.tar.gz: dc828b0e627ff3203c4b66943f30619ae3a47f22
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8e3a94a307194b45601fd01794a6ab1db0932ae3ae84eed924ed2b0246b07f8c32efd8b568eee03421961e2fa908533f9088e09a59e224148ca35e292e8dbb18
|
|
7
|
+
data.tar.gz: 592557aaa4bfa7778c51a75917614eb96009498b93ef25987d81854bd78a0f9b5fe72f182f4807c237dee02e55df85f08a0361fc19128c29c1f6fde35b0f1eb6
|
data/lib/cooperator/version.rb
CHANGED
data/lib/cooperator.rb
CHANGED
|
@@ -56,8 +56,10 @@ module Cooperator
|
|
|
56
56
|
action.perform
|
|
57
57
|
end
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
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
|
+
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-
|
|
11
|
+
date: 2014-12-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|