Skip to content

Commit

Permalink
Replace Coveralls with SimpleCov
Browse files Browse the repository at this point in the history
We've been having errors in CI from Coveralls, when trying to upload results.
(As mentioned in [this comment](#230 (comment)))

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: lemurheavy/coveralls-ruby#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.
  • Loading branch information
dmagliola committed Jan 7, 2022
1 parent 853a839 commit 998b1f3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source 'https://rubygems.org'
gemspec

group :test do
gem 'coveralls'
gem 'simplecov'
gem 'json'
gem 'rack'
gem 'rack-test'
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 1 addition & 7 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 998b1f3

Please sign in to comment.