ordering of plugins

7 views
Skip to first unread message

Tim Hughes

unread,
Jan 2, 2016, 2:31:55 PM1/2/16
to guard-dev

I may be missing something in the docs so maybe someone can just point me in the right direction.

I have the following as my guard file.

-----------  Guardfile  ----------
group :test, halt_on_fail: true do
  guard 'rake', :task => 'test' do
    watch(%r{^manifests\/(.+)\.pp$})
    watch(%r{^spec\/classes/.+\.rb$})
    watch('spec/spec_helper.rb')
    watch('.fixtures.yml')
    watch('Gemfile')
  end

  guard 'rake', :task => 'beaker' do
    watch(%r{^manifests\/.+\.pp$})
    watch(%r{^spec\/acceptance/.+\.rb$})
    watch('spec/spec_helper_acceptance.rb')
    watch('.fixtures.yml')
    watch('Gemfile')
  end
end
---------------------------------

The second task is a lot longer than the first and I would like to make sure that they are run in order so the ":task => 'test'" runs before the ":task => 'beaker'". I was hoping the ordering in the Guardfile would be sufficient but sometimes the "beaker" task runs before the "test" task and I have to wait for it to complete.

Ideally I would like the "test" to run first and if it is successful then run the "beaker" task.

Thanks

Tim

Cezary Baginski

unread,
Apr 30, 2016, 5:14:47 PM4/30/16
to guard-dev

If the ordering doesn't work, it's probably a bug.

Can you open an issue and provide output from `bundle exec guard -d` where the order is wrong?

Or, you can open an issue, let me know and I'll prepare a special version of Guard to find out where the order gets messed up.

(If I can reproduce it reliably, I can fix it and release a fixed version very quickly).
Reply all
Reply to author
Forward
0 new messages