Sha256: 875cea366c3f5242a014d503ead4881b24bf345b8ccab15e2a65bd5a24c7913c

Contents?: true

Size: 1.4 KB

Versions: 42

Compression:

Stored size: 1.4 KB

Contents

ruby_version, ruby_source = ENV['RUBY_VER'], "job parameter"
unless ruby_version
  ruby_version = "2.4.1"
  ruby_source = "default"
end
test_name "Install and configure Ruby #{ruby_version} (from #{ruby_source}) on the SUT" do

  step 'Ensure that the default system is an el-based system' do
    # The pre-suite currently only supports el systems, and we should
    #fail early if the default platform is not a supported platform
    assert(default.platform.variant == 'el',
           "Expected the platform variant to be 'el', not #{default.platform.variant}")
  end

  step 'clean out current ruby and its dependencies' do
    on default, 'yum remove ruby ruby-devel -y'
  end

  # These steps install git, openssl, and wget
  step 'install development dependencies' do
    on default, 'yum groupinstall "Development Tools" -y'
    on default, 'yum install openssl-devel -y'
    on default, 'yum install wget -y'
  end

  step "download and install ruby #{ruby_version}" do
    on default, "wget http://cache.ruby-lang.org/pub/ruby/#{ruby_version[0..2]}/ruby-#{ruby_version}.tar.gz"
    on default, "tar xvfz ruby-#{ruby_version}.tar.gz"
    on default, "cd ruby-#{ruby_version};./configure"
    on default, "cd ruby-#{ruby_version};make"
    on default, "cd ruby-#{ruby_version};make install"
  end

  step 'update gem on the SUT and install bundler' do
    on default, 'gem update --system;gem install --force bundler'
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
beaker-4.42.0 acceptance/pre_suite/subcommands/05_install_ruby.rb
beaker-4.41.2 acceptance/pre_suite/subcommands/05_install_ruby.rb
beaker-4.41.1 acceptance/pre_suite/subcommands/05_install_ruby.rb
beaker-4.41.0 acceptance/pre_suite/subcommands/05_install_ruby.rb
beaker-4.40.2 acceptance/pre_suite/subcommands/05_install_ruby.rb
beaker-4.40.1 acceptance/pre_suite/subcommands/05_install_ruby.rb
beaker-4.40.0 acceptance/pre_suite/subcommands/05_install_ruby.rb
beaker-4.39.0 acceptance/pre_suite/subcommands/05_install_ruby.rb
beaker-4.38.1 acceptance/pre_suite/subcommands/05_install_ruby.rb
beaker-4.38.0 acceptance/pre_suite/subcommands/05_install_ruby.rb
beaker-4.37.2 acceptance/pre_suite/subcommands/05_install_ruby.rb
beaker-4.37.1 acceptance/pre_suite/subcommands/05_install_ruby.rb
beaker-4.37.0 acceptance/pre_suite/subcommands/05_install_ruby.rb
beaker-4.36.1 acceptance/pre_suite/subcommands/05_install_ruby.rb
beaker-4.36.0 acceptance/pre_suite/subcommands/05_install_ruby.rb
beaker-4.35.0 acceptance/pre_suite/subcommands/05_install_ruby.rb
beaker-4.34.0 acceptance/pre_suite/subcommands/05_install_ruby.rb
beaker-4.33.0 acceptance/pre_suite/subcommands/05_install_ruby.rb
beaker-4.32.0 acceptance/pre_suite/subcommands/05_install_ruby.rb
beaker-4.31.0 acceptance/pre_suite/subcommands/05_install_ruby.rb