Created
March 25, 2015 19:07
-
-
Save JohnRiv/4a9f642eca83e54f473e to your computer and use it in GitHub Desktop.
Guard not working
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A sample Guardfile | |
# More info at https://github.com/guard/guard#readme | |
## Uncomment and set this to only include directories you want to watch | |
# directories %w(app lib config test spec features) | |
## Uncomment to clear the screen before every task | |
# clearing :on | |
## Guard internally checks for changes in the Guardfile and exits. | |
## If you want Guard to automatically start up again, run guard in a | |
## shell loop, e.g.: | |
## | |
## $ while bundle exec guard; do echo "Restarting Guard..."; done | |
## | |
## Note: if you are using the `directories` clause above and you are not | |
## watching the project directory ('.'), then you will want to move | |
## the Guardfile to a watched dir and symlink it back, e.g. | |
# | |
# $ mkdir config | |
# $ mv Guardfile config/ | |
# $ ln -s config/Guardfile . | |
# | |
# and, you'll have to watch "config/Guardfile" instead of "Guardfile" | |
# Note: The cmd option is now required due to the increasing number of ways | |
# rspec may be run, below are examples of the most common uses. | |
# * bundler: 'bundle exec rspec' | |
# * bundler binstubs: 'bin/rspec' | |
# * spring: 'bin/rspec' (This will use spring if running and you have | |
# installed the spring binstubs per the docs) | |
# * zeus: 'zeus rspec' (requires the server to be started separately) | |
# * 'just' rspec: 'rspec' | |
guard :rspec, cmd: "bundle exec rspec" do | |
require "guard/rspec/dsl" | |
dsl = Guard::RSpec::Dsl.new(self) | |
# Feel free to open issues for suggestions and improvements | |
# RSpec files | |
rspec = dsl.rspec | |
watch(rspec.spec_helper) { rspec.spec_dir } | |
watch(rspec.spec_support) { rspec.spec_dir } | |
watch(rspec.spec_files) | |
# Ruby files | |
ruby = dsl.ruby | |
dsl.watch_spec_files_for(ruby.lib_files) | |
# Rails files | |
rails = dsl.rails(view_extensions: %w(erb haml slim)) | |
dsl.watch_spec_files_for(rails.app_files) | |
dsl.watch_spec_files_for(rails.views) | |
watch(rails.controllers) do |m| | |
[ | |
rspec.spec.("routing/#{m[1]}_routing"), | |
rspec.spec.("controllers/#{m[1]}_controller") | |
] | |
end | |
# Rails config changes | |
watch(rails.spec_helper) { rspec.spec_dir } | |
watch(rails.routes) { "#{rspec.spec_dir}/routing" } | |
watch(rails.app_controller) { "#{rspec.spec_dir}/controllers" } | |
# Capybara features specs | |
watch(rails.view_dirs) { |m| rspec.spec.("features/#{m[1]}") } | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ LISTEN_GEM_DEBUGGING=2 bundle exec guard -d | |
I, [2015-03-25T15:02:17.822000 #6918] INFO -- : Celluloid loglevel set to: 0 | |
I, [2015-03-25T15:02:17.826000 #6918] INFO -- : Listen version: 2.9.0 | |
15:02:17 - DEBUG - Notiffany: gntp not available (Please add "gem 'ruby_gntp'" to your Gemfile and run your app with "bundle exec".). | |
15:02:17 - DEBUG - Notiffany: growl not available (Please add "gem 'growl'" to your Gemfile and run your app with "bundle exec".). | |
Notice: Your terminal-notifier is older than what terminal-notifier-guard supports, consider upgrading. | |
15:02:17 - DEBUG - Notiffany: terminal_notifier not available (The :terminal_notifier only runs on Mac OS X 10.8 and later.). | |
15:02:17 - DEBUG - Notiffany: libnotify not available (Unsupported platform "darwin"). | |
15:02:17 - DEBUG - Notiffany: notifysend not available (Unsupported platform "darwin"). | |
15:02:18 - DEBUG - Notiffany: notifu not available (Unsupported platform "darwin"). | |
15:02:18 - DEBUG - Command execution: emacsclient --eval '1' | |
15:02:18 - DEBUG - Notiffany: emacs not available (Emacs client failed). | |
15:02:18 - DEBUG - Notiffany: tmux not available (:tmux notifier is only available inside a TMux session.). | |
15:02:18 - DEBUG - Notiffany: file not available (No :path option given). | |
15:02:18 - DEBUG - Notiffany is using TerminalTitle to send notifications. | |
15:02:18 - DEBUG - Command execution: hash stty | |
15:02:18 - DEBUG - Guard starts all plugins | |
15:02:18 - DEBUG - Hook :start_begin executed for Guard::RSpec | |
15:02:18 - INFO - Guard::RSpec is running | |
15:02:18 - DEBUG - Hook :start_end executed for Guard::RSpec | |
D, [2015-03-25T15:02:18.676000 #6918] DEBUG -- : Adapter: considering TCP ... | |
D, [2015-03-25T15:02:18.677000 #6918] DEBUG -- : Adapter: considering polling ... | |
D, [2015-03-25T15:02:18.677000 #6918] DEBUG -- : Adapter: considering optimized backend... | |
I, [2015-03-25T15:02:19.242000 #6918] INFO -- : Record.build(): 0.5510001182556152 seconds | |
15:02:19 - INFO - Guard is now watching at '/projects/ruby/test' | |
15:02:19 - DEBUG - Start interactor | |
15:02:19 - DEBUG - Command execution: /bin/sh -c stty -g 2>/dev/null | |
[1] guard(main)> D, [2015-03-25T15:02:46.169000 #6918] DEBUG -- : fsevent: /projects/ruby/test/app/controllers | |
D, [2015-03-25T15:02:46.173000 #6918] DEBUG -- : raw queue: [:dir, <Pathname:/projects/ruby/test>, "app/controllers", {:recursive=>true}] | |
D, [2015-03-25T15:02:46.180000 #6918] DEBUG -- : unknown: dir:/projects/ruby/test/app/controllers ({:recursive=>true}) | |
D, [2015-03-25T15:02:46.184000 #6918] DEBUG -- : Scanning: app/controllers({:recursive=>true}): {} -> #<Set: {<Pathname:/projects/ruby/test/app/controllers/application_controller.rb>, <Pathname:/projects/ruby/test/app/controllers/cart_controller.rb>, <Pathname:/projects/ruby/test/app/controllers/concerns>, <Pathname:/projects/ruby/test/app/controllers/demo_controller.rb>, <Pathname:/projects/ruby/test/app/controllers/localization_controller.rb>, <Pathname:/projects/ruby/test/app/controllers/styleguide_controller.rb>}> | |
D, [2015-03-25T15:02:46.193000 #6918] DEBUG -- : unknown: file:/projects/ruby/test/app/controllers/application_controller.rb ({}) | |
D, [2015-03-25T15:02:46.201000 #6918] DEBUG -- : unknown: file:/projects/ruby/test/app/controllers/cart_controller.rb ({}) | |
D, [2015-03-25T15:02:46.213000 #6918] DEBUG -- : unknown: dir:/projects/ruby/test/app/controllers/concerns ({:recursive=>true}) | |
D, [2015-03-25T15:02:46.216000 #6918] DEBUG -- : unknown: file:/projects/ruby/test/app/controllers/demo_controller.rb ({}) | |
D, [2015-03-25T15:02:46.228000 #6918] DEBUG -- : unknown: file:/projects/ruby/test/app/controllers/localization_controller.rb ({}) | |
D, [2015-03-25T15:02:46.233000 #6918] DEBUG -- : Scanning: app/controllers/concerns({:recursive=>true}): {} -> #<Set: {<Pathname:/projects/ruby/test/app/controllers/concerns/.keep>}> | |
D, [2015-03-25T15:02:46.234000 #6918] DEBUG -- : unknown: file:/projects/ruby/test/app/controllers/styleguide_controller.rb ({}) | |
D, [2015-03-25T15:02:46.240000 #6918] DEBUG -- : unknown: file:/projects/ruby/test/app/controllers/concerns/.keep ({}) | |
I, [2015-03-25T15:02:46.347000 #6918] INFO -- : listen: raw changes: [[:added, "/projects/ruby/test/app/controllers/application_controller.rb"], [:added, "/projects/ruby/test/app/controllers/cart_controller.rb"], [:added, "/projects/ruby/test/app/controllers/demo_controller.rb"], [:added, "/projects/ruby/test/app/controllers/localization_controller.rb"], [:added, "/projects/ruby/test/app/controllers/styleguide_controller.rb"], [:added, "/projects/ruby/test/app/controllers/concerns/.keep"]] | |
I, [2015-03-25T15:02:46.348000 #6918] INFO -- : listen: final changes: {:modified=>[], :added=>["/projects/ruby/test/app/controllers/application_controller.rb", "/projects/ruby/test/app/controllers/cart_controller.rb", "/projects/ruby/test/app/controllers/demo_controller.rb", "/projects/ruby/test/app/controllers/localization_controller.rb", "/projects/ruby/test/app/controllers/styleguide_controller.rb", "/projects/ruby/test/app/controllers/concerns/.keep"], :removed=>[]} | |
D, [2015-03-25T15:02:46.358000 #6918] DEBUG -- : Callback took 0.00800013542175293 seconds |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment