Guard is CLI tool to handle events on filesystem modifications
install with gemfiile
group :development do
gem 'guard'
end
If you using Mac, add following code
gem 'rb-fsevent'
Guardfile is configuration file for handle FileSystem events. To generate Guardfile, execute following command on project root
bundle exec guard init
To surveillance file, use watch method like this (using RSpec plugin)
guard :rspec do
watch(%r{^spec/.+_spec\.rb$})
end
You can find more than 220 plugins in following URL https://rubygems.org/search?query=guard-
-
guard-rspec
- plugin for run spec test
-
guard-jasmine
- plugin for run jasmine BDD test
-
guard-rails
- plugin for rails restarting
-
guard-shell
- plugin for run shell script
-
guard-coffeescript
- plugin for run coffee command