rake tasks that should work on windows/msys

This commit is contained in:
Mike Dirolf 2009-12-21 13:20:56 -05:00
parent f2dcc3c010
commit e99018c84f
1 changed files with 6 additions and 13 deletions

View File

@ -13,9 +13,6 @@ require 'rbconfig'
include Config
ENV['TEST_MODE'] = 'TRUE'
gem_command = "gem"
gem_command = "gem1.9" if $0.match(/1\.9$/) # use gem1.9 if we used rake1.9
desc "Test the MongoDB Ruby driver."
task :test do
puts "\nThis option has changed."
@ -96,20 +93,16 @@ namespace :gem do
desc "Install the gem locally"
task :install do
sh <<EOS
#{gem_command} build mongo-ruby-driver.gemspec &&
#{gem_command} install mongo-*.gem &&
rm mongo-*.gem
EOS
system "gem build mongo-ruby-driver.gemspec"
system "gem install mongo-*.gem"
system "rm mongo-*.gem"
end
desc "Install the optional c extensions"
task :install_extensions do
sh <<EOS
#{gem_command} build mongo-extensions.gemspec &&
#{gem_command} install mongo_ext-*.gem &&
rm mongo_ext-*.gem
EOS
system "gem build mongo-extensions.gemspec"
system "gem install mongo_ext-*.gem"
system "rm mongo_ext-*.gem"
end
end