rb-inotify 0.7.2 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.2
1
+ 0.8.0
data/lib/rb-inotify.rb CHANGED
@@ -13,5 +13,5 @@ module INotify
13
13
  # An array containing the version number of rb-inotify.
14
14
  # The numbers in the array are the major, minor, and patch versions,
15
15
  # respectively.
16
- VERSION = [0, 7, 2]
16
+ VERSION = [0, 8, 0]
17
17
  end
@@ -26,5 +26,6 @@ module INotify
26
26
  attach_function :inotify_rm_watch, [:int, :uint32], :int
27
27
 
28
28
  attach_function :read, [:int, :pointer, :size_t], :ssize_t
29
+ attach_function :close, [:int], :int
29
30
  end
30
31
  end
@@ -243,6 +243,17 @@ module INotify
243
243
  events
244
244
  end
245
245
 
246
+ def close
247
+ return if Native.close(@fd) == 0
248
+
249
+ raise SystemCallError.new("Failed to properly close inotify socket" +
250
+ case FFI.errno
251
+ when Errno::EBADF::Errno; ": invalid or closed file descriptior"
252
+ when Errno::EIO::Errno; ": an I/O error occured"
253
+ end,
254
+ FFI.errno)
255
+ end
256
+
246
257
  private
247
258
 
248
259
  # Same as IO#readpartial, or as close as we need.
data/rb-inotify.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rb-inotify}
8
- s.version = "0.7.2"
8
+ s.version = "0.8.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Nathan Weizenbaum"]
12
- s.date = %q{2010-04-25}
12
+ s.date = %q{2010-08-07}
13
13
  s.description = %q{A Ruby wrapper for Linux's inotify, using FFI}
14
14
  s.email = %q{nex342@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -33,7 +33,7 @@ Gem::Specification.new do |s|
33
33
  s.homepage = %q{http://github.com/nex3/rb-notify}
34
34
  s.rdoc_options = ["--charset=UTF-8"]
35
35
  s.require_paths = ["lib"]
36
- s.rubygems_version = %q{1.3.6}
36
+ s.rubygems_version = %q{1.3.5}
37
37
  s.summary = %q{A Ruby wrapper for Linux's inotify, using FFI}
38
38
 
39
39
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,12 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rb-inotify
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 7
8
- - 2
9
- version: 0.7.2
4
+ version: 0.8.0
10
5
  platform: ruby
11
6
  authors:
12
7
  - Nathan Weizenbaum
@@ -14,37 +9,29 @@ autorequire:
14
9
  bindir: bin
15
10
  cert_chain: []
16
11
 
17
- date: 2010-04-25 00:00:00 -07:00
12
+ date: 2010-08-07 00:00:00 -07:00
18
13
  default_executable:
19
14
  dependencies:
20
15
  - !ruby/object:Gem::Dependency
21
16
  name: ffi
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
24
20
  requirements:
25
21
  - - ">="
26
22
  - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- - 5
30
- - 0
31
23
  version: 0.5.0
32
- type: :runtime
33
- version_requirements: *id001
24
+ version:
34
25
  - !ruby/object:Gem::Dependency
35
26
  name: yard
36
- prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
27
+ type: :development
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
38
30
  requirements:
39
31
  - - ">="
40
32
  - !ruby/object:Gem::Version
41
- segments:
42
- - 0
43
- - 4
44
- - 0
45
33
  version: 0.4.0
46
- type: :development
47
- version_requirements: *id002
34
+ version:
48
35
  description: A Ruby wrapper for Linux's inotify, using FFI
49
36
  email: nex342@gmail.com
50
37
  executables: []
@@ -80,20 +67,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
80
67
  requirements:
81
68
  - - ">="
82
69
  - !ruby/object:Gem::Version
83
- segments:
84
- - 0
85
70
  version: "0"
71
+ version:
86
72
  required_rubygems_version: !ruby/object:Gem::Requirement
87
73
  requirements:
88
74
  - - ">="
89
75
  - !ruby/object:Gem::Version
90
- segments:
91
- - 0
92
76
  version: "0"
77
+ version:
93
78
  requirements: []
94
79
 
95
80
  rubyforge_project:
96
- rubygems_version: 1.3.6
81
+ rubygems_version: 1.3.5
97
82
  signing_key:
98
83
  specification_version: 3
99
84
  summary: A Ruby wrapper for Linux's inotify, using FFI