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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 61d076a09964b861d80f4724752654bd1e03d7b1
4
- data.tar.gz: 549a175bc931f6e247d09e87bc4a0e805a8715b8
2
+ SHA256:
3
+ metadata.gz: 699dcebd7c8e1b99dbd7eeae0b82b8e588e211104a67a549d412630db567ef3e
4
+ data.tar.gz: cff9f4532ae72dbc2e19d7025b211dc82444f10572079f0abac227f6a8f770f3
5
5
  SHA512:
6
- metadata.gz: e124acb15e091aae6d754e00dde77dde57a267c3c209cab827735f527abce5800d4b16066adaeacdbadc4fa8311b1622bda29bf300de8a1a4c3c4d1033e7f1d4
7
- data.tar.gz: d27912bb5ea1822547af03aeabb819a6aabf39b1cae25289e0132ac768d68d7751f1895ccd97bdbf9026c2c1fe787d8d0612708a725fcef6c9882fa4a91e1082
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. This corruption is not currently fixed by their tools, though Apple has been made aware of the issue and are working on it (as of may 2015). 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 always return the same value as the kernel reporting (thus fixing fsevents).
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.events.each do |event|
141
- puts "event ID: #{event.id}"
142
- puts "path: #{event.path}"
143
- puts "c flags: #{event.cflags}"
144
- puts "named flags: #{event.flags.join(', ')}"
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
@@ -22,6 +22,8 @@
22
22
  #define TARGET_CPU "i386"
23
23
  #elif defined(__x86_64__)
24
24
  #define TARGET_CPU "x86_64"
25
+ #elif defined(__arm64__)
26
+ #define TARGET_CPU "arm64"
25
27
  #else
26
28
  #define TARGET_CPU "unknown"
27
29
  #endif
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
@@ -52,7 +52,7 @@ class FSEvent
52
52
  found_length = false
53
53
 
54
54
  while reading_length
55
- byte = @pipe.read(1)
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
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  class FSEvent
4
- VERSION = '0.10.2'
4
+ VERSION = '0.11.1'
5
5
  end
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.10.2
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: 2017-07-01 00:00:00.000000000 Z
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
- rubyforge_project:
126
- rubygems_version: 2.6.11
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: []