simplecov icon indicating copy to clipboard operation
simplecov copied to clipboard

Make log path relative in output message

Open trans opened this issue 12 years ago • 7 comments

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.

trans avatar Feb 10 '13 14:02 trans

Yup, seems like a good idea.

colszowka avatar Mar 23 '13 16:03 colszowka

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.

bhaak avatar May 03 '13 17:05 bhaak

+1 for ability to write relative paths.

greyblake avatar Jun 14 '13 07:06 greyblake

+1

baburdick avatar Aug 07 '13 00:08 baburdick

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

baburdick avatar Oct 10 '13 07:10 baburdick

Has there been any progress on this since Oct 10, 2013? If not, I can finish it.

ptashman avatar May 22 '15 20:05 ptashman

I don't think there has been any progress on this @ptashman - PRs welcome :)

PragTob avatar Dec 03 '19 16:12 PragTob