Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add Guard support.

  • Loading branch information...
commit 3eed203fe32c029386169acdba2660f06a59a879 1 parent 594757a
Uģis Ozols ugisozols authored
Showing with 26 additions and 5 deletions.
  1. +6 −5 Gemfile
  2. +20 −0 Guardfile
11 Gemfile
View
@@ -5,9 +5,8 @@ gemspec
gem 'refinerycms', :git => 'git://github.com/resolve/refinerycms.git'
group :development, :test do
- require 'rbconfig'
-
gem 'refinerycms-testing', :git => 'git://github.com/resolve/refinerycms.git'
+ gem 'guard-rspec', '~> 0.6.0'
platforms :jruby do
gem 'activerecord-jdbcsqlite3-adapter'
@@ -29,13 +28,14 @@ group :development, :test do
end
platforms :ruby do
- gem 'spork', '0.9.0.rc9'
+ gem 'spork', '~> 0.9.0.rc'
gem 'guard-spork'
unless ENV['TRAVIS']
+ require 'rbconfig'
if RbConfig::CONFIG['target_os'] =~ /darwin/i
gem 'rb-fsevent', '>= 0.3.9'
- gem 'growl', '~> 1.0.3'
+ gem 'ruby_gntp'
end
if RbConfig::CONFIG['target_os'] =~ /linux/i
gem 'rb-inotify', '>= 0.5.1'
@@ -47,8 +47,9 @@ group :development, :test do
platforms :jruby do
unless ENV['TRAVIS']
+ require 'rbconfig'
if RbConfig::CONFIG['target_os'] =~ /darwin/i
- gem 'growl', '~> 1.0.3'
+ gem 'ruby_gntp'
end
if RbConfig::CONFIG['target_os'] =~ /linux/i
gem 'rb-inotify', '>= 0.5.1'
20 Guardfile
View
@@ -0,0 +1,20 @@
+guard 'rspec', :version => 2, :cli => "--color" do
+ watch(%r{^spec/.+_spec\.rb$})
+ watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
+ watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/controllers/#{m[1]}_#{m[2]}_spec.rb", "spec/requests/#{m[1]}_spec.rb"] }
+ watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
+ watch('spec/spec_helper.rb') { "spec" }
+ watch('config/routes.rb') { "spec/routing" }
+ 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
+
+guard 'spork', :wait => 60, :cucumber => false, :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')
+end
Please sign in to comment.
Something went wrong with that request. Please try again.