Created
March 1, 2011 18:33
-
-
Save oriolgual/849610 to your computer and use it in GitHub Desktop.
Sample Guardfile with a backend and frontend groups
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
group 'all' do | |
guard 'ego' do | |
watch(%r{Guardfile}) | |
end | |
guard 'shell' do | |
watch(%r{db/schema.rb}) do | |
`rake db:test:prepare` | |
end | |
end | |
guard 'bundler' do | |
watch(%r{Gemfile}) | |
end | |
end | |
group 'backend' do | |
# https://github.com/guard/guard-cucumber | |
guard 'cucumber' do | |
watch(%r{features/.+\.feature}) | |
watch(%r{features/support/.+}) { 'features' } | |
end | |
# https://github.com/guard/guard-rspec | |
guard 'rspec', version: 2, formatter: 'instafail', fail_fast: true do | |
watch(%r{spec/(.*)_spec.rb}) | |
watch(%r{spec/spec_helper.rb}) { "spec" } | |
watch(%r{app/(.*)\.rb}) { |m| "spec/#{m[1]}_spec.rb" } | |
watch(%r{config/routes.rb}) { "spec/routing" } | |
watch(%r{app/controllers/application_controller.rb}) { "spec/controllers" } | |
watch(%r{spec/factories\.rb}) { "spec/models" } | |
end | |
end | |
group 'frontend' do | |
guard 'compass' do | |
watch(%r{src/(.*)\.s[ac]ss}) | |
end | |
guard 'jammit' do | |
watch(%r{public/javascripts/(.*)\\\\.js}) | |
watch(%r{public/stylesheets/(.*)\\\\.css}) | |
end | |
guard 'livereload' do | |
watch(%r{app/.+\.(erb|haml)}) | |
watch(%r{app/helpers/.+\.rb}) | |
watch(%r{public/.+\.(css|js|html)}) | |
watch(%r{config/locales/.+\.ym}) | |
end | |
guard 'passenger', ping: 'foo' do | |
watch(%r{lib/.*\.rb}) | |
watch(%r{config/.*\.rb}) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment