Permalink
Browse files

Adding coverage reports using simplecov-rcov and removing rcov

Change-Id: Ibf1f5a3891dcb55f12e386516bf2abade26e3746
  • Loading branch information...
1 parent abe6088 commit 84a478d5a5a9418a0c92b64a86b86bde7050cd1e @trisberg trisberg committed Mar 15, 2012
@@ -1,5 +1,4 @@
-Gemfile.lock
.build
*.gem
.DS_Store
-spec/spec
+/coverage/
@@ -0,0 +1,7 @@
+ENV['COVERAGE'] = 'true'
+require 'simplecov-rcov'
+SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
+SimpleCov.start do
+ add_filter "/spec/"
+ add_filter "/vendor/"
+end
@@ -0,0 +1,65 @@
+PATH
+ remote: .
+ specs:
+ cf-autoconfig (0.0.2)
+ cf-runtime (= 0.0.1)
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ amq-client (0.9.2)
+ amq-protocol (>= 0.9.0)
+ eventmachine
+ amq-protocol (0.9.0)
+ amqp (0.9.4)
+ amq-client (~> 0.9.2)
+ amq-protocol (>= 0.9.0)
+ eventmachine
+ bson (1.6.1)
+ builder (3.0.0)
+ carrot (1.2.0)
+ cf-runtime (0.0.1)
+ crack (~> 0.3.1)
+ ci_reporter (1.6.9)
+ builder (>= 2.1.2)
+ crack (0.3.1)
+ diff-lcs (1.1.3)
+ eventmachine (0.12.10)
+ mongo (1.2.4)
+ bson (>= 1.2.4)
+ multi_json (1.1.0)
+ mysql2 (0.2.18)
+ pg (0.11.0)
+ rake (0.9.2.2)
+ redis (2.2.2)
+ rspec (2.6.0)
+ rspec-core (~> 2.6.0)
+ rspec-expectations (~> 2.6.0)
+ rspec-mocks (~> 2.6.0)
+ rspec-core (2.6.4)
+ rspec-expectations (2.6.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.6.0)
+ simplecov (0.6.1)
+ multi_json (~> 1.0)
+ simplecov-html (~> 0.5.3)
+ simplecov-html (0.5.3)
+ simplecov-rcov (0.2.3)
+ simplecov (>= 0.4.1)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ amqp (~> 0.8)
+ carrot (~> 1.0)
+ cf-autoconfig!
+ ci_reporter (~> 1.6.5)
+ mongo (~> 1.2.0)
+ mysql2 (~> 0.2.7)
+ pg (~> 0.11.0)
+ rake (~> 0.9.2)
+ redis (~> 2.0)
+ rspec (~> 2.6.0)
+ simplecov (~> 0.6.1)
+ simplecov-rcov (~> 0.2.3)
@@ -1,32 +1,23 @@
require 'rake'
+require 'rspec'
+require 'rspec/core/rake_task'
require 'ci/reporter/rake/rspec'
desc "Run specs"
-task "spec" => ["bundler:install", "test:spec"]
+RSpec::Core::RakeTask.new do |t|
+ t.pattern = "spec/**/*_spec.rb"
+ t.rspec_opts = ["--format", "documentation", "--colour"]
+end
-desc "Run specs using RCov"
-task "spec:rcov" => ["bundler:install", "test:spec:rcov"]
+desc "Run specs using Coverage tool"
+RSpec::Core::RakeTask.new("spec:cov") do |t|
+ t.pattern = "spec/**/*_spec.rb"
+ t.ruby_opts = ["-r 'simplecov'"]
+end
desc "Run specs producing results for CI"
task "ci" => ["ci:spec"]
-namespace "bundler" do
- desc "Install gems"
- task "install" do
- sh("bundle install")
- end
-end
-
-namespace "test" do
- task "spec" do |t|
- sh("cd spec && rake spec")
- end
-
- task "spec:rcov" do |t|
- sh("cd spec && rake spec:rcov")
- end
-end
-
namespace :ci do
- task "spec" => ["ci:setup:rspec", "^spec"]
+ task "spec" => ["ci:setup:rspec", "^spec:cov"]
end
@@ -24,9 +24,10 @@ spec = Gem::Specification.new do |s|
s.add_development_dependency "pg", "~> 0.11.0"
s.add_development_dependency "mongo", "~> 1.2.0"
s.add_development_dependency "rake", "~> 0.9.2"
- s.add_development_dependency "rcov", "~> 0.9.10"
s.add_development_dependency "rspec", "~> 2.6.0"
s.add_development_dependency "ci_reporter", "~> 1.6.5"
+ s.add_development_dependency "simplecov", "~> 0.6.1"
+ s.add_development_dependency "simplecov-rcov", "~> 0.2.3"
s.require_path = 'lib'
s.files = %w(LICENSE) + Dir.glob("{lib}/**/*")
@@ -0,0 +1,2 @@
+/coverage/
+/reports/
@@ -1,26 +0,0 @@
-require 'tempfile'
-
-require 'rubygems'
-require 'bundler/setup'
-Bundler.require(:default, :test)
-
-require 'rake'
-require 'rspec'
-require 'rspec/core/rake_task'
-
-coverage_dir = File.expand_path(File.join(File.dirname(__FILE__), "coverage"))
-
-ignore_pattern = 'spec,[.]bundle,[/]gems[/]'
-
-RSpec::Core::RakeTask.new do |t|
- t.pattern = "**/*_spec.rb"
- t.rspec_opts = ["--format", "documentation", "--colour"]
-end
-
-desc "Run specs using RCov"
-RSpec::Core::RakeTask.new("spec:rcov") do |t|
- t.pattern = "**/*_spec.rb"
- t.rspec_opts = []
- t.rcov = true
- t.rcov_opts = %W{--exclude osx\/objc,gems\/,spec\/,features\/ -o "#{coverage_dir}"}
-end
@@ -1,3 +1,5 @@
+require 'simplecov' if ENV['COVERAGE']
+
$:.unshift('./lib')
require 'bundler'
require 'bundler/setup'
@@ -1,4 +1,4 @@
.build
*.gem
.DS_Store
-**/spec/spec
+spec/reports
View
@@ -1,7 +1,6 @@
source "http://rubygems.org"
gem "rake", "~> 0.9.2"
-gem "rcov", "~> 0.9.10"
gem "rspec", "~> 2.6.0"
gem "ci_reporter", "~> 1.6.5"
gem "vmc"
-gem "curb"
+gem "curb"
@@ -12,7 +12,6 @@ GEM
spruz (~> 0.2.8)
mime-types (1.17.2)
rake (0.9.2.2)
- rcov (0.9.11)
rest-client (1.6.7)
mime-types (>= 1.16)
rspec (2.6.0)
@@ -41,6 +40,5 @@ DEPENDENCIES
ci_reporter (~> 1.6.5)
curb
rake (~> 0.9.2)
- rcov (~> 0.9.10)
rspec (~> 2.6.0)
vmc
View
@@ -1,22 +1,20 @@
require 'rake'
+require 'rspec'
+require 'rspec/core/rake_task'
require 'ci/reporter/rake/rspec'
desc "Run specs"
task "spec" => ["test:package","test:spec"]
-desc "Run specs using RCov"
-task "spec:rcov" => ["test:spec:rcov"]
-
desc "Run specs producing results for CI"
task "ci" => ["ci:spec"]
namespace "test" do
task "spec" do |t|
- sh("cd spec && rake spec")
- end
-
- task "spec:rcov" do |t|
- sh("cd spec && rake spec:rcov")
+ RSpec::Core::RakeTask.new do |t|
+ t.pattern = "spec/**/*_spec.rb"
+ t.rspec_opts = ["--format", "documentation", "--colour"]
+ end
end
task "package" do |t|
@@ -1,26 +0,0 @@
-require 'tempfile'
-
-require 'rubygems'
-require 'bundler/setup'
-Bundler.require(:default, :test)
-
-require 'rake'
-require 'rspec'
-require 'rspec/core/rake_task'
-
-coverage_dir = File.expand_path(File.join(File.dirname(__FILE__), "coverage"))
-
-ignore_pattern = 'spec,[.]bundle,[/]gems[/]'
-
-RSpec::Core::RakeTask.new do |t|
- t.pattern = "**/*_spec.rb"
- t.rspec_opts = ["--format", "documentation", "--colour"]
-end
-
-desc "Run specs using RCov"
-RSpec::Core::RakeTask.new("spec:rcov") do |t|
- t.pattern = "**/*_spec.rb"
- t.rspec_opts = []
- t.rcov = true
- t.rcov_opts = %W{--exclude osx\/objc,gems\/,spec\/,features\/ -o "#{coverage_dir}"}
-end
View
@@ -1,5 +1,4 @@
-Gemfile.lock
.build
*.gem
.DS_Store
-spec/spec
+/coverage/
View
@@ -0,0 +1,7 @@
+ENV['COVERAGE'] = 'true'
+require 'simplecov-rcov'
+SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
+SimpleCov.start do
+ add_filter "/spec/"
+ add_filter "/vendor/"
+end
View
@@ -0,0 +1,67 @@
+PATH
+ remote: .
+ specs:
+ cf-runtime (0.0.1)
+ crack (~> 0.3.1)
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ amq-client (0.9.2)
+ amq-protocol (>= 0.9.0)
+ eventmachine
+ amq-protocol (0.9.0)
+ amqp (0.9.4)
+ amq-client (~> 0.9.2)
+ amq-protocol (>= 0.9.0)
+ eventmachine
+ bson (1.6.1)
+ builder (3.0.0)
+ carrot (1.2.0)
+ ci_reporter (1.6.9)
+ builder (>= 2.1.2)
+ crack (0.3.1)
+ diff-lcs (1.1.3)
+ eventmachine (0.12.10)
+ mongo (1.2.4)
+ bson (>= 1.2.4)
+ multi_json (1.1.0)
+ mysql2 (0.2.18)
+ pg (0.11.0)
+ rack (1.4.1)
+ rack-test (0.6.1)
+ rack (>= 1.0)
+ rake (0.9.2.2)
+ redis (2.2.2)
+ rspec (2.6.0)
+ rspec-core (~> 2.6.0)
+ rspec-expectations (~> 2.6.0)
+ rspec-mocks (~> 2.6.0)
+ rspec-core (2.6.4)
+ rspec-expectations (2.6.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.6.0)
+ simplecov (0.6.1)
+ multi_json (~> 1.0)
+ simplecov-html (~> 0.5.3)
+ simplecov-html (0.5.3)
+ simplecov-rcov (0.2.3)
+ simplecov (>= 0.4.1)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ amqp (~> 0.8)
+ carrot (~> 1.0)
+ cf-runtime!
+ ci_reporter (~> 1.6.5)
+ mongo (~> 1.2.0)
+ mysql2 (~> 0.2.7)
+ pg (~> 0.11.0)
+ rack-test (~> 0.6.1)
+ rake (~> 0.9.2)
+ redis (~> 2.0)
+ rspec (~> 2.6.0)
+ simplecov (~> 0.6.1)
+ simplecov-rcov (~> 0.2.3)
View
@@ -1,33 +1,23 @@
-require "bundler/gem_tasks"
require 'rake'
+require 'rspec'
+require 'rspec/core/rake_task'
require 'ci/reporter/rake/rspec'
desc "Run specs"
-task "spec" => ["bundler:install", "test:spec"]
+RSpec::Core::RakeTask.new do |t|
+ t.pattern = "spec/**/*_spec.rb"
+ t.rspec_opts = ["--format", "documentation", "--colour"]
+end
-desc "Run specs using RCov"
-task "spec:rcov" => ["bundler:install", "test:spec:rcov"]
+desc "Run specs using Coverage tool"
+RSpec::Core::RakeTask.new("spec:cov") do |t|
+ t.pattern = "spec/**/*_spec.rb"
+ t.ruby_opts = ["-r 'simplecov'"]
+end
desc "Run specs producing results for CI"
task "ci" => ["ci:spec"]
-namespace "bundler" do
- desc "Install gems"
- task "install" do
- sh("bundle install")
- end
-end
-
-namespace "test" do
- task "spec" do |t|
- sh("cd spec && rake spec")
- end
-
- task "spec:rcov" do |t|
- sh("cd spec && rake spec:rcov")
- end
-end
-
namespace :ci do
- task "spec" => ["ci:setup:rspec", "^spec"]
+ task "spec" => ["ci:setup:rspec", "^spec:cov"]
end
Oops, something went wrong.

0 comments on commit 84a478d

Please sign in to comment.