From 2769541e8eaa6bd972a806a9af9deb5d0eef487a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Sat, 3 Sep 2011 20:05:50 +0300 Subject: [PATCH 1/4] Improve the README --- README.md | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 1478d57..ac75b72 100644 --- a/README.md +++ b/README.md @@ -13,14 +13,13 @@ Features * [Directory Change Notification](http://msdn.microsoft.com/en-us/library/aa365261\(VS.85\).aspx) support on Windows ([rb-fchange, >= 0.0.2](https://rubygems.org/gems/rb-fchange) required). * Polling on the other operating systems (help us to support more OS). * Automatic & Super fast (when polling is not used) files modifications detection (even new files are detected). -* Growl notifications ([growl_notify gem](https://rubygems.org/gems/growl_notify) or [growlnotify](http://growl.info/documentation/growlnotify.php) & [growl gem](https://rubygems.org/gems/growl) required). -* Libnotify notifications ([libnotify gem](https://rubygems.org/gems/libnotify) required). +* Visual notifications on Mac OSX ([Growl](http://growl.info)), Linux ([Libnotify](http://developer.gnome.org/libnotify)) and Windows ([Notifu](http://www.paralint.com/projects/notifu)). * Tested against Ruby 1.8.7, 1.9.2 and REE. Screencast ---------- -Ryan Bates made a screencast on Guard, you can view it here: http://railscasts.com/episodes/264-guard +Ryan Bates made a Railscast on Guard, you can view it here: http://railscasts.com/episodes/264-guard Install ------- @@ -31,12 +30,18 @@ Install the gem: $ gem install guard ``` -Add it to your Gemfile (inside the `development` group): +Or add it to your Gemfile (inside the `development` group): ``` ruby +# In your Gemfile gem 'guard' ``` +and install it via Bundler: +``` bash +$ bundle install +``` + Generate an empty Guardfile with: ``` bash @@ -44,6 +49,7 @@ $ guard init ``` You may optionally place a .Guardfile in your home directory to use it across multiple projects. +Also note that if a `.guard.rb` is found in your home directory, it will be appended to the Guardfile. Add the guards you need to your Guardfile (see the existing guards below). @@ -55,11 +61,16 @@ Install the rb-fsevent gem for [FSEvent](http://en.wikipedia.org/wiki/FSEvents) $ gem install rb-fsevent ``` -Install either the growl_notify or the growl gem if you want notification support: +You have two possibilities: +Use the [growl_notify gem](https://rubygems.org/gems/growl_notify) (recommended): ``` bash $ gem install growl_notify -$ # or +``` + +Use the [growlnotify](http://growl.info/extras.php#growlnotify) (cli tool for growl) + the [growl gem](https://rubygems.org/gems/growl) required). +``` bash +$ brew install growlnotify $ gem install growl ``` @@ -67,7 +78,7 @@ And add them to your Gemfile: ``` ruby gem 'rb-fsevent' -gem 'growl' +gem 'growl_notify' # or gem 'growl' ``` The difference between growl and growl_notify is that growl_notify uses AppleScript to @@ -76,13 +87,13 @@ approach is preferred, but you may also use the older growl gem. ### On Linux -Install the rb-inotify gem for [inotify](http://en.wikipedia.org/wiki/Inotify) support: +Install the [rb-inotify gem](https://rubygems.org/gems/rb-inotify) for [inotify](http://en.wikipedia.org/wiki/Inotify) support: ``` bash $ gem install rb-inotify ``` -Install the Libnotify gem if you want notification support: +Install the [libnotify gem](https://rubygems.org/gems/libnotify) if you want visual notification support: ``` bash $ gem install libnotify @@ -97,19 +108,19 @@ gem 'libnotify' ### On Windows -Install the rb-fchange gem for [Directory Change Notification](http://msdn.microsoft.com/en-us/library/aa365261\(VS.85\).aspx) support: +Install the [rb-fchange gem](https://rubygems.org/gems/rb-fchange) for [Directory Change Notification](http://msdn.microsoft.com/en-us/library/aa365261\(VS.85\).aspx) support: ``` bash $ gem install rb-fchange ``` -Install the win32console gem if you want colors in your terminal: +Install the [win32console gem](https://rubygems.org/gems/win32console) if you want colors in your terminal: ``` bash $ gem install win32console ``` -Install the Notifu gem if you want notification support: +Install the [rb-notifu gem](https://rubygems.org/gems/rb-notifu) if you want visual notification support: ``` bash $ gem install rb-notifu @@ -337,7 +348,7 @@ Group frontend: User config file ---------------- -If a .guard.rb is found in your home directory, it will be appended to +If a `.guard.rb` is found in your home directory, it will be appended to the Guardfile. This can be used for tasks you want guard to handle but other users probably don't. For example, indexing your source tree with [Ctags](http://ctags.sourceforge.net): @@ -346,7 +357,6 @@ other users probably don't. For example, indexing your source tree with guard 'shell' do watch(%r{^(?:app|lib)/.+\.rb$}) { `ctags -R` } end - ``` Create a new guard From 62ef515824bc3f62f87add834ceff1ad342dd471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Sat, 3 Sep 2011 20:07:08 +0300 Subject: [PATCH 2/4] Oops! [ci skip] --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ac75b72..3519995 100644 --- a/README.md +++ b/README.md @@ -33,11 +33,11 @@ $ gem install guard Or add it to your Gemfile (inside the `development` group): ``` ruby -# In your Gemfile gem 'guard' ``` and install it via Bundler: + ``` bash $ bundle install ``` @@ -64,11 +64,13 @@ $ gem install rb-fsevent You have two possibilities: Use the [growl_notify gem](https://rubygems.org/gems/growl_notify) (recommended): + ``` bash $ gem install growl_notify ``` Use the [growlnotify](http://growl.info/extras.php#growlnotify) (cli tool for growl) + the [growl gem](https://rubygems.org/gems/growl) required). + ``` bash $ brew install growlnotify $ gem install growl From 7ffa358b3ab9b2fb8eaf0fd866051c4b5d4ae8f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Sat, 3 Sep 2011 21:30:44 +0300 Subject: [PATCH 3/4] Edited README.md via GitHub --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3519995..e445f86 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ Use the [growl_notify gem](https://rubygems.org/gems/growl_notify) (recommended) $ gem install growl_notify ``` -Use the [growlnotify](http://growl.info/extras.php#growlnotify) (cli tool for growl) + the [growl gem](https://rubygems.org/gems/growl) required). +Use the [growlnotify](http://growl.info/extras.php#growlnotify) (cli tool for growl) + the [growl gem](https://rubygems.org/gems/growl). ``` bash $ brew install growlnotify From 94a7c99b0ca75a0f943fc9b28afd71672d2635bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Sat, 3 Sep 2011 22:15:41 +0300 Subject: [PATCH 4/4] growl_notify gem is recommended over growl gem --- lib/guard/notifier.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/guard/notifier.rb b/lib/guard/notifier.rb index e960301..e9ea811 100644 --- a/lib/guard/notifier.rb +++ b/lib/guard/notifier.rb @@ -116,7 +116,7 @@ module Guard end rescue LoadError turn_off - UI.info "Please install growl or growl_notify gem for Mac OS X notification support and add it to your Gemfile" + UI.info "Please install growl_notify or growl gem for Mac OS X notification support and add it to your Gemfile" end def self.require_libnotify