bartes-rcov_stats 1.1.2 → 1.1.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.
Files changed (3) hide show
  1. data/README +11 -0
  2. data/lib/rcov_stats.rb +4 -8
  3. metadata +1 -1
data/README CHANGED
@@ -28,4 +28,15 @@ You can specify there :
28
28
  - action which will be used before running test suite (before_rcov -> by default db:test:prepare)
29
29
 
30
30
 
31
+ You can run:
32
+ - rake rcov:stats (includes rcov:units and rcov:functionals)
33
+ - rake rcov:units
34
+ - rake rcov:functionals
35
+ - rake rcov:general (includes rcov:units and rcov:functionals, but counts one general coverage and puts all results in one output directory)
36
+
37
+
38
+ You can grab rcov gem with :
39
+ gem install relevance-rcov
40
+
41
+
31
42
  Copyright (c) 2009 [bartes], released under the MIT license
@@ -44,10 +44,6 @@ module RcovStats
44
44
  get_array_data "functionals_files_to_test"
45
45
  end
46
46
 
47
- def excluded_paths
48
- %w(spec gems plugins)
49
- end
50
-
51
47
  def igonored_paths
52
48
  %w(. .. .svn)
53
49
  end
@@ -119,8 +115,7 @@ module RcovStats
119
115
  def invoke_rcov_task(options)
120
116
  require 'rake/win32'
121
117
  files_to_cover = parse_file_to_cover(options[:files_to_cover].uniq).map{|f| "(#{f})".gsub("/","\/")}.join("|")
122
- rcov_settings = "--sort coverage --text-summary --rails -x \"^(?!(#{files_to_cover}))\" "
123
- rcov_settings +="--exclude \"#{excluded_paths.map{|p| "#{p}/*"}.join(",")}\" "
118
+ rcov_settings = "--sort coverage --text-summary -x \"^(?!(#{files_to_cover}))\" "
124
119
  rcov_settings +="--output=#{File.join(root,"coverage",options[:output])} " if options[:output]
125
120
  rcov_tests = parse_file_to_test(options[:files_to_test].uniq)
126
121
  return false if rcov_tests.empty?
@@ -134,12 +129,13 @@ module RcovStats
134
129
  rcov_tests = parse_file_to_test(options[:files_to_test].uniq)
135
130
  return false if rcov_tests.empty?
136
131
  Spec::Rake::SpecTask.new(options[:name]) do |t|
137
- t.spec_opts = ['--options', "\"#{File.join(root,'spec','spec.opts')}\""]
132
+ spec_opts = File.join(root,'spec','spec.opts')
133
+ t.spec_opts = ['--options', "\"#{spec_opts}\""] if File.exists?(spec_opts)
138
134
  t.spec_files = rcov_tests
139
135
  t.rcov = true
140
136
  t.rcov_dir = File.join(root,"coverage",options[:output]) if options[:output]
141
137
  files_to_cover = parse_file_to_cover(options[:files_to_cover].uniq).map{|f| "(#{f})".gsub("/","\/")}.join("|")
142
- t.rcov_opts = ["--rails","--text-summary","--sort","coverage","--exclude","\"#{excluded_paths.map{|p| "#{p}/*"}.join(",")}\"","-x" , "\"^(?!(#{files_to_cover}))\""]
138
+ t.rcov_opts = ["--text-summary","--sort","coverage","-x","\"^(?!(#{files_to_cover}))\""]
143
139
  end
144
140
  end
145
141
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bartes-rcov_stats
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bartosz Knapik