module EasyCov::Filters

Constants

IGNORE_GEMS

Ignore all gems (uses GEM_PATH if set, else /gems/ in filename)

IGNORE_OUTSIDE_ROOT

Ignore all filfes outside EasyCov.root (pwd by default)

IGNORE_STDLIB

Ignore all ruby STDLIB files

IGNORE_TESTS

Ignore files in <root>/test/ and <root>/.test/

IGNORE_VENDOR

Ignore files in <root>/vendor/

Public Class Methods

stdlib_paths() click to toggle source

Get the list of STDLIB load paths

# File lib/easycov/filters.rb, line 7
def stdlib_paths
  return @stdlib_paths if !@stdlib_paths.nil?

  # see if we have a cached answer
  if ENV["EASYCOV_STDLIB_PATHS"] then
    @stdlib_paths = ENV["EASYCOV_STDLIB_PATHS"].split(/:/)
    return @stdlib_paths
  end

  # load
  opt, lib = ENV.delete("RUBYOPT"), ENV.delete("RUBYLIB")
  @stdlib_paths = `ruby -e 'puts $:'`.strip.split(/\n/)
  ENV["RUBYOPT"] = opt
  ENV["RUBYLIB"] = lib
  ENV["EASYCOV_STDLIB_PATHS"] = @stdlib_paths.join(":")

  return @stdlib_paths
end