grosser/parallel_tests — pull request #341 by movitto (2014-09-28 14:22:57+00:00)
Title: Add env flag to toggle bundler usage

Hey thx for the great lib. Ran into an issue similar to #306. Have a project Gemfile committed for travis / automated build systems / and such but don't typically use it locally (custom dev env).

When I run rspec via the parallel_tests rake task, the bundler_enabled? method in lib/parallel_tests, detects my gemfile and enables bundler, resuling in "bundle show rspec-core" getting executed in lib/rspec/runner.rb#determine_executable. This fails (again bundler not used / avail in certain environments) resulting in parallel_tests using / falling back to executing the 'spec' resulting in:

bundler: command not found: spec
Install missing gem executables with `bundle install`

Threw together a patch where bundler could be manually enabled / disabled via an env variable. Alternative solutions could be devised, though thought this was a simple / flexible way offering more control. Again thanks for the lib.

-Mo