Permalink
Browse files

1.3.0.rc12

  • Loading branch information...
1 parent 5fab337 commit 52ead2c7c6d845397c3a0de619106802cc47928a @mpapis mpapis committed Apr 12, 2013
Showing with 44 additions and 5 deletions.
  1. +43 −4 lib/rvm/capistrano.rb
  2. +1 −1 lib/rvm/capistrano/version.rb
View
47 lib/rvm/capistrano.rb
@@ -169,7 +169,12 @@ def rvm_task(name,&block)
command_install = case rvm_type
when :root, :system
if fetch(:use_sudo, true) == false && rvm_install_with_sudo == false
- raise ":use_sudo is set to 'false' but sudo is needed to install rvm_type: #{rvm_type}. You can enable use_sudo within rvm for use only by this install operation by adding to deploy.rb: set :rvm_install_with_sudo, true"
+ raise "
+
+:use_sudo is set to 'false' but sudo is needed to install rvm_type: #{rvm_type}.
+You can enable use_sudo within rvm for use only by this install operation by adding to deploy.rb: set :rvm_install_with_sudo, true
+
+"
else
"#{sudo} "
end
@@ -201,13 +206,43 @@ def rvm_task(name,&block)
rvm_task :install_ruby do
ruby, gemset = fetch(:rvm_ruby_string_evaluated).to_s.strip.split /@/
if %w( release_path default ).include? "#{ruby}"
- raise "ruby can not be installed when using :rvm_ruby_string => :#{ruby}"
+ raise "
+
+ruby can not be installed when using :rvm_ruby_string => :#{ruby}
+
+"
else
- command_install = with_rvm_group("#{File.join(rvm_bin_path, "rvm")} #{rvm_install_ruby} #{ruby} -j #{rvm_install_ruby_threads} #{rvm_install_ruby_params}")
+ command_install = ""
+
+ autolibs_flag = fetch(:rvm_autolibs_flag, 2).to_s
+ autolibs_flag_no_requirements = %w(
+ 0 disable disabled
+ 1 read read-only
+ 2 fail read-fail
+ ).include?( autolibs_flag )
+
+ if autolibs_flag_no_requirements
+ command_install << with_rvm_group("#{File.join(rvm_bin_path, "rvm")} --autolibs=#{autolibs_flag} #{rvm_install_ruby} #{ruby} -j #{rvm_install_ruby_threads} #{rvm_install_ruby_params}")
+ else
+ if fetch(:use_sudo, true) == false && rvm_install_with_sudo == false
+ raise "
+
+:use_sudo is set to 'false' but sudo is needed to install requirements with autolibs '#{autolibs_flag}'.
+You can enable use_sudo within rvm for use only by this ruby install operation by adding to deploy.rb: set :rvm_install_with_sudo, true
+
+"
+ else
+ command_install << "#{sudo} #{File.join(rvm_bin_path, "rvm")} --autolibs=#{autolibs_flag} requirements #{ruby}"
+ command_install << "; "
+ command_install << with_rvm_group("#{File.join(rvm_bin_path, "rvm")} --autolibs=1 #{rvm_install_ruby} #{ruby} -j #{rvm_install_ruby_threads} #{rvm_install_ruby_params}")
+ end
+ end
+
if gemset
command_install << "; "
command_install << with_rvm_group("#{File.join(rvm_bin_path, "rvm")} #{ruby} do rvm gemset create #{gemset}")
end
+
run_silent_curl command_install
end
end
@@ -233,7 +268,11 @@ def rvm_task(name,&block)
rvm_task :create_gemset do
ruby, gemset = fetch(:rvm_ruby_string_evaluated).to_s.strip.split /@/
if %w( release_path default ).include? "#{ruby}"
- raise "gemset can not be created when using :rvm_ruby_string => :#{ruby}"
+ raise "
+
+gemset can not be created when using :rvm_ruby_string => :#{ruby}
+
+"
else
if gemset
run with_rvm_group("#{File.join(rvm_bin_path, "rvm")} #{ruby} do rvm gemset create #{gemset}"), :shell => "#{rvm_install_shell}"
View
2 lib/rvm/capistrano/version.rb
@@ -1,5 +1,5 @@
module RVM
class Capistrano
- VERSION="1.3.0.rc11"
+ VERSION="1.3.0.rc12"
end
end

0 comments on commit 52ead2c

Please sign in to comment.