diff --git a/attributes/default.rb b/attributes/default.rb index 6a1e162..492c40a 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -22,6 +22,7 @@ default['ruby_install']['version'] = '0.5.0' default['ruby_install']['checksum'] = 'aa4448c2c356510cc7c2505961961a17bd3f3435842831e04c8516eb703afd19' +default['ruby_install']['url'] = "https://codeload.github.com/postmodern/ruby-install/tar.gz/v#{node['ruby_install']['version']}" # Install rubies into /opt/rubies as expected by Chruby. default['ruby_install']['default_ruby_base_path'] = '/opt/rubies' diff --git a/recipes/default.rb b/recipes/default.rb index a6c7fe8..d06a075 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -36,9 +36,9 @@ packages = %w{ libssl1.0.0 libssl1.0.0-dbg } end packages.each do |pkg| - package pkg do - action :upgrade - end + package pkg do + action :upgrade + end end when 'rhel' include_recipe 'yum' @@ -47,13 +47,16 @@ include_recipe 'ark' ark 'ruby_install' do - url "https://codeload.github.com/postmodern/ruby-install/tar.gz/v#{node['ruby_install']['version']}" # rubocop:disable LineLength + url node['ruby_install']['url'] extension 'tar.gz' checksum node['ruby_install']['checksum'] - prefix_root '/tmp' # Don't need /usr/local/ruby-install + version node['ruby_install']['version'] action :install_with_make end # Make sure ruby-install has correct ownership, Debian doesn't seem to use # group 'root' when it is installed unlike all the others including Ubuntu. -execute 'chown root:root /usr/local/bin/ruby-install' +file '/usr/local/bin/ruby-install' do + owner 'root' + group 'root' +end