Sha256: 86ba028b002c2b732bf7f1b8251407fb4b5c6e5b9be9d961f3c09e55d0639132

Contents?: true

Size: 948 Bytes

Versions: 5

Compression:

Stored size: 948 Bytes

Contents

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

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

execute "install ruby-#{version}" do
  cwd '/var/daddy/tmp'
  command <<-EOF
    set -eu
    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

{
  'rubygems-update' => nil,
  'bundler' => '2.3.26',
  'itamae' => '1.14.1',
  'daddy' => nil
}.each do |name, version|
  gem_package name do
    user 'root'
    version version if version
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
daddy-0.9.13 itamae/environments/ruby/default.rb
daddy-0.9.12 itamae/environments/ruby/default.rb
daddy-0.9.11 itamae/environments/ruby/default.rb
daddy-0.9.10 itamae/environments/ruby/default.rb
daddy-0.9.9 itamae/environments/ruby/default.rb