Sha256: fa845e6b15a8bbb8872633e074a2796191306e683b8c5efdea697f20f21783a1
Contents?: true
Size: 500 Bytes
Versions: 12
Compression:
Stored size: 500 Bytes
Contents
require "json" module SimpleCov module LastRun class << self def last_run_path File.join(SimpleCov.coverage_path, ".last_run.json") end def read return nil unless File.exist?(last_run_path) json = File.read(last_run_path) return nil if json.strip.empty? JSON.parse(json) end def write(json) File.open(last_run_path, "w+") do |f| f.puts JSON.pretty_generate(json) end end end end end
Version data entries
12 entries across 12 versions & 5 rubygems