Permalink
Browse files

add guard-rails and guard-livereload

  • Loading branch information...
1 parent 1ba724f commit 38cff2a0a0c7ec1eed5beb80ac8b151f8c2dc36a @essa essa committed Sep 4, 2012
Showing with 37 additions and 0 deletions.
  1. +3 −0 Gemfile
  2. +12 −0 Gemfile.lock
  3. +22 −0 Guardfile
View
@@ -64,7 +64,10 @@ group :test do
gem 'guard-rspec'
gem 'guard-cucumber'
gem 'guard-jasmine'
+ gem 'guard-rails'
+ gem 'guard-livereload'
end
+
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
View
@@ -128,7 +128,11 @@ GEM
debugger-ruby_core_source (>= 1.1.1)
debugger-ruby_core_source (1.1.2)
diff-lcs (1.1.3)
+ em-websocket (0.3.8)
+ addressable (>= 2.1.1)
+ eventmachine (>= 0.12.9)
erubis (2.7.0)
+ eventmachine (0.12.10)
execjs (1.4.0)
multi_json (~> 1.0)
factory_girl (2.5.0)
@@ -151,6 +155,12 @@ GEM
guard (>= 1.1.0)
multi_json
thor
+ guard-livereload (1.0.0)
+ em-websocket (>= 0.2.0)
+ guard (>= 1.1.0)
+ multi_json (~> 1.0)
+ guard-rails (0.1.1)
+ guard (>= 0.2.2)
guard-rspec (1.2.1)
guard (>= 1.1)
guard-spork (1.1.0)
@@ -303,6 +313,8 @@ DEPENDENCIES
guard (>= 1.3.2)
guard-cucumber
guard-jasmine
+ guard-livereload
+ guard-rails
guard-rspec
guard-spork
haml (>= 3.1.alpha.50)
View
@@ -1,6 +1,20 @@
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
+guard 'rails' do
+ watch('Gemfile.lock')
+ watch(%r{^(config|lib)/.*})
+end
+
+guard 'livereload' do
+ watch(%r{app/views/.+\.(erb|haml|slim)})
+ watch(%r{app/helpers/.+\.rb})
+ watch(%r{public/.+\.(css|js|html)})
+ watch(%r{config/locales/.+\.yml})
+ # Rails Assets Pipeline
+ watch(%r{(app|vendor)/assets/\w+/(.+\.(css|js|html)).*}) { |m| "/assets/#{m[2]}" }
+end
+
guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' } do
watch('config/application.rb')
watch('config/environment.rb')
@@ -43,4 +57,12 @@ guard 'rspec',
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
end
+guard 'cucumber',
+ :cli => '--drb --no-profile --color --format progress --strict',
+ :all_after_pass => false, # run all specs after changed specs pass, default: true
+ :all_on_start => false do # run all the specs at startup, default: true
+ watch(%r{^features/.+\.feature$})
+ watch(%r{^features/support/.+$}) { 'features' }
+ watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
+end

0 comments on commit 38cff2a

Please sign in to comment.