Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to include code outside of project root #81

Closed
bjeanes opened this issue Sep 20, 2011 · 3 comments
Closed

Ability to include code outside of project root #81

bjeanes opened this issue Sep 20, 2011 · 3 comments
Labels

Comments

@bjeanes
Copy link

bjeanes commented Sep 20, 2011

Use-case: uncovering and removing un-needed dependencies from large applications

I work on a HUGE application with 50+ gems as dependencies. It's become evident that there are a few gems that were included early on in the project's life that may no longer be necessary or that may be rarely used (maybe one method from it is needed, for example).

The more dependencies there are, the slower the application is when running the tests, starting the app, running rake tasks, starting the console, etc. Finding the least-used gems by using a coverage tool when running the complete suite of specs/cukes would be an ideal way to remedy this problem.

@colszowka
Copy link
Collaborator

Yes, this is a reasonable use case and should be possible. I'll look into adding this. For the time being, you could just git clone simplecov into a dir above your project, then specify in your Gemfile for Simplecov:

if File.exist?(File.join(File.dirname(__FILE__), '../simplecov'))
  gem 'simplecov', :path => File.join(File.dirname(__FILE__), '../simplecov')
else
  gem 'simplecov', '>= 0.5.3', :require => false
end

This will allow you to manipulate simplecov/lib/defaults.rb - comment the adapter loading of root_filter there on line 37. Of course you could also fork and use the git path instead of a local path - that would give you the ability to ditch the if statement in the Gemfile and just always use your forked version of the gem everywhere.

@seeflanigan
Copy link

+1

@bf4
Copy link
Collaborator

bf4 commented May 17, 2015

Closing as stale. Please reopen if this is still an issue. (And take a look at #340 )

@bf4 bf4 closed this as completed May 17, 2015
@simplecov-ruby simplecov-ruby locked and limited conversation to collaborators May 17, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants