1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

no need for rake-compiler to build the gem

This commit is contained in:
Charles Lowell 2010-03-22 22:37:23 -05:00
parent 7533ff5d90
commit 64e9cbc883
3 changed files with 16 additions and 32 deletions

View file

@ -1,4 +1,5 @@
require 'rubygems'
require 'spec/rake/spectask'
UPSTREAM = "ext/v8/upstream"
SCONS = "#{UPSTREAM}/scons"
@ -22,19 +23,8 @@ Gem::Specification.new do |gemspec|
gemspec.files = manifest.to_a
end
begin
gem 'rake-compiler', '>= 0.4.1'
require "rake/extensiontask"
Rake::ExtensionTask.new("v8", $gemspec) do |ext|
ext.lib_dir = "lib/v8"
ext.source_pattern = "*.{cpp,h}"
end
rescue LoadError
puts "Rake Compiler not available. Install it with: gem install rake-compiler"
end
require 'spec/rake/spectask'
Spec::Rake::SpecTask.new(:spec) do |spec|
spec.libs << 'lib' << 'spec'
spec.spec_files = FileList['spec/**/*_spec.rb']
@ -65,4 +55,8 @@ namespace :clean do
end
end
for file in Dir['tasks/*.rake']
load file
end

11
tasks/compile.rake Normal file
View file

@ -0,0 +1,11 @@
begin
gem 'rake-compiler', '>= 0.4.1'
require "rake/extensiontask"
rescue LoadError
puts "Rake Compiler not available. You won't be able to compile with rake, unless you gem install rake-compiler"
end
Rake::ExtensionTask.new("v8", $gemspec) do |ext|
ext.lib_dir = "lib/v8"
ext.source_pattern = "*.{cpp,h}"
end

View file

@ -1,21 +0,0 @@
begin
require 'spec'
rescue LoadError
require 'rubygems' unless ENV['NO_RUBYGEMS']
require 'spec'
end
begin
require 'spec/rake/spectask'
rescue LoadError
puts <<-EOS
To use rspec for testing you must install rspec gem:
gem install rspec
EOS
exit(0)
end
desc "Run the specs under spec/models"
Spec::Rake::SpecTask.new do |t|
t.spec_opts = ['--options', "spec/spec.opts"]
t.spec_files = FileList['spec/**/*_spec.rb']
end