topaz2/chef_boilerplate_php

View on GitHub
Guardfile

Summary

Maintainability
Test Coverage
guard 'foodcritic', cookbook_paths: '.', cli: '--tags ~FC001 --tags ~FC014', 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 '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 do
  watch(%r{^libraries/(.+)\.rb$})
  watch(%r{^spec/(.+)_spec\.rb$})
  watch(%r{^(recipes)/(.+)\.rb$})   { |m| "spec/#{m[1]}_spec.rb" }
  watch('spec/spec_helper.rb')      { 'spec' }
end