Sha256: 5ccffc6dd3b15ca1dceb6e0677fdb2cc09f08d5554f88b0e9b428c54dbbb5fd2
Contents?: true
Size: 700 Bytes
Versions: 9
Compression:
Stored size: 700 Bytes
Contents
#!/usr/bin/env ruby # frozen_string_literal: true # Borrowed from https://gist.github.com/qortex/7e7c49f3731391a91ee898336183acef # Temporary hack to get CodeClimate to work with SimpleCov 0.18 JSON format until issue is fixed # upstream: https://github.com/codeclimate/test-reporter/issues/413 require "json" filename = "coverage/.resultset.json" contents = JSON.parse(File.read(filename)) def remove_lines_key(obj) case obj when Hash obj.transform_values do |val| val.is_a?(Hash) && val.key?("lines") ? val["lines"] : remove_lines_key(val) end else obj end end # overwrite File.write(filename, JSON.generate(remove_lines_key(contents))) puts Dir['coverage/.*.json']
Version data entries
9 entries across 9 versions & 4 rubygems