Commit Graph

26 Commits

Author SHA1 Message Date
Mislav Marohnić
17a654b171 refactor get_guard_class to first try the constant and fallback to require
This enables defining inline guard handlers to override ones present in gems,
e.g. you could define an inline Guard::RSpec handler and have guard use that
instead of first trying to load 'guard/rspec' from the 'guard-rspec' gem.

Also gets rid of the ill-named method `try_to_load_gem`. Handlers are simply
found in the $LOAD_PATH and don't have to necessarily come from gems.
2011-06-07 15:42:45 +02:00
Rémy Coutable
cb5843aa47 In Ruby < 1.9, Symbol#downcase doesn't exist! 2011-06-02 00:40:37 +02:00
Rémy Coutable
72734e1587 Fixed a bug preventing from using "guard :test" in Guardfile! 2011-05-27 17:56:46 +02:00
John Bintz
310bc5b644 support for dashes in guard names 2011-05-23 19:07:12 -04:00
Michael Kessler
5f0c815256 Cleaning up all specs.
I basically went through all specs and applied the following rules:

* Use `describe` for methods and `context` for contexts.
* All class methods starts with `.` and instance methods with `#`.
* Removed all `it should`, because the specs _have to_.
* Applied a consistant naming on all listener specs.
* Make fixture usage more fail save by giving generous sleep times.
* Make all behaviour description non-technical and easy to understand.

The goal of this excercise was to have a documentation that is easy
readable and describes the behaviour and not the implementation.

Try it out by using the RSpec documentation format!
2011-05-13 11:26:05 +02:00
Thibaud Guillaume-Gentil
f424854e61 Refactorized notifier enabling/disabling 2011-05-10 21:22:25 +02:00
Thibaud Guillaume-Gentil
1e5ab84b3a Fixed Guard::Notifier (when growl/libnotify not present) 2011-05-08 21:56:46 +02:00
Thibaud Guillaume-Gentil
2f94f9e22f Fixed notification option
Only print notification "Install message" once
Added GUARD_NOTIFY=false env variable support
Fixes #28
2011-05-06 23:19:31 +02:00
Thibaud Guillaume-Gentil
5740548a51 Kept support of Rubygems < 1.8.0 (for now!) 2011-05-06 21:51:50 +02:00
Thibaud Guillaume-Gentil
2da724f5e9 Fixed Rubygems deprecation messages 2011-05-06 21:23:30 +02:00
Jeff Sacks
38c371272d fixing require bug; updating documentation and version 2011-04-25 09:18:59 -05:00
Jeff Sacks
a0b6ecacdb adding support for inline classes 2011-04-21 16:39:46 -05:00
Rémy Coutable
9b981f5459 Run guards for new modified files only if any guard match any file (preventing from clearing the screen when no guard will run!).
Signed-off-by: Rémy Coutable <remy@jilion.com>
2011-04-16 23:13:29 +02:00
Thibaud Guillaume-Gentil
42c27242e1 Added a command line option (-n false) to disable notifications (growl/libnotify). closed #28 2011-04-10 22:32:29 +02:00
Thibaud Guillaume-Gentil
59f555e086 Switched to gem which command to locate gem path rather than open-gem 2011-02-22 15:15:09 +01:00
koshigoe
36e11c3820 fixed problem: Guard.get_guard_class return wrong class when loaded nested class.
The problem cause when using guard-ego with guard-spork.
2011-02-19 03:53:05 +09:00
Thibaud Guillaume-Gentil
2fc6745837 Merge branch 'master' of github.com:guard/guard
Conflicts:
	lib/guard.rb
	lib/guard/interactor.rb
	spec/guard_spec.rb
2010-11-30 21:23:53 +01:00
Thibaud Guillaume-Gentil
53a79691a5 Kept listener running in thread even when guards plugin are also running. 2010-11-30 21:15:03 +01:00
Rémy Coutable
3116b13f1b Optimized spec_helper, remove useless code and add the "bypass when test env" for UI.error 2010-11-26 00:57:08 +01:00
Rémy Coutable
e2247ea732 Improving, cleaning & making clear Guard class' specs 2010-11-03 23:31:00 +01:00
Thibaud Guillaume-Gentil
9c15536eda Little "refactoring" 2010-10-28 08:47:26 +02:00
Olivier Amblet
cb8b845eb6 A bad guard do not threaten the whole process.
Every guard task are now executed through
supervised_task method.

If a guard failed to achieve its task(raise error)
a message is logged and the guard is fired.

The stop method now always quit the application
at the end.

Specs added. The documentation specify that if a
throw an exception, it will be dismissed.
2010-10-27 15:18:00 +02:00
Yann Lugrin
3cdcea3dfd locate_guard chomp newline at end of path 2010-10-24 04:30:07 +08:00
Thibaud Guillaume-Gentil
2191bc1088 Rescue Interrupt on run yield 2010-10-20 22:40:44 +02:00
Thibaud Guillaume-Gentil
ec87585472 guard init <guard-name> command no more need Gemfile presence but open_gem is required now
Closes #3.
2010-10-20 22:34:32 +02:00
Thibaud Guillaume-Gentil
c347c2c7e0 Added 1.8.6 compatibility
Closes #2.
2010-10-18 21:45:31 +02:00