grosser / single_cov

Actionable code coverage.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow configuring app folders

ussu opened this issue · comments

Hi @grosser ,

The folders that belong in app/ are hard-coded

file_part[0...0] = if file_part =~ /^(?:#{RAILS_APP_FOLDERS.map { |f| Regexp.escape(f) }.join('|')})\//

I use the gem with Rails and I'd like to cover code in app that is not located in these specific folders :)
(or maybe someone could have a folder in lib that have one of these name ? although it seems less likely)
It would be great to at least allow the user to configure this list, or to make a more flexible guess!

What do you think?
Thanks,
Sulidi

RAILS_APP_FOLDERS is not frozen, so you can just edit it ... but ideally make a PR to make it officially configurable

thanks for the reply :)