kapnismology 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kapnismology/rake_task.rb +20 -0
- data/lib/kapnismology/smoke_test.rb +1 -18
- data/lib/kapnismology/version.rb +1 -1
- data/lib/kapnismology.rb +1 -0
- metadata +3 -3
- data/lib/tasks/kapnismology_tasks.rake +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b509aa57f24552e1207a28fd8d8ee87a7d8a98cd
|
4
|
+
data.tar.gz: 74086fc4c1bd7368c8a1e3d7e84d4c23f22c14da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 935b970070e8c124e1d9e869a2cfed295a365b88777109f66b6f64a5bb96380bd7945db073674992cd32e1649fb2c140a41024f65df99f1ec8373096b10f6688
|
7
|
+
data.tar.gz: 67edfe655cdf3799706f1536085d15c3d4b946ff8eba5e381fe7da40285ca8bff05345595f09ed92ffd6a308dec4a59b16023e69cc5565884f5d977e099a65e2
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Kapnismology
|
2
|
+
## Usable as a rake tasks, it just circles through all the results printing them.
|
3
|
+
# If any result did not pass then the command should fail
|
4
|
+
class RakeTask
|
5
|
+
def output
|
6
|
+
evaluations = SmokeTest.result
|
7
|
+
evaluations.each do |evaluation|
|
8
|
+
puts "The smoke test #{evaluation.test_name} #{passed_or_failed(evaluation.passed)}"
|
9
|
+
puts evaluation.message
|
10
|
+
puts
|
11
|
+
end
|
12
|
+
all_passed = evaluations.map(&:passed).inject{|m, result| m && result}
|
13
|
+
fail 'We have some failures in our smoke tests' unless all_passed
|
14
|
+
end
|
15
|
+
|
16
|
+
def passed_or_failed(passed)
|
17
|
+
passed ? "passed" : "failed"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -1,23 +1,6 @@
|
|
1
1
|
|
2
2
|
module Kapnismology
|
3
3
|
|
4
|
-
class RakeTask
|
5
|
-
def output
|
6
|
-
evaluations = SmokeTest.result
|
7
|
-
evaluations.each do |evaluation|
|
8
|
-
puts "The smoke test #{evaluation.test_name} #{passed_or_failed(evaluation.passed)}"
|
9
|
-
puts evaluation.message
|
10
|
-
puts
|
11
|
-
end
|
12
|
-
all_passed = evaluations.map(&:passed).inject{|m, result| m && result}
|
13
|
-
fail 'We have some failures in our smoke tests' unless all_passed
|
14
|
-
end
|
15
|
-
|
16
|
-
def passed_or_failed(passed)
|
17
|
-
passed ? "passed" : "failed"
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
4
|
#
|
22
5
|
# This is the base class for all the smoke tests.
|
23
6
|
# Inherit from this class and implement the result and self.name method
|
@@ -50,4 +33,4 @@ module Kapnismology
|
|
50
33
|
end
|
51
34
|
|
52
35
|
end
|
53
|
-
end
|
36
|
+
end
|
data/lib/kapnismology/version.rb
CHANGED
data/lib/kapnismology.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kapnismology
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordi Polo Carres
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -81,10 +81,10 @@ files:
|
|
81
81
|
- lib/kapnismology.rb
|
82
82
|
- lib/kapnismology/engine.rb
|
83
83
|
- lib/kapnismology/evaluation.rb
|
84
|
+
- lib/kapnismology/rake_task.rb
|
84
85
|
- lib/kapnismology/result.rb
|
85
86
|
- lib/kapnismology/smoke_test.rb
|
86
87
|
- lib/kapnismology/version.rb
|
87
|
-
- lib/tasks/kapnismology_tasks.rake
|
88
88
|
homepage: https://www.github.com/JordiPolo/kapnismology
|
89
89
|
licenses: []
|
90
90
|
metadata: {}
|