rb-inotify 0.4.0 → 0.5.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.4.0
1
+ 0.5.0
@@ -13,6 +13,11 @@ module INotify
13
13
  # The name of the file that the event occurred on.
14
14
  # This is only set for events that occur on files in directories;
15
15
  # otherwise, it's `""`.
16
+ # Similarly, if the event is being fired for the directory itself
17
+ # the name will be `""`
18
+ #
19
+ # This pathname is relative to the enclosing directory.
20
+ # For the absolute pathname, use \{#absolute\_name}.
16
21
  #
17
22
  # @return [String]
18
23
  attr_reader :name
@@ -45,6 +50,19 @@ module INotify
45
50
  @watcher ||= @notifier.watchers[@watcher_id]
46
51
  end
47
52
 
53
+ # The absolute path of the file that the event occurred on.
54
+ #
55
+ # This is actually only as absolute as the path passed to the {Watcher}
56
+ # that created this event.
57
+ # However, it is relative to the working directory,
58
+ # assuming that hasn't changed since the watcher started.
59
+ #
60
+ # @return [String]
61
+ def absolute_name
62
+ return watcher.path if name.empty?
63
+ return File.join(watcher.path, name)
64
+ end
65
+
48
66
  # Returns the flags that describe this event.
49
67
  # This is generally similar to the input to {Notifier#watch},
50
68
  # except that it won't contain options flags nor `:all_events`,
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.4.0"
8
+ s.version = "0.5.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-01-14}
12
+ s.date = %q{2010-01-18}
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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rb-inotify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Weizenbaum
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-14 00:00:00 -08:00
12
+ date: 2010-01-18 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency