rb-fsevent 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +3 -7
- data/ext/extconf.rb +7 -3
- data/ext/fsevent/fsevent_watch.c +5 -0
- data/lib/rb-fsevent/fsevent.rb +3 -1
- data/lib/rb-fsevent/version.rb +1 -1
- metadata +72 -41
data/README.rdoc
CHANGED
@@ -3,9 +3,9 @@
|
|
3
3
|
Very simple & usable Mac OSX FSEvents API
|
4
4
|
|
5
5
|
- RubyCocoa not required!
|
6
|
-
- Signals are working
|
7
|
-
- Tested on MRI 1.8.
|
8
|
-
- Tested on JRuby
|
6
|
+
- Signals are working (really)
|
7
|
+
- Tested on MRI 1.8.7 & 1.9.2
|
8
|
+
- Tested on JRuby 1.6.3
|
9
9
|
|
10
10
|
== Install
|
11
11
|
|
@@ -247,10 +247,6 @@ The list of tested RVM targets is currently:
|
|
247
247
|
|
248
248
|
%w[1.8.6 1.8.7 1.9.2 jruby-head]
|
249
249
|
|
250
|
-
Development note: As of my last attempt to do so, jruby-head's cext support will NOT compile, as-is, using xcode 4.0.1. Simply editing the makefile to point -isysroot to '/' rather than depend on an SDK specific environment and switching the minimum OS to 10.6 was enough to get past this. Making these changes within the context of an RVM installed ruby, however, requires creating a patch and then informing rvm that it needs to apply this patch pre-build.
|
251
|
-
|
252
|
-
If you have xcode4, and jruby-head has not yet been fixed to allow unmodified compilation, then it's perfectly understandable and acceptable to just remove jruby-head as a testing target. This is especially true considering that it requires an unreleased version of JRuby to begin with.
|
253
|
-
|
254
250
|
== Authors
|
255
251
|
|
256
252
|
- {Thibaud Guillaume-Gentil}[http://github.com/thibaudgg]
|
data/ext/extconf.rb
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
require 'mkmf'
|
3
3
|
create_makefile('none')
|
4
4
|
|
5
|
+
# TODO: determine whether we really need to be working around instead of with mkmf
|
6
|
+
|
5
7
|
if `uname -s`.chomp != 'Darwin'
|
6
8
|
puts "Warning! Only Darwin (Mac OS X) systems are supported, nothing will be compiled"
|
7
9
|
else
|
@@ -37,13 +39,15 @@ else
|
|
37
39
|
-dead_strip -framework CoreServices
|
38
40
|
}
|
39
41
|
|
40
|
-
|
42
|
+
cc_opts = core_flags + ldflags
|
41
43
|
|
42
|
-
|
44
|
+
cc_opts += %w{
|
43
45
|
-D DEBUG=true
|
44
46
|
} if ENV['FWDEBUG'] == "true"
|
47
|
+
|
48
|
+
cc_bin = `which clang || which gcc`.to_s.strip!
|
45
49
|
|
46
|
-
compile_command = "CFLAGS='#{cflags.join(' ')} #{wflags.join(' ')}'
|
50
|
+
compile_command = "CFLAGS='#{cflags.join(' ')} #{wflags.join(' ')}' #{cc_bin} #{cc_opts.join(' ')} -o '#{gem_root}/bin/fsevent_watch' fsevent/fsevent_watch.c"
|
47
51
|
|
48
52
|
STDERR.puts(compile_command)
|
49
53
|
|
data/ext/fsevent/fsevent_watch.c
CHANGED
@@ -185,6 +185,11 @@ int main(int argc, const char *argv[])
|
|
185
185
|
* after reading ruby 1.9's process.c
|
186
186
|
* 5. if left completely undocumented, even slightly obscure bugfixes
|
187
187
|
* may be removed as cruft by a future maintainer
|
188
|
+
*
|
189
|
+
* hindsight is 20/20 addition: if you're single-threaded and blocking on IO
|
190
|
+
* with a subprocess, then handlers for deferrable signals might not get run
|
191
|
+
* when you expect them to. In the case of Ruby 1.8, that means making use of
|
192
|
+
* IO::select, which will preserve correct signal handling behavior.
|
188
193
|
*/
|
189
194
|
if (setpgid(0,0) < 0) {
|
190
195
|
fprintf(stderr, "Unable to set new process group.\n");
|
data/lib/rb-fsevent/fsevent.rb
CHANGED
@@ -29,7 +29,9 @@ class FSEvent
|
|
29
29
|
|
30
30
|
def run
|
31
31
|
@running = true
|
32
|
-
|
32
|
+
# please note the use of IO::select() here, as it is used specifically to
|
33
|
+
# preserve correct signal handling behavior in ruby 1.8.
|
34
|
+
while @running && IO::select([pipe], nil, nil, nil)
|
33
35
|
if line = pipe.readline
|
34
36
|
modified_dir_paths = line.split(":").select { |dir| dir != "\n" }
|
35
37
|
callback.call(modified_dir_paths)
|
data/lib/rb-fsevent/version.rb
CHANGED
metadata
CHANGED
@@ -1,60 +1,82 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rb-fsevent
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 9
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 4
|
9
|
+
- 3
|
10
|
+
version: 0.4.3
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Thibaud Guillaume-Gentil
|
9
14
|
- Travis Tilley
|
10
15
|
autorequire:
|
11
16
|
bindir: bin
|
12
17
|
cert_chain: []
|
13
|
-
|
14
|
-
|
15
|
-
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
18
|
+
|
19
|
+
date: 2011-08-12 00:00:00 Z
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
17
22
|
name: bundler
|
18
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
19
25
|
none: false
|
20
|
-
requirements:
|
26
|
+
requirements:
|
21
27
|
- - ~>
|
22
|
-
- !ruby/object:Gem::Version
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 1
|
32
|
+
- 0
|
33
|
+
- 10
|
23
34
|
version: 1.0.10
|
24
35
|
type: :development
|
25
|
-
|
26
|
-
|
27
|
-
- !ruby/object:Gem::Dependency
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
28
38
|
name: rspec
|
29
|
-
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
41
|
none: false
|
31
|
-
requirements:
|
42
|
+
requirements:
|
32
43
|
- - ~>
|
33
|
-
- !ruby/object:Gem::Version
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 27
|
46
|
+
segments:
|
47
|
+
- 2
|
48
|
+
- 5
|
49
|
+
- 0
|
34
50
|
version: 2.5.0
|
35
51
|
type: :development
|
36
|
-
|
37
|
-
|
38
|
-
- !ruby/object:Gem::Dependency
|
52
|
+
version_requirements: *id002
|
53
|
+
- !ruby/object:Gem::Dependency
|
39
54
|
name: guard-rspec
|
40
|
-
|
55
|
+
prerelease: false
|
56
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
41
57
|
none: false
|
42
|
-
requirements:
|
58
|
+
requirements:
|
43
59
|
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
hash: 9
|
62
|
+
segments:
|
63
|
+
- 0
|
64
|
+
- 1
|
65
|
+
- 9
|
45
66
|
version: 0.1.9
|
46
67
|
type: :development
|
47
|
-
|
48
|
-
version_requirements: *2152585300
|
68
|
+
version_requirements: *id003
|
49
69
|
description: FSEvents API with Signals catching (without RubyCocoa)
|
50
|
-
email:
|
70
|
+
email:
|
51
71
|
- thibaud@thibaud.me
|
52
72
|
- ttilley@gmail.com
|
53
73
|
executables: []
|
54
|
-
|
74
|
+
|
75
|
+
extensions:
|
55
76
|
- ext/extconf.rb
|
56
77
|
extra_rdoc_files: []
|
57
|
-
|
78
|
+
|
79
|
+
files:
|
58
80
|
- lib/rb-fsevent/fsevent.rb
|
59
81
|
- lib/rb-fsevent/version.rb
|
60
82
|
- lib/rb-fsevent.rb
|
@@ -62,29 +84,38 @@ files:
|
|
62
84
|
- ext/fsevent/fsevent_watch.c
|
63
85
|
- LICENSE
|
64
86
|
- README.rdoc
|
65
|
-
has_rdoc: true
|
66
87
|
homepage: http://rubygems.org/gems/rb-fsevent
|
67
88
|
licenses: []
|
89
|
+
|
68
90
|
post_install_message:
|
69
91
|
rdoc_options: []
|
70
|
-
|
92
|
+
|
93
|
+
require_paths:
|
71
94
|
- lib
|
72
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
95
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
73
96
|
none: false
|
74
|
-
requirements:
|
75
|
-
- -
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
|
78
|
-
|
97
|
+
requirements:
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
hash: 3
|
101
|
+
segments:
|
102
|
+
- 0
|
103
|
+
version: "0"
|
104
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
79
105
|
none: false
|
80
|
-
requirements:
|
81
|
-
- -
|
82
|
-
- !ruby/object:Gem::Version
|
83
|
-
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
hash: 3
|
110
|
+
segments:
|
111
|
+
- 0
|
112
|
+
version: "0"
|
84
113
|
requirements: []
|
114
|
+
|
85
115
|
rubyforge_project: rb-fsevent
|
86
|
-
rubygems_version: 1.6
|
116
|
+
rubygems_version: 1.8.6
|
87
117
|
signing_key:
|
88
118
|
specification_version: 3
|
89
119
|
summary: Very simple & usable FSEvents API
|
90
120
|
test_files: []
|
121
|
+
|