simplecov
simplecov copied to clipboard
Make log path relative in output message
The output message I get:
Coverage report generated for test:all to /home/rubyworks/Projects/all/tomparse/log/coverage. 412 / 469 LOC (87.85%) covered.
It would be nice if the log path was made relative to the current working path, so it could look like:
Coverage report generated for test:all to log/coverage. 412 / 469 LOC (87.85%) covered.
Yup, seems like a good idea.
The output message is generated in the method output_message in lib/simplecov-html.rb.
With require 'pathname' local_path = Pathname.new(output_path).relative_path_from(Pathname.new(Dir.pwd)) you can get the relative path of the coverage directory with standard Ruby libraries.
+1 for ability to write relative paths.
+1
A late night stab at this. It's broken and I'm tired. But perhaps it'll spark someone to find the right approach: https://gist.github.com/baburdick/6914399
Has there been any progress on this since Oct 10, 2013? If not, I can finish it.
I don't think there has been any progress on this @ptashman - PRs welcome :)