From cd7b3f54f1617294decc70f0858bcf180db7fba4 Mon Sep 17 00:00:00 2001 From: Fabian Rodriguez Date: Fri, 27 Feb 2015 22:41:32 -0200 Subject: [PATCH] Removes the following deprecation warning: 'method adapters is deprecated. use profiles instead' This warning was showing up because the project was using the gem 'simplecov-gem-adapter' which uses the old syntax. * Remove the gem dependency * Add a profile with the same setup that the gem has --- Gemfile | 1 - lib/simplecov_custom_profile.rb | 13 +++++++++++++ test/helper.rb | 3 +-- 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 lib/simplecov_custom_profile.rb diff --git a/Gemfile b/Gemfile index d695524b..f29e4abd 100644 --- a/Gemfile +++ b/Gemfile @@ -19,7 +19,6 @@ gem 'maruku', '~> 0.7.0' gem 'rdiscount', '~> 2.0' gem 'launchy', '~> 2.3' gem 'simplecov', '~> 0.9' -gem 'simplecov-gem-adapter', '~> 1.0.1' gem 'mime-types', '~> 1.5' gem 'activesupport', '~> 3.2.13' gem 'jekyll_test_plugin' diff --git a/lib/simplecov_custom_profile.rb b/lib/simplecov_custom_profile.rb new file mode 100644 index 00000000..eebb8fbe --- /dev/null +++ b/lib/simplecov_custom_profile.rb @@ -0,0 +1,13 @@ +require 'simplecov' + +SimpleCov.profiles.define 'gem' do + add_filter '/test/' + add_filter '/features/' + add_filter '/spec/' + add_filter '/autotest/' + + add_group 'Binaries', '/bin/' + add_group 'Libraries', '/lib/' + add_group 'Extensions', '/ext/' + add_group 'Vendor Libraries', '/vendor/' +end diff --git a/test/helper.rb b/test/helper.rb index 257b2db9..4efa1f96 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -1,5 +1,4 @@ -require 'simplecov' -require 'simplecov-gem-adapter' +require 'simplecov_custom_profile' SimpleCov.start('gem') do add_filter "/vendor/bundle" add_filter "/vendor/gem"