Simplecov Tailwind Documentation

website·Indexed 31 days ago

https://simplecov-tailwind.chiefpansancolt.dev/

Documentation for Simplecov Tailwind, including installation guides via Ruby Gems, setup instructions, and version 2.2.0 change logs.

Tokens
1.2K
Snippets
6
Records
11
Agent score
62%

What's inside Simplecov Tailwind

  1. Submit a Pull Request to Simplecov Tailwind

    To ensure a pull request is considered by maintainers, follow these requirements:

    1. Complete all instructions in the provided Pull Request template.
    2. Verify that all status checks are passing after submission.
    3. If a status check fails and you believe it is unrelated to your changes, leave a comment on the PR explaining why; a maintainer will then re-run the check.

    Note: Reviewers may request additional design work, tests, or changes before the PR is accepted.

  2. Install Simplecov Tailwind via RubyGems

    Add simplecov and simplecov-tailwindcss to the :test group in your Gemfile to make the Tailwind formatter available for your application.
    # ./Gemfile
    group :test do
      gem 'simplecov', require: false
      gem 'simplecov-tailwindcss', require: false
    end
  3. Report a bug in Simplecov Tailwind

    Before submitting a bug report, check the existing open bug issues to avoid duplicates. When creating a report, use the official bug report form and provide as many details as possible to help maintainers reproduce the behavior. If you find a closed issue that matches your experience, open a new issue and include a link to the original closed issue in the body.
  4. Suggest enhancements for Simplecov Tailwind

    To suggest new features or minor improvements, first check the existing open enhancement issues. Use the feature request form and include detailed descriptions, including the imagined steps/workflow for how the requested feature would be used.
  5. Install Simplecov Tailwind via GitHub Packages

    If the gem is hosted on GitHub Packages, add the specific source URL to your Gemfile before declaring the simplecov-tailwindcss dependency.
    # ./Gemfile
    group :test do
      gem "simplecov", require: false
    end
    
    source "https://rubygems.pkg.github.com/chiefpansancolt"
    group :test do
      gem "simplecov-tailwindcss", require: false
    end
  6. Install Simplecov and Simplecov Tailwindcss dependencies

    Simplecov Tailwindcss is a replacement formatter for Simplecov. Before installing the Tailwindcss formatter, ensure that the base simplecov gem is added to your project's Gemfile within the test group.
    # ./Gemfile
    
    group :test do
      gem 'simplecov', require: false
    end
  7. Configure Simplecov to use the Tailwindcss Formatter

    To use Simplecov Tailwindcss, you must require the library and set the formatter in your Simplecov configuration helper. You can use it as a single formatter or as part of a MultiFormatter if you want to generate multiple report types (e.g., both standard HTML and Tailwindcss).
    require 'simplecov-tailwindcss'
    
    # Option 1: Single Formatter Usage
    SimpleCov.formatter = SimpleCov::Formatter::TailwindFormatter
    
    # Option 2: Multi Formatter Usage
    SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new(
      [SimpleCov::Formatter::HTMLFormatter, SimpleCov::Formatter::TailwindFormatter]
    )
  8. Configure Simplecov to use the Tailwind Formatter

    To use Simplecov Tailwind, you must require the gem and set the formatter in your test helper. You can use it as a single formatter or as part of a MultiFormatter to generate multiple report types (e.g., HTML and Tailwind).
    require 'simplecov-tailwindcss'
    
    # Option 1: Single Formatter Usage
    SimpleCov.formatter = SimpleCov::Formatter::TailwindFormatter
    
    # Option 2: Multi Formatter Usage (HTML + Tailwind)
    SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new(
      [SimpleCov::Formatter::HTMLFormatter, SimpleCov::Formatter::TailwindFormatter]
    )
  9. Implement Simplecov Tailwind in a Minitest helper

    Example integration of Simplecov with a custom profile and the Tailwind formatter within a test/test_helper.rb file.
    # test/test_helper.rb
    require 'simplecov'
    require 'simplecov-tailwindcss'
    
    SimpleCov.profiles.define 'migrator_profile' do
      load_profile 'test_frameworks'
    
      add_filter %r{^/config/}
      add_filter %r{^/db/}
      add_filter %r{^/vendor/}
    
      add_group 'Controllers', 'app/controllers'
      add_group 'Helpers', 'app/helpers'
      add_group 'Channels', 'app/channels'
      add_group 'Models' do |src|
        src.filename.include?('app/models') && !src.filename.include?('app/models/factories') &&
          !src.filename.include?('app/models/salesforce_objects')
      end
      add_group 'Factories', 'app/models/factories'
      add_group 'Salesforce Objects', 'app/models/salesforce_objects'
      add_group 'Jobs', 'app/jobs'
      add_group 'Generators', 'lib/generators'
    
      track_files '{app,lib}/**/*.rb'
    end
    
    SimpleCov.start 'migrator_profile'
    SimpleCov.minimum_coverage 90
    SimpleCov.formatter = SimpleCov::Formatter::TailwindFormatter
  10. Simplecov Tailwindcss Formatter Features

    The Tailwindcss formatter provides an enhanced HTML coverage report with the following features:

    • Tabular view for Groupings
    • File name searches
    • Modal view of File Coverage (triggered by clicking a row)
    • Tile views for group statistics
    • Branch coverage support
    • Dark Mode support
    • Persistence of sort, search, and open files on page refresh
    • Slideover view for File Details