scube-server/Guardfile
Thibault Jouan 35be3e21b6 Improve guard config
* Watch changes on controllers;
* Simplify pattern for support watch;
* Use more specific patterns for views;
* Remove deprecated rule on lib directory.
2015-05-01 18:05:00 +00:00

27 lines
909 B
Ruby

directories %w[app config spec]
guard :spork, rspec_env: { RAILS_ENV: 'test' } do
watch('config/application.rb')
watch('config/environment.rb')
watch(%r{^config/environments/.+\.rb$})
watch(%r{^config/initializers/.+\.rb$})
watch('spec/spec_helper.rb')
watch(%r{^spec/support/.+\.rb$})
end
guard :rspec, cmd: 'bundle exec rspec --drb -f doc' do
watch(%r{^spec/.+_spec\.rb$})
watch('config/routes.rb') { 'spec' }
watch('spec/spec_helper.rb') { 'spec' }
watch('spec/support/') { 'spec' }
watch('spec/factories.rb') { 'spec' }
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^app/controllers/}) { 'spec/features' }
watch(%r{^app/controllers/api}) { 'spec/integration/api' }
watch(%r{^app/views/.+\.haml}) { 'spec/features' }
watch(%r{^app/views/api/.+\.rabl}) { 'spec/integration/api' }
end