mirror of
https://github.com/ms-ati/docile
synced 2023-03-27 23:21:52 -04:00
Switch from coveralls.io to codecov.io
This commit is contained in:
parent
baf4811fe4
commit
e8ade0ac9b
4 changed files with 20 additions and 21 deletions
5
Gemfile
5
Gemfile
|
@ -1,4 +1,9 @@
|
|||
source 'https://rubygems.org'
|
||||
|
||||
# Travis-only dependencies go here
|
||||
group :test do
|
||||
gem 'codecov', :require => false
|
||||
end
|
||||
|
||||
# Specify gem's dependencies in docile.gemspec
|
||||
gemspec
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
[![Build Status](https://img.shields.io/travis/ms-ati/docile.svg)](https://travis-ci.org/ms-ati/docile)
|
||||
[![Dependency Status](https://gemnasium.com/ms-ati/docile.png)](https://gemnasium.com/ms-ati/docile)
|
||||
[![Code Climate](https://img.shields.io/codeclimate/github/ms-ati/docile.svg)](https://codeclimate.com/github/ms-ati/docile)
|
||||
[![Coverage Status](https://img.shields.io/coveralls/ms-ati/docile.svg)](https://coveralls.io/r/ms-ati/docile)
|
||||
[![Code Coverage](https://img.shields.io/codecov/c/github/ms-ati/docile.svg)](https://codecov.io/github/ms-ati/docile)
|
||||
[![Inline docs](http://inch-ci.org/github/ms-ati/docile.png)](http://inch-ci.org/github/ms-ati/docile)
|
||||
|
||||
|
||||
|
|
|
@ -38,7 +38,4 @@ Gem::Specification.new do |s|
|
|||
s.add_development_dependency 'redcarpet'
|
||||
s.add_development_dependency 'github-markup'
|
||||
end
|
||||
|
||||
# Coveralls test coverage tool, basically hosted SimpleCov
|
||||
s.add_development_dependency 'coveralls'
|
||||
end
|
||||
|
|
|
@ -2,25 +2,22 @@ require File.expand_path('on_what', File.dirname(File.dirname(__FILE__)))
|
|||
|
||||
begin
|
||||
require 'simplecov'
|
||||
require 'coveralls'
|
||||
|
||||
# On Ruby 1.9+ use SimpleCov and publish to Coveralls.io
|
||||
if !on_1_8?
|
||||
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
||||
SimpleCov::Formatter::HTMLFormatter,
|
||||
Coveralls::SimpleCov::Formatter
|
||||
]
|
||||
SimpleCov.start do
|
||||
add_filter '/spec/' # exclude test code
|
||||
add_filter '/vendor/' # exclude gems which are vendored on Travis CI
|
||||
end
|
||||
|
||||
# Remove Docile, which was required by SimpleCov, to require again later
|
||||
Object.send(:remove_const, :Docile)
|
||||
$LOADED_FEATURES.reject! { |f| f =~ /\/docile\// }
|
||||
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
|
||||
|
||||
# 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/coveralls gems not found; skipping coverage'
|
||||
warn 'warning: simplecov or codecov gems not found; skipping coverage'
|
||||
end
|
||||
|
||||
lib_dir = File.join(File.dirname(File.dirname(__FILE__)), 'lib')
|
||||
|
|
Loading…
Reference in a new issue