rb-fsevent 0.10.2 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +8 -7
- data/bin/fsevent_watch +0 -0
- data/ext/fsevent_watch/defines.h +2 -0
- data/ext/rakefile.rb +5 -0
- data/lib/rb-fsevent/fsevent.rb +2 -2
- data/lib/rb-fsevent/version.rb +1 -1
- data/rb-fsevent.gemspec +0 -1
- metadata +6 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 699dcebd7c8e1b99dbd7eeae0b82b8e588e211104a67a549d412630db567ef3e
|
4
|
+
data.tar.gz: cff9f4532ae72dbc2e19d7025b211dc82444f10572079f0abac227f6a8f770f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c21fe63b0ed15e92c8cc5cc908b4c1c9fa93a882211cd21bb5a974d349697a896b0326ed4c721bb6b267fc4de70fffe357a31c17cdf0f932fcc1c9851868a695
|
7
|
+
data.tar.gz: 126114099b0302f935453f402b0817626e5fe2f8b1acc2c7316aed7263b2077d0db2f0fa6af907a61a752e03de18bc8ada50916609341c646421e1e7a61e1467
|
data/README.md
CHANGED
@@ -5,17 +5,18 @@
|
|
5
5
|
|
6
6
|
Very simple & usable Mac OSX FSEvents API
|
7
7
|
|
8
|
-
* RubyCocoa not required!
|
9
8
|
* Signals are working (really)
|
10
9
|
* Tested on MRI 2.4.1, RBX 3.72, JRuby 1.7.26 and 9.1.8.0
|
11
10
|
* Tested on 10.8
|
12
11
|
|
13
12
|
## HFS+ filename corruption bug
|
14
13
|
|
15
|
-
There is a _very_ long-standing (since 2011) OSX bug where sometimes the filename metadata for HFS+ filesystems will get corrupted, resulting in some APIs returning one case for a file, and other APIs returning another.
|
14
|
+
There is a _very_ long-standing (since 2011) OSX bug where sometimes the filename metadata for HFS+ filesystems will get corrupted, resulting in some APIs returning one case for a file, and other APIs returning another. The result is that sometimes, _for no visible reason to the user_, fsevents would simply not work. As of rb-fsevent 0.9.5 this issue is properly detected and an insanely hacky (but effective) workaround is used that replaces the system `realpath()` with a custom implementation that should almost always return the same value as the kernel reporting (thus fixing fsevents). The major flaw in the workaround is that it may return the wrong path for hard links.
|
16
15
|
|
17
16
|
Please note that this doesn't repair the underlying issue on disk. Other apps and libraries using fsevents will continue to break with no warning. There may be other issues unrelated to fsevents.
|
18
17
|
|
18
|
+
__This bug is resolved in MacOS 10.12 and all users are strongly encouraged to upgrade.__
|
19
|
+
|
19
20
|
## Install
|
20
21
|
|
21
22
|
gem install rb-fsevent
|
@@ -137,11 +138,11 @@ fsevent.run
|
|
137
138
|
require 'rb-fsevent'
|
138
139
|
fsevent = FSEvent.new
|
139
140
|
fsevent.watch Dir.pwd do |paths, event_meta|
|
140
|
-
event_meta
|
141
|
-
puts "event ID: #{event
|
142
|
-
puts "path: #{event
|
143
|
-
puts "c flags: #{event
|
144
|
-
puts "named flags: #{event
|
141
|
+
event_meta['events'].each do |event|
|
142
|
+
puts "event ID: #{event['id']}"
|
143
|
+
puts "path: #{event['path']}"
|
144
|
+
puts "c flags: #{event['cflags']}"
|
145
|
+
puts "named flags: #{event['flags'].join(', ')}"
|
145
146
|
# named flags will include strings such as `ItemInodeMetaMod` or `OwnEvent`
|
146
147
|
end
|
147
148
|
end
|
data/bin/fsevent_watch
CHANGED
Binary file
|
data/ext/fsevent_watch/defines.h
CHANGED
data/ext/rakefile.rb
CHANGED
@@ -99,6 +99,11 @@ task :x86 do
|
|
99
99
|
$ARCHFLAGS = '-arch i386'
|
100
100
|
end
|
101
101
|
|
102
|
+
desc 'set build arch to arm64'
|
103
|
+
task :arm64 do
|
104
|
+
$ARCHFLAGS = '-arch arm64'
|
105
|
+
end
|
106
|
+
|
102
107
|
task :setup_env => [:set_build_type, :sw_vers, :get_sdk_info]
|
103
108
|
|
104
109
|
directory $obj_dir.to_s
|
data/lib/rb-fsevent/fsevent.rb
CHANGED
@@ -52,7 +52,7 @@ class FSEvent
|
|
52
52
|
found_length = false
|
53
53
|
|
54
54
|
while reading_length
|
55
|
-
byte = @pipe.
|
55
|
+
byte = @pipe.read_nonblock(1)
|
56
56
|
if "#{byte}" =~ /\d/
|
57
57
|
length << byte
|
58
58
|
found_length = true
|
@@ -89,7 +89,7 @@ class FSEvent
|
|
89
89
|
Process.kill('KILL', @pipe.pid) if process_running?(@pipe.pid)
|
90
90
|
@pipe.close
|
91
91
|
end
|
92
|
-
rescue IOError
|
92
|
+
rescue IOError, Errno::EBADF
|
93
93
|
ensure
|
94
94
|
@running = false
|
95
95
|
end
|
data/lib/rb-fsevent/version.rb
CHANGED
data/rb-fsevent.gemspec
CHANGED
@@ -20,7 +20,6 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^spec/}) }
|
21
21
|
s.require_path = 'lib'
|
22
22
|
|
23
|
-
s.add_development_dependency 'bundler', '~> 1.0'
|
24
23
|
s.add_development_dependency 'rspec', '~> 3.6'
|
25
24
|
s.add_development_dependency 'guard-rspec', '~> 4.2'
|
26
25
|
s.add_development_dependency 'rake', '~> 12.0'
|
metadata
CHANGED
@@ -1,30 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rb-fsevent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thibaud Guillaume-Gentil
|
8
8
|
- Travis Tilley
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-02-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: bundler
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
requirements:
|
18
|
-
- - "~>"
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: '1.0'
|
21
|
-
type: :development
|
22
|
-
prerelease: false
|
23
|
-
version_requirements: !ruby/object:Gem::Requirement
|
24
|
-
requirements:
|
25
|
-
- - "~>"
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
version: '1.0'
|
28
14
|
- !ruby/object:Gem::Dependency
|
29
15
|
name: rspec
|
30
16
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,7 +93,7 @@ licenses:
|
|
107
93
|
- MIT
|
108
94
|
metadata:
|
109
95
|
source_code_uri: https://github.com/thibaudgg/rb-fsevent
|
110
|
-
post_install_message:
|
96
|
+
post_install_message:
|
111
97
|
rdoc_options: []
|
112
98
|
require_paths:
|
113
99
|
- lib
|
@@ -122,9 +108,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
108
|
- !ruby/object:Gem::Version
|
123
109
|
version: '0'
|
124
110
|
requirements: []
|
125
|
-
|
126
|
-
|
127
|
-
signing_key:
|
111
|
+
rubygems_version: 3.2.22
|
112
|
+
signing_key:
|
128
113
|
specification_version: 4
|
129
114
|
summary: Very simple & usable FSEvents API
|
130
115
|
test_files: []
|