rb-fsevent 0.3.6 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,18 +2,20 @@
2
2
  require 'mkmf'
3
3
  create_makefile('none')
4
4
 
5
- raise "Only Darwin (Mac OS X) systems are supported" unless `uname -s`.chomp == 'Darwin'
6
-
7
- gem_root = File.expand_path(File.join('..'))
8
- darwin_verion = `uname -r`.to_i
9
- sdk_verion = { 9 => '10.5', 10 => '10.6', 11 => '10.7' }[darwin_verion]
10
-
11
- raise "Only Darwin systems greather than 8 (Mac OS X 10.5+) are supported" unless sdk_verion
12
-
13
- # Compile the actual fsevent_watch binary
14
- system "mkdir -p #{File.join(gem_root, 'bin')}"
15
- system "CFLAGS='-isysroot /Developer/SDKs/MacOSX#{sdk_verion}.sdk -mmacosx-version-min=#{sdk_verion}' /usr/bin/gcc -framework CoreServices -o '#{gem_root}/bin/fsevent_watch' fsevent/fsevent_watch.c"
16
-
17
- unless File.executable?("#{gem_root}/bin/fsevent_watch")
18
- raise "Compilation of fsevent_watch failed (see README)"
5
+ if `uname -s`.chomp != 'Darwin'
6
+ puts "Warning! Only Darwin (Mac OS X) systems are supported, nothing will be compiled"
7
+ else
8
+ gem_root = File.expand_path(File.join('..'))
9
+ darwin_verion = `uname -r`.to_i
10
+ sdk_verion = { 9 => '10.5', 10 => '10.6', 11 => '10.7' }[darwin_verion]
11
+
12
+ raise "Only Darwin systems greather than 8 (Mac OS X 10.5+) are supported" unless sdk_verion
13
+
14
+ # Compile the actual fsevent_watch binary
15
+ system "mkdir -p #{File.join(gem_root, 'bin')}"
16
+ system "CFLAGS='-isysroot /Developer/SDKs/MacOSX#{sdk_verion}.sdk -mmacosx-version-min=#{sdk_verion}' /usr/bin/gcc -framework CoreServices -o '#{gem_root}/bin/fsevent_watch' fsevent/fsevent_watch.c"
17
+
18
+ unless File.executable?("#{gem_root}/bin/fsevent_watch")
19
+ raise "Compilation of fsevent_watch failed (see README)"
20
+ end
19
21
  end
@@ -16,6 +16,7 @@ class FSEvent
16
16
  Process.kill("KILL", pipe.pid)
17
17
  pipe.close
18
18
  end
19
+ rescue Interrupt, IOError
19
20
  end
20
21
 
21
22
  private
@@ -1,3 +1,3 @@
1
1
  class FSEvent
2
- VERSION = "0.3.6"
2
+ VERSION = "0.3.8"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rb-fsevent
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 3
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 6
10
- version: 0.3.6
9
+ - 8
10
+ version: 0.3.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Thibaud Guillaume-Gentil
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-05 00:00:00 +01:00
18
+ date: 2010-11-11 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency