cover_me 1.0.0.pre2 → 1.0.0.pre3
Sign up to get free protection for your applications and to get access to all the features.
- data/README +1 -1
- data/lib/cover_me/index.rb +2 -1
- metadata +4 -4
data/README
CHANGED
@@ -34,7 +34,7 @@ After spending a morning playing with it, I was quickly able to grow the idea in
|
|
34
34
|
|
35
35
|
CoverMe is pretty easy to use, and has been tested with Ruby 1.9.2 and Rails 3.rc1. First, add CoverMe to your Gemfile:
|
36
36
|
|
37
|
-
gem 'cover_me', '>= 1.0.0.
|
37
|
+
gem 'cover_me', '>= 1.0.0.pre2', :require => false, :group => :test
|
38
38
|
|
39
39
|
Now make sure to install the gem with Bundler:
|
40
40
|
|
data/lib/cover_me/index.rb
CHANGED
@@ -26,7 +26,8 @@ class CoverMe::Index
|
|
26
26
|
def percent_tested
|
27
27
|
unless @percent_tested
|
28
28
|
executed_percent = self.reports.inject(0) {|sum, x| sum += x.executed_percent; sum}
|
29
|
-
@percent_tested = (executed_percent / self.reports.size.to_f)
|
29
|
+
@percent_tested = (executed_percent / self.reports.size.to_f)
|
30
|
+
@percent_tested = (@percent_tested.nan? ? 0 : @percent_tested.round(2))
|
30
31
|
end
|
31
32
|
return @percent_tested
|
32
33
|
end
|
metadata
CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
|
|
6
6
|
- 1
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.0.
|
9
|
+
- pre3
|
10
|
+
version: 1.0.0.pre3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- markbates
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-08-
|
18
|
+
date: 2010-08-19 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -84,7 +84,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
84
84
|
requirements:
|
85
85
|
- - ">="
|
86
86
|
- !ruby/object:Gem::Version
|
87
|
-
hash: -
|
87
|
+
hash: -2662027339613245849
|
88
88
|
segments:
|
89
89
|
- 0
|
90
90
|
version: "0"
|