rcov_stats 2.2.2 → 2.2.3

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.
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ 2.2.3 (September 2010)
2
+ missing files in gem file
1
3
  2.2.2 (September 2010)
2
4
  fixed requiring path for rails 2.3.x
3
5
  2.2.1 (September 2010)
@@ -0,0 +1,14 @@
1
+ module RcovStatsRelated
2
+ class ErbBinding
3
+
4
+ def initialize( options )
5
+ options.each_pair do |key, value|
6
+ instance_variable_set(:"@#{key}",value)
7
+ end
8
+ end
9
+
10
+ def get_binding
11
+ binding
12
+ end
13
+ end
14
+ end
@@ -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: 3
4
+ hash: 1
5
5
  prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 2
9
- - 2
10
- version: 2.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