Sha256: 04173716f247d55e87e5f127ae192ef046f31b52c1fe9a279be4844af9129391

Contents?: true

Size: 440 Bytes

Versions: 38

Compression:

Stored size: 440 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.parse(File.read(last_run_path))
      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

38 entries across 38 versions & 10 rubygems

Version Path
dirwatch-0.0.9 vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/lib/simplecov/last_run.rb
dirwatch-0.0.8 vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/lib/simplecov/last_run.rb
dirwatch-0.0.6 vendor/bundle/ruby/2.3.0/gems/simplecov-0.13.0/lib/simplecov/last_run.rb
dirwatch-0.0.5 vendor/bundle/ruby/2.3.0/gems/simplecov-0.13.0/lib/simplecov/last_run.rb
dirwatch-0.0.4 vendor/bundle/ruby/2.3.0/gems/simplecov-0.13.0/lib/simplecov/last_run.rb
dirwatch-0.0.3 vendor/bundle/ruby/2.3.0/gems/simplecov-0.13.0/lib/simplecov/last_run.rb
dirwatch-0.0.2 vendor/bundle/ruby/2.3.0/gems/simplecov-0.13.0/lib/simplecov/last_run.rb
simplecov-0.13.0 lib/simplecov/last_run.rb
abaci-0.3.0 vendor/bundle/gems/simplecov-0.12.0/lib/simplecov/last_run.rb
ivanvc-logstash-input-s3-3.1.1.4 vendor/local/gems/simplecov-0.12.0/lib/simplecov/last_run.rb
ivanvc-logstash-input-s3-3.1.1.3 vendor/local/gems/simplecov-0.12.0/lib/simplecov/last_run.rb
ivanvc-logstash-input-s3-3.1.1.2 vendor/local/gems/simplecov-0.12.0/lib/simplecov/last_run.rb
cvss-suite-1.0.8 vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/last_run.rb
simplecov-0.12.0 lib/simplecov/last_run.rb
cvss-suite-1.0.7 vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/last_run.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/simplecov-0.11.2/lib/simplecov/last_run.rb
cvss-suite-1.0.6 vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/last_run.rb
cvss-suite-1.0.5 vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/last_run.rb
cvss-suite-1.0.4 vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/last_run.rb
cvss-suite-1.0.3 vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/lib/simplecov/last_run.rb