On Tue, Jan 18, 2011 at 1:31 PM, David C. [email protected]
wrote:
It also turns out that autotest has a bundler plugin that prefixes the command
with ‘bundle exec’. To use an autotest plugin, you just require it in a .autotest
file in the project root. In this case:
def using_bundler?
File.exists?(‘./Gemfile’) && !defined Autotest::Bundler # and
also check for the option if you decide to do #1
end
I actually did implement a --skip-bundler option (not yet released), but it has
to be passed like this:
autotest – --skip-bundler
Considering that this is a total hack, and that I’d be removing it at the next
major release anyway, I really don’t want to introduce a hack on top of a hack.
I’d sooner do a 3.0 release now.
I’m still trying to understand what you are proposing to change, and
what it breaks.
I guess you are proposing that the  rspec autotest extension would
never prefix the rspec command with ‘bundle exec’ and this would break
folks using autotest with rspec who haven’t changed their .autotest
file.
And that you think that you should bump the whole rspec suite to
version 3 because of this? I guess this is because the autotest
‘extension’ isn’t really an extension, it’s in rspec-core.
What about those of us using other alternatives to autotest, e.g.
guard?  I just looked at the guard code and changing rspec as a whole
to version 3 would break guard since it checks specifically for rspec
version 1 vs. 2 in order to determine whether to use ‘spec’ or ‘rspec’
as the base command.
If you bump rspec to v3 because of this, it looks like guard users
will need to freeze on rspec 2, at least until the author of
guard-rspec catches up.  I guess that’s OK unless the latter takes too
long, and rspec continues to improve only on the version 3 branch.
That probably wouldn’t happen, and if it does I could fork guard-rspec
myself I guess.
But if you do, I think you should also break out the autotest
extension into a separate gem which is NOT required by rspec-core,
much like Rails 3 broke out ‘most-favored’ things like Test::Unit and
put alternatives like, say RSpec, and Cucumber on more of an equal
footing.
–
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: rubyredrick (Rick DeNatale) · GitHub
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale