Remove simplecov gem on 1.8

Deprecation note indicates it will be removing even
no-op support for 1.8, so clarify now that it won’t
even be installed on those builds.
This commit is contained in:
Marc Siegel 2015-06-24 16:18:43 -04:00
parent 3c2bcb3f1f
commit 85fa373cb4
2 changed files with 20 additions and 17 deletions

View File

@ -2,7 +2,7 @@ require File.expand_path('on_what', File.dirname(__FILE__))
source 'https://rubygems.org'
# Travis-only dependencies go here
if on_travis?
if on_travis? && !on_1_8?
group :test do
gem 'codecov', :require => false
end

View File

@ -1,23 +1,26 @@
require File.expand_path('on_what', File.dirname(File.dirname(__FILE__)))
begin
require 'simplecov'
SimpleCov.start do
add_filter '/spec/' # exclude test code
add_filter '/vendor/' # exclude gems which are vendored on Travis CI
end
# Code coverage (via SimpleCov) on Ruby 1.9+
unless on_1_8?
begin
require 'simplecov'
SimpleCov.start do
add_filter '/spec/' # exclude test code
add_filter '/vendor/' # exclude gems which are vendored on Travis CI
end
# On CI, for Ruby 1.9+, we publish simplecov results to codecov.io
if on_travis? && !on_1_8?
require 'codecov'
SimpleCov.formatter = SimpleCov::Formatter::Codecov
end
# On CI we publish simplecov results to codecov.io
if on_travis?
require 'codecov'
SimpleCov.formatter = SimpleCov::Formatter::Codecov
end
# Due to circular dependency (simplecov depends on docile), remove and require again below
Object.send(:remove_const, :Docile)
$LOADED_FEATURES.reject! { |f| f =~ /\/docile\// }
rescue LoadError
warn 'warning: simplecov or codecov gems not found; skipping coverage'
# Due to circular dependency (simplecov depends on docile), remove docile and require again below
Object.send(:remove_const, :Docile)
$LOADED_FEATURES.reject! { |f| f =~ /\/docile\// }
rescue LoadError
warn 'warning: simplecov or codecov gems not found; skipping coverage'
end
end
lib_dir = File.join(File.dirname(File.dirname(__FILE__)), 'lib')