codegram/guard-spinach — pull request #4 by wojtha (2013-02-25 17:52:05+00:00)
Title: Additional options

This pull request is based on [fork](https://github.com/mattconnolly/guard-spinach) by @mattconnolly who added the `all_on_start` option and [fork](https://github.com/keyvanfatehi/guard-spinach) by @keyvanfatehi who added the `generate` option.

And my contribution is `command_prefix` which is inpired by the [similar functionality](https://github.com/guard/guard-cucumber/pull/3) of the *guard-cucumber* gem, and some tests. I'm using this option currently in conjuction with Zeus.

### Options

all_on_start

Boolean. Run all features on start.

generate

Boolean. Auto generate missing step files during each run.

command_prefix

String. Allows you to inject something before the `spinach` command. E.g. `zeus spinach`.

### Example Guardfile snippet

```ruby
guard 'spinach', command_prefix: 'zeus', all_on_start: true, generate: true do
watch(%r|^features/(.*)\.feature|)
watch(%r|^features/steps/(.*)([^/]+)\.rb|) do |m|
"features/#{m[1]}#{m[2]}.feature"
end
end
```