Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support 'run_on_start' config option #3

Open
olliebennett opened this issue Jan 3, 2017 · 1 comment · May be fixed by #4
Open

Support 'run_on_start' config option #3

olliebennett opened this issue Jan 3, 2017 · 1 comment · May be fixed by #4

Comments

@olliebennett
Copy link

I'd like to be able to avoid running Consistency Fail when Guard starts up. It takes time, and is not important to me until I change the model/schema files. A configuration option for this would be useful. It would still be possible to hit to manually run everything.

The RuboCop Guard Plugin supports this through all_on_start: false - see implementation.

The RSpec Guard Plugin also supports all_on_start: false (false is actually the default) - see implementation.

It should be quite quick to duplicate this functionality for this plugin. Perhaps the option run_on_start is a better name, because "all" doesn't really make sense for consistency_fail, however.

The (optional) config would become:

guard :consistency_fail, run_on_start: false do
  watch(%r{^app/model/(.+)\.rb})
  watch(%r{^db/schema.rb})
end

Does this sound useful? If so, I can put together a PR.

@ptyagi16
Copy link
Owner

ptyagi16 commented Jan 4, 2017

Sounds good @olliebennett Please send a PR

yld pushed a commit to yld/guard-consistency_fail that referenced this issue Feb 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants