simplecov-rcov 0.2.0 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +0 -6
- data/Gemfile.lock +10 -5
- data/README.md +0 -4
- data/Rakefile +6 -3
- data/lib/simplecov-rcov.rb +5 -5
- data/lib/simplecov-rcov/version.rb +1 -2
- data/simplecov-rcov.gemspec +6 -0
- data/test/test_simplecov-rcov.rb +1 -1
- metadata +61 -7
- data/Manifest +0 -19
- data/test/simplecov-rcov_test.rb +0 -31
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,18 +1,23 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
simplecov-rcov (0.1
|
4
|
+
simplecov-rcov (0.2.1)
|
5
|
+
simplecov (>= 0.4.1)
|
5
6
|
|
6
7
|
GEM
|
7
8
|
remote: http://rubygems.org/
|
8
9
|
specs:
|
9
|
-
|
10
|
-
|
11
|
-
simplecov
|
10
|
+
mocha (0.9.12)
|
11
|
+
rake (0.9.2)
|
12
|
+
simplecov (0.4.2)
|
13
|
+
simplecov-html (~> 0.4.4)
|
14
|
+
simplecov-html (0.4.5)
|
12
15
|
|
13
16
|
PLATFORMS
|
14
17
|
ruby
|
15
18
|
|
16
19
|
DEPENDENCIES
|
17
|
-
|
20
|
+
bundler (>= 1.0.0.rc.6)
|
21
|
+
mocha
|
22
|
+
rake
|
18
23
|
simplecov-rcov!
|
data/README.md
CHANGED
@@ -59,10 +59,6 @@ And require the gems just before use the *SimpleCov* constant, like in the examp
|
|
59
59
|
|
60
60
|
If not could be *Uninitialized constant SimpleCov* issues.
|
61
61
|
|
62
|
-
## TODO
|
63
|
-
|
64
|
-
The actual version generates only one simple **/rcov/index.html** file.
|
65
|
-
|
66
62
|
## Credits
|
67
63
|
|
68
64
|
* Author: [Fernando Guillen](http://fernandoguillen.info)
|
data/Rakefile
CHANGED
@@ -1,15 +1,18 @@
|
|
1
|
+
require 'rake'
|
2
|
+
require 'rake/testtask'
|
1
3
|
require 'bundler'
|
4
|
+
|
5
|
+
include Rake::DSL
|
6
|
+
|
2
7
|
Bundler::GemHelper.install_tasks
|
3
8
|
|
4
|
-
|
9
|
+
task :default => :test
|
5
10
|
Rake::TestTask.new(:test) do |test|
|
6
11
|
test.libs << 'lib' << 'test'
|
7
12
|
test.pattern = 'test/**/test_*.rb'
|
8
13
|
test.verbose = true
|
9
14
|
end
|
10
15
|
|
11
|
-
task :default => :test
|
12
|
-
|
13
16
|
require 'rake/rdoctask'
|
14
17
|
Rake::RDocTask.new do |rdoc|
|
15
18
|
rdoc.rdoc_dir = 'rdoc'
|
data/lib/simplecov-rcov.rb
CHANGED
@@ -1,16 +1,18 @@
|
|
1
|
-
require 'bundler'
|
2
|
-
Bundler.setup(:default)
|
3
|
-
|
4
1
|
require 'erb'
|
5
2
|
require 'cgi'
|
6
3
|
require 'fileutils'
|
7
4
|
require 'time'
|
5
|
+
require 'pathname'
|
6
|
+
|
7
|
+
require File.expand_path( "#{File.dirname(__FILE__)}/simplecov-rcov/version.rb" )
|
8
8
|
|
9
9
|
unless defined?(SimpleCov)
|
10
10
|
raise RuntimeError, "simplecov-rcov is a formatter for simplecov. Please update your test helper and gemfile to require 'simplecov'!"
|
11
11
|
end
|
12
12
|
|
13
13
|
class SimpleCov::Formatter::RcovFormatter
|
14
|
+
UPSTREAM_URL = "https://github.com/fguillen/simplecov-rcov"
|
15
|
+
|
14
16
|
def format( result )
|
15
17
|
Dir[File.join(File.dirname(__FILE__), '../assets/*')].each do |path|
|
16
18
|
FileUtils.cp_r(path, asset_output_path)
|
@@ -148,5 +150,3 @@ class SimpleCov::Formatter::RcovFormatter
|
|
148
150
|
end
|
149
151
|
end
|
150
152
|
end
|
151
|
-
|
152
|
-
require 'simplecov-rcov/version'
|
data/simplecov-rcov.gemspec
CHANGED
@@ -23,4 +23,10 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
24
24
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
25
25
|
s.require_paths = ["lib"]
|
26
|
+
|
27
|
+
s.add_dependency 'simplecov', '>= 0.4.1'
|
28
|
+
|
29
|
+
s.add_development_dependency 'bundler', '>= 1.0.0.rc.6'
|
30
|
+
s.add_development_dependency 'mocha'
|
31
|
+
s.add_development_dependency 'rake'
|
26
32
|
end
|
data/test/test_simplecov-rcov.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 3
|
9
|
+
version: 0.2.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Fernando Guillen http://fernandoguillen.info
|
@@ -18,8 +18,65 @@ cert_chain: []
|
|
18
18
|
|
19
19
|
date: 2011-02-10 00:00:00 +01:00
|
20
20
|
default_executable:
|
21
|
-
dependencies:
|
22
|
-
|
21
|
+
dependencies:
|
22
|
+
- !ruby/object:Gem::Dependency
|
23
|
+
name: simplecov
|
24
|
+
prerelease: false
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ">="
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
- 4
|
33
|
+
- 1
|
34
|
+
version: 0.4.1
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: bundler
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
segments:
|
46
|
+
- 1
|
47
|
+
- 0
|
48
|
+
- 0
|
49
|
+
- rc
|
50
|
+
- 6
|
51
|
+
version: 1.0.0.rc.6
|
52
|
+
type: :development
|
53
|
+
version_requirements: *id002
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: mocha
|
56
|
+
prerelease: false
|
57
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
segments:
|
63
|
+
- 0
|
64
|
+
version: "0"
|
65
|
+
type: :development
|
66
|
+
version_requirements: *id003
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: rake
|
69
|
+
prerelease: false
|
70
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
71
|
+
none: false
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
segments:
|
76
|
+
- 0
|
77
|
+
version: "0"
|
78
|
+
type: :development
|
79
|
+
version_requirements: *id004
|
23
80
|
description: Rcov style formatter for SimpleCov
|
24
81
|
email:
|
25
82
|
- fguillen.mail@gmail.com
|
@@ -35,7 +92,6 @@ files:
|
|
35
92
|
- .gitignore
|
36
93
|
- Gemfile
|
37
94
|
- Gemfile.lock
|
38
|
-
- Manifest
|
39
95
|
- README.md
|
40
96
|
- Rakefile
|
41
97
|
- assets/jquery-1.3.2.min.js
|
@@ -57,7 +113,6 @@ files:
|
|
57
113
|
- test/fixtures/sample.rb
|
58
114
|
- test/fixtures/totals_tr.html
|
59
115
|
- test/helper.rb
|
60
|
-
- test/simplecov-rcov_test.rb
|
61
116
|
- test/test_simplecov-rcov.rb
|
62
117
|
- views/detail.html.erb
|
63
118
|
- views/index.html.erb
|
@@ -111,5 +166,4 @@ test_files:
|
|
111
166
|
- test/fixtures/sample.rb
|
112
167
|
- test/fixtures/totals_tr.html
|
113
168
|
- test/helper.rb
|
114
|
-
- test/simplecov-rcov_test.rb
|
115
169
|
- test/test_simplecov-rcov.rb
|
data/Manifest
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
Gemfile
|
2
|
-
Gemfile.lock
|
3
|
-
Manifest
|
4
|
-
README.md
|
5
|
-
Rakefile
|
6
|
-
lib/simplecov-rcov.rb
|
7
|
-
simplecov-rcov.gemspec
|
8
|
-
test/fixtures/app/controllers/sample.rb
|
9
|
-
test/fixtures/app/models/airplane.rb
|
10
|
-
test/fixtures/app/models/dog.rb
|
11
|
-
test/fixtures/app/models/house.rb
|
12
|
-
test/fixtures/app/models/robot.rb
|
13
|
-
test/fixtures/app/models/user.rb
|
14
|
-
test/fixtures/file_tr.html
|
15
|
-
test/fixtures/sample.rb
|
16
|
-
test/fixtures/totals_tr.html
|
17
|
-
test/helper.rb
|
18
|
-
test/simplecov-rcov_test.rb
|
19
|
-
views/index.erb.html
|
data/test/simplecov-rcov_test.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
require "#{File.expand_path(File.dirname(__FILE__))}/helper"
|
2
|
-
|
3
|
-
class SimplecovRcovFormatterTest < Test::Unit::TestCase
|
4
|
-
def test_format
|
5
|
-
SimpleCov::Formatter::RcovFormatter.stubs( :path_result ).returns( '/tmp/rcov/coverage_test_index.html' )
|
6
|
-
if File.exists?( SimpleCov::Formatter::RcovFormatter.path_result )
|
7
|
-
File.delete( SimpleCov::Formatter::RcovFormatter.path_result )
|
8
|
-
end
|
9
|
-
|
10
|
-
@original_result = {
|
11
|
-
source_fixture( 'sample.rb' ) => [nil, 1, 1, 1, nil, 0, 1, 1, nil, nil],
|
12
|
-
source_fixture( 'app/models/user.rb' ) => [nil, 1, 1, 1, 1, 0, 1, 0, nil, nil],
|
13
|
-
source_fixture( 'app/models/robot.rb' ) => [1, 1, 1, 1, nil, nil, 1, 0, nil, nil],
|
14
|
-
source_fixture( 'app/models/house.rb' ) => [nil, nil, nil, nil, nil, nil, nil, nil, nil, nil],
|
15
|
-
source_fixture( 'app/models/airplane.rb' ) => [0, 0, 0, 0, 0],
|
16
|
-
source_fixture( 'app/models/dog.rb' ) => [1, 1, 1, 1, 1],
|
17
|
-
source_fixture( 'app/controllers/sample.rb' ) => [nil, 1, 1, 1, nil, nil, 0, 0, nil, nil]
|
18
|
-
}
|
19
|
-
|
20
|
-
@result = SimpleCov::Result.new( @original_result )
|
21
|
-
rcov_result = SimpleCov::Formatter::RcovFormatter.new().format( @result )
|
22
|
-
|
23
|
-
assert_match( File.read( "#{File.dirname(__FILE__)}/fixtures/totals_tr.html"), rcov_result )
|
24
|
-
assert_match( File.read( "#{File.dirname(__FILE__)}/fixtures/file_tr.html"), rcov_result )
|
25
|
-
assert( File.exists?( SimpleCov::Formatter::RcovFormatter.path_result ) )
|
26
|
-
end
|
27
|
-
|
28
|
-
def source_fixture( filename )
|
29
|
-
File.expand_path( File.join( File.dirname( __FILE__ ), 'fixtures', filename ) )
|
30
|
-
end
|
31
|
-
end
|