guard / guard-cucumber

Guard::Cucumber automatically run your features (much like autotest)
https://rubygems.org/gems/guard-cucumber
MIT License
86 stars 36 forks source link

Standardize command line args #30

Closed hron closed 8 years ago

hron commented 8 years ago

Current scheme of command line args in guard-cucumber is very sophisticated. However it doesn't allow to use tools like parallel_tests.

This change standardize command line args with guard-rspec gem. The implemented change deprecates a lot of options, but it allows to use all of them by utilizing :cmd option.

e2 commented 8 years ago

Really cool patch and cleanup, thanks! I like how you're using Guard::RSpec as a reference. (Both these plugins have a lot in common).

Also, recent parallel_tests has a -- option, which kind of helps manage RSpec and Parallel test options:

https://github.com/grosser/parallel_tests#setup-for-non-rails

I'll release this as 2.0.0 . I don't think a deprecation version is needed, since migrating should be trivial.

e2 commented 8 years ago

Released as v2.0.0.

Thanks again!

sentience commented 8 years ago

Migration may be trivial, but it should still be documented. Any plans to update the changelog for 2.0? I could try contributing something, but I’d have to read the code change to work out what the correct approach for migrating might be.

e2 commented 8 years ago

@sentience - yes, sorry, I've been using GitHub releases instead of the changelog, but I didn't link it.

See here: https://github.com/guard/guard-cucumber/releases

sentience commented 8 years ago

@e2 Am I missing something? That release note doesn’t document the migration process either. As far as I can see, it just links to the code change, which is pretty tough to parse.

e2 commented 8 years ago

@sentience - yes, I guess the Readme could have a small migration section. The change is mostly cleanup and renaming options.

Personally, I'd just show an error when there are unrecognized options (some other plugins probably do that already).

The basic change is going from :cli, :cmd_prefix, :bundler, :binstubs and to just :cmd and :cmd_additional_args (less options, clearer, easier to setup more complex scenarios).

If you submit a PR for this, I'll gladly accept it.