No commit activity in last 3 years
No release in over 3 years
Coverage console output formatter for SimpleCov.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

Gem Version

Simplecov_covview

simplecov_covview is a coverage viewer for SimpleCov.

This formatter Generates a console report of your SimpleCov ruby code coverage results on Ruby.

Installation

Add this line to your application's Gemfile:

gem 'simplecov_covview'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install simplecov_covview

Usage

require "simplecov"
require "simplecov_covview"

SimpleCov.formatter = SimpleCov::Formatter::CovView
# or
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
    SimpleCov::Formatter::HTMLFormatter,
    SimpleCov::Formatter::CovView
  ])

Output options:

8-colors colorized output (default)

  • The default color mode is 8-colors mode.
  • To enable 8-colors, enable use_8color and disable use_256color.
SimpleCov::Formatter::CovView.use_8color = true
SimpleCov::Formatter::CovView.use_256color = false

8 colors

256-colors colorized output

  • To enable 256-colors mode, enable use_256color.
  • use_256color has priority over use_8color.
SimpleCov::Formatter::CovView.use_8color = false
SimpleCov::Formatter::CovView.use_256color = true
# or
SimpleCov::Formatter::CovView.use_8color = true
SimpleCov::Formatter::CovView.use_256color = true

256 colors

No colorized output

Disabling 8-colors and 256-colors will result in no colorization.  

SimpleCov::Formatter::CovView.use_8color = false
SimpleCov::Formatter::CovView.use_256color = false

no colors

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/icm7216/simplecov_covview.

License

The gem is available as open source under the terms of the MIT License.