Guest User

Untitled

a guest
Jan 16th, 2014
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. include_recipe 'rvm'
  2.  
  3. install_pkg_prereqs
  4.  
  5. Array(node['rvm']['user_installs']).each do |rvm_user|
  6. version = rvm_user['version'] || node['rvm']['version']
  7. branch = rvm_user['branch'] || node['rvm']['branch']
  8. script_flags = build_script_flags(branch, version)
  9. upgrade_strategy = build_upgrade_strategy(rvm_user['upgrade'])
  10. installer_url = rvm_user['installer_url'] || node['rvm']['installer_url']
  11. rvm_prefix = rvm_user['home'] ||
  12. "#{node['rvm']['user_home_root']}/#{rvm_user['user']}"
  13. rvm_gem_options = rvm_user['rvm_gem_options'] || node['rvm']['rvm_gem_options']
  14. rvmrc = rvm_user['rvmrc'] || node['rvm']['rvmrc']
  15.  
  16. rvmrc_template :rvm_prefix => rvm_prefix,
  17. :rvm_gem_options => rvm_gem_options,
  18. :rvmrc => rvmrc,
  19. :user => rvm_user['user']
  20.  
  21. install_rvm :rvm_prefix => rvm_prefix,
  22. :installer_url => installer_url,
  23. :script_flags => script_flags,
  24. :user => rvm_user['user']
  25.  
  26. upgrade_rvm :rvm_prefix => rvm_prefix,
  27. :upgrade_strategy => upgrade_strategy,
  28. :user => rvm_user['user']
  29. end
Advertisement
Add Comment
Please, Sign In to add comment