class RShade::Configuration

Constants

RUBY_VERSION_PATTERN

Attributes

filter[RW]
formatter[RW]
track_gems[RW]

Public Class Methods

new() click to toggle source
# File lib/rshade/configuration.rb, line 7
def initialize
  @track_gems = Set.new
end

Public Instance Methods

excluded_paths() click to toggle source
# File lib/rshade/configuration.rb, line 11
def excluded_paths
  @excluded_paths ||= begin
    paths = [ENV['GEM_PATH'].split(':'), parse_ruby_version].flatten.compact
    paths.reject do |v|
      track_gems.any? { |gem_name| v.include? gem_name }
    end
  end
end
parse_ruby_version() click to toggle source
# File lib/rshade/configuration.rb, line 20
def parse_ruby_version
  val = RUBY_VERSION_PATTERN.match(ENV['GEM_PATH'])
  return nil unless val

  val[0]
end
root_dir() click to toggle source
# File lib/rshade/configuration.rb, line 39
def root_dir
  @root_dir ||= File.expand_path('../../', __dir__)
end
store_dir() click to toggle source
# File lib/rshade/configuration.rb, line 35
def store_dir
  File.expand_path('../../tmp', __dir__)
end