Rakefile 551 B

1234567891011121314151617181920212223
  1. require 'bundler'
  2. require 'bundler/setup'
  3. require "rake/extensiontask"
  4. require "rspec/core/rake_task"
  5. Bundler::GemHelper.install_tasks
  6. task :default => :spec
  7. desc "remove all generated artifacts except built v8 objects"
  8. task :clean do
  9. sh "rm -rf pkg"
  10. sh "rm -rf ext/v8/*.bundle ext/v8/*.so"
  11. sh "rm -rf lib/v8/*.bundle lib/v8/*.so"
  12. end
  13. Rake::ExtensionTask.new("v8", eval(File.read("therubyracer.gemspec"))) do |ext|
  14. ext.lib_dir = "lib/v8"
  15. ext.source_pattern = "*.{cpp,h}"
  16. end
  17. RSpec::Core::RakeTask.new(:spec)