Skip to content
This repository has been archived by the owner on Jan 9, 2021. It is now read-only.

Commit

Permalink
update Guardfile
Browse files Browse the repository at this point in the history
  • Loading branch information
miketheman committed Nov 22, 2014
1 parent c1598fe commit d83f333
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions Guardfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
# Guardfile for automated testing

# guard 'kitchen' do
# guard 'kitchen', cli: ['-c 2'] do
# watch(%r{.kitchen.*/.+})
# watch(%r{test/.+})
# watch(%r{^recipes/(.+)\.rb$})
# watch(%r{^attributes/(.+)\.rb$})
Expand All @@ -11,25 +11,22 @@
# watch(%r{^resources/(.+)\.rb})
# end

guard 'foodcritic', cookbook_paths: '.', all_on_start: false do
guard :foodcritic, cookbook_paths: '.', cli: ['--epic-fail', 'any'] do
watch(%r{attributes/.+\.rb$})
watch(%r{providers/.+\.rb$})
watch(%r{recipes/.+\.rb$})
watch(%r{resources/.+\.rb$})
watch('metadata.rb')
end

guard 'rubocop', all_on_start: false do
watch(%r{attributes/.+\.rb$})
watch(%r{providers/.+\.rb$})
watch(%r{recipes/.+\.rb$})
watch(%r{resources/.+\.rb$})
watch('metadata.rb')
end

guard :rspec, cmd: 'bundle exec rspec', all_on_start: false, notification: false do
watch(%r{^libraries/(.+)\.rb$})
watch(%r{^spec/(.+)_spec\.rb$})
# ChefSpec tests
guard :rspec, cmd: 'bundle exec rspec', all_on_start: true do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^(recipes)/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { 'spec' }
end

guard :rubocop do
watch(%r{.+\.rb$})
watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
end

0 comments on commit d83f333

Please sign in to comment.