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:
parent
7533ff5d90
commit
64e9cbc883
3 changed files with 16 additions and 32 deletions
16
Rakefile
16
Rakefile
|
@ -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
11
tasks/compile.rake
Normal 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
|
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue