Guardfile 1.1 KB

12345678910111213141516171819202122232425
  1. guard 'livereload' do
  2. watch(%r{app/views/.+\.(erb|haml|slim)$})
  3. watch(%r{app/helpers/.+\.rb})
  4. watch(%r{public/.+\.(css|js|html)})
  5. watch(%r{config/locales/.+\.yml})
  6. # Rails Assets Pipeline
  7. watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html|png|jpg))).*}) { |m| "/assets/#{m[3]}" }
  8. end
  9. guard :rspec, cmd: 'bundle exec spring rspec' do
  10. watch(%r{^spec/.+_spec\.rb$})
  11. watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
  12. watch('spec/spec_helper.rb') { "spec" }
  13. # Rails example
  14. watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
  15. watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
  16. watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
  17. watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
  18. watch('config/routes.rb') { "spec/routing" }
  19. watch('app/controllers/application_controller.rb') { "spec/controllers" }
  20. watch('spec/rails_helper.rb') { "spec" }
  21. end