class CoverallsMulti::Formatter::Lcov
formats lcov coverage results files before merge + push to Coveralls
Public Instance Methods
run(file_path)
click to toggle source
convert lcov files using the coveralls-lcov gem
# File lib/coveralls-multi/formatters/lcov.rb, line 10 def run(file_path) converter = Coveralls::Lcov::Converter.new(file_path) file = converter.convert # HACK: stringify keys without iterating over the whole array of hashes JSON.parse(JSON.dump(file[:source_files])) rescue StandardError, SystemExit => e puts "[CoverallsMulti] There was a problem converting the lcov file at #{file_path}." puts '[CoverallsMulti] Make sure the file exists.' raise e end