rb-fsevent 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@ Very simple & usable Mac OSX FSEvents API
5
5
  - RubyCocoa not required!
6
6
  - Signals are working
7
7
  - Tested on MRI 1.8.6, 1.8.7 & 1.9.2
8
- - Tested on JRuby 1.6.0 RC3, with experimental (but sufficient) extconf/mkmf support
8
+ - Tested on JRuby-head, with experimental (but sufficient) extconf/mkmf support
9
9
 
10
10
  == Install
11
11
 
@@ -80,6 +80,8 @@ The :latency parameter determines how long the service should wait after the fir
80
80
 
81
81
  Setting a higher latency value allows for more effective temporal coalescing, resulting in fewer callbacks and greater overall efficiency... at the cost of apparent responsiveness. Setting this to a reasonably high value (and NOT setting :no_defer) is particularly well suited for background, daemon, or batch processing applications.
82
82
 
83
+ Implementation note: It appears that FSEvents will only coalesce events from a maximum of 32 distinct subpaths, making the above completely accurate only when events are to fewer than 32 subpaths. Creating 300 files in one directory, for example, or 30 files in 10 subdirectories, but not 300 files within 300 subdirectories. In the latter case, you may receive 31 callbacks in one go after the latency period. As this appears to be an implementation detail, the number could potentially differ across OS revisions. It is entirely possible that this number is somehow configurable, but I have not yet discovered an accepted method of doing so.
84
+
83
85
  === NoDefer
84
86
 
85
87
  The :no_defer option changes the behavior of the latency parameter completely. Rather than waiting for $latency period of time before sending along events in an attempt to coalesce a potential deluge ahead of time, that first event is sent along to the client immediately and is followed by a $latency period of silence before sending along any additional events that occurred within that period.
@@ -90,7 +92,7 @@ This behavior is particularly useful for interactive applications where that fee
90
92
 
91
93
  The :watch_root option allows for catching the scenario where you start watching "~/src/demo_project" and either it is later renamed to "~/src/awesome_sauce_3000" or the path changes in such a manner that the original directory is now at "~/clients/foo/iteration4/demo_project".
92
94
 
93
- Unfortunately, while this behavior is somewhat supported in the fsevent_watch binary built as part of this project, support for passing across detailed metadata is not (yet). As a result, you would not receive the appropriate RootChanged event and be able to react appropriately. Also, since the C code doesn't open watched directories and retain that file descriptor as part of path-specific callback metadata, we are unable to to issue an F_GETPATH fcntl() to determine the directory's new path.
95
+ Unfortunately, while this behavior is somewhat supported in the fsevent_watch binary built as part of this project, support for passing across detailed metadata is not (yet). As a result, you would not receive the appropriate RootChanged event and be able to react appropriately. Also, since the C code doesn't open watched directories and retain that file descriptor as part of path-specific callback metadata, we are unable to issue an F_GETPATH fcntl() to determine the directory's new path.
94
96
 
95
97
  Please do not use this option until proper support is added in an upcoming (planned) release.
96
98
 
@@ -104,7 +106,7 @@ WARNING: passing in 0 as the parameter to :since_when will return events for eve
104
106
 
105
107
  == Debugging output
106
108
 
107
- If the gem is installed with the environment variable FWDEBUG set to the string "true", then fsevent_watch will be built with its various DEBUG sections defined, and the output to STDERR is truly verbose (and hopefully helpful debugging your application and not just fsevent_watch itself):
109
+ If the gem is installed with the environment variable FWDEBUG set to the string "true", then fsevent_watch will be built with its various DEBUG sections defined, and the output to STDERR is truly verbose (and hopefully helpful in debugging your application and not just fsevent_watch itself). If enough people find this to be directly useful when developing code that makes use of rb-fsevent, then it wouldn't be hard to clean this up and make it a feature enabled by a commandline argument instead. Until somebody files an issue, however, I will assume otherwise.
108
110
 
109
111
  append_path called for: /tmp/moo/cow/
