Class: Vx::Builder::ScriptBuilder::Ruby
- Defined in:
- lib/vx/builder/script_builder/ruby.rb
Constant Summary collapse
- DEFAULT_RUBY =
'1.9.3'- ALIASES =
{ 'jruby-19mode' => 'jruby' }
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#deploy?, #do_after_deploy, #do_announce, #do_before_deploy, #do_before_install, #do_cache_key, #do_cached_directories, #do_deploy_script, #do_install, #do_script
Methods included from Helper::VxvmInstall
Methods included from Helper::TraceShCommand
Instance Method Details
#call(env) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/vx/builder/script_builder/ruby.rb', line 13 def call(env) if enabled?(env) vxvm_install(env, 'ruby', ruby_version(env)) do_cache_key(env) do |i| i << "rvm-#{ruby_version env}" i << gemfile(env) end do_before_install(env) do |i| i << trace_sh_command("export BUNDLE_GEMFILE=${PWD}/#{gemfile(env)}") i << trace_sh_command('export GEM_HOME=~/.rubygems') end do_announce(env) do |i| i << trace_sh_command("ruby --version") i << trace_sh_command("gem --version") i << trace_sh_command("bundle --version") end do_install(env) do |i| bundler_args = env.source.bundler_args.first i << trace_sh_command("bundle install #{bundler_args}") i << trace_sh_command("bundle clean --force") end do_script(env) do |i| script = "if [ -f Rakefile ] ; then \n #{trace_sh_command "bundle exec rake"}\nfi" i << script end do_cached_directories(env) do |i| i << "~/.rubygems" end end app.call(env) end |