Last active
December 28, 2015 06:48
-
-
Save scarolan/7459166 to your computer and use it in GitHub Desktop.
Guardfile for testing a Chef cookbook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Guardfile for testing this cookbook | |
guard :rubocop do | |
watch(%r{.+\.rb$}) | |
watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) } | |
end | |
guard :foodcritic, cookbook_paths: '.' do | |
watch(%r{attributes/.+\.rb$}) | |
watch(%r{providers/.+\.rb$}) | |
watch(%r{recipes/.+\.rb$}) | |
watch(%r{resources/.+\.rb$}) | |
end | |
guard :rspec do | |
watch(%r{^spec/.+_spec\.rb$}) | |
watch(%r{^(recipes)/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } | |
watch('spec/spec_helper.rb') { 'spec' } | |
end | |
guard :kitchen, all_on_start: false do | |
watch(%r{test/.+}) | |
watch(%r{^recipes/(.+)\.rb$}) | |
watch(%r{^attributes/(.+)\.rb$}) | |
watch(%r{^files/(.+)}) | |
watch(%r{^templates/(.+)}) | |
watch(%r{^providers/(.+)\.rb}) | |
watch(%r{^resources/(.+)\.rb}) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# These are required to work around some oddress | |
# Required for Growl notifications to work properly. | |
SafeYAML::OPTIONS[:deserialize_symbols] = true | |
SafeYAML::OPTIONS[:default_mode] = 'unsafe' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment