em-dir-watcher 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.1
1
+ 0.9.2
@@ -0,0 +1,65 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{em-dir-watcher}
8
+ s.version = "0.9.2"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Andrey Tarantsov", "Mikhail Gusarov"]
12
+ s.date = %q{2010-08-09}
13
+ s.description = %q{Directory watching support for EventMachine (fssm / win32-changenotify)}
14
+ s.email = %q{andreyvit@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.md"
18
+ ]
19
+ s.files = [
20
+ ".gitignore",
21
+ "LICENSE",
22
+ "README.md",
23
+ "Rakefile",
24
+ "VERSION",
25
+ "em-dir-watcher.gemspec",
26
+ "examples/monitor.rb",
27
+ "lib/em-dir-watcher.rb",
28
+ "lib/em-dir-watcher/invokers/subprocess_invoker.rb",
29
+ "lib/em-dir-watcher/monitor.rb",
30
+ "lib/em-dir-watcher/platform/linux.rb",
31
+ "lib/em-dir-watcher/platform/mac.rb",
32
+ "lib/em-dir-watcher/platform/mac/ffi_fsevents_watcher.rb",
33
+ "lib/em-dir-watcher/platform/mac/rubycocoa_watcher.rb",
34
+ "lib/em-dir-watcher/platform/windows.rb",
35
+ "lib/em-dir-watcher/platform/windows/monitor.rb",
36
+ "lib/em-dir-watcher/platform/windows/path_to_ruby_exe.rb",
37
+ "lib/em-dir-watcher/tree.rb",
38
+ "test/helper.rb",
39
+ "test/test_monitor.rb",
40
+ "test/test_tree.rb",
41
+ "testloop"
42
+ ]
43
+ s.homepage = %q{http://github.com/mockko/em-dir-watcher}
44
+ s.rdoc_options = ["--charset=UTF-8"]
45
+ s.require_paths = ["lib"]
46
+ s.rubygems_version = %q{1.3.6}
47
+ s.summary = %q{Directory watching support for EventMachine (fssm / win32-changenotify)}
48
+ s.test_files = [
49
+ "test/helper.rb",
50
+ "test/test_monitor.rb",
51
+ "test/test_tree.rb",
52
+ "examples/monitor.rb"
53
+ ]
54
+
55
+ if s.respond_to? :specification_version then
56
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
57
+ s.specification_version = 3
58
+
59
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
60
+ else
61
+ end
62
+ else
63
+ end
64
+ end
65
+
data/examples/monitor.rb CHANGED
@@ -14,7 +14,7 @@ EM.error_handler{ |e|
14
14
  }
15
15
 
16
16
  EM.run {
17
- dw = EMDirWatcher.watch dir, inclusions, exclusions do |path|
17
+ dw = EMDirWatcher.watch dir, :include_only => inclusions, :exclude => exclusions do |path|
18
18
  full_path = File.join(dir, path)
19
19
  if File.exists? full_path
20
20
  puts "Modified: #{path}"
@@ -5,12 +5,6 @@ module EMDirWatcher
5
5
  module Platform
6
6
  module Linux
7
7
 
8
- module Native
9
- extend FFI::Library
10
- ffi_lib "c"
11
- attach_function :close, [:int], :int
12
- end
13
-
14
8
  class Watcher
15
9
 
16
10
  def initialize path, inclusions, exclusions
@@ -42,7 +36,8 @@ class Watcher
42
36
  def ready_to_use?; true; end
43
37
 
44
38
  def stop
45
- Native.close @notifier.fd
39
+ @notifier.close
40
+ rescue SystemCallError
46
41
  end
47
42
  end
48
43
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 9
8
- - 1
9
- version: 0.9.1
8
+ - 2
9
+ version: 0.9.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Andrey Tarantsov
@@ -34,6 +34,7 @@ files:
34
34
  - README.md
35
35
  - Rakefile
36
36
  - VERSION
37
+ - em-dir-watcher.gemspec
37
38
  - examples/monitor.rb
38
39
  - lib/em-dir-watcher.rb
39
40
  - lib/em-dir-watcher/invokers/subprocess_invoker.rb