mirror of
https://github.com/ditkrg/simplecov-json.git
synced 2026-01-23 06:16:45 +00:00
only call .to_json once
This commit is contained in:
parent
dc62eda478
commit
0ff743fbd3
@ -23,11 +23,14 @@ class SimpleCov::Formatter::JSONFormatter
|
|||||||
total_lines: result.total_lines
|
total_lines: result.total_lines
|
||||||
}
|
}
|
||||||
|
|
||||||
|
json = data.to_json
|
||||||
|
|
||||||
File.open(output_filepath, "w+") do |file|
|
File.open(output_filepath, "w+") do |file|
|
||||||
file.puts data.to_json
|
file.puts json
|
||||||
end
|
end
|
||||||
puts output_message(result)
|
puts output_message(result)
|
||||||
data.to_json
|
|
||||||
|
json
|
||||||
end
|
end
|
||||||
|
|
||||||
def output_filename
|
def output_filename
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user