skalnik/vim-vroom — pull request #27 by metalelf0 (2012-09-11 14:03:00+00:00)
Title: Add vroom_rspec_version to fix crash when use_colors == 0 on rspec 1.x

I wrote this to fix a misbehaviour with the `vroom_use_colors` option.

Starting with rspec 2.x the `--no-color` option has been introduced. So consider this scenario:

rspec version: 1.x
g:vroom_use_colors = 0
g:vroom_spec_command = 'spec '

Even if it is possible to launch specs by changing the spec_command, the command would fail, because there is no `--no-color` option in rspec 1.x.

So, instead of adding another option (like, `g:vroom_no_color_switch`), I preferred to add the rspec version directly and use it in the `s:SetColorFlag()` function.

This could be used also to set the rspec executable name automatically (`rspec` on 2.x, `spec` on 1.x) but I'd like to know what you think about it.