Commit Graph

59 Commits

Author SHA1 Message Date
Rémy Coutable
b34cd1acfb Based on @ttilley explanation in https://github.com/thibaudgg/rb-fsevent/issues/17, signal handlers registration should happen before any subprocess creation (fsevent_watch for instance) to be properly catches by the subprocess.
Note that in the case when guard is run via bundler, this –quoting @ttilley– "would make this an unsolvable problem" (isn't it dramatic?! ;)).
2011-07-30 23:58:53 +02:00
Rémy Coutable
1481604411 Rename Guard::Dsl.revaluate_guardfile to Guard::Dsl.reevaludate_guardfile 2011-07-29 00:22:53 +02:00
Rémy Coutable
48057cb6c8 New CLI options: watchdir and guardfile thanks to @nestegg! 2011-07-28 23:59:31 +02:00
Doug Renn
8e129c585a Add a command line option for directory to watch 2011-07-22 16:10:36 -06:00
Doug Renn
e3bbdbfa42 Add a command line option to specify the guardfile 2011-07-22 15:27:03 -06:00
Doug Renn
ee8489fb83 Don't assume watched directory, use value from listener 2011-07-22 11:57:49 -06:00
Rémy Coutable
8a1ca41626 Moved Guard::Listener#update_last_event inside Guard::Listener#modified_files
Since the pattern was to always call Guard::Listener#update_last_event after Guard::Listener#modified_files.
2011-07-21 01:25:06 +02:00
Rémy Coutable
a318e03ad1 Added a debug message when running run_on_change
So the debug mode is a little more useful...

Also added timestamp in debug print
2011-07-21 01:21:04 +02:00
Benjamin Quorning
13e325ca52 Grammar fix 2011-07-12 04:06:55 -07:00
Thibaud Guillaume-Gentil
ba0b84838d Integrated Guard::Ego inside Guard, oh yeah! 2011-07-02 10:01:45 +02:00
John Bintz
aa3010af91 show the guards defined in the Guardfile with 'guard show' or 'guard -T' 2011-06-21 09:54:52 -04:00
Rémy Coutable
20dd08e977 Write exception details using UI.error, and UI.error will now output "ERROR:" in red! 2011-06-19 20:24:47 +02:00
Elliot Winkler
b41f31e420 If running a task for a guard and it borks, don't swallow the error but print the backtrace 2011-06-18 16:30:00 -06:00
Rémy Coutable
21f5a41f88 Actually clear the terminal before the setup (don't clear setup messages). 2011-06-08 12:25:44 +02:00
Rémy Coutable
ddc6f26b91 Clear the terminal on start when the :clear option is given 2011-06-08 12:16:36 +02:00
Thibaud Guillaume-Gentil
a2b3927a2e Fixed Guard::Version in ruby 1.8.7 2011-06-08 09:10:26 +02:00
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
Thibaud Guillaume-Gentil
aabf0583b3 Merge branch 'master' of github.com:guard/guard
Conflicts:
	lib/guard.rb
	spec/guard_spec.rb
2011-05-08 22:01:35 +02:00
Thibaud Guillaume-Gentil
1e5ab84b3a Fixed Guard::Notifier (when growl/libnotify not present) 2011-05-08 21:56:46 +02:00
Rémy Coutable
9cfe8d3635 Don't modify a frozen hash. 2011-05-07 18:40:13 +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
Thibaud Guillaume-Gentil
bb28799240 Removed useless Bundler requirement. Fixes #41 2011-04-29 08:25:57 +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
Thibaud Guillaume-Gentil
98c112c074 Fixed new_modified_files rerun conditions on Guard.run_on_change_for_all_guards 2011-04-19 09:40:34 +02:00
Rémy Coutable
c0f1ea6459 Merge branch 'master' of https://github.com/brainopia/guard into brainopia-master 2011-04-16 23:17:21 +02: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
brainopia
097ce1f17e Fix Guard.locate_guard to return path to gem folder 2011-04-16 23:43:50 +04: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
31c43f7c13 Cleared screen when new files modified during the guards run 2011-04-10 21:56:48 +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
9772e9d9c8 Replaced Thread (incompatible with inotify) by a whole dir scan after each run_on_changes 2011-01-19 23:05:45 +01:00
Rémy Coutable
f90823ae90 Shortened implementation of the new group DSL method and made it (+ specs) clearer 2010-12-17 18:13:31 +01:00
Michael Kessler
63af219490 Enhance the DSL to allow grouping of guard definitions and run them selectively 2010-12-17 16:31:39 +01:00
Rémy Coutable
8fa0f1d4bc Match a Regex 2010-12-16 15:08:05 +01:00
Rémy Coutable
1831bf752f Guard no more automatically convert String into Regexp in "watch" method patterns.
It allows to define:

watch("foo_bar.rb") without meaning /foo_bar.rb/ (where "foo_bar_rb.rb" would have been matched)

However, during the deprecation phase, strings that look like a regexes (e.g. "^foo_bar.rb", "foo_bar.rb$", "foo_.*bar.rb" or "foo_(bar|baz).rb" are converted automatically to Regexp and a *very annoying* deprecation message is displayed.
2010-12-16 01:22:42 +01:00
Thibaud Guillaume-Gentil
62f9cd5311 Fixed yesterday merge 2010-12-01 08:37:31 +01: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
7f39a55fdf Use 'guard' instead of 'g', use parenthesis and don't explicitly return when not necessary 2010-11-26 00:58:36 +01:00
Thibaud Guillaume-Gentil
85beb5e97a Don't call run_on_change guard method when there is no matched files. 2010-11-25 08:52:53 +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