forked from yujinakayama/transpec
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGuardfile
More file actions
25 lines (21 loc) · 796 Bytes
/
Guardfile
File metadata and controls
25 lines (21 loc) · 796 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
25
ignore %r{^\.cache/}
# This group allows to skip running RuboCop if RSpec failed,
# like Red > Green (RSpec) > Refactor (RuboCop).
group :red_green_refactor, halt_on_fail: true do
guard :rspec, cmd: 'bundle exec rspec --format Fuubar' do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { 'spec' }
watch(%r{^spec/support/.+\.rb$}) { 'spec' }
end
guard :rubocop, all_on_start: false, cli: '--format fuubar' do
watch(%r{.+\.rb$})
watch(%r{.+\.rake$})
watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
end
guard :shell do
watch('README.md.erb') do
system('rake', 'readme') || n('Failed to build README.md', 'README Build Result', :failed)
end
end
end