Permalink
Browse files

Added guard

  • Loading branch information...
1 parent c7a9a0d commit c29faa6b0600aac06b4112f71ad69fbdcafd82d4 Timur Vafin committed May 8, 2011
Showing with 77 additions and 0 deletions.
  1. +7 −0 Gemfile
  2. +28 −0 Gemfile.lock
  3. +42 −0 Guardfile
View
@@ -37,4 +37,11 @@ group :test, :development do
gem 'rails3-generators', '0.17.4'
gem 'rcov', '0.9.9'
gem 'parallel_tests', '0.4.12'
+# gem 'rb-fsevent', :require => false if RUBY_PLATFORM =~ /darwin/i
+# gem 'guard-rspec'
+# gem 'guard-cucumber'
+# gem 'guard-livereload'
+# gem 'guard-pow'
+# gem 'guard-bundler'
+# gem 'growl'
end
View
@@ -77,10 +77,14 @@ GEM
orm_adapter (~> 0.0.3)
warden (~> 1.0.3)
diff-lcs (1.1.2)
+ em-websocket (0.2.1)
+ addressable (>= 2.1.1)
+ eventmachine (>= 0.12.9)
email_spec (1.1.1)
rspec (~> 2.0)
erubis (2.6.6)
abstract (>= 1.0.0)
+ eventmachine (0.12.10)
factory_girl (1.3.3)
factory_girl_rails (1.0.1)
factory_girl (~> 1.3)
@@ -99,6 +103,22 @@ GEM
gem_plugin (0.2.3)
gherkin (2.3.5)
json (>= 1.4.6)
+ growl (1.0.3)
+ guard (0.3.4)
+ thor (~> 0.14.6)
+ guard-bundler (0.1.2)
+ guard (>= 0.2.2)
+ guard-cucumber (0.3.0)
+ cucumber (~> 0.10.0)
+ guard (~> 0.3.0)
+ guard-livereload (0.1.11)
+ em-websocket (~> 0.2.0)
+ guard (>= 0.2.2)
+ json (~> 1.5.1)
+ guard-pow (0.1.0)
+ guard (>= 0.3.0)
+ guard-rspec (0.3.1)
+ guard (>= 0.2.2)
haml (3.0.25)
has_scope (0.5.0)
i18n (0.5.0)
@@ -210,6 +230,7 @@ GEM
rake (>= 0.8.7)
thor (~> 0.14.4)
rake (0.8.7)
+ rb-fsevent (0.4.0)
rcov (0.9.9)
responders (0.6.2)
rest-client (1.6.1)
@@ -283,6 +304,12 @@ DEPENDENCIES
factory_girl_rails (= 1.0.1)
flutie (= 1.1.5)
formtastic (= 1.2.3)
+ growl
+ guard-bundler
+ guard-cucumber
+ guard-livereload
+ guard-pow
+ guard-rspec
inherited_resources (= 1.2.1)
jquery-rails (= 0.2.7)
kaminari (= 0.10.4)
@@ -295,6 +322,7 @@ DEPENDENCIES
rails (= 3.0.6)
rails3-generators (= 0.17.4)
rails_best_practices (= 0.7.5)
+ rb-fsevent
rcov (= 0.9.9)
rr (= 1.0.2)
rspec-rails (= 2.5.0)
View
@@ -0,0 +1,42 @@
+# A sample Guardfile
+# More info at https://github.com/guard/guard#readme
+
+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
+
+guard 'rspec', :version => 2 do
+ watch(%r{^spec/.+_spec\.rb})
+ watch(%r{^lib/(.+)\.rb}) { |m| "spec/lib/#{m[1]}_spec.rb" }
+ watch('spec/spec_helper.rb') { "spec" }
+
+ # Rails example
+ watch('spec/spec_helper.rb') { "spec" }
+ watch('config/routes.rb') { "spec/routing" }
+ watch('app/controllers/application_controller.rb') { "spec/controllers" }
+ 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/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
+end
+
+guard 'cucumber' do
+ 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
+
+guard 'pow' do
+ watch('.powrc')
+ watch('.powenv')
+ watch('.rvmrc')
+ watch('Gemfile')
+ watch('Gemfile.lock')
+ watch('config/application.rb')
+ watch('config/environment.rb')
+ watch(%r{^config/environments/.*\.rb$})
+ watch(%r{^config/initializers/.*\.rb$})
+end

0 comments on commit c29faa6

Please sign in to comment.