Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.32 KB | None | 0 0
  1.       task :rcov_overlay do
  2.         path = ENV["FILE"]
  3.         rcov, eol = Marshal.load(File.read("coverage.info")).last[path], 1
  4.         puts rcov[:lines].zip(rcov[:coverage]).map { |line, coverage|
  5.           bol, eol = eol, eol + line.length
  6.           [bol, eol, "#ffcccc"] unless coverage
  7.         }.compact.inspect
  8.       end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement