rcov_stats 2.2.2 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
module RcovStatsRelated
|
2
|
+
module Integrations
|
3
|
+
module Rspec
|
4
|
+
|
5
|
+
def invoke
|
6
|
+
require 'spec/rake/spectask'
|
7
|
+
|
8
|
+
rcov_tests = parse_file_to_test(files_to_test)
|
9
|
+
return false if rcov_tests.empty?
|
10
|
+
Spec::Rake::SpecTask.new(@name) do |t|
|
11
|
+
t.spec_files = rcov_tests
|
12
|
+
t.rcov = true
|
13
|
+
begin
|
14
|
+
t.rcov_dir = File.join(self.class.root, "coverage", @name)
|
15
|
+
rescue
|
16
|
+
end
|
17
|
+
files_to_cover_parsed = parse_file_to_cover(files_to_cover).map { |f| "(#{f})".gsub("/", "\/") }.join("|")
|
18
|
+
t.rcov_opts = ["--text-summary", "--sort", "coverage", "--output", "#{File.join(self.class.root, "coverage", @name)}", "--exclude", "\"^(?!(#{files_to_cover_parsed}))\""]
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_name
|
23
|
+
"spec"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module RcovStatsRelated
|
2
|
+
module Integrations
|
3
|
+
module Rspec2
|
4
|
+
|
5
|
+
def invoke
|
6
|
+
require 'rspec/core/rake_task'
|
7
|
+
|
8
|
+
rcov_tests = parse_file_to_test(files_to_test)
|
9
|
+
return false if rcov_tests.empty?
|
10
|
+
RSpec::Core::RakeTask.new(@name) do |t|
|
11
|
+
t.pattern = rcov_tests
|
12
|
+
t.rcov = true
|
13
|
+
files_to_cover_parsed = parse_file_to_cover(files_to_cover).map { |f| "(#{f})".gsub("/", "\/") }.join("|")
|
14
|
+
t.rcov_opts = ["--text-summary", "--sort", "coverage", "--output", "#{File.join(self.class.root, "coverage", @name)}", "--exclude", "\"^(?!(#{files_to_cover_parsed}))\""]
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_name
|
19
|
+
"spec"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module RcovStatsRelated
|
2
|
+
module Integrations
|
3
|
+
module TestUnit
|
4
|
+
|
5
|
+
def invoke
|
6
|
+
require 'rake/win32'
|
7
|
+
files_to_cover_parsed = parse_file_to_cover(files_to_cover).map { |f| "(#{f})".gsub("/", "\/") }.join("|")
|
8
|
+
rcov_settings = "--sort coverage --text-summary --exclude \"^(?!(#{files_to_cover_parsed}))\" "
|
9
|
+
rcov_settings +="--output=#{File.join(self.class.root, "coverage", @name)} "
|
10
|
+
rcov_tests = parse_file_to_test(files_to_test)
|
11
|
+
return false if rcov_tests.empty?
|
12
|
+
rcov_settings += rcov_tests.join(' ')
|
13
|
+
cmd = "#{'bundle exec' if bundler?} rcov #{rcov_settings}"
|
14
|
+
Rake::Win32.windows? ? Rake::Win32.rake_system(cmd) : system(cmd)
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_name
|
18
|
+
"test"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rcov_stats
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 2.2.
|
9
|
+
- 3
|
10
|
+
version: 2.2.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Bartosz Knapik
|
@@ -86,6 +86,10 @@ files:
|
|
86
86
|
- templates/jquery-1.3.2.min.js
|
87
87
|
- templates/print.css
|
88
88
|
- tasks/rcov.rake
|
89
|
+
- lib/rcov_stats_related/erb_binding.rb
|
90
|
+
- lib/rcov_stats_related/integrations/rspec2.rb
|
91
|
+
- lib/rcov_stats_related/integrations/rspec.rb
|
92
|
+
- lib/rcov_stats_related/integrations/test_unit.rb
|
89
93
|
- README
|
90
94
|
- init.rb
|
91
95
|
- Rakefile
|