Skip to content

Commit

Permalink
Wrapped rcov in a guard so it is bypassed when using JRuby.
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkMenard committed Jan 25, 2009
1 parent 4cbafc5 commit a24e332
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions Rakefile
@@ -1,7 +1,6 @@
require 'rubygems'
require 'rake/testtask'
require 'rake/rdoctask'
require 'rcov/rcovtask'

task :default => :test

Expand All @@ -21,13 +20,6 @@ Rake::RDocTask.new do |rdoc|
rdoc.options << '--charset' << 'utf-8'
end

Rcov::RcovTask.new do |t|
t.test_files = FileList['test/**/test*.rb']
t.rcov_opts << "--sort coverage"
t.rcov_opts << "--exclude gems"
t.rcov_opts << "--no-validator-links"
end

desc %{Update ".manifest" with the latest list of project filenames. Respect\
.gitignore by excluding everything that git ignores. Update `files` and\
`test_files` arrays in "*.gemspec" file if it's present.}
Expand Down Expand Up @@ -55,3 +47,15 @@ task :manifest do
end
File.open('.manifest', 'w') {|f| f << list.join("\n") }
end

if RUBY_PLATFORM =~ /java/
puts "rcov support disabled (running under JRuby)."
else
require 'rcov/rcovtask'
Rcov::RcovTask.new do |t|
t.test_files = FileList['test/**/test*.rb']
t.rcov_opts << "--sort coverage"
t.rcov_opts << "--exclude gems"
t.rcov_opts << "--no-validator-links"
end
end

0 comments on commit a24e332

Please sign in to comment.