solidusio / solidus_starter_frontend

🎨 Rails-based starter kit for your Solidus storefront.
BSD 3-Clause "New" or "Revised" License
55 stars 37 forks source link

Abort installation when Rails < 7 #314

Closed kennyadsl closed 1 year ago

kennyadsl commented 1 year ago

Description

We now have features that are only compatible with the last version of Rails and we are assuming the project will be only installed on the latest.

This change let the installer exit if a previous version is detected, printing a message that asks to retry with latest Rails.

Motivation and Context

We don't want Solidus Starter Frontend to be installed with old versions of Rails, otherwise new features won't work.

How Has This Been Tested?

I changed the sandbox script to use an old version of Rails:

rails _6.1.7.2_ new sandbox \
  --skip-git \
  --database=${DB:-sqlite3} \
  --skip-rc

The result is Rails and Solidus installed, but the Solidus Starter Frontend template script aborted with the corresponding message.

Screenshots (if appropriate):

Types of changes

Checklist: