guard 0.8.6 → 0.8.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,15 @@
1
- ## 0.8.6 - October 17, 2011
1
+ ## 0.8.7 - October 18, 2011
2
2
 
3
3
  ### Bug fix
4
4
 
5
- - [#149](https://github.com/guard/guard/issues/160): Include objects in changed_paths when Guard allows any return from the watchers. (reported by [@earlonrails][], fixed by [@netzpirat][])
6
- - [#168](https://github.com/guard/guard/issues/167): Fix `guard init` path to Guardfile template. (reported by [@semperos][])
5
+ - [#166](https://github.com/guard/guard/issues/166): Fix silent failure after re-evaluating Guardfile. (reported by [@dgutov][], fixed by [@rymai][], special thanks to [@dyfrgi][] for the [reproductible test case](https://github.com/dyfrgi/Guard-Broken))
6
+
7
+ ## 0.8.6 - October 17, 2011
8
+
9
+ ### Bug fixes
10
+
11
+ - [#168](https://github.com/guard/guard/issues/168): Fix `guard init` path to Guardfile template. (reported by [@semperos][])
12
+ - [#167](https://github.com/guard/guard/issues/167): Include objects in changed_paths when Guard allows any return from the watchers. (reported by [@earlonrails][], fixed by [@netzpirat][])
7
13
 
8
14
  ## 0.8.5 - October 17, 2011
9
15
 
@@ -12,29 +18,29 @@
12
18
  - `reload` and `run_all` Guard terminal interactions actions can be scoped to only run on a certain guard or group. ([@thibaudgg][])
13
19
  - Add cli option (-i / --no-interactions) to turn off Guard terminal interactions. ([@thibaudgg][])
14
20
  - Add support for Growl Notification Transport Protocol. ([@netzpirat][])
15
- - [#157](https://github.com/guard/guard/pull/157): Allow any return from the Guard watchers. ([@earlonrails][])
16
- - [#156](https://github.com/guard/guard/pull/156): Log error and diagnostic messages to STDERR. ([@sunaku][])
17
- - [#152](https://github.com/guard/guard/pull/152): Growl Notify API update for a graceful fail. ([@scottdavis][])
21
+ - [#157](https://github.com/guard/guard/issues/157): Allow any return from the Guard watchers. ([@earlonrails][])
22
+ - [#156](https://github.com/guard/guard/issues/156): Log error and diagnostic messages to STDERR. ([@sunaku][])
23
+ - [#152](https://github.com/guard/guard/issues/152): Growl Notify API update for a graceful fail. ([@scottdavis][])
18
24
 
19
25
  ### Bug fix
20
26
 
21
- - [#149](https://github.com/guard/guard/issues/160): Avoid `Guard is not missing constant ...` exceptions. (reported by [@earlonrails][], fixed by [@netzpirat][])
27
+ - [#160](https://github.com/guard/guard/issues/160): Avoid `Guard is not missing constant ...` exceptions. (reported by [@earlonrails][], fixed by [@netzpirat][])
22
28
 
23
29
  ## 0.8.4 - October 3, 2011
24
30
 
25
31
  ### Bug fix
26
32
 
27
- - [#149](https://github.com/guard/guard/issues/149) & [#150](https://github.com/guard/guard/pull/150): Fix issue where interator thread was continuing to capture input from stdin while a guard is being executed. (reported by [@hardipe][], fixed by [@f1sherman][])
33
+ - [#149](https://github.com/guard/guard/issues/149) & [#150](https://github.com/guard/guard/issues/150): Fix issue where interator thread was continuing to capture input from stdin while a guard is being executed. (reported by [@hardipe][], fixed by [@f1sherman][])
28
34
 
29
35
  ## 0.8.3 - October 1, 2011
30
36
 
31
37
  ### Bug fix
32
38
 
33
- - [#145](https://github.com/guard/guard/pull/145): Fix over-utilization of CPU in Interactor. ([@johnbintz][])
39
+ - [#145](https://github.com/guard/guard/issues/145): Fix over-utilization of CPU in Interactor. ([@johnbintz][])
34
40
 
35
41
  ### Improvements
36
42
 
37
- - [#146](https://github.com/guard/guard/pull/146): Use a mutex instead of a lock for more efficient/simple locking. ([@f1sherman][])
43
+ - [#146](https://github.com/guard/guard/issues/146): Use a mutex instead of a lock for more efficient/simple locking. ([@f1sherman][])
38
44
  - Make Guard implementation of `:task_has_failed` simple. ([@netzpirat][])
39
45
 
40
46
  ## 0.8.2 - September 30, 2011
@@ -51,18 +57,18 @@
51
57
 
52
58
  ### Bug fix
53
59
 
54
- - [#144](https://github.com/guard/guard/pull/144): Fix `guard init`. (reported by [@fabioyamate][], fixed by [@rymai][])
60
+ - [#144](https://github.com/guard/guard/issues/144): Fix `guard init`. (reported by [@fabioyamate][], fixed by [@rymai][])
55
61
 
56
62
  ## 0.8.0 - September 28, 2011
57
63
 
58
64
  ### Bug fixes
59
65
 
60
- - [#137](https://github.com/guard/guard/pull/137): Fix interacting with tools like ruby-debug. ([@hron][] & [@netzpirat][])
61
- - [#138](https://github.com/guard/guard/pull/138): Fixed comments in example scaffold to reference interactions. ([@rmm5t][] & [@netzpirat][])
66
+ - [#137](https://github.com/guard/guard/issues/137): Fix interacting with tools like ruby-debug. ([@hron][] & [@netzpirat][])
67
+ - [#138](https://github.com/guard/guard/issues/138): Fixed comments in example scaffold to reference interactions. ([@rmm5t][] & [@netzpirat][])
62
68
 
63
69
  ### New feature
64
70
 
65
- - [#136](https://github.com/guard/guard/pull/136): New CLI `:watch_all_modifications`/`-A` option to watch for deleted and moved files too. ([@limeyd][] & [@netzpirat][])
71
+ - [#136](https://github.com/guard/guard/issues/136): New CLI `:watch_all_modifications`/`-A` option to watch for deleted and moved files too. ([@limeyd][] & [@netzpirat][])
66
72
  - [#97](https://github.com/guard/guard/issues/97): Guard dependencies. Task execution can now be halted if a Guard throws `:task_has_failed` and `Guard::Dsl#group` options include `:halt_on_fail => true`. ([@rymai][])
67
73
  - [#121](https://github.com/guard/guard/issues/121): `Guard.guards` and `Guard.groups` are now smart accessors. Filters can be passed to find a specific Guard/group or several Guards/groups that match (see YARDoc). ([@rymai][] & [@ches][])
68
74
  - New `Guard::Group` class to store groups defined in Guardfile (with `Guard::Dsl#group`). ([@rymai][])
@@ -83,7 +89,7 @@
83
89
 
84
90
  ### New features
85
91
 
86
- - [#42](https://github.com/guard/guard/pull/42): New DSL method: `callback` allows you to execute arbitrary code before or after any of the `start`, `stop`, `reload`, `run_all` and `run_on_change` guards' method. New [Wiki page](https://github.com/guard/guard/wiki/Hooks-and-callbacks) for documenting it. ([@monocle][] & [@rymai][])
92
+ - [#42](https://github.com/guard/guard/issues/42): New DSL method: `callback` allows you to execute arbitrary code before or after any of the `start`, `stop`, `reload`, `run_all` and `run_on_change` guards' method. New [Wiki page](https://github.com/guard/guard/wiki/Hooks-and-callbacks) for documenting it. ([@monocle][] & [@rymai][])
87
93
  - Ability to 'pause' files modification listening. Please refer to the "Interactions" section in the README for more information. ([@thibaudgg][])
88
94
 
89
95
  ### Improvement
@@ -94,8 +100,8 @@
94
100
 
95
101
  ### New features
96
102
 
97
- - [#130](https://github.com/guard/guard/pull/130): Adds `ignore_paths` method to DSL. ([@ianwhite][])
98
- - [#128](https://github.com/guard/guard/pull/128): Users can add additional settings to `~/.guard.rb` that augment the existing Guardfile. ([@tpope][])
103
+ - [#130](https://github.com/guard/guard/issues/130): Adds `ignore_paths` method to DSL. ([@ianwhite][])
104
+ - [#128](https://github.com/guard/guard/issues/128): Users can add additional settings to `~/.guard.rb` that augment the existing Guardfile. ([@tpope][])
99
105
 
100
106
  ## 0.6.2 - August 17, 2011
101
107
 
@@ -117,30 +123,30 @@
117
123
 
118
124
  ### Bug fixes
119
125
 
120
- - [#120](https://github.com/guard/guard/pull/120): remove `guardfile_contents` when re-evaluating so that the Guardfile gets reloaded correctly. ([@mordaroso][])
121
- - [#119](https://github.com/guard/guard/pull/119): `Dsl.evaluate_guardfile` uses all groups if none specified. ([@ches][])
126
+ - [#120](https://github.com/guard/guard/issues/120): remove `guardfile_contents` when re-evaluating so that the Guardfile gets reloaded correctly. ([@mordaroso][])
127
+ - [#119](https://github.com/guard/guard/issues/119): `Dsl.evaluate_guardfile` uses all groups if none specified. ([@ches][])
122
128
 
123
129
  ## 0.6.0 - August 13, 2011
124
130
 
125
131
  ### Bug fixes
126
132
 
127
- - Pull request [#107](https://github.com/guard/guard/pull/107): Small spelling fix. ([@dnagir][])
133
+ - Pull request [#107](https://github.com/guard/guard/issues/107): Small spelling fix. ([@dnagir][])
128
134
  - `Dir.glob` now ignores files that don't need to be watched. ([@rymai][])
129
135
 
130
136
  ### New feature
131
137
 
132
- - Pull request [#112](https://github.com/guard/guard/pull/112): Add `list` command to CLI. ([@docwhat][])
138
+ - Pull request [#112](https://github.com/guard/guard/issues/112): Add `list` command to CLI. ([@docwhat][])
133
139
 
134
140
  ### Improvements
135
141
 
136
- - [#99](https://github.com/guard/guard/pull/99): [OS X] Switch from growl gem to growl_notify gem. ([@johnbintz][])
137
- - [#115](https://github.com/guard/guard/pull/115): [Linux] Add `:transient => true` to default libnotify options. ([@zonque][])
138
- - [#95](https://github.com/guard/guard/pull/95): Output system commands and options to be executed when in debug mode. ([@uk-ar][] and [@netzpirat][])
142
+ - [#99](https://github.com/guard/guard/issues/99): [OS X] Switch from growl gem to growl_notify gem. ([@johnbintz][])
143
+ - [#115](https://github.com/guard/guard/issues/115): [Linux] Add `:transient => true` to default libnotify options. ([@zonque][])
144
+ - [#95](https://github.com/guard/guard/issues/95): Output system commands and options to be executed when in debug mode. ([@uk-ar][] and [@netzpirat][])
139
145
  - `Guard::Dsl.revaluate_guardfile` has been renamed to `Guard::Dsl.reevaluate_guardfile`. ([@rymai][])
140
146
  - New CLI options: ([@nestegg][])
141
147
  - `watchdir`/`-w` to specify the directory in which Guard should watch for changes,
142
148
  - `guardfile`/`-G` to specify an alternate location for the Guardfile to use.
143
- - [#90](https://github.com/guard/guard/pull/90): Refactoring of color handling in the `Guard::UI`. ([@stereobooster][])
149
+ - [#90](https://github.com/guard/guard/issues/90): Refactoring of color handling in the `Guard::UI`. ([@stereobooster][])
144
150
 
145
151
  ## 0.5.1 - July 2, 2011
146
152
 
@@ -153,18 +159,18 @@
153
159
  ### New features
154
160
 
155
161
  - Guard::Ego is now part of Guard, so Guardfile is automagically re-evaluated when modified. ([@thibaudgg][])
156
- - [#91](https://github.com/guard/guard/pull/91): Show Guards in Guardfile with the `guard -T`. ([@johnbintz][])
162
+ - [#91](https://github.com/guard/guard/issues/91): Show Guards in Guardfile with the `guard -T`. ([@johnbintz][])
157
163
 
158
164
  ### Improvements
159
165
 
160
166
  - [#98](https://github.com/guard/guard/issues/98): Multiple calls per watch event on linux with rb-inotify. ([@jeffutter][] & [@netzpirat][])
161
- - [#94](https://github.com/guard/guard/pull/94): Show backtrace in terminal when a problem with a watch action occurs. ([@capotej][])
162
- - [#88](https://github.com/guard/guard/pull/88): Write exception trace in the terminal when a supervised task fail. ([@mcmire][])
167
+ - [#94](https://github.com/guard/guard/issues/94): Show backtrace in terminal when a problem with a watch action occurs. ([@capotej][])
168
+ - [#88](https://github.com/guard/guard/issues/88): Write exception trace in the terminal when a supervised task fail. ([@mcmire][])
163
169
  - Color in red the "ERROR:" flag when using `UI.error`. ([@rymai][])
164
- - [#79](https://github.com/guard/guard/issues/79) and Pull request [#82](https://github.com/guard/guard/pull/82): Improve INotify support on Linux. ([@Gazer][] & [@yannlugrin][])
165
- - [#12](https://github.com/guard/guard/issues/12) and Pull request [#86](https://github.com/guard/guard/pull/86): Eventually exits with SystemStackError. ([@stereobooster][])
166
- - [#84](https://github.com/guard/guard/pull/84): Use RbConfig instead of obsolete and deprecated Config. ([@etehtsea][])
167
- - [#80](https://github.com/guard/guard/pull/80): Watching dotfile (hidden files under unix). (reported by [@chrisberkhout][], fixed by [@yannlugrin][])
170
+ - [#79](https://github.com/guard/guard/issues/79) and Pull request [#82](https://github.com/guard/guard/issues/82): Improve INotify support on Linux. ([@Gazer][] & [@yannlugrin][])
171
+ - [#12](https://github.com/guard/guard/issues/12) and Pull request [#86](https://github.com/guard/guard/issues/86): Eventually exits with SystemStackError. ([@stereobooster][])
172
+ - [#84](https://github.com/guard/guard/issues/84): Use RbConfig instead of obsolete and deprecated Config. ([@etehtsea][])
173
+ - [#80](https://github.com/guard/guard/issues/80): Watching dotfile (hidden files under unix). (reported by [@chrisberkhout][], fixed by [@yannlugrin][])
168
174
  - Clear the terminal on start when the `:clear` option is given. ([@rymai][])
169
175
  - Rename home directory Guardfile to `.Guardfile`. ([@tpope][])
170
176
 
@@ -179,7 +185,7 @@
179
185
 
180
186
  ### Improvements
181
187
 
182
- - [#77](https://github.com/guard/guard/pull/77): Refactor `get_guard_class` to first try the constant and fallback to require + various tweaks. ([@mislav][])
188
+ - [#77](https://github.com/guard/guard/issues/77): Refactor `get_guard_class` to first try the constant and fallback to require + various tweaks. ([@mislav][])
183
189
  - Notifier improvement, don't use system notification library if could not be required. ([@yannlugrin][])
184
190
 
185
191
  ## 0.4.0 - June 5, 2011
@@ -190,19 +196,19 @@
190
196
 
191
197
  ### New features
192
198
 
193
- - [#73](https://github.com/guard/guard/pull/73): Allow DSL's `group` method to accept a Symbol as group name. ([@johnbintz][])
194
- - [#51](https://github.com/guard/guard/pull/51): Allow options (like `:priority`) to be passed through to the Notifier. ([@indirect][] & [@netzpirat][])
199
+ - [#73](https://github.com/guard/guard/issues/73): Allow DSL's `group` method to accept a Symbol as group name. ([@johnbintz][])
200
+ - [#51](https://github.com/guard/guard/issues/51): Allow options (like `:priority`) to be passed through to the Notifier. ([@indirect][] & [@netzpirat][])
195
201
 
196
202
  ### Improvement
197
203
 
198
- - [#74](https://github.com/guard/guard/pull/74): Added link definitions to make the CHANGELOG more DRY! That's for sure now, we have the cleanest CHANGELOG ever! (even the link definitions are sorted alphabetically!) ([@pcreux][])
204
+ - [#74](https://github.com/guard/guard/issues/74): Added link definitions to make the CHANGELOG more DRY! That's for sure now, we have the cleanest CHANGELOG ever! (even the link definitions are sorted alphabetically!) ([@pcreux][])
199
205
 
200
206
  ## 0.4.0.rc - May 28, 2011
201
207
 
202
208
  ### Bug fixes
203
209
 
204
- - [#69](https://github.com/guard/guard/pull/69): Fixed typo in README: `Ctr-/` => `Ctr-\`. ([@tinogomes][])
205
- - [#66](https://github.com/guard/guard/pull/66): Support for dashes in guard names. ([@johnbintz][])
210
+ - [#69](https://github.com/guard/guard/issues/69): Fixed typo in README: `Ctr-/` => `Ctr-\`. ([@tinogomes][])
211
+ - [#66](https://github.com/guard/guard/issues/66): Support for dashes in guard names. ([@johnbintz][])
206
212
  - Require `guard/ui` because `Guard::Notifier` can be required without full Guard. ([@yannlugrin][])
207
213
  - Handled quick file (<1s) modification. Avoid to catch modified files without content modification (sha1 checksum). ([@thibaudgg][] & [@netzpirat][])
208
214
  - Fixed `Guard::Notifier` (when growl/libnotify not present). ([@thibaudgg][])
@@ -210,14 +216,14 @@
210
216
 
211
217
  ### New features
212
218
 
213
- - [#67](https://github.com/guard/guard/pull/67): Allow Guardfile in `$HOME` folder. ([@hashrocketeer][])
214
- - [#64](https://github.com/guard/guard/pull/64): Windows notifications support. ([@stereobooster][])
215
- - [#63](https://github.com/guard/guard/pull/63): Refactor listeners to work as a library. ([@niklas][])
219
+ - [#67](https://github.com/guard/guard/issues/67): Allow Guardfile in `$HOME` folder. ([@hashrocketeer][])
220
+ - [#64](https://github.com/guard/guard/issues/64): Windows notifications support. ([@stereobooster][])
221
+ - [#63](https://github.com/guard/guard/issues/63): Refactor listeners to work as a library. ([@niklas][])
216
222
  - Use `ENV["GUARD_NOTIFY"]` to disable notifications. ([@thibaudgg][])
217
223
  - Cleaning up all specs. ([@netzpirat][])
218
- - [#60](https://github.com/guard/guard/pull/60): Added Windows support. ([@stereobooster][])
219
- - [#58](https://github.com/guard/guard/pull/58): Extract code from signal handlers into methods. ([@nicksieger][])
220
- - [#55](https://github.com/guard/guard/pull/55): It is now possible to pass `:guardfile` (a Guardfile path) or `:guardfile_contents` (the content of a Guardfile) to `Guard::Dsl.evaluate_guardfile`. Hence this allows the use of `Guard::Dsl.evaluate_guardfile` in a programmatic manner. ([@anithri][], improved by [@rymai][])
224
+ - [#60](https://github.com/guard/guard/issues/60): Added Windows support. ([@stereobooster][])
225
+ - [#58](https://github.com/guard/guard/issues/58): Extract code from signal handlers into methods. ([@nicksieger][])
226
+ - [#55](https://github.com/guard/guard/issues/55): It is now possible to pass `:guardfile` (a Guardfile path) or `:guardfile_contents` (the content of a Guardfile) to `Guard::Dsl.evaluate_guardfile`. Hence this allows the use of `Guard::Dsl.evaluate_guardfile` in a programmatic manner. ([@anithri][], improved by [@rymai][])
221
227
 
222
228
  ## 0.3.4 - April 24, 2011
223
229
 
@@ -241,7 +247,7 @@
241
247
 
242
248
  ### Bug fixe
243
249
 
244
- - [#43](https://github.com/guard/guard/pull/43): Fixed `guard init` command. ([@brainopia][])
250
+ - [#43](https://github.com/guard/guard/issues/43): Fixed `guard init` command. ([@brainopia][])
245
251
 
246
252
  ## 0.3.1 - April 14, 2011
247
253
 
@@ -265,7 +271,7 @@
265
271
  ### New features
266
272
 
267
273
  - The whole directory is now watched during `run_on_change` to detect new files modifications. ([@thibaudgg][])
268
- - [#26](https://github.com/guard/guard/pull/26): New DSL method: `group` allows you to group several guards. New CLI option: `--group group_name` to specify certain groups of guards to start. ([@netzpirat][])
274
+ - [#26](https://github.com/guard/guard/issues/26): New DSL method: `group` allows you to group several guards. New CLI option: `--group group_name` to specify certain groups of guards to start. ([@netzpirat][])
269
275
  - `watch` patterns are now more strict: strings are matched with `String#==`, `Regexp` are matched with `Regexp#match`. ([@rymai][])
270
276
  - A deprecation warning is displayed if your `Guardfile` contains `String` that look like `Regexp` (bad!). ([@rymai][])
271
277
  - It's now possible to return an `Enumerable` in the `watch` optional blocks in the `Guardfile`. ([@rymai][])
@@ -273,7 +279,7 @@
273
279
  ### New specs
274
280
 
275
281
  - `Guard::Watcher`. ([@rymai][])
276
- - [#13](https://github.com/guard/guard/pull/13): `Guard::Dsl`. ([@oliamb][])
282
+ - [#13](https://github.com/guard/guard/issues/13): `Guard::Dsl`. ([@oliamb][])
277
283
 
278
284
  ## 0.2.2 - October 25, 2010
279
285
 
@@ -285,8 +291,8 @@
285
291
 
286
292
  ### Bug fixes
287
293
 
288
- - [#7](https://github.com/guard/guard/pull/7): Fixes for Linux support. ([@yannlugrin][])
289
- - [#6](https://github.com/guard/guard/pull/6): Locate guard now chomp newline in result path. ([@yannlugrin][])
294
+ - [#7](https://github.com/guard/guard/issues/7): Fixes for Linux support. ([@yannlugrin][])
295
+ - [#6](https://github.com/guard/guard/issues/6): Locate guard now chomp newline in result path. ([@yannlugrin][])
290
296
 
291
297
  ## 0.2.0 - October 21, 2010
292
298
 
@@ -309,8 +315,10 @@
309
315
  [@capotej]: https://github.com/capotej
310
316
  [@ches]: https://github.com/ches
311
317
  [@chrisberkhout]: https://github.com/chrisberkhout
318
+ [@dgutov]: https://github.com/dgutov
312
319
  [@dnagir]: https://github.com/dnagir
313
320
  [@docwhat]: https://github.com/docwhat
321
+ [@dyfrgi]: https://github.com/dyfrgi
314
322
  [@earlonrails]: https://github.com/earlonrails
315
323
  [@etehtsea]: https://github.com/etehtsea
316
324
  [@f1sherman]: https://github.com/f1sherman
@@ -340,8 +348,8 @@
340
348
  [@pcreux]: https://github.com/pcreux
341
349
  [@rmm5t]: https://github.com/rmm5t
342
350
  [@rymai]: https://github.com/rymai
343
- [@semperos]: https://github.com/semperos
344
351
  [@scottdavis]: https://github.com/scottdavis
352
+ [@semperos]: https://github.com/semperos
345
353
  [@stereobooster]: https://github.com/stereobooster
346
354
  [@stouset]: https://github.com/stouset
347
355
  [@sunaku]: https://github.com/sunaku
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- Guard [![Build Status](https://secure.travis-ci.org/guard/guard.png)](http://travis-ci.org/guard/guard)
1
+ Guard [![Build Status](https://secure.travis-ci.org/guard/guard.png?branch=master)](http://travis-ci.org/guard/guard)
2
2
  =====
3
3
 
4
4
  Guard is a command line tool that easily handle events on files modifications.
@@ -58,7 +58,7 @@ module Guard
58
58
 
59
59
  @options = options
60
60
  @guards = []
61
- @groups = [Group.new(:default)]
61
+ self.reset_groups
62
62
  @interactor = Interactor.new unless @options[:no_interactions]
63
63
  @listener = Listener.select_and_init(@options[:watchdir] ? File.expand_path(@options[:watchdir]) : Dir.pwd, options)
64
64
 
@@ -119,6 +119,14 @@ module Guard
119
119
  end
120
120
  end
121
121
 
122
+ # Initialize the groups array with the `:default` group.
123
+ #
124
+ # @see Guard.groups
125
+ #
126
+ def reset_groups
127
+ @groups = [Group.new(:default)]
128
+ end
129
+
122
130
  # Start Guard by evaluate the `Guardfile`, initialize the declared Guards
123
131
  # and start the available file change listener.
124
132
  #
@@ -219,7 +227,7 @@ module Guard
219
227
 
220
228
  lock.synchronize do
221
229
  begin
222
- interactor.stop_if_not_current if interactor
230
+ interactor.stop if interactor
223
231
  yield
224
232
  rescue Interrupt
225
233
  end
@@ -101,7 +101,7 @@ module Guard
101
101
  #
102
102
  def reevaluate_guardfile
103
103
  ::Guard.guards.clear
104
- ::Guard.groups.clear
104
+ ::Guard.reset_groups
105
105
  @@options.delete(:guardfile_contents)
106
106
  Dsl.evaluate_guardfile(@@options)
107
107
  msg = 'Guardfile has been re-evaluated.'
@@ -27,7 +27,7 @@ module Guard
27
27
  def start
28
28
  return if ENV["GUARD_ENV"] == 'test'
29
29
 
30
- if !@thread || @thread.stop?
30
+ if !@thread || !@thread.alive?
31
31
  @thread = Thread.new do
32
32
  while entry = $stdin.gets.chomp
33
33
  scopes, action = extract_scopes_and_action(entry)
@@ -47,6 +47,14 @@ module Guard
47
47
  end
48
48
  end
49
49
 
50
+ # Kill interactor thread if not current
51
+ #
52
+ def stop
53
+ unless Thread.current == @thread
54
+ @thread.kill
55
+ end
56
+ end
57
+
50
58
  # Extract guard or group scope and action from Interactor entry
51
59
  #
52
60
  # @example `spork reload` will only reload rspec
@@ -54,6 +62,7 @@ module Guard
54
62
  #
55
63
  # @param [String] Interactor entry gets from $stdin
56
64
  # @return [Array] entry group or guard scope hash and action
65
+ #
57
66
  def extract_scopes_and_action(entry)
58
67
  scopes = {}
59
68
  entries = entry.split(' ')
@@ -67,6 +76,7 @@ module Guard
67
76
  action = action_from_entry(entries[1])
68
77
  end
69
78
  action ||= :run_all
79
+
70
80
  [scopes, action]
71
81
  end
72
82
 
@@ -74,6 +84,7 @@ module Guard
74
84
  #
75
85
  # @param [String] Interactor entry gets from $stdin
76
86
  # @return [Hash] An hash with a guard or a group scope
87
+ #
77
88
  def scopes_from_entry(entry)
78
89
  scopes = {}
79
90
  if guard = ::Guard.guards(entry)
@@ -82,6 +93,7 @@ module Guard
82
93
  if group = ::Guard.groups(entry)
83
94
  scopes[:group] = group
84
95
  end
96
+
85
97
  scopes
86
98
  end
87
99
 
@@ -89,6 +101,7 @@ module Guard
89
101
  #
90
102
  # @param [String] Interactor entry gets from $stdin
91
103
  # @return [Symbol] A guard action
104
+ #
92
105
  def action_from_entry(entry)
93
106
  if STOP_ACTIONS.include?(entry)
94
107
  :stop
@@ -99,12 +112,5 @@ module Guard
99
112
  end
100
113
  end
101
114
 
102
- # Kill interactor thread if not current
103
- #
104
- def stop_if_not_current
105
- unless Thread.current == @thread
106
- @thread.kill
107
- end
108
- end
109
115
  end
110
116
  end
@@ -1,6 +1,6 @@
1
1
  module Guard
2
2
  unless defined? Guard::VERSION
3
3
  # The current gem version of Guard
4
- VERSION = '0.8.6'
4
+ VERSION = '0.8.7'
5
5
  end
6
6
  end
@@ -0,0 +1,180 @@
1
+ !RBIX
2
+ 16846133056282117387
3
+ x
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 28
13
+ 99
14
+ 7
15
+ 0
16
+ 65
17
+ 49
18
+ 1
19
+ 2
20
+ 13
21
+ 99
22
+ 12
23
+ 7
24
+ 2
25
+ 12
26
+ 7
27
+ 3
28
+ 12
29
+ 65
30
+ 12
31
+ 49
32
+ 4
33
+ 4
34
+ 15
35
+ 49
36
+ 2
37
+ 0
38
+ 15
39
+ 2
40
+ 11
41
+ I
42
+ 6
43
+ I
44
+ 0
45
+ I
46
+ 0
47
+ I
48
+ 0
49
+ n
50
+ p
51
+ 5
52
+ x
53
+ 5
54
+ Guard
55
+ x
56
+ 11
57
+ open_module
58
+ x
59
+ 15
60
+ __module_init__
61
+ M
62
+ 1
63
+ n
64
+ n
65
+ x
66
+ 5
67
+ Guard
68
+ i
69
+ 48
70
+ 5
71
+ 66
72
+ 26
73
+ 93
74
+ 0
75
+ 15
76
+ 29
77
+ 21
78
+ 0
79
+ 45
80
+ 0
81
+ 1
82
+ 7
83
+ 2
84
+ 3
85
+ 98
86
+ 3
87
+ 3
88
+ 30
89
+ 8
90
+ 27
91
+ 25
92
+ 92
93
+ 0
94
+ 27
95
+ 8
96
+ 32
97
+ 15
98
+ 7
99
+ 4
100
+ 8
101
+ 33
102
+ 1
103
+ 9
104
+ 38
105
+ 1
106
+ 8
107
+ 47
108
+ 65
109
+ 7
110
+ 2
111
+ 7
112
+ 5
113
+ 64
114
+ 49
115
+ 6
116
+ 2
117
+ 11
118
+ I
119
+ 4
120
+ I
121
+ 0
122
+ I
123
+ 0
124
+ I
125
+ 0
126
+ n
127
+ p
128
+ 7
129
+ x
130
+ 5
131
+ Guard
132
+ n
133
+ x
134
+ 7
135
+ VERSION
136
+ x
137
+ 22
138
+ vm_const_defined_under
139
+ s
140
+ 8
141
+ constant
142
+ s
143
+ 5
144
+ 0.6.3
145
+ x
146
+ 9
147
+ const_set
148
+ p
149
+ 5
150
+ I
151
+ 2
152
+ I
153
+ 2
154
+ I
155
+ 2f
156
+ I
157
+ 0
158
+ I
159
+ 30
160
+ x
161
+ 66
162
+ /Users/remy/Development/Ruby/Gems/guard/guard/lib/guard/version.rb
163
+ p
164
+ 0
165
+ x
166
+ 13
167
+ attach_method
168
+ p
169
+ 3
170
+ I
171
+ 0
172
+ I
173
+ 1
174
+ I
175
+ 1c
176
+ x
177
+ 66
178
+ /Users/remy/Development/Ruby/Gems/guard/guard/lib/guard/version.rb
179
+ p
180
+ 0
metadata CHANGED
@@ -1,126 +1,90 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: guard
3
- version: !ruby/object:Gem::Version
4
- hash: 51
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.8.7
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 8
9
- - 6
10
- version: 0.8.6
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Thibaud Guillaume-Gentil
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-10-17 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2011-10-18 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: thor
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &2157758980 !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
18
+ requirements:
26
19
  - - ~>
27
- - !ruby/object:Gem::Version
28
- hash: 43
29
- segments:
30
- - 0
31
- - 14
32
- - 6
20
+ - !ruby/object:Gem::Version
33
21
  version: 0.14.6
34
22
  type: :runtime
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: bundler
38
23
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *2157758980
25
+ - !ruby/object:Gem::Dependency
26
+ name: bundler
27
+ requirement: &2157758600 !ruby/object:Gem::Requirement
40
28
  none: false
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- hash: 3
45
- segments:
46
- - 0
47
- version: "0"
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
48
33
  type: :development
49
- version_requirements: *id002
50
- - !ruby/object:Gem::Dependency
51
- name: rspec
52
34
  prerelease: false
53
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *2157758600
36
+ - !ruby/object:Gem::Dependency
37
+ name: rspec
38
+ requirement: &2157784160 !ruby/object:Gem::Requirement
54
39
  none: false
55
- requirements:
40
+ requirements:
56
41
  - - ~>
57
- - !ruby/object:Gem::Version
58
- hash: 23
59
- segments:
60
- - 2
61
- - 6
62
- - 0
42
+ - !ruby/object:Gem::Version
63
43
  version: 2.6.0
64
44
  type: :development
65
- version_requirements: *id003
66
- - !ruby/object:Gem::Dependency
67
- name: guard-rspec
68
45
  prerelease: false
69
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *2157784160
47
+ - !ruby/object:Gem::Dependency
48
+ name: guard-rspec
49
+ requirement: &2157783660 !ruby/object:Gem::Requirement
70
50
  none: false
71
- requirements:
51
+ requirements:
72
52
  - - ~>
73
- - !ruby/object:Gem::Version
74
- hash: 11
75
- segments:
76
- - 0
77
- - 5
78
- - 0
53
+ - !ruby/object:Gem::Version
79
54
  version: 0.5.0
80
55
  type: :development
81
- version_requirements: *id004
82
- - !ruby/object:Gem::Dependency
83
- name: yard
84
56
  prerelease: false
85
- requirement: &id005 !ruby/object:Gem::Requirement
57
+ version_requirements: *2157783660
58
+ - !ruby/object:Gem::Dependency
59
+ name: yard
60
+ requirement: &2157783200 !ruby/object:Gem::Requirement
86
61
  none: false
87
- requirements:
62
+ requirements:
88
63
  - - ~>
89
- - !ruby/object:Gem::Version
90
- hash: 7
91
- segments:
92
- - 0
93
- - 7
94
- - 2
64
+ - !ruby/object:Gem::Version
95
65
  version: 0.7.2
96
66
  type: :development
97
- version_requirements: *id005
98
- - !ruby/object:Gem::Dependency
99
- name: kramdown
100
67
  prerelease: false
101
- requirement: &id006 !ruby/object:Gem::Requirement
68
+ version_requirements: *2157783200
69
+ - !ruby/object:Gem::Dependency
70
+ name: kramdown
71
+ requirement: &2157782740 !ruby/object:Gem::Requirement
102
72
  none: false
103
- requirements:
73
+ requirements:
104
74
  - - ~>
105
- - !ruby/object:Gem::Version
106
- hash: 45
107
- segments:
108
- - 0
109
- - 13
110
- - 3
75
+ - !ruby/object:Gem::Version
111
76
  version: 0.13.3
112
77
  type: :development
113
- version_requirements: *id006
78
+ prerelease: false
79
+ version_requirements: *2157782740
114
80
  description: Guard is a command line tool to easily handle events on file system modifications.
115
- email:
81
+ email:
116
82
  - thibaud@thibaud.me
117
- executables:
83
+ executables:
118
84
  - guard
119
85
  extensions: []
120
-
121
86
  extra_rdoc_files: []
122
-
123
- files:
87
+ files:
124
88
  - bin/guard
125
89
  - images/failed.png
126
90
  - images/pending.png
@@ -141,6 +105,7 @@ files:
141
105
  - lib/guard/templates/Guardfile
142
106
  - lib/guard/ui.rb
143
107
  - lib/guard/version.rb
108
+ - lib/guard/version.rbc
144
109
  - lib/guard/watcher.rb
145
110
  - lib/guard.rb
146
111
  - CHANGELOG.md
@@ -150,38 +115,26 @@ files:
150
115
  - README.md
151
116
  homepage: https://github.com/guard/guard
152
117
  licenses: []
153
-
154
118
  post_install_message:
155
119
  rdoc_options: []
156
-
157
- require_paths:
120
+ require_paths:
158
121
  - lib
159
- required_ruby_version: !ruby/object:Gem::Requirement
122
+ required_ruby_version: !ruby/object:Gem::Requirement
160
123
  none: false
161
- requirements:
162
- - - ">="
163
- - !ruby/object:Gem::Version
164
- hash: 3
165
- segments:
166
- - 0
167
- version: "0"
168
- required_rubygems_version: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - ! '>='
126
+ - !ruby/object:Gem::Version
127
+ version: '0'
128
+ required_rubygems_version: !ruby/object:Gem::Requirement
169
129
  none: false
170
- requirements:
171
- - - ">="
172
- - !ruby/object:Gem::Version
173
- hash: 23
174
- segments:
175
- - 1
176
- - 3
177
- - 6
130
+ requirements:
131
+ - - ! '>='
132
+ - !ruby/object:Gem::Version
178
133
  version: 1.3.6
179
134
  requirements: []
180
-
181
135
  rubyforge_project: guard
182
- rubygems_version: 1.8.6
136
+ rubygems_version: 1.8.10
183
137
  signing_key:
184
138
  specification_version: 3
185
139
  summary: Guard keeps an eye on your file modifications
186
140
  test_files: []
187
-