rb-inotify 0.8.4 → 0.8.5

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.8.4
1
+ 0.8.5
@@ -180,9 +180,9 @@ module INotify
180
180
  # or the flags don't contain any events
181
181
  def watch(path, *flags, &callback)
182
182
  return Watcher.new(self, path, *flags, &callback) unless flags.include?(:recursive)
183
- Dir.entries(path).each do |d|
184
- next if d == '.' || d == '..'
185
- d = File.join(path, d)
183
+
184
+ Dir.glob(File.join(path, '*'), File::FNM_DOTMATCH).each do |d|
185
+ next if d =~ /\/\.\.?$/ # Current or parent directory
186
186
  watch(d, *flags, &callback) if !RECURSIVE_BLACKLIST.include?(d) && File.directory?(d)
187
187
  end
188
188
 
@@ -58,7 +58,7 @@ module INotify
58
58
  @callback = callback || proc {}
59
59
  @path = path
60
60
  @flags = flags.freeze
61
- @id = Native.inotify_add_watch(@notifier.fd, path,
61
+ @id = Native.inotify_add_watch(@notifier.fd, path.dup,
62
62
  Native::Flags.to_mask(flags))
63
63
 
64
64
  unless @id < 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, 8, 4]
16
+ VERSION = [0, 8, 5]
17
17
  end
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.8.4"
8
+ s.version = "0.8.5"
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-12-05}
12
+ s.date = %q{2011-06-02}
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 = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rb-inotify
3
3
  version: !ruby/object:Gem::Version
4
- hash: 55
4
+ hash: 53
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 8
9
- - 4
10
- version: 0.8.4
9
+ - 5
10
+ version: 0.8.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nathan Weizenbaum
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-05 00:00:00 -08:00
18
+ date: 2011-06-02 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency