-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathGuardfile
29 lines (27 loc) · 1.28 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
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
group :livereload do
guard 'livereload' do
watch(%r{app/searchers/quick_search/.+\.rb})
watch(%r{app/controllers/quick_search/.+\.rb})
watch(%r{app/views/quick_search/.+\.(erb|haml|slim)$})
watch(%r{app/helpers/quick_search/.+\.rb})
watch(%r{public/.+\.(css|js|html)})
watch(%r{config/locales/.+\.yml})
# Rails Assets Pipeline
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html))).*}) { |m| "/assets/#{m[3]}" }
end
end
group :test do
guard :minitest do
# FIXME: add a callback that adds a separator on each test run
# Rails 4
watch(%r{^app/(.+)\.rb}) { 'test' } #{ |m| "test/#{m[1]}_test.rb" }
watch(%r{^app/controllers/quick_search/application_controller\.rb}) { 'test' }#{ 'test/controllers' }
watch(%r{^app/controllers/quick_search/(.+)_controller\.rb}) { 'test' } #{ |m| "test/integration/#{m[1]}_test.rb" }
watch(%r{^app/views/quick_search/(.+)_mailer/.+}) { 'test' } #{ |m| "test/mailers/#{m[1]}_mailer_test.rb" }
watch(%r{^lib/(.+)\.rb}) { 'test' } #{ |m| "test/lib/#{m[1]}_test.rb" }
watch(%r{^test/.+_test\.rb})
watch(%r{^test/test_helper\.rb}) { 'test' }
end
end