2 # scripts/Makefiles can read and eval the output of this script and
6 fp
= File
.open(__FILE__
, "rb")
7 fp
.flock(File
::LOCK_EX)
9 ruby_engine
= defined?(RUBY_ENGINE
) ? RUBY_ENGINE
: 'ruby'
12 # we want "ruby-1.8.7" and not "ruby-1.8", so disable :multiruby
14 :path => "tmp/isolate/#{ruby_engine}-#{RUBY_VERSION}",
19 gem
'sqlite3-ruby', '1.2.5'
24 _
, status
= Process
.waitpid2(pid
)
25 status
.success
? or abort status
.inspect
26 lib_paths
= Dir
["#{opts[:path]}/gems/*-*/lib"].map
{ |x
| File
.expand_path(x
) }
27 libs
= "tmp/isolate/.#{ruby_engine}-#{RUBY_VERSION}.libs"
28 File
.open("#{libs}.#$$", "w") { |fp
| fp
.puts lib_paths
.join(':') }
29 File
.rename("#{libs}.#$$", libs
)
31 # pure Ruby gems can be shared across all Rubies
32 %w(3.0.0).each
do |rails_ver
|
33 opts
[:path] = "tmp/isolate/rails-#{rails_ver}"
36 gem
'rails', rails_ver
39 _
, status
= Process
.waitpid2(pid
)
40 status
.success
? or abort status
.inspect
41 more
= Dir
["#{opts[:path]}/gems/*-*/lib"].map
{ |x
| File
.expand_path(x
) }
42 lib_paths
.concat(more
)