110
112
  resolved path to: /private/tmp/moo/cow
@@ -230,17 +232,27 @@ If the gem is installed with the environment variable FWDEBUG set to the string
230
232
 
231
233
  == Note about FFI
232
234
 
233
- rb-fsevent doesn't use {ruby-ffi}[http://github.com/ffi/ffi] anymore because it sadly doesn't allow to catch Signals, you can see the code in {ffi branch}[http://github.com/thibaudgg/rb-fsevent/tree/ffi].
235
+ rb-fsevent doesn't use {ruby-ffi}[http://github.com/ffi/ffi] anymore because it sadly doesn't allow for catching Signals. You can still see the code in the {ffi branch}[http://github.com/thibaudgg/rb-fsevent/tree/ffi].
234
236
 
235
237
  == Development
236
238
 
237
239
  - Source hosted at {GitHub}[http://github.com/thibaudgg/rb-fsevent]
238
240
  - Report issues/Questions/Feature requests on {GitHub Issues}[http://github.com/thibaudgg/rb-fsevent/issues]
239
241
 
240
- Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change
241
- you make.
242
+ Pull requests are quite welcome! Please ensure that your commits are in a topic branch for each individual changeset than can be reasonably isolated. It is also important to ensure that your changes are well tested... whether that means new tests, modified tests, or fixing a scenario where the existing tests currently fail. If you have rvm and the required rubies currently installed, we have a helper task for running the testsuite in all of them:
243
+
244
+ rake spec:portability
245
+
246
+ The list of tested RVM targets is currently:
247
+
248
+ %w[1.8.6 1.8.7 1.9.2 jruby-head]
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.
242
253
 
243
254
  == Authors
244
255
 
245
256
  - {Thibaud Guillaume-Gentil}[http://github.com/thibaudgg]
246
257
  - {Travis Tilley}[http://github.com/ttilley]
258
+
@@ -5,6 +5,13 @@ create_makefile('none')
5
5
  if `uname -s`.chomp != 'Darwin'
6
6
  puts "Warning! Only Darwin (Mac OS X) systems are supported, nothing will be compiled"
7
7
  else
8
+ begin
9
+ xcode_path = %x[xcode-select -print-path].to_s.strip!
10
+ rescue Errno::ENOENT
11
+ end
12
+
13
+ raise "Could not find a suitable Xcode installation" unless xcode_path
14
+
8
15
  gem_root = File.expand_path(File.join('..'))
9
16
  darwin_version = `uname -r`.to_i
10
17
  sdk_version = { 9 => '10.5', 10 => '10.6', 11 => '10.7' }[darwin_version]
@@ -12,7 +19,7 @@ else
12
19
  raise "Only Darwin systems greater than 8 (Mac OS X 10.5+) are supported" unless sdk_version
13
20
 
14
21
  core_flags = %W{
15
- -isysroot /Developer/SDKs/MacOSX#{sdk_version}.sdk
22
+ -isysroot #{xcode_path}/SDKs/MacOSX#{sdk_version}.sdk
16
23
  -mmacosx-version-min=#{sdk_version} -mdynamic-no-pic -std=gnu99
17
24
  }
18
25
 
@@ -1,3 +1,3 @@
1
1
  class FSEvent
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,83 +1,60 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rb-fsevent
3
- version: !ruby/object:Gem::Version
4
- hash: 15
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 4
9
- - 0
10
- version: 0.4.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.1
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Thibaud Guillaume-Gentil
14
9
  - Travis Tilley
15
10
  autorequire:
16
11
  bindir: bin
17
12
  cert_chain: []
18
-
19
- date: 2011-03-09 00:00:00 +01:00
13
+ date: 2011-07-06 00:00:00.000000000 +02:00
20
14
  default_executable:
21
- dependencies:
22
- - !ruby/object:Gem::Dependency
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
23
17
  name: bundler
24
- prerelease: false
25
- requirement: &id001 !ruby/object:Gem::Requirement
18
+ requirement: &2152430220 !ruby/object:Gem::Requirement
26
19
  none: false
27
- requirements:
20
+ requirements:
28
21
  - - ~>
29
- - !ruby/object:Gem::Version
30
- hash: 3
31
- segments:
32
- - 1
33
- - 0
34
- - 10
22
+ - !ruby/object:Gem::Version
35
23
  version: 1.0.10
36
24
  type: :development
37
- version_requirements: *id001
38
- - !ruby/object:Gem::Dependency
39
- name: rspec
40
25
  prerelease: false
41
- requirement: &id002 !ruby/object:Gem::Requirement
26
+ version_requirements: *2152430220
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: &2152429140 !ruby/object:Gem::Requirement
42
30
  none: false
43
- requirements:
31
+ requirements:
44
32
  - - ~>
45
- - !ruby/object:Gem::Version
46
- hash: 27
47
- segments:
48
- - 2
49
- - 5
50
- - 0
33
+ - !ruby/object:Gem::Version
51
34
  version: 2.5.0
52
35
  type: :development
53
- version_requirements: *id002
54
- - !ruby/object:Gem::Dependency
55
- name: guard-rspec
56
36
  prerelease: false
57
- requirement: &id003 !ruby/object:Gem::Requirement
37
+ version_requirements: *2152429140
38
+ - !ruby/object:Gem::Dependency
39
+ name: guard-rspec
40
+ requirement: &2152427640 !ruby/object:Gem::Requirement
58
41
  none: false
59
- requirements:
42
+ requirements:
60
43
  - - ~>
61
- - !ruby/object:Gem::Version
62
- hash: 9
63
- segments:
64
- - 0
65
- - 1
66
- - 9
44
+ - !ruby/object:Gem::Version
67
45
  version: 0.1.9
68
46
  type: :development
69
- version_requirements: *id003
47
+ prerelease: false
48
+ version_requirements: *2152427640
70
49
  description: FSEvents API with Signals catching (without RubyCocoa)
71
- email:
50
+ email:
72
51
  - thibaud@thibaud.me
73
52
  - ttilley@gmail.com
74
53
  executables: []
75
-
76
- extensions:
54
+ extensions:
77
55
  - ext/extconf.rb
78
56
  extra_rdoc_files: []
79
-
80
- files:
57
+ files:
81
58
  - lib/rb-fsevent/fsevent.rb
82
59
  - lib/rb-fsevent/version.rb
83
60
  - lib/rb-fsevent.rb
@@ -88,36 +65,32 @@ files:
88
65
  has_rdoc: true
89
66
  homepage: http://rubygems.org/gems/rb-fsevent
90
67
  licenses: []
91
-
92
68
  post_install_message:
93
69
  rdoc_options: []
94
-
95
- require_paths:
70
+ require_paths:
96
71
  - lib
97
- required_ruby_version: !ruby/object:Gem::Requirement
72
+ required_ruby_version: !ruby/object:Gem::Requirement
98
73
  none: false
99
- requirements:
100
- - - ">="
101
- - !ruby/object:Gem::Version
102
- hash: 3
103
- segments:
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ segments:
104
79
  - 0
105
- version: "0"
106
- required_rubygems_version: !ruby/object:Gem::Requirement
80
+ hash: -3134696196885608875
81
+ required_rubygems_version: !ruby/object:Gem::Requirement
107
82
  none: false
108
- requirements:
109
- - - ">="
110
- - !ruby/object:Gem::Version
111
- hash: 3
112
- segments:
83
+ requirements:
84
+ - - ! '>='
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ segments:
113
88
  - 0
114
- version: "0"
89
+ hash: -3134696196885608875
115
90
  requirements: []
116
-
117
91
  rubyforge_project: rb-fsevent
118
- rubygems_version: 1.3.7
92
+ rubygems_version: 1.6.2
119
93
  signing_key:
120
94
  specification_version: 3
121
95
  summary: Very simple & usable FSEvents API
122
96
  test_files: []
123
-