Sha256: 93e827744ecb6819937c3596125004af05bab60717f265dcaad996915b450b8d

Contents?: true

Size: 491 Bytes

Versions: 9

Compression:

Stored size: 491 Bytes

Contents

# Reads and writes external coverage files as BINARY
module MetricFu
  class RCovTestCoverageClient
    def initialize(coverage_file)
      @file_path = Pathname(coverage_file)
      @file_path.dirname.mkpath
    end

    def post_results(payload)
      mf_log "Saving coverage payload to #{@file_path}"
      dump(payload)
    end

    def load
      File.binread(@file_path)
    end

    def dump(payload)
      File.open(@file_path, "wb") { |file| file.write(payload) }
    end
  end
end

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
metric_fu-4.13.0 lib/metric_fu/metrics/rcov/external_client.rb
fastruby-metric_fu-5.0.0 lib/metric_fu/metrics/rcov/external_client.rb
code_metric_fu-4.14.4 lib/metric_fu/metrics/rcov/external_client.rb
code_metric_fu-4.14.3 lib/metric_fu/metrics/rcov/external_client.rb
code_metric_fu-4.14.2 lib/metric_fu/metrics/rcov/external_client.rb
code_metric_fu-4.14.1 lib/metric_fu/metrics/rcov/external_client.rb
code_metric_fu-4.14.0 lib/metric_fu/metrics/rcov/external_client.rb
metric_fu-4.12.0 lib/metric_fu/metrics/rcov/external_client.rb
metric_fu-4.11.4 lib/metric_fu/metrics/rcov/external_client.rb