ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Ruby Coverage

by integrum ST2

Sublime Text 2 plugin integrating simplecov analysis and highlighting for Ruby

Details

  • 2013.04.11.20.00.25
  • github.​com
  • 11 years ago
  • 1 hour ago
  • 12 years ago

Installs

  • Total 5K
  • Win 2K
  • Mac 2K
  • Linux 1K
May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

SublimeRubyCoverage

A plugin for Sublime Text 2 that can highlight lines of Ruby lacking test coverage.

Installation

You will need to setup simplecov-sublime-ruby-coverage in your project.

Set up Sublime Package Control if you don't have it yet.

Go to Tools > Command Palette. Type Package Control: Install Package and hit enter. Type Ruby Coverage and hit enter.

Usage

To set color of the marks, add the following to your color scheme settings array:

<dict>
  <key>name</key>
  <string>coverage.uncovered</string>
  <key>scope</key>
  <string>coverage.uncovered</string>
  <key>settings</key>
  <dict>
    <key>foreground</key>
    <string>#ffff33</string>
  </dict>
</dict>

Ignoring Files

Add a .covignore file to your project root in order to add custom ignores.

Highlighting lines missing coverage

When you open a .rb file, SublimeRubyCoverage tries to find coverage information and highlight all uncovered lines with an outline.

It does this by looking in all parent directories until it finds a coverage/sublime-ruby-coverage directory as produced by simplecov-sublime-ruby-coverage. The coverage file is expected to have as many lines as the source file, with each line containing a 1 if the line is covered or a 0 if it is not.

You can force a reload of the coverage information and redraw of the outlines by running the show_ruby_coverage command, bound to super+shift+c by default.