Fix for #20 - Add Support for CLI options #21

Closed
wants to merge 3 commits into from

2 participants

@randomcoder

A simple fix to extract additional command line options from the arguments passed to the cucumber task that are not already handled by the plugin.

Adds support for:

  • --dry-run, -d
  • --strict, -s
  • --monochrone, -m

Also updated version for Scala 2.10 to the 2.10.0 final from the RC2

Tim Sheppard added some commits Jan 31, 2013
Tim Sheppard Extracted versions into new object and created new val for the cross …
…versions
08980a7
Tim Sheppard Added creation of options list
The inputs args are now parsed for tags, options and names.

Tags begin with `@` or `~@`
Options either begin with `--` or match `-[a-z]`
Names are all those args that are neither a Tag or an Option

The new Options list is now appended to the runner args.
046c5b1
Tim Sheppard Changed implementation of option checking to use a fixed whitelist of…
… supported options rather than pattern match.

This makes it much more robust and will not pass parameters that are not supported or handled by the plugin in a different way.
82647b6
@skipoleschris

Thanks for the patch. I used this as a basis for a fix as follows:

  • There is a new task cucumber-dry-run that runs cucumber with the --dry-run flag enabled
  • There is a new boolean setting cucumberStrict to enable or disable strict mode
  • There is a new boolean setting cucumberMonochrome to enable or disable monochrome mode

I think this fits better with the general approach of hiding the details of cucumber behind sbt settings. Hope that's oaky.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment