guard 0.8.3 → 0.8.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,45 +1,51 @@
1
+ ## 0.8.4 - October 3, 2011
2
+
3
+ ### Bug fix
4
+
5
+ - [#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][])
6
+
1
7
  ## 0.8.3 - October 1, 2011
2
8
 
3
- ### Bugs fixes:
9
+ ### Bug fix
4
10
 
5
- - Pull request [#145](https://github.com/guard/guard/pull/145): Fix over-utilization of CPU in Interactor. ([@johnbintz][])
11
+ - [#145](https://github.com/guard/guard/pull/145): Fix over-utilization of CPU in Interactor. ([@johnbintz][])
6
12
 
7
- ### Improvement:
13
+ ### Improvements
8
14
 
9
- - Pull request [#146](https://github.com/guard/guard/pull/146): Use a mutex instead of a lock for more efficient/simple locking. ([@f1sherman][])
15
+ - [#146](https://github.com/guard/guard/pull/146): Use a mutex instead of a lock for more efficient/simple locking. ([@f1sherman][])
10
16
  - Make Guard implementation of `:task_has_failed` simple. ([@netzpirat][])
11
17
 
12
18
  ## 0.8.2 - September 30, 2011
13
19
 
14
- ### Bugs fixes:
20
+ ### Bug fix
15
21
 
16
22
  - Fixed guard stop to prevent run_guard_task(:stop) to be skipped [guard-spork issue #28](https://github.com/guard/guard-spork/issues/28). ([@thibaudgg][])
17
23
 
18
- ### Improvement:
24
+ ### Improvement
19
25
 
20
26
  - Update docs regarding :task_has_failed. ([@netzpirat][])
21
27
 
22
28
  ## 0.8.1 - September 29, 2011
23
29
 
24
- ### Bugs fixes:
30
+ ### Bug fix
25
31
 
26
- - Pull request [#144](https://github.com/guard/guard/pull/144): Fix `guard init`. (reported by [@fabioyamate][], fixed by [@rymai][])
32
+ - [#144](https://github.com/guard/guard/pull/144): Fix `guard init`. (reported by [@fabioyamate][], fixed by [@rymai][])
27
33
 
28
34
  ## 0.8.0 - September 28, 2011
29
35
 
30
- ### Bugs fixes:
36
+ ### Bug fixes
31
37
 
32
- - Pull request [#137](https://github.com/guard/guard/pull/137): Fix interacting with tools like ruby-debug. ([@hron][] & [@netzpirat][])
33
- - Pull request [#138](https://github.com/guard/guard/pull/138): Fixed comments in example scaffold to reference interactions. ([@rmm5t][] & [@netzpirat][])
38
+ - [#137](https://github.com/guard/guard/pull/137): Fix interacting with tools like ruby-debug. ([@hron][] & [@netzpirat][])
39
+ - [#138](https://github.com/guard/guard/pull/138): Fixed comments in example scaffold to reference interactions. ([@rmm5t][] & [@netzpirat][])
34
40
 
35
- ### New feature:
41
+ ### New feature
36
42
 
37
- - Pull request [#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][])
38
- - Issue [#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][])
39
- - Issue [#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][])
43
+ - [#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][])
44
+ - [#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][])
45
+ - [#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][])
40
46
  - New `Guard::Group` class to store groups defined in Guardfile (with `Guard::Dsl#group`). ([@rymai][])
41
47
 
42
- ### Improvement:
48
+ ### Improvements
43
49
 
44
50
  - Specs refactoring. ([@netzpirat][])
45
51
  - Full YARD documentation. ([@netzpirat][] & a little of [@rymai][])
@@ -53,233 +59,224 @@
53
59
  - Posix Signals handlers (`Ctrl-C`, `Ctrl-\` and `Ctrl-Z`) are no more supported and replaced by `$stdin.gets`. Please refer to the "Interactions" section in the README for more information. ([@thibaudgg][])
54
60
  - JRuby & Rubinius support (beta). ([@thibaudgg][] & [@netzpirat][])
55
61
 
56
- ### New feature:
62
+ ### New features
57
63
 
58
- - Pull request [#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][])
64
+ - [#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][])
59
65
  - Ability to 'pause' files modification listening. Please refer to the "Interactions" section in the README for more information. ([@thibaudgg][])
60
66
 
61
- ### Improvement:
67
+ ### Improvement
62
68
 
63
69
  - Remove the need to scan the whole directory after guard's `run_on_change` method. ([@thibaudgg][])
64
70
 
65
71
  ## 0.6.3 - September 1, 2011
66
72
 
67
- ### New features:
73
+ ### New features
68
74
 
69
- - Pull request [#130](https://github.com/guard/guard/pull/130): Adds `ignore_paths` method to DSL. ([@ianwhite][])
70
- - Pull request [#128](https://github.com/guard/guard/pull/128): Users can add additional settings to `~/.guard.rb` that augment the existing Guardfile. ([@tpope][])
75
+ - [#130](https://github.com/guard/guard/pull/130): Adds `ignore_paths` method to DSL. ([@ianwhite][])
76
+ - [#128](https://github.com/guard/guard/pull/128): Users can add additional settings to `~/.guard.rb` that augment the existing Guardfile. ([@tpope][])
71
77
 
72
78
  ## 0.6.2 - August 17, 2011
73
79
 
74
- ### Bugs fixes:
80
+ ### Bug fixes
75
81
 
76
82
  - Re-add the possibility to use the `growl` gem since the `growl_notify` gem this is currently known to not work in conjunction with Spork. ([@netzpirat][])
77
83
  - Ensure that scoped groups and group name are symbolized before checking for inclusion. ([@rymai][])
78
84
 
79
- ### New features:
85
+ ### New features
80
86
 
81
87
  - Groups are now stored in a `@groups` variable (will be used for future features). ([@rymai][])
82
88
  - Guards will now receive their group in the options hash at initialization (will be used for future features). ([@rymai][])
83
89
 
84
- ### Improvement:
90
+ ### Improvement
85
91
 
86
92
  - Explain the growl/growl_notify differences in the README. ([@netzpirat][])
87
93
 
88
94
  ## 0.6.1 - August 15, 2011
89
95
 
90
- ### Bugs fixes:
96
+ ### Bug fixes
91
97
 
92
- - Pull request [#120](https://github.com/guard/guard/pull/120): remove `guardfile_contents` when re-evaluating so that the Guardfile gets reloaded correctly. ([@mordaroso][])
93
- - Pull request [#119](https://github.com/guard/guard/pull/119): `Dsl.evaluate_guardfile` uses all groups if none specified. ([@ches][])
98
+ - [#120](https://github.com/guard/guard/pull/120): remove `guardfile_contents` when re-evaluating so that the Guardfile gets reloaded correctly. ([@mordaroso][])
99
+ - [#119](https://github.com/guard/guard/pull/119): `Dsl.evaluate_guardfile` uses all groups if none specified. ([@ches][])
94
100
 
95
101
  ## 0.6.0 - August 13, 2011
96
102
 
97
- ### Bugs fixes:
103
+ ### Bug fixes
98
104
 
99
105
  - Pull request [#107](https://github.com/guard/guard/pull/107): Small spelling fix. ([@dnagir][])
100
106
  - `Dir.glob` now ignores files that don't need to be watched. ([@rymai][])
101
107
 
102
- ### New features:
108
+ ### New feature
103
109
 
104
110
  - Pull request [#112](https://github.com/guard/guard/pull/112): Add `list` command to CLI. ([@docwhat][])
105
111
 
106
- ### Improvements:
112
+ ### Improvements
107
113
 
108
- - Pull request [#99](https://github.com/guard/guard/pull/99): [OS X] Switch from growl gem to growl_notify gem. ([@johnbintz][])
109
- - Pull request [#115](https://github.com/guard/guard/pull/115): [Linux] Add `:transient => true` to default libnotify options. ([@zonque][])
110
- - Pull request [#95](https://github.com/guard/guard/pull/95): Output system commands and options to be executed when in debug mode. ([@uk-ar][] and [@netzpirat][])
114
+ - [#99](https://github.com/guard/guard/pull/99): [OS X] Switch from growl gem to growl_notify gem. ([@johnbintz][])
115
+ - [#115](https://github.com/guard/guard/pull/115): [Linux] Add `:transient => true` to default libnotify options. ([@zonque][])
116
+ - [#95](https://github.com/guard/guard/pull/95): Output system commands and options to be executed when in debug mode. ([@uk-ar][] and [@netzpirat][])
111
117
  - `Guard::Dsl.revaluate_guardfile` has been renamed to `Guard::Dsl.reevaluate_guardfile`. ([@rymai][])
112
118
  - New CLI options: ([@nestegg][])
113
119
  - `watchdir`/`-w` to specify the directory in which Guard should watch for changes,
114
120
  - `guardfile`/`-G` to specify an alternate location for the Guardfile to use.
115
- - Pull request [#90](https://github.com/guard/guard/pull/90): Refactoring of color handling in the `Guard::UI`. ([@stereobooster][])
121
+ - [#90](https://github.com/guard/guard/pull/90): Refactoring of color handling in the `Guard::UI`. ([@stereobooster][])
116
122
 
117
123
  ## 0.5.1 - July 2, 2011
118
124
 
119
- ### Bugs fixes:
125
+ ### Bug fix
120
126
 
121
127
  - Fixed `guard show` command. ([@bronson][] & [@thibaudgg][])
122
128
 
123
129
  ## 0.5.0 - July 2, 2011
124
130
 
125
- ### New features:
131
+ ### New features
126
132
 
127
133
  - Guard::Ego is now part of Guard, so Guardfile is automagically re-evaluated when modified. ([@thibaudgg][])
128
- - Pull request [#91](https://github.com/guard/guard/pull/91): Show Guards in Guardfile with the `guard -T`. ([@johnbintz][])
134
+ - [#91](https://github.com/guard/guard/pull/91): Show Guards in Guardfile with the `guard -T`. ([@johnbintz][])
129
135
 
130
- ### Improvements:
136
+ ### Improvements
131
137
 
132
- - Issue [#98](https://github.com/guard/guard/issues/98): Multiple calls per watch event on linux with rb-inotify. ([@jeffutter][] & [@netzpirat][])
133
- - Pull request [#94](https://github.com/guard/guard/pull/94): Show backtrace in terminal when a problem with a watch action occurs. ([@capotej][])
134
- - Pull request [#88](https://github.com/guard/guard/pull/88): Write exception trace in the terminal when a supervised task fail. ([@mcmire][])
138
+ - [#98](https://github.com/guard/guard/issues/98): Multiple calls per watch event on linux with rb-inotify. ([@jeffutter][] & [@netzpirat][])
139
+ - [#94](https://github.com/guard/guard/pull/94): Show backtrace in terminal when a problem with a watch action occurs. ([@capotej][])
140
+ - [#88](https://github.com/guard/guard/pull/88): Write exception trace in the terminal when a supervised task fail. ([@mcmire][])
135
141
  - Color in red the "ERROR:" flag when using `UI.error`. ([@rymai][])
136
- - Issue [#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][])
137
- - Issue [#12](https://github.com/guard/guard/issues/12) and Pull request [#86](https://github.com/guard/guard/pull/86): Eventually exits with SystemStackError. ([@stereobooster][])
138
- - Pull request [#84](https://github.com/guard/guard/pull/84): Use RbConfig instead of obsolete and deprecated Config. ([@etehtsea][])
139
- - Pull request [#80](https://github.com/guard/guard/pull/80): Watching dotfile (hidden files under unix). (reported by [@chrisberkhout][], fixed by [@yannlugrin][])
142
+ - [#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][])
143
+ - [#12](https://github.com/guard/guard/issues/12) and Pull request [#86](https://github.com/guard/guard/pull/86): Eventually exits with SystemStackError. ([@stereobooster][])
144
+ - [#84](https://github.com/guard/guard/pull/84): Use RbConfig instead of obsolete and deprecated Config. ([@etehtsea][])
145
+ - [#80](https://github.com/guard/guard/pull/80): Watching dotfile (hidden files under unix). (reported by [@chrisberkhout][], fixed by [@yannlugrin][])
140
146
  - Clear the terminal on start when the `:clear` option is given. ([@rymai][])
141
147
  - Rename home directory Guardfile to `.Guardfile`. ([@tpope][])
142
148
 
143
149
  ## 0.4.2 - June 7, 2011
144
150
 
145
- ### Bugs fixes:
151
+ ### Bug fixes
146
152
 
147
153
  - Fixed Guard::Version in ruby 1.8.7 ([@thibaudgg][])
148
154
  - Fix ([@mislav][]) link in CHANGELOG (Note: this is a recursive CHANGELOG item). ([@fnichol][])
149
155
 
150
156
  ## 0.4.1 - June 7, 2011
151
157
 
152
- ### Improvements:
158
+ ### Improvements
153
159
 
154
- - Pull request [#77](https://github.com/guard/guard/pull/77): Refactor `get_guard_class` to first try the constant and fallback to require + various tweaks. ([@mislav][])
160
+ - [#77](https://github.com/guard/guard/pull/77): Refactor `get_guard_class` to first try the constant and fallback to require + various tweaks. ([@mislav][])
155
161
  - Notifier improvement, don't use system notification library if could not be required. ([@yannlugrin][])
156
162
 
157
163
  ## 0.4.0 - June 5, 2011
158
164
 
159
- ### Bugs fixes:
165
+ ### Bug fix
160
166
 
161
167
  - In Ruby < 1.9, `Symbol#downcase` doesn't exist! ([@rymai][])
162
168
 
163
- ### New features:
169
+ ### New features
164
170
 
165
- - Pull request [#73](https://github.com/guard/guard/pull/73): Allow DSL's `group` method to accept a Symbol as group name. ([@johnbintz][])
166
- - Pull request [#51](https://github.com/guard/guard/pull/51): Allow options (like `:priority`) to be passed through to the Notifier. ([@indirect][] & [@netzpirat][])
171
+ - [#73](https://github.com/guard/guard/pull/73): Allow DSL's `group` method to accept a Symbol as group name. ([@johnbintz][])
172
+ - [#51](https://github.com/guard/guard/pull/51): Allow options (like `:priority`) to be passed through to the Notifier. ([@indirect][] & [@netzpirat][])
167
173
 
168
- ### Improvements:
174
+ ### Improvement
169
175
 
170
- - Pull request [#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][])
176
+ - [#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][])
171
177
 
172
178
  ## 0.4.0.rc - May 28, 2011
173
179
 
174
- ### Bugs fixes:
180
+ ### Bug fixes
175
181
 
176
- - Pull request [#69](https://github.com/guard/guard/pull/69): Fixed typo in README: `Ctr-/` => `Ctr-\`. ([@tinogomes][])
177
- - Pull request [#66](https://github.com/guard/guard/pull/66): Support for dashes in guard names. ([@johnbintz][])
182
+ - [#69](https://github.com/guard/guard/pull/69): Fixed typo in README: `Ctr-/` => `Ctr-\`. ([@tinogomes][])
183
+ - [#66](https://github.com/guard/guard/pull/66): Support for dashes in guard names. ([@johnbintz][])
178
184
  - Require `guard/ui` because `Guard::Notifier` can be required without full Guard. ([@yannlugrin][])
179
185
  - Handled quick file (<1s) modification. Avoid to catch modified files without content modification (sha1 checksum). ([@thibaudgg][] & [@netzpirat][])
180
186
  - Fixed `Guard::Notifier` (when growl/libnotify not present). ([@thibaudgg][])
181
187
  - Fixed Rubygems deprecation messages. ([@thibaudgg][])
182
188
 
183
- ### New features:
189
+ ### New features
184
190
 
185
- - Pull request [#67](https://github.com/guard/guard/pull/67): Allow Guardfile in `$HOME` folder. ([@hashrocketeer][])
186
- - Pull request [#64](https://github.com/guard/guard/pull/64): Windows notifications support. ([@stereobooster][])
187
- - Pull request [#63](https://github.com/guard/guard/pull/63): Refactor listeners to work as a library. ([@niklas][])
191
+ - [#67](https://github.com/guard/guard/pull/67): Allow Guardfile in `$HOME` folder. ([@hashrocketeer][])
192
+ - [#64](https://github.com/guard/guard/pull/64): Windows notifications support. ([@stereobooster][])
193
+ - [#63](https://github.com/guard/guard/pull/63): Refactor listeners to work as a library. ([@niklas][])
188
194
  - Use `ENV["GUARD_NOTIFY"]` to disable notifications. ([@thibaudgg][])
189
195
  - Cleaning up all specs. ([@netzpirat][])
190
- - Pull request [#60](https://github.com/guard/guard/pull/60): Added Windows support. ([@stereobooster][])
191
- - Pull request [#58](https://github.com/guard/guard/pull/58): Extract code from signal handlers into methods. ([@nicksieger][])
192
- - Pull request [#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][])
193
-
196
+ - [#60](https://github.com/guard/guard/pull/60): Added Windows support. ([@stereobooster][])
197
+ - [#58](https://github.com/guard/guard/pull/58): Extract code from signal handlers into methods. ([@nicksieger][])
198
+ - [#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][])
194
199
 
195
200
  ## 0.3.4 - April 24, 2011
196
201
 
197
- ### Bugs fixes:
202
+ ### Bug fix
198
203
 
199
- - Issue [#41](https://github.com/guard/guard/issues/41): Removed useless Bundler requirement. ([@thibaudgg][])
204
+ - [#41](https://github.com/guard/guard/issues/41): Removed useless Bundler requirement. ([@thibaudgg][])
200
205
 
201
- ### New features:
206
+ ### New features
202
207
 
203
208
  - Changed CHANGELOG from RDOC to Markdown and cleaned it! Let's celebrate! ([@rymai][])
204
209
  - Changed README from RDOC to Markdown! Let's celebrate! ([@thibaudgg][])
205
- - Issue [#48](https://github.com/guard/guard/issues/48): Adding support for inline Guard classes rather than requiring a gem. ([@jrsacks][])
206
-
210
+ - [#48](https://github.com/guard/guard/issues/48): Adding support for inline Guard classes rather than requiring a gem. ([@jrsacks][])
207
211
 
208
212
  ## 0.3.3 - April 18, 2011
209
213
 
210
- ### Bugs fixes:
214
+ ### Bug fix
211
215
 
212
216
  - Fixed `new_modified_files` rerun conditions on `Guard.run_on_change_for_all_guards`. ([@thibaudgg][])
213
217
 
214
-
215
218
  ## 0.3.2 - April 17, 2011
216
219
 
217
- ### Bugs fixes:
218
-
219
- - Pull request [#43](https://github.com/guard/guard/pull/43): Fixed `guard init` command. ([@brainopia][])
220
+ ### Bug fixe
220
221
 
222
+ - [#43](https://github.com/guard/guard/pull/43): Fixed `guard init` command. ([@brainopia][])
221
223
 
222
224
  ## 0.3.1 - April 14, 2011
223
225
 
224
- ### Bugs fixes:
226
+ ### Bug fixes
225
227
 
226
228
  - Return unique filenames from Linux listener. (Marian Schubert)
227
229
  - `Guard.get_guard_class` return wrong class when loaded nested class. ([@koshigoe][])
228
- - Issue [#35](https://github.com/guard/guard/issues/35): Fixed open-gem/gem_open dependency problem by using `gem which` to locate guards gem path. (reported by [@thierryhenrio][], fixed by [@thibaudgg][])
229
- - Issue [#38](https://github.com/guard/guard/issues/38) & Pull request [#39](https://github.com/guard/guard/issues/39): Fixed an invalid ANSI escape code in `Guard::UI.reset_line`. ([@gix][])
230
-
231
- ### New features:
230
+ - [#35](https://github.com/guard/guard/issues/35): Fixed open-gem/gem_open dependency problem by using `gem which` to locate guards gem path. (reported by [@thierryhenrio][], fixed by [@thibaudgg][])
231
+ - [#38](https://github.com/guard/guard/issues/38) & Pull request [#39](https://github.com/guard/guard/issues/39): Fixed an invalid ANSI escape code in `Guard::UI.reset_line`. ([@gix][])
232
232
 
233
- - Issue [#28](https://github.com/guard/guard/issues/28): New `-n` command line option to disable notifications (Growl / Libnotify). ([@thibaudgg][])
233
+ ### New feature
234
234
 
235
+ - [#28](https://github.com/guard/guard/issues/28): New `-n` command line option to disable notifications (Growl / Libnotify). ([@thibaudgg][])
235
236
 
236
237
  ## 0.3.0 - January 19, 2011
237
238
 
238
- ### Bugs fixes:
239
+ ### Bug fix
239
240
 
240
241
  - Avoid launching `run_on_change` guards method when no files matched. `--clear` guard argument is now usable. ([@thibaudgg][])
241
242
 
242
- ### New features:
243
+ ### New features
243
244
 
244
245
  - The whole directory is now watched during `run_on_change` to detect new files modifications. ([@thibaudgg][])
245
- - Pull request [#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][])
246
+ - [#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][])
246
247
  - `watch` patterns are now more strict: strings are matched with `String#==`, `Regexp` are matched with `Regexp#match`. ([@rymai][])
247
248
  - A deprecation warning is displayed if your `Guardfile` contains `String` that look like `Regexp` (bad!). ([@rymai][])
248
249
  - It's now possible to return an `Enumerable` in the `watch` optional blocks in the `Guardfile`. ([@rymai][])
249
250
 
250
- ### New specs:
251
+ ### New specs
251
252
 
252
253
  - `Guard::Watcher`. ([@rymai][])
253
- - Pull request [#13](https://github.com/guard/guard/pull/13): `Guard::Dsl`. ([@oliamb][])
254
-
254
+ - [#13](https://github.com/guard/guard/pull/13): `Guard::Dsl`. ([@oliamb][])
255
255
 
256
256
  ## 0.2.2 - October 25, 2010
257
257
 
258
- ### Bugs fixes:
259
-
260
- - Issue [#5](https://github.com/guard/guard/issues/5): avoid creating new copy of `fsevent_watch` every time a file is changed. (reported by [@stouset][], fixed by [@thibaudgg][])
258
+ ### Bug fix
261
259
 
260
+ - [#5](https://github.com/guard/guard/issues/5): avoid creating new copy of `fsevent_watch` every time a file is changed. (reported by [@stouset][], fixed by [@thibaudgg][])
262
261
 
263
262
  ## 0.2.1 - October 24, 2010
264
263
 
265
- ### Bugs fixes:
266
-
267
- - Pull request [#7](https://github.com/guard/guard/pull/7): Fixes for Linux support. ([@yannlugrin][])
268
- - Pull request [#6](https://github.com/guard/guard/pull/6): Locate guard now chomp newline in result path. ([@yannlugrin][])
264
+ ### Bug fixes
269
265
 
266
+ - [#7](https://github.com/guard/guard/pull/7): Fixes for Linux support. ([@yannlugrin][])
267
+ - [#6](https://github.com/guard/guard/pull/6): Locate guard now chomp newline in result path. ([@yannlugrin][])
270
268
 
271
269
  ## 0.2.0 - October 21, 2010
272
270
 
273
- ### Bugs fixes:
271
+ ### Bug fixes
274
272
 
275
- - Issue [#3](https://github.com/guard/guard/issues/3): `guard init <guard-name>` no more need `Gemfile` but `open_gem` is required now. (reported by [@wereHamster][], fixed by [@thibaudgg][])
276
- - Issue [#2](https://github.com/guard/guard/issues/2): 1.8.6 compatibility. (reported by [@veged][], fixed by [@thibaudgg][])
273
+ - [#3](https://github.com/guard/guard/issues/3): `guard init <guard-name>` no more need `Gemfile` but `open_gem` is required now. (reported by [@wereHamster][], fixed by [@thibaudgg][])
274
+ - [#2](https://github.com/guard/guard/issues/2): 1.8.6 compatibility. (reported by [@veged][], fixed by [@thibaudgg][])
277
275
  - Removes Growl & Libnotify dependencies. ([@thibaudgg][])
278
276
 
279
-
280
277
  ## 0.2.0.beta.1 - October 17, 2010
281
278
 
282
- ### New features:
279
+ ### New features
283
280
 
284
281
  - Improved listeners support (`rb-fsevent` & `rb-inotify`). ([@thibaudgg][])
285
282
  - Added polling listening fallback. ([@thibaudgg][])
@@ -299,6 +296,7 @@
299
296
  [@Gazer]: https://github.com/Gazer
300
297
  [@gix]: https://github.com/gix
301
298
  [@hron]: https://github.com/hron
299
+ [@hardipe]: https://github.com/hardipe
302
300
  [@hashrocketeer]: https://github.com/hashrocketeer
303
301
  [@ianwhite]: https://github.com/ianwhite
304
302
  [@indirect]: https://github.com/indirect
data/lib/guard.rb CHANGED
@@ -29,6 +29,8 @@ module Guard
29
29
  # @option options [Boolean] watch_all_modifications watches all file modifications if true
30
30
  #
31
31
  def setup(options = {})
32
+ @lock = Mutex.new
33
+
32
34
  @options = options
33
35
  @guards = []
34
36
  @groups = [Group.new(:default)]
@@ -41,8 +43,6 @@ module Guard
41
43
 
42
44
  debug_command_execution if @options[:debug]
43
45
 
44
- @lock = Mutex.new
45
-
46
46
  self
47
47
  end
48
48
 
@@ -180,9 +180,12 @@ module Guard
180
180
 
181
181
  @lock.synchronize do
182
182
  begin
183
+ @interactor.stop_if_not_current
183
184
  yield
184
185
  rescue Interrupt
185
186
  end
187
+
188
+ @interactor.start
186
189
  end
187
190
  end
188
191
 
data/lib/guard/cli.rb CHANGED
@@ -119,7 +119,7 @@ module Guard
119
119
  #
120
120
  def init(guard_name = nil)
121
121
  if !File.exist?('Guardfile')
122
- puts 'Writing new Guardfile to #{Dir.pwd}/Guardfile'
122
+ puts "Writing new Guardfile to #{Dir.pwd}/Guardfile"
123
123
  FileUtils.cp(File.expand_path('../templates/Guardfile', __FILE__), 'Guardfile')
124
124
  elsif guard_name.nil?
125
125
  Guard::UI.error "Guardfile already exists at #{ Dir.pwd }/Guardfile"
@@ -11,28 +11,34 @@ module Guard
11
11
  # - Everything else => Run all
12
12
  #
13
13
  class Interactor
14
-
15
14
  # Start the interactor in its own thread.
16
15
  #
17
16
  def start
18
17
  return if ENV["GUARD_ENV"] == 'test'
19
18
 
20
- @thread = Thread.new do
21
- while entry = $stdin.gets.chomp
22
- entry.gsub! /\n/, ''
23
- case entry
24
- when 'stop', 'quit', 'exit', 's', 'q', 'e'
25
- ::Guard.stop
26
- when 'reload', 'r', 'z'
27
- ::Guard::Dsl.reevaluate_guardfile
28
- ::Guard.reload
29
- when 'pause', 'p'
30
- ::Guard.pause
31
- else
32
- ::Guard.run_all
19
+ if !@thread || @thread.stop?
20
+ @thread = Thread.new do
21
+ while entry = $stdin.gets.chomp
22
+ case entry
23
+ when 'stop', 'quit', 'exit', 's', 'q', 'e'
24
+ ::Guard.stop
25
+ when 'reload', 'r', 'z'
26
+ ::Guard::Dsl.reevaluate_guardfile
27
+ ::Guard.reload
28
+ when 'pause', 'p'
29
+ ::Guard.pause
30
+ else
31
+ ::Guard.run_all
32
+ end
33
33
  end
34
34
  end
35
35
  end
36
36
  end
37
+
38
+ def stop_if_not_current
39
+ unless Thread.current == @thread
40
+ @thread.kill
41
+ end
42
+ end
37
43
  end
38
44
  end
data/lib/guard/version.rb CHANGED
@@ -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.3'
4
+ VERSION = '0.8.4'
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.8.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-01 00:00:00.000000000Z
12
+ date: 2011-10-03 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
16
- requirement: &70160547964420 !ruby/object:Gem::Requirement
16
+ requirement: &70285420259220 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.14.6
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70160547964420
24
+ version_requirements: *70285420259220
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: bundler
27
- requirement: &70160547963800 !ruby/object:Gem::Requirement
27
+ requirement: &70285420258380 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70160547963800
35
+ version_requirements: *70285420258380
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &70160547962800 !ruby/object:Gem::Requirement
38
+ requirement: &70285420255900 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 2.6.0
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70160547962800
46
+ version_requirements: *70285420255900
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: guard-rspec
49
- requirement: &70160547961820 !ruby/object:Gem::Requirement
49
+ requirement: &70285420255300 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 0.3.1
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70160547961820
57
+ version_requirements: *70285420255300
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: yard
60
- requirement: &70160547961140 !ruby/object:Gem::Requirement
60
+ requirement: &70285420254600 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 0.7.2
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70160547961140
68
+ version_requirements: *70285420254600
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: kramdown
71
- requirement: &70160547960440 !ruby/object:Gem::Requirement
71
+ requirement: &70285420253720 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: 0.13.3
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70160547960440
79
+ version_requirements: *70285420253720
80
80
  description: Guard is a command line tool to easily handle events on file system modifications.
81
81
  email:
82
82
  - thibaud@thibaud.me