-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGuardfile
More file actions
24 lines (19 loc) · 726 Bytes
/
Guardfile
File metadata and controls
24 lines (19 loc) · 726 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env ruby
# ^syntax detection
require 'finstyle'
guard :rubocop, :keep_failed => false, :cli => '-r finstyle' do
watch(%r{.+\.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
rspec_opts = '--color --format progress'
guard 'rspec', :cmd => "bundle exec rspec #{rspec_opts}", :all_on_start => true do
watch(%r{^spec/.+_spec\.rb$})
watch('spec/spec_helper.rb') { 'spec' }
watch(%r{^(libraries|providers|recipes|resources)/(.+)\.rb$}) { |m| "spec/#{m[2]}_spec.rb" }
end