Sha256: 717f93240a9baa4da37e392e9fe1780991022557cd8ce0ffe1452f80a33f4442
Contents?: true
Size: 554 Bytes
Versions: 15
Compression:
Stored size: 554 Bytes
Contents
module CodeClimate module TestReporter class ShortenFilename def initialize(filename) @filename = filename end def short_filename return @filename unless ::SimpleCov.root apply_prefix @filename.gsub(/^#{Regexp.escape(::SimpleCov.root)}/, ".").gsub(%r{^\./}, "") end private def apply_prefix(filename) if (prefix = CodeClimate::TestReporter.configuration.path_prefix) File.join(prefix, filename) else filename end end end end end
Version data entries
15 entries across 15 versions & 2 rubygems