Permalink
Browse files

Major cleanup. Temporarily breaking JRuby support

  • Loading branch information...
1 parent dcb920f commit dea676c0b45f6d09b5ad99d3b3d6069018d35728 @abedra abedra committed Jan 21, 2012
Showing with 38 additions and 1,791 deletions.
  1. +7 −95 Rakefile
  2. +0 −6 TODO
  3. +1 −1 bin/rcov
  4. +2 −6 lib/rcov/version.rb
  5. BIN lib/rcovrt.jar
  6. +14 −41 rcov-java.gemspec
  7. +14 −54 rcov.gemspec
  8. +0 −1,588 setup.rb
View
102 Rakefile
@@ -1,103 +1,15 @@
-$:.unshift "lib" if File.directory? "lib"
-require 'rcov/rcovtask'
-require 'rcov/version'
require 'rake/testtask'
-require 'rake/rdoctask'
-require 'rake/gempackagetask'
require 'rake/clean'
-
-# Use the specified rcov executable instead of the one in $PATH
-# (this way we get a sort of informal functional test).
-# This could also be specified from the command like, e.g.
-# rake rcov RCOVPATH=/path/to/myrcov
-ENV["RCOVPATH"] = "bin/rcov"
-
-# The following task is largely equivalent to:
-# Rcov::RcovTask.new
-desc "Create a cross-referenced code coverage report."
-Rcov::RcovTask.new do |t|
- t.test_files = FileList['test/*_test.rb']
- t.ruby_opts << "-Ilib:ext/rcovrt" # in order to use this rcov
- t.rcov_opts << "--xrefs" # comment to disable cross-references
- t.verbose = true
-end
-
-desc "Analyze code coverage for the FileStatistics class."
-Rcov::RcovTask.new(:rcov_sourcefile) do |t|
- t.test_files = FileList['test/file_statistics_test.rb']
- t.verbose = true
- t.rcov_opts << "--test-unit-only"
- t.ruby_opts << "-Ilib:ext/rcovrt" # in order to use this rcov
- t.output_dir = "coverage.sourcefile"
-end
-
-Rcov::RcovTask.new(:rcov_ccanalyzer) do |t|
- t.test_files = FileList['test/code_coverage_analyzer_test.rb']
- t.verbose = true
- t.rcov_opts << "--test-unit-only"
- t.ruby_opts << "-Ilib:ext/rcovrt" # in order to use this rcov
- t.output_dir = "coverage.ccanalyzer"
-end
+require 'rcov/rcovtask'
+require 'rcov/version'
desc "Run the unit tests with rcovrt."
-if RUBY_PLATFORM == 'java'
- Rake::TestTask.new(:test_rcovrt => ["lib/rcovrt.jar"]) do |t|
- t.libs << "lib"
- t.ruby_opts << "--debug"
- t.test_files = FileList['test/*_test.rb']
- t.verbose = true
- end
-
- file "lib/rcovrt.jar" => FileList["ext/java/**/*.java"] do |t|
- rm_f "lib/rcovrt.jar"
- mkdir_p "pkg/classes"
- sh "javac -classpath #{Java::JavaLang::System.getProperty('java.class.path')} -d pkg/classes #{t.prerequisites.join(' ')}"
- sh "jar cf #{t.name} -C pkg/classes ."
- end
-else
- Rake::TestTask.new(:test_rcovrt => ["ext/rcovrt/rcovrt.so"]) do |t|
- system("cd ext/rcovrt && make clean && rm Makefile")
- t.libs << "ext/rcovrt"
- t.test_files = FileList['test/*_test.rb']
- t.verbose = true
- end
-end
-
-file "ext/rcovrt/rcovrt.so" => FileList["ext/rcovrt/*.c"] do
- ruby "setup.rb config"
- ruby "setup.rb setup"
-end
-
-desc "Run the unit tests in pure-Ruby mode ."
-Rake::TestTask.new(:test_pure_ruby) do |t|
+Rake::TestTask.new(:test_rcovrt) do |t|
+ system("cd ext/rcovrt && make clean && rm Makefile")
+ system("cd ext/rcovrt && ruby extconf.rb && make")
t.libs << "ext/rcovrt"
- t.test_files = FileList['test/turn_off_rcovrt.rb', 'test/*_test.rb']
+ t.test_files = FileList['test/*_test.rb']
t.verbose = true
end
-desc "Run the unit tests"
-task :test => [:test_rcovrt]
-
-desc "install by setup.rb"
-task :install do
- sh "sudo ruby setup.rb install"
-end
-
-task :default => :test
-
-begin
- %w{sdoc sdoc-helpers rdiscount}.each { |name| gem name }
- require 'sdoc_helpers'
-rescue LoadError => ex
- puts "sdoc support not enabled:"
- puts ex.inspect
-end
-
-require 'rake/rdoctask'
-Rake::RDocTask.new do |rdoc|
- version = File.exist?('VERSION') ? File.read('VERSION') : ''
- rdoc.rdoc_dir = 'rdoc'
- rdoc.title = "rcov #{version}"
- rdoc.rdoc_files.include('README*')
- rdoc.rdoc_files.include('lib/**/*.rb')
-end
+task :default => [:test_rcovrt]
View
6 TODO
@@ -1,6 +0,0 @@
-test_diff under functional_tests does not pass for jruby. It looks like Jruby is reporting on MORE information than
-regular ruby. I don't understand why this is yet. I am certain I can "remove" the extra data from the jruby run by
-putting more stuff in the "ignore" list. But I would like to understand "why" before we do. This will more than
-likely involve talking with the JRuby guys.
-
-Figure out how to have the right rcov.gem created by github
View
@@ -1,5 +1,6 @@
#!/usr/bin/env ruby
# -*- coding: iso-8859-1 -*-
+
# rcov Copyright (c) 2004-2006 Mauricio Fernandez <mfp@acm.org>
#
# rcov originally based on
@@ -15,7 +16,6 @@ if RUBY_VERSION =~ /1.9/
exit 1
end
-
require 'cgi'
require 'rbconfig'
require 'optparse'
View
@@ -1,10 +1,6 @@
-# rcov Copyright (c) 2004-2006 Mauricio Fernandez <mfp@acm.org>
-#
-# See LICENSE for licensing information.
-
module Rcov
- VERSION = "0.9.11"
- RELEASE_DATE = "2010-02-28"
+ VERSION = "1.0.0"
+ RELEASE_DATE = "2012-02-01"
RCOVRT_ABI = [2,0,0]
UPSTREAM_URL = "http://github.com/relevance/rcov"
end
View
Binary file not shown.
View
@@ -1,60 +1,33 @@
$:.push File.expand_path("../lib", __FILE__)
require "rcov/version"
-PKG_FILES = ["bin/rcov", "lib/rcov.rb", "lib/rcov/lowlevel.rb", "lib/rcov/version.rb",
- "lib/rcov/rcovtask.rb", "lib/rcov/formatters.rb", "lib/rcov/call_site_analyzer.rb",
- "lib/rcov/code_coverage_analyzer.rb", "lib/rcov/coverage_info.rb", "lib/rcov/differential_analyzer.rb",
- "lib/rcov/file_statistics.rb",
- "lib/rcov/formatters/base_formatter.rb", "lib/rcov/formatters/full_text_report.rb",
- "lib/rcov/formatters/html_erb_template.rb",
- "lib/rcov/formatters/html_coverage.rb", "lib/rcov/formatters/text_coverage_diff.rb",
- "lib/rcov/formatters/text_report.rb", "lib/rcov/formatters/text_summary.rb",
- "lib/rcov/formatters/failure_report.rb",
- "lib/rcov/templates/index.html.erb", "lib/rcov/templates/detail.html.erb",
- "lib/rcov/templates/screen.css",
- "lib/rcov/templates/print.css",
- "lib/rcov/templates/rcov.js",
- "lib/rcov/templates/jquery-1.3.2.min.js",
- "lib/rcov/templates/jquery.tablesorter.min.js", "LICENSE",
- "ext/java/src/CallsiteHook.java","ext/java/src/CoverageHook.java","ext/java/src/RcovHook.java","ext/java/src/RcovrtService.java",
- "Rakefile", "doc/readme_for_rake.markdown", "doc/readme_for_vim.markdown", "doc/readme_for_emacs.markdown",
- "doc/readme_for_api.markdown", "THANKS", "test/functional_test.rb",
- "test/file_statistics_test.rb", "test/assets/sample_03.rb", "test/assets/sample_05-new.rb",
- "test/code_coverage_analyzer_test.rb", "test/assets/sample_04.rb", "test/assets/sample_02.rb",
- "test/assets/sample_05-old.rb", "test/assets/sample_01.rb", "test/turn_off_rcovrt.rb",
- "test/call_site_analyzer_test.rb", "test/assets/sample_05.rb", "test/assets/sample_06.rb", "editor-extensions/rcov.vim",
- "test/test_helper.rb",
- "test/expected_coverage/diff-gcc-all.out", "test/expected_coverage/diff-gcc-diff.out", "test/expected_coverage/diff-gcc-original.out",
- "test/expected_coverage/diff-no-color.out", "test/expected_coverage/diff.out", "test/expected_coverage/gcc-text.out",
- "test/expected_coverage/sample_03_rb.html", "test/expected_coverage/sample_03_rb.rb", "test/expected_coverage/sample_04_rb.html",
- "test/expected_coverage/sample_04_rb.rb",
- "editor-extensions/rcov.el", "setup.rb", "BLURB", "lib/rcovrt.jar"]
-
Gem::Specification.new do |s|
s.name = %q{rcov}
s.version = Rcov::VERSION
-
s.required_rubygems_version = nil if s.respond_to? :required_rubygems_version=
- s.authors = ["Relevance", "Chad Humphries (spicycode)", "Aaron Bedra (abedra)", "Jay McGaffigan(hooligan495)", "Mauricio Fernandez"]
- s.date = %q{2009-12-29}
- s.default_executable = %q{rcov}
- s.description = %q{rcov is a code coverage tool for Ruby. It is commonly used for viewing overall test unit coverage of target code. It features fast execution (20-300 times faster than previous tools), multiple analysis modes, XHTML and several kinds of text reports, easy automation with Rake via a RcovTask, fairly accurate coverage information through code linkage inference using simple heuristics, colorblind-friendliness...}
- s.email = %q{opensource@thinkrelevance.com}
+ s.authors = ["Relevance",
+ "Chad Humphries (spicycode)",
+ "Aaron Bedra (abedra)",
+ "Jay McGaffigan(hooligan495)",
+ "Mauricio Fernandez"]
+ s.date = %q{2012-02-01}
+ s.description = %q{rcov is a code coverage tool for Ruby.}
+ s.email = %q{aaron@aaronbedra.com}
+ s.files = Dir.glob('lib/**/*.rb') + Dir.glob('ext/java/**/*.java')
+ s.extensions = ["ext/rcovrt/extconf.rb"]
s.executables = ["rcov"]
- s.files = PKG_FILES
- s.platform = %q{java}
- s.has_rdoc = true
s.homepage = %q{http://github.com/relevance/rcov}
s.rdoc_options = ["--title", "rcov code coverage tool"]
s.require_paths = ["lib"]
s.required_ruby_version = Gem::Requirement.new("> 0.0.0")
s.summary = %q{Code coverage analysis tool for Ruby}
- s.test_files = ["test/functional_test.rb", "test/file_statistics_test.rb", "test/code_coverage_analyzer_test.rb", "test/call_site_analyzer_test.rb"]
-
+ s.test_files = ["test/functional_test.rb",
+ "test/file_statistics_test.rb",
+ "test/code_coverage_analyzer_test.rb",
+ "test/call_site_analyzer_test.rb"]
if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 1
-
if current_version >= 3 then
else
end
View
@@ -1,62 +1,22 @@
$:.push File.expand_path("../lib", __FILE__)
require "rcov/version"
-PKG_FILES = ["bin/rcov", "lib/rcov.rb", "lib/rcov/lowlevel.rb", "lib/rcov/version.rb",
- "lib/rcov/rcovtask.rb", "lib/rcov/formatters.rb", "lib/rcov/call_site_analyzer.rb",
- "lib/rcov/code_coverage_analyzer.rb", "lib/rcov/coverage_info.rb", "lib/rcov/differential_analyzer.rb",
- "lib/rcov/file_statistics.rb",
- "lib/rcov/formatters/base_formatter.rb", "lib/rcov/formatters/full_text_report.rb",
- "lib/rcov/formatters/html_erb_template.rb",
- "lib/rcov/formatters/html_coverage.rb", "lib/rcov/formatters/text_coverage_diff.rb",
- "lib/rcov/formatters/text_report.rb", "lib/rcov/formatters/text_summary.rb",
- "lib/rcov/formatters/failure_report.rb",
- "lib/rcov/templates/index.html.erb", "lib/rcov/templates/detail.html.erb",
- "lib/rcov/templates/screen.css",
- "lib/rcov/templates/print.css",
- "lib/rcov/templates/rcov.js",
- "lib/rcov/templates/jquery-1.3.2.min.js",
- "lib/rcov/templates/jquery.tablesorter.min.js",
- "ext/rcovrt/extconf.rb", "ext/rcovrt/1.8/rcovrt.c",
- "ext/rcovrt/1.8/callsite.c", "LICENSE",
- "Rakefile", "doc/readme_for_rake.markdown", "doc/readme_for_vim.markdown", "doc/readme_for_emacs.markdown",
- "doc/readme_for_api.markdown", "THANKS", "test/functional_test.rb",
- "test/file_statistics_test.rb", "test/assets/sample_03.rb", "test/assets/sample_05-new.rb",
- "test/code_coverage_analyzer_test.rb", "test/assets/sample_04.rb", "test/assets/sample_02.rb",
- "test/assets/sample_05-old.rb", "test/assets/sample_01.rb", "test/turn_off_rcovrt.rb",
- "test/call_site_analyzer_test.rb", "test/assets/sample_05.rb", "test/assets/sample_06.rb", "editor-extensions/rcov.vim",
- "test/test_helper.rb",
- "test/expected_coverage/diff-gcc-all.out", "test/expected_coverage/diff-gcc-diff.out", "test/expected_coverage/diff-gcc-original.out",
- "test/expected_coverage/diff-no-color.out", "test/expected_coverage/diff.out", "test/expected_coverage/gcc-text.out",
- "test/expected_coverage/sample_03_rb.html", "test/expected_coverage/sample_03_rb.rb", "test/expected_coverage/sample_04_rb.html",
- "editor-extensions/rcov.el", "setup.rb", "BLURB"]
-
Gem::Specification.new do |s|
s.name = %q{rcov}
+ s.summary = %q{Code coverage analysis tool for Ruby}
+ s.description = %q{rcov is a code coverage tool for Ruby.}
s.version = Rcov::VERSION
-
- s.required_rubygems_version = nil if s.respond_to? :required_rubygems_version=
- s.authors = ["Relevance", "Chad Humphries (spicycode)", "Aaron Bedra (abedra)", "Jay McGaffigan(hooligan495)", "Mauricio Fernandez"]
- s.date = %q{2009-12-29}
- s.description = %q{rcov is a code coverage tool for Ruby. It is commonly used for viewing overall test unit coverage of target code. It features fast execution (20-300 times faster than previous tools), multiple analysis modes, XHTML and several kinds of text reports, easy automation with Rake via a RcovTask, fairly accurate coverage information through code linkage inference using simple heuristics, colorblind-friendliness...}
- s.email = %q{opensource@thinkrelevance.com}
- s.executables = ["rcov"]
- s.extensions = ["ext/rcovrt/extconf.rb"]
- s.files = PKG_FILES
+ s.date = %q{2012-02-01}
s.homepage = %q{http://github.com/relevance/rcov}
- s.rdoc_options = ["--title", "rcov code coverage tool"]
+ s.authors = ["Aaron Bedra (abedra)",
+ "Chad Humphries (spicycode)",
+ "Jay McGaffigan(hooligan495)",
+ "Relevance Inc",
+ "Mauricio Fernandez"]
+ s.email = %q{aaron@aaronbedra.com}
+ s.files = Dir.glob('lib/**/*.rb') + Dir.glob('lib/rcov/templates/*') + Dir.glob('ext/rcovrt/**/*.{c,h,rb}')
+ s.extensions = ["ext/rcovrt/extconf.rb"]
+ s.executables = ["rcov"]
s.require_paths = ["lib"]
- s.required_ruby_version = Gem::Requirement.new("> 0.0.0")
- s.summary = %q{Code coverage analysis tool for Ruby}
- s.test_files = ["test/functional_test.rb", "test/file_statistics_test.rb", "test/code_coverage_analyzer_test.rb", "test/call_site_analyzer_test.rb"]
-
- if s.respond_to? :specification_version then
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
- s.specification_version = 1
-
- if current_version >= 3 then
- else
- end
- else
- end
-end
-
+ s.rdoc_options = ["--title", "rcov code coverage tool"]
+end
Oops, something went wrong.

0 comments on commit dea676c

Please sign in to comment.