Skip to content

Commit

Permalink
Remove vendor stuff and depend on listen
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaudgg committed Mar 3, 2012
1 parent 43b8733 commit c98167e
Show file tree
Hide file tree
Showing 88 changed files with 1 addition and 6,084 deletions.
44 changes: 0 additions & 44 deletions Rakefile
Expand Up @@ -4,50 +4,6 @@ require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) RSpec::Core::RakeTask.new(:spec)
task :default => :spec task :default => :spec


desc "Build vendored gems"
task :build_vendor do
raise unless File.exist?('Rakefile')
# Destroy vendor
sh "rm -rf lib/vendor && mkdir lib/vendor"

# Clone the correct gems
sh "git clone https://github.com/thibaudgg/rb-fsevent.git lib/vendor/darwin"
sh "cd lib/vendor/darwin && git checkout 10c7980fa7b9678f787b7f4671f3b67f3a7571f1"
sh "git clone https://github.com/nex3/rb-inotify.git lib/vendor/linux"
sh "cd lib/vendor/linux && git checkout 01e7487e7a8d8f26b13c6835a321390c6618ccb7"
sh "git clone https://github.com/stereobooster/rb-fchange.git lib/vendor/windows"
sh "cd lib/vendor/windows && git checkout d655a602b73f11e6cca986cc3f9fe2846f2dc771"

# Strip out the .git directories
%w[darwin linux windows].each {|platform| sh "rm -rf lib/vendor/#{platform}/.git"}

# Move ext directory of darwin to root
sh "mkdir -p ext"
sh "cp -r lib/vendor/darwin/ext/* ext/"

# Alter darwin extconf.rb
extconf_path = File.expand_path("../ext/extconf.rb", __FILE__)
extconf_contents = File.read(extconf_path)
extconf_contents.sub!(/puts "Warning/, '#\0')
extconf_contents.gsub!(/bin\/fsevent_watch/, 'bin/fsevent_watch_guard')
File.open(extconf_path, 'w') { |f| f << extconf_contents }

# Alter lib/vendor/darwin/lib/rb-fsevent/fsevent.rb
fsevent_path = File.expand_path("../lib/vendor/darwin/lib/rb-fsevent/fsevent.rb", __FILE__)
fsevent_contents = File.read(fsevent_path)
fsevent_contents.sub!(/fsevent_watch/, 'fsevent_watch_guard')
fsevent_contents.sub!(/'\.\.'/, "'..', '..', '..', '..'")

File.open(fsevent_path, 'w') { |f| f << fsevent_contents }
end

desc "Compile mac executable"
task :build_mac_exec do
Dir.chdir(File.expand_path("../ext", __FILE__)) do
system("ruby extconf.rb") or raise
end
end

require 'rbconfig' require 'rbconfig'
namespace(:spec) do namespace(:spec) do
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/i if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/i
Expand Down
Binary file removed bin/fsevent_watch_guard_guard
Binary file not shown.
64 changes: 0 additions & 64 deletions ext/extconf.rb

This file was deleted.

226 changes: 0 additions & 226 deletions ext/fsevent/fsevent_watch.c

This file was deleted.

23 changes: 0 additions & 23 deletions ext/fsevent_watch/.gitignore

This file was deleted.

0 comments on commit c98167e

Please sign in to comment.