Skip to content

Instantly share code, notes, and snippets.

@consti
Created July 3, 2014 05:55
Show Gist options
  • Select an option

  • Save consti/339bd4f8d9624da53561 to your computer and use it in GitHub Desktop.

Select an option

Save consti/339bd4f8d9624da53561 to your computer and use it in GitHub Desktop.
~/.Guardfile
ignore %r{^ignored/path/}, /public/
filter /\.txt$/, /.*\.zip/
# change this to your local ip address (also install Growl)
notification :gntp, :host => '10.0.1.182'
group :frontend do
# guard :bundler do
# watch('Gemfile')
# end
# guard :pow do
# watch('.rvmrc')
# watch(%r{^\.pow(rc|env)$})
# watch('Gemfile.lock')
# watch(%r{^config/.+\.rb$})
# end
guard :livereload do
watch(%r{^app/.+\.(erb|haml)})
watch(%r{^app/helpers/.+\.rb})
watch(%r{^public/.+\.(css|js|html)})
watch(%r{^config/locales/.+\.yml})
end
end
group :backend do
guard 'spork', :wait => 50 do
watch('Gemfile')
watch('Gemfile.lock')
watch('config/application.rb')
watch('config/environment.rb')
watch(%r{^config/environments/.+\.rb})
watch(%r{^config/initializers/.+\.rb})
watch('spec/spec_helper.rb')
end
guard :rspec do
watch('spec/spec_helper.rb') { "spec" }
watch('app/controllers/application_controller.rb') { "spec/controllers" }
watch('config/routes.rb') { "spec/routing" }
watch(%r{^spec/support/(requests|controllers|mailers|models)_helpers\.rb}) { |m| "spec/#{m[1]}" }
watch(%r{^spec/.+_spec\.rb})
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/requests/#{m[1]}_spec.rb"] }
watch(%r{^app/(.+)\.rb}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^lib/(.+)\.rb}) { |m| "spec/lib/#{m[1]}_spec.rb" }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment