lib/vx/builder/script_builder/ruby.rb in vx-builder-0.5.25 vs lib/vx/builder/script_builder/ruby.rb in vx-builder-0.5.26
- old
+ new
@@ -18,10 +18,16 @@
ruby_v = ruby_version(env) || 'default'
i << "rvm-#{ruby_v}"
i << gemfile(env)
end
+ do_init(env) do |i|
+ if jruby?(env)
+ i << trace_sh_command('export JRUBY_OPTS="-Xcext.enabled=true"')
+ end
+ end
+
do_before_install(env) do |i|
i << trace_sh_command("export RAILS_ENV=test")
i << trace_sh_command("export RACK_ENV=test")
i << trace_sh_command("export BUNDLE_GEMFILE=${PWD}/#{gemfile(env)}")
i << trace_sh_command('export GEM_HOME=~/.rubygems')
@@ -68,9 +74,13 @@
end
def ruby_version(env)
v = env.source.rvm.first
ALIASES[v] || v
+ end
+
+ def jruby?(env)
+ ruby_version(env) =~ /jruby/
end
def gemfile(env)
env.source.gemfile.first || "Gemfile"
end