run-basic-rails-application: Remove RHEL 7 and Software Collections logic.

We will not run the rails test in RHEL 7 or Software Collections cases.
This commit is contained in:
Jun Aruga 2025-01-27 15:45:12 +01:00
commit fde78aa7df

View file

@ -37,9 +37,6 @@ bundle=""
ARCH=$(uname -m)
RAILSVER=""
# version of Ruby on RHEL7 needs older version of rails
if rlIsRHEL 7; then RAILSVER="-v 4.2.7"; NOKOVER="-v 1.6.8"; fi
rlJournalStart
rlPhaseStartSetup
rlAssertRpm --all
@ -65,19 +62,9 @@ rlJournalStart
rlPhaseStartTest
rlRun "rails new app | tee bundle.log" 0 "Creating new rails application"
[ ! -z "$COLLECTIONS" ] && rlAssertGrep "bundle install --local" bundle.log || rlAssertNotGrep "bundle install --local" bundle.log
rlRun "pushd app/"
rlAssertExists "app"
if [ -z "$COLLECTIONS" ] && rlIsRHEL '<=7'
then
rlRun "echo \"gem 'nokogiri', '1.6.8'\" >> Gemfile" 0 "Adding nokogiri gem into Gemfile"
sed -i "s/gem 'spring'/#gem 'spring'/" Gemfile
rlRun "gem pristine nokogiri" 0 "Restore installed nokogiri to pristine condition"
rlRun "bundle config build.nokogiri --use-system-libraries" 0 "Build nokogiri with system libraries"
rlRun "bundle install"
fi
rlRun "ss -tulpn | grep 3000" 1 "Check if port 3000 isn't engaged"
rlRun "rails server &" 0 "Running rails server"
sleep 10