Skip to content

Instantly share code, notes, and snippets.

@gaahrdner
Created November 9, 2011 15:42

Revisions

  1. gaahrdner revised this gist Nov 9, 2011. 1 changed file with 23 additions and 0 deletions.
    23 changes: 23 additions & 0 deletions gistfile1.rb
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,26 @@
    ### guard -d

    Guard is now watching at '/home/code/blah'
    DEBUG (09:44:05): Hook :start_begin executed for Guard::Spork
    DEBUG (09:44:05): Command execution: ps aux | awk '/spork/&&!/awk/{print $2;}'
    DEBUG (09:44:05): Killing Spork servers with PID:
    DEBUG (09:44:05): Command execution: ps aux | awk '/spork/&&!/awk/{print $2;}'
    Starting Spork for RSpec
    DEBUG (09:44:05): Spawned Spork server 5669 ('bundle exec spork -p 8989')
    DEBUG (09:44:05): Command execution: ps aux | awk '/spork/&&!/awk/{print $2;}'
    Using RSpec
    Preloading Rails environment
    Loading Spork.prefork block...
    Spork is ready and listening on 8989!
    Spork server for RSpec successfully started
    DEBUG (09:44:20): Command execution: growlnotify --version
    DEBUG (09:44:20): Hook :start_end executed for Guard::Spork
    DEBUG (09:44:20): Hook :start_begin executed for Guard::RSpec
    Guard::RSpec is running, with RSpec 2!
    DEBUG (09:44:20): Hook :start_end executed for Guard::RSpec


    ### guard file
    # A sample Guardfile
    # More info at https://github.com/guard/guard#readme

  2. gaahrdner renamed this gist Nov 9, 2011. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. gaahrdner created this gist Nov 9, 2011.
    32 changes: 32 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    # A sample Guardfile
    # More info at https://github.com/guard/guard#readme

    guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' }, :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('Gemfile')
    watch('Gemfile.lock')
    watch('spec/spec_helper.rb')
    watch('spec/factories.rb')
    watch('test/test_helper.rb')
    end

    guard 'rspec', :version => 2, :cli => '--color --drb', :all_on_start => false, :all_after_pass => false 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(%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"] }
    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