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

Run different task depending on changed file #15

Open
jmuheim opened this issue Jul 13, 2012 · 1 comment
Open

Run different task depending on changed file #15

jmuheim opened this issue Jul 13, 2012 · 1 comment

Comments

@jmuheim
Copy link

jmuheim commented Jul 13, 2012

I like your gem, but it's seems very limiting that only one specific rake task can be run after changing several files.

It would be nicer to have something like this:

guard 'rake' do
  watch('db/seeds.rb') { 'db:seed' }
end
@jmuheim
Copy link
Author

jmuheim commented Jul 13, 2012

Okay, I just found out that it's possible to have many of these rake guards living next to each other:

guard 'rake' do
  watch('db/seeds.rb') { 'db:seed' }
end

guard 'rake' do
  watch('bla.rb') { 'bla' }
end

Maybe you could point this out in the documentation. And still, somehow this feels more natural to me:

guard 'rake' do
  watch('db/seeds.rb') { 'db:seed' }
end

But maybe it's an (unwritten?) law that the block after watch(...) always only must return a path to a file...?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant