Commit Graph

211 Commits

Author SHA1 Message Date
Michael Kessler
8891776e34 Merge remote-tracking branch 'earlonrails/return_on_guard' 2011-10-11 10:55:12 +02:00
Kevin Krauss
037b1e6feb Optional user defined return with guard options[:any_return] 2011-10-10 13:38:14 -07:00
Kevin Krauss
bdfdf45325 Switched the parameter to be added to the guard instead of the watcher. 2011-10-10 09:52:53 -07:00
Michael Kessler
1845efb11e Add missing specs for Guard implementation base class 2011-10-10 08:05:10 +02:00
Kevin Krauss
a274fb1ddf fixed spec for guard 2011-10-09 16:06:38 -07:00
Kevin Krauss
a7b6ebeef1 updated the watch spec to describe the tests better. 2011-10-07 10:45:26 -07:00
Kevin Krauss
33542acec9 watcher init now has an addition param that allows the user to return any obj type. The spec has been restored to its original and then more specs added for object support. 2011-10-07 10:36:47 -07:00
Kevin Krauss
d6b47f6448 Changed {:foo, 'bar'} to {:foo => 'bar'} 2011-10-05 18:09:28 -07:00
Kevin Krauss
a5dd0c7847 any return is ok. Pass the path and some other parameters if you would like and they don't become strings! 2011-10-05 18:01:55 -07:00
Scott Davis
1181b8b234 updated the growl notify code to gracefuly fail if growl is not installed - this is new in growl_notify-0.0.3 2011-10-05 01:10:48 -04:00
Michael Kessler
8b6a035dfe Make spec example simpler to avoid Ruby hash ordering issue. 2011-10-04 11:37:12 +02:00
Michael Kessler
4451d73583 Move the template initialization to the Guard module and add specs. 2011-10-04 09:46:14 +02:00
Michael Kessler
cdf0906614 Move the DSL describing logic from the CLI to the DSLDescriber. 2011-10-04 09:04:50 +02:00
Thibaud Guillaume-Gentil
da866d3380 Version 0.8.4 2011-10-03 08:25:07 +02:00
Michael Kessler
7dcd7ca168 Update wrong spec description. 2011-10-01 13:37:49 +02:00
Brian John
b3535b4a4e use a mutex instead of a lock for more efficient/simple locking 2011-09-30 20:45:41 -05:00
Michael Kessler
e33f5df518 Make Guard implementation of :task_has_failed simple.
This change makes sure that Guard implementation can just
`throw :task_has_failed` without knowing whether the enclosing
group has enabled :halt_on_fail.

The problem with throw/catch is, that when you throw a :symbol,
you'll have to catch it, otherwise you get a 'uncatched throw' error.

When the Guard group has not enabled :halt_on_fail, we catch the throw
when execute the supervised task.
2011-09-30 18:35:04 +02:00
Michael Kessler
db949bf9e4 Refactor the watch_all_modifications specs.
- Just test a single expectation per it block
- Better separation of fixture setup/teardown
2011-09-28 15:57:30 +02:00
Michael Kessler
5d122466fa Use new fixture helper. 2011-09-28 15:16:55 +02:00
Michael Kessler
ca7b059c66 Fix wrong wording. 2011-09-28 15:16:19 +02:00
Michael Kessler
5325cbdea1 Refactor listener specs.
- Introduce `listen_to`, `fixture` and `watch` spec helpers.
- Added docs to spec helper.
- Better separation of fixture setup/teardown and the actual expectation.
- Make line match within 120 characters.
2011-09-28 15:06:33 +02:00
Michael Kessler
b64b7882f7 Refactor massive execute_supervised_task_for_all_guards method.
- Renamed some Guard methods to be shorter and more consistent.
- Extract methods from execute_supervised_task_for_all_guards for less complexity.
- Added more specs for extracted methods.
- Added more docs on how marking of deleted/moved files works.
- Refactor Guard to be unaware of the :watch_all_modifications options for simplicity.
2011-09-28 12:42:09 +02:00
Darren Pearce
67882bcceb Merge branch 'master' of git://github.com/guard/guard
Conflicts:
	lib/guard.rb
2011-09-26 12:22:02 -06:00
Michael Kessler
e9eaa39e4d Remove Travis debug output. 2011-09-24 12:14:59 +02:00
Michael Kessler
1571292ba7 Make spec sleep time a float. 2011-09-24 11:35:53 +02:00
Michael Kessler
5de287ba95 Make the sleep time for listener specs configurable. 2011-09-24 11:09:32 +02:00
Rémy Coutable
41ada16595 Allow more complex conditions when searching for guards 2011-09-23 00:39:27 +02:00
Rémy Coutable
1cd669bf60 Refactor & fix specs 2011-09-23 00:22:44 +02:00
Rémy Coutable
12fcf15a95 New smart accessors for guards and groups 2011-09-23 00:21:30 +02:00
Rémy Coutable
ed97336c7d New Group class 2011-09-23 00:20:35 +02:00
Rémy Coutable
4c1cf825e5 Merge branch 'master' into guard_dependencies
Conflicts:
	lib/guard.rb
	lib/guard/dsl.rb
	man/guard
	man/guard.html
2011-09-22 22:44:15 +02:00
Darren Pearce
ec463a271b Merge branch 'master' of git://github.com/guard/guard
Conflicts:
	lib/guard/listener.rb
2011-09-21 17:14:09 -06:00
Darren Pearce
432d4a0991 changed watch deletions option to watch_all_modifiactions, Merge branch 'master' of git://github.com/guard/guard
Conflicts:
	lib/guard.rb
	lib/guard/cli.rb
	lib/guard/listener.rb
2011-09-21 17:00:53 -06:00
Michael Kessler
072d5404ee Merge pull request #137 from hron/guard
---

It seems like the new interactor eats input from $stdin even while it is locked. This disallow using tools like ruby-debug or pry in specs or cucumber.

The fix just kills the interactor when it is locked and runs it again when ulocked.

Conflicts:
	lib/guard/interactor.rb
2011-09-21 00:34:11 +02:00
Michael Kessler
33b52d2955 Fix guard groups. 2011-09-20 14:26:27 +02:00
Michael Kessler
53802ed355 Add yardoc to listeners. 2011-09-20 13:58:25 +02:00
Rémy Coutable
078d55f13c Actually halt guards' execution in a group only when the guard's task throw :task_has_failed (not when it returns false). 2011-09-16 01:20:22 +02:00
Rémy Coutable
b1b69924a7 First implementation of #97 "Guard dependencies". 2011-09-16 01:01:58 +02:00
Darren Pearce
34aaed9741 fixed specs to cleanup afterwards 2011-09-13 22:46:56 -06:00
Darren Pearce
b74d09b9d6 Merge remote branch 'upstream/master'
Conflicts:
	lib/guard.rb
	lib/guard/listener.rb
	spec/guard/listener_spec.rb
2011-09-13 16:50:24 -06:00
Darren Pearce
423610f22d moved timestamp hash creation into it's own method add initial specs for watching deleted files and fixed some minor formatting 2011-09-13 16:22:39 -06:00
Michael Kessler
59103ffe09 Use the listener_helpers start/stop. 2011-09-05 10:36:45 +02:00
Michael Kessler
d1c452bc1e Revert "More Travis tests."
This reverts commit bd67a69a8b.
2011-09-05 10:07:19 +02:00
Michael Kessler
bd67a69a8b More Travis tests. 2011-09-05 09:42:05 +02:00
Rémy Coutable
96604060ed Clean Hook code 2011-09-04 18:44:42 +02:00
Rémy Coutable
11495687f4 Merge branch 'master' into hook
Conflicts:
	Guardfile
	lib/guard.rb
	lib/guard/dsl.rb
	spec/guard/interactor_spec.rb
	spec/guard/listeners/darwin_spec.rb
2011-09-04 18:00:29 +02:00
Thibaud Guillaume-Gentil
e1472cb0c4 Make specs pass on jruby & rubinius (Mac OS X) 2011-09-03 22:37:36 +02:00
Thibaud Guillaume-Gentil
ee5468eeeb Don't kill listener thread on spec 2011-09-03 21:44:09 +02:00
Thibaud Guillaume-Gentil
8b66b71716 Travis test 2011-09-03 21:33:06 +02:00
Thibaud Guillaume-Gentil
5978e875df Put mtime (maybe ctime is updated on linux when moving a file) 2011-09-03 14:43:25 +02:00