autotest-fsevent 0.2.5 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +0 -1
- data/.rvmrc +1 -0
- data/CHANGELOG.txt +10 -0
- data/Gemfile.lock +10 -11
- data/PostInstall.txt +5 -5
- data/README.rdoc +9 -3
- data/autotest-fsevent.gemspec +1 -1
- data/ext/fsevent/extconf.rb +11 -4
- data/lib/autotest-fsevent/version.rb +1 -1
- data/lib/autotest/fsevent.rb +21 -21
- data/prebuilt/10.7/fsevent_sleep +0 -0
- metadata +66 -76
data/.gitignore
CHANGED
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm use ruby-1.9.3-p0@autotest-fsevent --create
|
data/CHANGELOG.txt
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
== 0.2.6 2011-11-02
|
2
|
+
|
3
|
+
* 1 minor improvement
|
4
|
+
* Use File.exists? which is both Ruby 1.8 and 1.9
|
5
|
+
|
6
|
+
== 0.2.6 2011-11-02
|
7
|
+
|
8
|
+
* 1 minor improvement
|
9
|
+
* Add FSEVENT_SLEEP environment variable for prebuilt binaries
|
10
|
+
|
1
11
|
== 0.2.5 2011-03-02
|
2
12
|
|
3
13
|
* 1 minor improvement
|
data/Gemfile.lock
CHANGED
@@ -1,24 +1,24 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
autotest-fsevent (0.2.
|
4
|
+
autotest-fsevent (0.2.5)
|
5
5
|
sys-uname
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: http://rubygems.org/
|
9
9
|
specs:
|
10
|
-
ZenTest (4.
|
10
|
+
ZenTest (4.5.0)
|
11
11
|
diff-lcs (1.1.2)
|
12
12
|
rake (0.8.7)
|
13
|
-
rspec (2.
|
14
|
-
rspec-core (~> 2.
|
15
|
-
rspec-expectations (~> 2.
|
16
|
-
rspec-mocks (~> 2.
|
17
|
-
rspec-core (2.
|
18
|
-
rspec-expectations (2.
|
13
|
+
rspec (2.5.0)
|
14
|
+
rspec-core (~> 2.5.0)
|
15
|
+
rspec-expectations (~> 2.5.0)
|
16
|
+
rspec-mocks (~> 2.5.0)
|
17
|
+
rspec-core (2.5.1)
|
18
|
+
rspec-expectations (2.5.0)
|
19
19
|
diff-lcs (~> 1.1.2)
|
20
|
-
rspec-mocks (2.
|
21
|
-
sys-uname (0.8.
|
20
|
+
rspec-mocks (2.5.0)
|
21
|
+
sys-uname (0.8.5)
|
22
22
|
|
23
23
|
PLATFORMS
|
24
24
|
ruby
|
@@ -28,4 +28,3 @@ DEPENDENCIES
|
|
28
28
|
autotest-fsevent!
|
29
29
|
rake
|
30
30
|
rspec
|
31
|
-
sys-uname
|
data/PostInstall.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
In order to use autotest-fsevent, install either the comprehensive
|
2
|
-
|
3
|
-
|
1
|
+
In order to use autotest-fsevent, install either the comprehensive ZenTest
|
2
|
+
gem or the lightweight autotest-standalone gem and then add the following
|
3
|
+
line to your ~/.autotest file:
|
4
4
|
|
5
5
|
require 'autotest/fsevent'
|
6
6
|
|
@@ -8,7 +8,7 @@ For more information, feedback and bug submissions, please visit:
|
|
8
8
|
|
9
9
|
http://www.bitcetera.com/products/autotest-fsevent
|
10
10
|
|
11
|
-
If you like this gem, please consider to recommend me on Working with
|
12
|
-
|
11
|
+
If you like this gem, please consider to recommend me on Working with Rails,
|
12
|
+
thank you!
|
13
13
|
|
14
14
|
http://workingwithrails.com/recommendation/new/person/11706-sven-schwyn
|
data/README.rdoc
CHANGED
@@ -39,12 +39,12 @@ Furthermore, you have to decide whether you want to use the comprehensive
|
|
39
39
|
ZenTest gem or the lightweight autotest-standalone gem and install either
|
40
40
|
of them. (See "Autotest" below for more on this.)
|
41
41
|
|
42
|
-
|
43
|
-
|
42
|
+
gem install ZenTest --OR--
|
43
|
+
gem install autotest-standalone
|
44
44
|
|
45
45
|
Now install the gem:
|
46
46
|
|
47
|
-
|
47
|
+
gem install autotest-fsevent
|
48
48
|
|
49
49
|
Then add the following line *after all other requires* in your ~/.autotest
|
50
50
|
file:
|
@@ -90,6 +90,12 @@ download it for free from:
|
|
90
90
|
|
91
91
|
http://developer.apple.com
|
92
92
|
|
93
|
+
If you don't want to install Xcode, download and use a prebuilt fsevent_sleep
|
94
|
+
from https://github.com/svoop/autotest-fsevent/tree/master/prebuilt, make the
|
95
|
+
downloaded binary executable and install the gem as follows:
|
96
|
+
|
97
|
+
FSEVENT_SLEEP="/absolute/path/to/fsevent_sleep" gem install autotest-fsevent
|
98
|
+
|
93
99
|
== DEVELOPMENT:
|
94
100
|
|
95
101
|
You can install the bleeding edge version as follows:
|
data/autotest-fsevent.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
20
|
s.require_paths = ["lib"]
|
21
21
|
|
22
|
-
s.post_install_message = "\e[1;32m\n" + ('-' * 79) + "\n\n" + File.read('PostInstall.txt') + "\n" + ('-' * 79) + "\n\e[0m"
|
22
|
+
s.post_install_message = "\e[1;32m\n" + ('-' * 79) + "\n\n" + File.read('PostInstall.txt').strip + "\n\n" + ('-' * 79) + "\n\e[0m"
|
23
23
|
s.extensions = ["ext/fsevent/extconf.rb"]
|
24
24
|
s.add_dependency "sys-uname"
|
25
25
|
s.add_development_dependency "rake"
|
data/ext/fsevent/extconf.rb
CHANGED
@@ -20,11 +20,18 @@ raise "Only Darwin (Mac OS X) systems are supported" unless `uname -s`.chomp ==
|
|
20
20
|
|
21
21
|
GEM_ROOT = File.expand_path(File.join('..', '..'))
|
22
22
|
DARWIN_VERSION = `uname -r`.to_i
|
23
|
-
SDK_VERSION = { 9 => '10.5', 10 => '10.6', 11 => '10.7' }[DARWIN_VERSION]
|
23
|
+
SDK_VERSION = { 9 => '10.5', 10 => '10.6', 11 => '10.7', 12 => '10.8' }[DARWIN_VERSION]
|
24
24
|
|
25
25
|
raise "Darwin #{DARWIN_VERSION} is not (yet) supported" unless SDK_VERSION
|
26
26
|
|
27
27
|
`mkdir -p #{File.join(GEM_ROOT, 'bin')}`
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
if ENV.has_key?('FSEVENT_SLEEP')
|
29
|
+
require 'fileutils'
|
30
|
+
FileUtils.cp(ENV['FSEVENT_SLEEP'], "#{GEM_ROOT}/bin/fsevent_sleep", :preserve => true)
|
31
|
+
raise "\e[1;31mInstallation of fsevent_sleep binary failed - see README for assistance\e[0m" unless File.executable?("#{GEM_ROOT}/bin/fsevent_sleep")
|
32
|
+
elsif File.exists?('/Developer/Applications/Xcode.app')
|
33
|
+
`CFLAGS='-isysroot /Developer/SDKs/MacOSX#{SDK_VERSION}.sdk -mmacosx-version-min=#{SDK_VERSION}' /usr/bin/gcc -framework CoreServices -o "#{GEM_ROOT}/bin/fsevent_sleep" fsevent_sleep.c`
|
34
|
+
raise "\e[1;31mCompilation of fsevent_sleep binary failed - see README for assistance\e[0m" unless File.executable?("#{GEM_ROOT}/bin/fsevent_sleep")
|
35
|
+
else
|
36
|
+
raise "\e[1;31mXcode not found - see README for assistance\e[0m"
|
37
|
+
end
|
data/lib/autotest/fsevent.rb
CHANGED
@@ -15,27 +15,27 @@ include Sys
|
|
15
15
|
# require 'autotest/fsevent'
|
16
16
|
module Autotest::FSEvent
|
17
17
|
|
18
|
-
|
18
|
+
GEM_PATH = File.expand_path(File.join(File.dirname(__FILE__), '..', '..')) unless defined?(GEM_PATH)
|
19
19
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
20
|
+
##
|
21
|
+
# Use FSEvent if possible
|
22
|
+
# Add waiting hook to prevent fallback to polling after ignored files have changed
|
23
|
+
Autotest.add_hook :initialize do
|
24
|
+
if Uname.sysname == 'Darwin' && Uname.release.to_i >= 9
|
25
|
+
class ::Autotest
|
26
|
+
remove_method :wait_for_changes
|
27
|
+
def wait_for_changes
|
28
|
+
hook :waiting
|
29
|
+
begin
|
30
|
+
`cd '#{Dir.pwd}'; #{File.join(GEM_PATH, 'bin', 'fsevent_sleep')} . 2>&1`
|
31
|
+
Kernel.sleep self.sleep
|
32
|
+
end until find_files_to_test
|
33
|
+
end
|
34
|
+
end
|
35
|
+
else
|
36
|
+
puts
|
37
|
+
puts "autotest-fsevent: platform #{Uname.sysname} #{Uname.release} is not supported"
|
38
|
+
end
|
39
|
+
end
|
40
40
|
|
41
41
|
end
|
Binary file
|
metadata
CHANGED
@@ -1,72 +1,71 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: autotest-fsevent
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.7
|
4
5
|
prerelease:
|
5
|
-
version: 0.2.5
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Sven Schwyn
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-11-02 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
17
15
|
name: sys-uname
|
18
|
-
|
19
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70265883670540 !ruby/object:Gem::Requirement
|
20
17
|
none: false
|
21
|
-
requirements:
|
22
|
-
- -
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version:
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
25
22
|
type: :runtime
|
26
|
-
version_requirements: *id001
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
29
23
|
prerelease: false
|
30
|
-
|
24
|
+
version_requirements: *70265883670540
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rake
|
27
|
+
requirement: &70265883670080 !ruby/object:Gem::Requirement
|
31
28
|
none: false
|
32
|
-
requirements:
|
33
|
-
- -
|
34
|
-
- !ruby/object:Gem::Version
|
35
|
-
version:
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
36
33
|
type: :development
|
37
|
-
version_requirements: *id002
|
38
|
-
- !ruby/object:Gem::Dependency
|
39
|
-
name: rspec
|
40
34
|
prerelease: false
|
41
|
-
|
35
|
+
version_requirements: *70265883670080
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rspec
|
38
|
+
requirement: &70265883669640 !ruby/object:Gem::Requirement
|
42
39
|
none: false
|
43
|
-
requirements:
|
44
|
-
- -
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version:
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
47
44
|
type: :development
|
48
|
-
version_requirements: *id003
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
|
-
name: ZenTest
|
51
45
|
prerelease: false
|
52
|
-
|
46
|
+
version_requirements: *70265883669640
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: ZenTest
|
49
|
+
requirement: &70265883669200 !ruby/object:Gem::Requirement
|
53
50
|
none: false
|
54
|
-
requirements:
|
55
|
-
- -
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
version:
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
58
55
|
type: :development
|
59
|
-
|
60
|
-
|
61
|
-
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *70265883669200
|
58
|
+
description: Autotest relies on filesystem polling to detect modifications in source
|
59
|
+
code files. This is expensive for the CPU, harddrive and battery - and unnecesary
|
60
|
+
on Mac OS X 10.5 or higher which comes with the very efficient FSEvent core service
|
61
|
+
for this very purpose. This gem teaches autotest how to use FSEvent.
|
62
|
+
email:
|
62
63
|
- ruby@bitcetera.com
|
63
64
|
executables: []
|
64
|
-
|
65
|
-
extensions:
|
65
|
+
extensions:
|
66
66
|
- ext/fsevent/extconf.rb
|
67
67
|
extra_rdoc_files: []
|
68
|
-
|
69
|
-
files:
|
68
|
+
files:
|
70
69
|
- .gitignore
|
71
70
|
- .rvmrc
|
72
71
|
- CHANGELOG.txt
|
@@ -82,48 +81,39 @@ files:
|
|
82
81
|
- lib/autotest-fsevent.rb
|
83
82
|
- lib/autotest-fsevent/version.rb
|
84
83
|
- lib/autotest/fsevent.rb
|
84
|
+
- prebuilt/10.7/fsevent_sleep
|
85
85
|
- spec/autotest-fsevent_spec.rb
|
86
86
|
- spec/spec_helper.rb
|
87
|
-
has_rdoc: true
|
88
87
|
homepage: http://www.bitcetera.com/products/autotest-fsevent
|
89
88
|
licenses: []
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
For more information, feedback and bug submissions, please visit:\n\n\
|
98
|
-
http://www.bitcetera.com/products/autotest-fsevent\n\n\
|
99
|
-
If you like this gem, please consider to recommend me on Working with\n\
|
100
|
-
Rails, thank you!\n\n\
|
101
|
-
http://workingwithrails.com/recommendation/new/person/11706-sven-schwyn\n\n\
|
102
|
-
-------------------------------------------------------------------------------\n\
|
103
|
-
\e[0m"
|
89
|
+
post_install_message: ! "\e[1;32m\n-------------------------------------------------------------------------------\n\nIn
|
90
|
+
order to use autotest-fsevent, install either the comprehensive ZenTest\ngem or
|
91
|
+
the lightweight autotest-standalone gem and then add the following\nline to your
|
92
|
+
~/.autotest file:\n\nrequire 'autotest/fsevent'\n\nFor more information, feedback
|
93
|
+
and bug submissions, please visit:\n\nhttp://www.bitcetera.com/products/autotest-fsevent\n\nIf
|
94
|
+
you like this gem, please consider to recommend me on Working with Rails,\nthank
|
95
|
+
you!\n\nhttp://workingwithrails.com/recommendation/new/person/11706-sven-schwyn\n\n-------------------------------------------------------------------------------\n\e[0m"
|
104
96
|
rdoc_options: []
|
105
|
-
|
106
|
-
require_paths:
|
97
|
+
require_paths:
|
107
98
|
- lib
|
108
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
99
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
109
100
|
none: false
|
110
|
-
requirements:
|
111
|
-
- -
|
112
|
-
- !ruby/object:Gem::Version
|
113
|
-
version:
|
114
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ! '>='
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
106
|
none: false
|
116
|
-
requirements:
|
117
|
-
- -
|
118
|
-
- !ruby/object:Gem::Version
|
119
|
-
version:
|
107
|
+
requirements:
|
108
|
+
- - ! '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
120
111
|
requirements: []
|
121
|
-
|
122
112
|
rubyforge_project: autotest-fsevent
|
123
|
-
rubygems_version: 1.
|
113
|
+
rubygems_version: 1.8.11
|
124
114
|
signing_key:
|
125
115
|
specification_version: 3
|
126
116
|
summary: Use FSEvent (on Mac OS X 10.5 or higher) instead of filesystem polling.
|
127
|
-
test_files:
|
117
|
+
test_files:
|
128
118
|
- spec/autotest-fsevent_spec.rb
|
129
119
|
- spec/spec_helper.rb
|