Created
March 8, 2012 20:25
-
-
Save czj/2003204 to your computer and use it in GitHub Desktop.
Sample Guardfile for spork+guard+rails+livereload
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A sample Guardfile | |
# More info at https://github.com/guard/guard#readme | |
guard 'livereload' do | |
watch(%r{app/.+\.(erb|haml)}) | |
watch(%r{app/helpers/.+\.rb}) | |
watch(%r{(public/|app/assets).+\.(css|js|html)}) | |
watch(%r{(app/assets/.+\.css)\.s[ac]ss}) { |m| m[1] } | |
watch(%r{(app/assets/.+\.js)\.coffee}) { |m| m[1] } | |
watch(%r{config/locales/.+\.yml}) | |
end | |
guard 'spork', :rspec => false, :cucumber => false do | |
watch('config/application.rb') | |
watch('config/environment.rb') | |
watch(%r{^config/environments/.+\.rb$}) | |
watch(%r{^config/initializers/.+\.rb$}) | |
watch('Gemfile') | |
watch('Gemfile.lock') | |
watch('test/test_helper.rb') { :test_unit } | |
end | |
guard 'minitest', :drb => true do | |
watch(%r{^lib/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" } | |
watch(%r{^test/.+_test\.rb$}) | |
watch('test/test_helper.rb') { "test" } | |
watch(%r{^app/models/(.+)\.rb$}) { |m| "test/unit/#{m[1]}_test.rb" } | |
watch(%r{^app/controllers/(.+)\.rb$}) { |m| "test/functional/#{m[1]}_test.rb" } | |
watch(%r{^app/views/.+\.rb$}) { "test/integration" } | |
watch('app/controllers/application_controller.rb') { ["test/functional", "test/integration"] } | |
end | |
guard 'i18n' do | |
watch(%r{config/locales/.+\.yml$}) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment