cookbook-pacemaker/Guardfile
2014-01-30 15:17:59 +00:00

36 lines
800 B
Ruby

#!/usr/bin/ruby
#
# More info at https://github.com/guard/guard#readme
guard_opts = {
all_on_start: true,
all_after_pass: true,
}
def all_specs
'spec'
end
group :rspec do
guard 'rspec', guard_opts do
watch(%r{^Gemfile$}) { all_specs }
watch(%r{^Gemfile.lock$}) { all_specs }
watch(%r{^spec/spec_helper\.rb$}) { all_specs }
watch(%r{^spec/helpers/(.+)\.rb$}) { all_specs }
watch(%r{^libraries/pacemaker\.rb$}) { all_specs }
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^libraries/pacemaker/(.+)\.rb$}) { |m|
"spec/libraries/#{m[1]}_spec.rb"
}
watch(%r{^(resources|providers)/(.+)\.rb$}) { |m|
"spec/providers/#{m[1]}_spec.rb"
}
end
end
group :bundler do
guard 'bundler' do
watch('Gemfile')
end
end