mirror of
https://github.com/ms-ati/docile
synced 2023-03-27 23:21:52 -04:00
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:
parent
3c2bcb3f1f
commit
85fa373cb4
2 changed files with 20 additions and 17 deletions
2
Gemfile
2
Gemfile
|
@ -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
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue