No commit activity in last 3 years
No release in over 3 years
Shields Badget Simplecov Formatter
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 5.10
~> 0.3
~> 12.1

Runtime

~> 0.15
 Project Readme

simplecov-shields-badge

Build Status Coverage

A simplecov formatter that generates a shields.io badge and uploads to gh-pages

Examples

Coverage 20% Coverage 40% Coverage 60% Coverage 80% Coverage 90% Coverage 100%

Usage

Add to your Gemfile

group :test do
  gem 'simplecov-shields-badge', require: false
end

Add to your README.md

 [![Coverage](https://USERNAME.github.io/REPO/badge.svg)](https://github.com/USERNAME/REPO)

Add to the top of your tests/helper.rb file

require 'simplecov'
SimpleCov.start

require 'shields_badge'
SimpleCov.formatter = SimpleCov::Formatter::ShieldsBadge

In your CI Environment Variables

GITHUB_USER="a github username"
GITHUB_MAIL="github user email"
GITHUB_ORG="github organization or username"
GITHUB_REPO="github repo name"
GITHUB_ACCESS_TOKEN="github access token with commit permission"