forked from Sous-Chefs-Boneyard/sysctl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Guardfile
36 lines (32 loc) · 1.06 KB
/
Guardfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# More info at https://github.com/guard/guard#readme
scope :group => :unit
group :unit do
guard :rubocop do
watch(%r{.+\.rb$})
watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
end
guard :foodcritic, :cli => '--epic-fail any --tags ~FC007 --tags ~FC015 --tags ~FC023', :cookbook_paths => '.', :all_on_start => false do
watch(%r{attributes/.+\.rb$})
watch(%r{providers/.+\.rb$})
watch(%r{recipes/.+\.rb$})
watch(%r{resources/.+\.rb$})
watch(%r{definitions/.+\.rb$})
end
guard :rspec, :cmd => 'bundle exec rspec --color --fail-fast', :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
end
group :integration do
guard :kitchen 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
end