From a7657d0dcf5f6bbc789136444ce0a8dcd947ee7f Mon Sep 17 00:00:00 2001 From: Daniel Magliola Date: Fri, 7 Jan 2022 00:19:54 +0000 Subject: [PATCH] Replace Coveralls with SimpleCov We've been having errors in CI from Coveralls, when trying to upload results. (As mentioned in [this comment](https://github.com/prometheus/client_ruby/pull/230#issuecomment-864561231)) This error seems to be because our coveralls gem is pretty old and abandoned, and probably using a TLS version that is no longer supported. (Reference: https://github.com/lemurheavy/coveralls-ruby/issues/163) One option recommended in that issue is to switch to a different `coveralls-ruby-reborn` gem. However, given that we only use `coveralls` to upload results to the cloud, only so we can have a badge in our README reporting 100%, in the interest of security, I think i'd rather get rid of `coveralls` altogether, and use `simplecov` directly instead, which reports the coverage when running the tests and doesn't upload them anywhere. Signed-off-by: Daniel Magliola --- Gemfile | 2 +- README.md | 1 - spec/spec_helper.rb | 8 +------- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Gemfile b/Gemfile index 3f36d705..ffd82038 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ source 'https://rubygems.org' gemspec group :test do - gem 'coveralls' + gem 'simplecov' gem 'json' gem 'rack' gem 'rack-test' diff --git a/README.md b/README.md index a5378800..a8925416 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ through a HTTP interface. Intended to be used together with a [![Gem Version][4]](http://badge.fury.io/rb/prometheus-client) [![Build Status][3]](https://circleci.com/gh/prometheus/client_ruby/tree/master.svg?style=svg) -[![Coverage Status][7]](https://coveralls.io/r/prometheus/client_ruby) ## Usage diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 80d04fb1..31000d69 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,17 +1,11 @@ # encoding: UTF-8 require 'simplecov' -require 'coveralls' RSpec.configure do |c| c.warnings = true end -SimpleCov.formatter = - if ENV['CI'] - Coveralls::SimpleCov::Formatter - else - SimpleCov::Formatter::HTMLFormatter - end +SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter SimpleCov.start