-
Notifications
You must be signed in to change notification settings - Fork 0
guard
osx 10.10.1 | Jan 15, 2014
##Run Guard Launch Guard through Bundler with:
bundle exec guardGuard will look for a Guardfile in your current directory. If it does not find one, it will look in your $HOME directory for a .Guardfile.
##Rspec For the Rspec implementation add the following to the Gemfile (inside development group) and run bundler:
group :development do
gem 'growl',
gem 'guard',
gem 'guard-rspec', require: false
endAfter you bundle with the additions to the Gemfile, enter the folloing command to create a prepopulated Guardfile.
guard init rspec##Minitest For the Minitest implementation add the following to the Gemfile (inside development group) and run bundler:
group :development do
gem 'growl',
gem 'guard',
gem 'guard-minitest', require: false
endAfter you bundle with the additions to the Gemfile, enter the folloing command to create a prepopulated Guardfile.
guard init minitest##Install Guard
The simplest way to install Guard is to use Bundler.
Add guard to a projects Gemfile and run bundle.
Outside of the context of app devopment gem install guard works just as well.
####Avoiding gem/dependency problems
Running bundle binstub guard will create bin/guard in your project, which means running bin/guard (tab completion will save you a key stroke or two) will have the exact same result as bundle exec guard
####Resources
####Guard Console Guard shows a Pry console whenever it has nothing to do and comes with some Guard specific Pry commands:
- ↩, a, all: Run all plugins.
- h, help: Show help for all interactor commands.
- c, change: Trigger a file change.
- n, notification: Toggles the notifications.
- p, pause: Toggles the file listener.
- r, reload: Reload all plugins.
- o, scope: Scope Guard actions to plugins or groups.
- s, show: Show all Guard plugins.
- e, exit: Stop all plugins and quit Guard
##Install Growl
The growl gem is compatible with all versions of Growl and uses a command line tool growlnotify that must be separately downloaded and installed. The version of the command line tool must match your Growl version. The growl gem does not support multiple notification channels.
You have to download the installer for growlnotify from the Growl download section.
To use growl you have to add it to your Gemfile and run bundler:
group :development do
gem 'growl'
end