Permalink
Browse files

Merge git://github.com/ballistiq/chef-rvm

Merging code from martinisoft#186 to enable autolibs and resolve dependency issues
  • Loading branch information...
2 parents 08a06bc + e5acdeb commit a20f0257ec987a530a142b13e62feac8bedacc86 @benalexander benalexander committed Apr 18, 2013
Showing with 7 additions and 5 deletions.
  1. +1 −0 attributes/default.rb
  2. +3 −3 libraries/chef_rvm_recipe_helpers.rb
  3. +1 −1 recipes/system_install.rb
  4. +2 −1 recipes/user_install.rb
View
@@ -49,6 +49,7 @@
default['rvm']['branch'] = "stable"
default['rvm']['version'] = "head"
default['rvm']['upgrade'] = "none"
+default['rvm']['autolibs'] = "enabled"
# extra system-wide tunables
default['rvm']['root_path'] = "/usr/local/rvm"
@@ -22,11 +22,11 @@
class Chef
module RVM
module RecipeHelpers
- def build_script_flags(branch, version = "head")
+ def build_script_flags(branch, version = "head", autolibs = "enabled")
if version =~ /\A\d+\.\d+\.\d+/ && %w{stable master none}.include?(branch)
- " -s -- --version #{version}"
+ " -s -- --version #{version} --autolibs=#{autolibs}"
else
- " -s -- --branch #{branch} --version #{version}"
+ " -s -- --branch #{branch} --version #{version} --autolibs=#{autolibs}"
end
end
@@ -19,7 +19,7 @@
include_recipe 'rvm'
-script_flags = build_script_flags(node['rvm']['branch'], node['rvm']['version'])
+script_flags = build_script_flags(node['rvm']['branch'], node['rvm']['version'], node['rvm']['autolibs'])
upgrade_strategy = build_upgrade_strategy(node['rvm']['upgrade'])
installer_url = node['rvm']['installer_url']
rvm_prefix = ::File.dirname(node['rvm']['root_path'])
View
@@ -24,8 +24,9 @@
Array(node['rvm']['user_installs']).each do |rvm_user|
version = rvm_user['version'] || node['rvm']['version']
branch = rvm_user['branch'] || node['rvm']['branch']
+ autolibs = rvm_user['autolibs'] || node['rvm']['autolibs']
- script_flags = build_script_flags(branch, version)
+ script_flags = build_script_flags(branch, version, autolibs)
upgrade_strategy = build_upgrade_strategy(rvm_user['upgrade'])
installer_url = rvm_user['installer_url'] || node['rvm']['installer_url']
rvm_prefix = rvm_user['home'] ||

0 comments on commit a20f025

Please sign in to comment.