lib/eycap/recipes/rvm.rb in eycap-0.6.6 vs lib/eycap/recipes/rvm.rb in eycap-0.6.7

- old
+ new

@@ -7,12 +7,20 @@ rvm_path=/usr/local/rvm if [[ -s "$rvm_path/environments/${application}" ]] then PATH="$rvm_path/wrappers/${application}:$PATH" fi DESC - task :create_wrappers, :roles => fetch(:rvm_require_role,"rvm") do - run "rvm alias create #{application} #{rvm_ruby_string}" - run "rvm wrapper #{application} --no-links --all" # works with 'rvm 1.19+' + task :create_wrappers, :roles => :app, :except => {:no_bundle => true} do + parallel do |session| + rvm_role = fetch(:rvm_require_role,"rvm") + if exists?(:rvm_shell) + session.when "in?(:#{rvm_role})", command_with_shell(<<-SHELL.split("\n").map(&:strip).join("; "), fetch(:rvm_shell)) + rvm alias create #{application} #{fetch(:rvm_ruby_string,nil)} + rvm wrapper #{application} --no-links --all + SHELL + end + session.else "true" # minimal NOOP + end end after "bundler:bundle_gems","rvm:create_wrappers" end end