forked from sous-chefs/haproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Guardfile
28 lines (24 loc) · 799 Bytes
/
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
require 'cookstyle'
guard :rubocop, keep_failed: false, cli: '-r finstyle' do
watch(/.+\.rb$/) { |m| m[0] }
watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
end
guard 'foodcritic', cookbook_paths: '.', cli: '-C -t ~FC001' do
watch(%r{attributes/.+\.rb$})
watch(%r{providers/.+\.rb$})
watch(%r{recipes/.+\.rb$})
watch(%r{resources/.+\.rb$})
end
spec_path = 'test/unit'
rspec_guard_config = {
cmd: "bundle exec rspec --color --format progress --default-path=#{spec_path}",
all_on_start: true,
spec_paths: [spec_path],
}
guard 'rspec', rspec_guard_config do
watch(%r{^#{spec_path}/.+_spec\.rb$})
watch("#{spec_path}/spec_helper.rb") { spec_path }
watch(%r{^(libraries|providers|recipes|resources)/(.+)\.rb$}) do |m|
"#{spec_path}/#{m[2]}_spec.rb"
end
end