directory_watcher 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ == 1.3.1 / 2009-10-26
2
+
3
+ * 1 bug fix
4
+ - explicitly killing the Rev loop when stopping
5
+
1
6
  == 1.3.0 / 2009-10-21
2
7
 
3
8
  * 2 major enhancements
@@ -211,7 +211,7 @@ require 'yaml'
211
211
  #
212
212
  class DirectoryWatcher
213
213
 
214
- VERSION = '1.3.0' # :nodoc:
214
+ VERSION = '1.3.1' # :nodoc:
215
215
 
216
216
  # An +Event+ structure contains the _type_ of the event and the file _path_
217
217
  # to which the event pertains. The type can be one of the following:
@@ -451,7 +451,7 @@ class DirectoryWatcher
451
451
  # already running, this method will return without taking any action.
452
452
  #
453
453
  def start
454
- return if running?
454
+ return self if running?
455
455
 
456
456
  load!
457
457
  @scanner.start
@@ -462,7 +462,7 @@ class DirectoryWatcher
462
462
  # already stopped, this method will return without taking any action.
463
463
  #
464
464
  def stop
465
- return unless running?
465
+ return self unless running?
466
466
 
467
467
  @scanner.stop
468
468
  self
@@ -487,6 +487,7 @@ class DirectoryWatcher
487
487
  File.delete(@persist) if @persist and test(?f, @persist)
488
488
  @scanner.reset pre_load
489
489
  start if was_running
490
+ self
490
491
  end
491
492
 
492
493
  # call-seq:
@@ -57,9 +57,6 @@ class DirectoryWatcher::RevScanner < ::DirectoryWatcher::Scanner
57
57
  def stop
58
58
  return unless running?
59
59
 
60
- @thread._rev_loop.stop rescue nil
61
- @thread = nil
62
-
63
60
  @timer.detach
64
61
  @timer = nil
65
62
 
@@ -67,6 +64,10 @@ class DirectoryWatcher::RevScanner < ::DirectoryWatcher::Scanner
67
64
  @watchers.clear
68
65
 
69
66
  notify
67
+
68
+ @thread._rev_loop.stop rescue nil
69
+ @thread.kill # for some reason the rev loop is not returning after stopping
70
+ @thread = nil
70
71
  end
71
72
 
72
73
  # :stopdoc:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: directory_watcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Pease
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-21 00:00:00 -06:00
12
+ date: 2009-10-26 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency