From 05fb871a4063ff12a5c10fdd8013aa421d7e1126 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 25 Apr 2013 17:22:13 +1000 Subject: [PATCH] guard rspec upgrade --- Gemfile.lock | 2 +- Guardfile | 46 +++++++++++++++++++++++----------------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index b75d4b98d..d5e4114c8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -209,7 +209,7 @@ GEM guard-jshint-on-rails (0.0.2) guard (>= 1.0.0) jshint_on_rails (>= 1.0.2) - guard-rspec (2.4.0) + guard-rspec (2.5.1) guard (>= 1.1) rspec (~> 2.11) guard-spork (1.4.2) diff --git a/Guardfile b/Guardfile index feff6c577..85a79eb4c 100644 --- a/Guardfile +++ b/Guardfile @@ -1,13 +1,3 @@ -guard :spork, wait: 120 do - watch('config/application.rb') - watch('config/environment.rb') - watch(%r{^config/environments/.*\.rb$}) - watch(%r{^config/initializers/.*\.rb$}) - watch('Gemfile') - watch('Gemfile.lock') - watch('spec/spec_helper.rb') { :rspec } -end - phantom_path = File.expand_path('~/phantomjs/bin/phantomjs') phantom_path = nil unless File.exists?(phantom_path) @@ -36,24 +26,34 @@ guard 'jshint-on-rails', config_path: 'config/jshint.yml' do watch(%r{^spec/javascripts/.*\.js$}) end -guard 'rspec', :focus_on_failed => true, :cli => "--drb" do - watch(%r{^spec/.+_spec\.rb$}) - watch(%r{^lib/(.+)\.rb$}) { |m| "spec/components/#{m[1]}_spec.rb" } - watch('spec/spec_helper.rb') { "spec" } +unless ENV["USING_AUTOSPEC"] + guard :spork, wait: 120 do + watch('config/application.rb') + watch('config/environment.rb') + watch(%r{^config/environments/.*\.rb$}) + watch(%r{^config/initializers/.*\.rb$}) + watch('Gemfile') + watch('Gemfile.lock') + watch('spec/spec_helper.rb') { :rspec } + end - # Rails example - watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } - watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" } - watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb" } - watch(%r{^spec/support/(.+)\.rb$}) { "spec" } - watch('app/controllers/application_controller.rb') { "spec/controllers" } + guard 'rspec', :focus_on_failed => true, :cli => "--drb" do + watch(%r{^spec/.+_spec\.rb$}) + watch(%r{^lib/(.+)\.rb$}) { |m| "spec/components/#{m[1]}_spec.rb" } + watch('spec/spec_helper.rb') { "spec" } - # Capybara request specs - watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" } + # Rails example + watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } + watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" } + watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb" } + watch(%r{^spec/support/(.+)\.rb$}) { "spec" } + watch('app/controllers/application_controller.rb') { "spec/controllers" } + # Capybara request specs + watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" } + end end - module ::Guard class AutoReload < ::Guard::Guard