Sha256: f1ff606e777e10d9b642e8952886cdfc84afc3f37dcecce5af9aaf024a2e0bd7

Contents?: true

Size: 816 Bytes

Versions: 5

Compression:

Stored size: 816 Bytes

Contents

version = ENV['RUBY_VERSION'] || '2.5.1'
short_version = version.split('.')[0..1].join('.')

directory 'tmp'

execute 'download ruby' do
  cwd 'tmp'
  command <<-EOF
    rm -f ruby-#{version}.tar.gz
    wget https://cache.ruby-lang.org/pub/ruby/#{short_version}/ruby-#{version}.tar.gz
  EOF
  not_if "sha256sum -c #{::File.join(::File.dirname(__FILE__), "ruby-#{version}.tar.gz_sha256sum.txt")}"
end

execute 'install ruby' do
  cwd 'tmp'
  command <<-EOF
     tar zxf ruby-#{version}.tar.gz
     pushd ruby-#{version}
       ./configure --disable-install-rdoc
       make
       sudo make install
     popd
   EOF
   not_if "ruby -v | egrep \"ruby #{version}(p[0-9]+) \""
end

gem_package 'rubygems-update' do
  user 'root'
end

gem_package 'bundler' do
  user 'root'
end

gem_package 'itamae' do
  user 'root'
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
daddy-0.7.5 itamae/environments/ruby/install.rb
daddy-0.7.4 itamae/environments/ruby/install.rb
daddy-0.7.3 itamae/environments/ruby/install.rb
daddy-0.7.2 itamae/environments/ruby/install.rb
daddy-0.7.1 itamae/environments/ruby/install.rb