kapnismology 0.0.1 → 0.0.2

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: a662a1647e4ff01d3de77f9161a447a3341ffa4f
4
- data.tar.gz: 730c6710054f95a57c72cff0a89f40ab19df018a
3
+ metadata.gz: b509aa57f24552e1207a28fd8d8ee87a7d8a98cd
4
+ data.tar.gz: 74086fc4c1bd7368c8a1e3d7e84d4c23f22c14da
5
5
  SHA512:
6
- metadata.gz: e66ded22c30d6eb294165e0d5c62215be82ae8fcf059d49ae7a6afc54dc246247bf24c6fdc4b5112f98b39d13efb964a5fa20b4eb17effd12be101e29caba029
7
- data.tar.gz: 79f7130926266fcd9de53c854f70d05e04523b82af428a73eee0b538f520e80a6ced0d1c6fc8c9e4b59d8b7ca65a53309d2ef3dc90c0820a65d05cbba67fc33b
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
@@ -1,3 +1,3 @@
1
1
  module Kapnismology
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/kapnismology.rb CHANGED
@@ -5,4 +5,5 @@ end
5
5
  require 'contracts'
6
6
  require 'kapnismology/result'
7
7
  require 'kapnismology/evaluation'
8
+ require 'kapnismology/rake_task'
8
9
  require 'kapnismology/smoke_test'
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.1
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-25 00:00:00.000000000 Z
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: {}
@@ -1,5 +0,0 @@
1
- # desc "Explaining what the task does"
2
- # task :smoke_tests do
3
-
4
- # # Task goes here
5
- # end