From 6d71b556a6e5ec5c1347a48e9e364505d117cc9f Mon Sep 17 00:00:00 2001 From: Daniel Luz Date: Tue, 3 Sep 2024 23:52:54 -0300 Subject: [PATCH 1/3] Restrict Ruby 3.0 to Rails 7.1 Rails 7.2 raises the minimum Ruby version to 3.1. --- Earthfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Earthfile b/Earthfile index 4d39070..6513f41 100644 --- a/Earthfile +++ b/Earthfile @@ -53,7 +53,7 @@ test-bundle: test-bundle-all: BUILD +test-bundle --RUBY_VERSION=3.0 --RAILS_VERSION="~>6.0" - BUILD +test-bundle --RUBY_VERSION=3.0 --RAILS_VERSION="~>7.0" + BUILD +test-bundle --RUBY_VERSION=3.0 --RAILS_VERSION="~>7.1.0" BUILD +test-bundle --RUBY_VERSION=3.1 --RAILS_VERSION="~>7.0" BUILD +test-bundle --RUBY_VERSION=3.2 --RAILS_VERSION="~>7.0" BUILD +test-bundle --RUBY_VERSION=3.3 --RAILS_VERSION="~>7.0" @@ -109,7 +109,7 @@ test-rails: test-rails-all: BUILD +test-rails --RUBY_VERSION=3.0 --RAILS_VERSION="~>6.0" - BUILD +test-rails --RUBY_VERSION=3.0 --RAILS_VERSION="~>7.0" + BUILD +test-rails --RUBY_VERSION=3.0 --RAILS_VERSION="~>7.1.0" BUILD +test-rails --RUBY_VERSION=3.1 --RAILS_VERSION="~>7.0" BUILD +test-rails --RUBY_VERSION=3.2 --RAILS_VERSION="~>7.0" BUILD +test-rails --RUBY_VERSION=3.3 --RAILS_VERSION="~>7.0" @@ -124,7 +124,7 @@ test-rake: test-rake-all: BUILD +test-rake --RUBY_VERSION=3.0 --RAILS_VERSION="~>6.0" - BUILD +test-rake --RUBY_VERSION=3.0 --RAILS_VERSION="~>7.0" + BUILD +test-rake --RUBY_VERSION=3.0 --RAILS_VERSION="~>7.1.0" BUILD +test-rake --RUBY_VERSION=3.1 --RAILS_VERSION="~>7.0" BUILD +test-rake --RUBY_VERSION=3.2 --RAILS_VERSION="~>7.0" BUILD +test-rake --RUBY_VERSION=3.3 --RAILS_VERSION="~>7.0" From c69fee5722cd5e9639945e71472c40f8919fb79c Mon Sep 17 00:00:00 2001 From: Daniel Luz Date: Wed, 4 Sep 2024 00:31:42 -0300 Subject: [PATCH 2/3] Stub compopt for the tests --- tests/test-utils | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test-utils b/tests/test-utils index 3e8d1c9..5980479 100644 --- a/tests/test-utils +++ b/tests/test-utils @@ -1,6 +1,9 @@ #! bash [[ -n $BASH_COMPLETION_SCRIPT ]] && source "$BASH_COMPLETION_SCRIPT" +# This builtin only works in real completions, so stub it for the tests +compopt() { true; } + begin-test() { echo "TEST: $1" } From 7a24a93edda896e8cfd454289bc23e1f459eeaa9 Mon Sep 17 00:00:00 2001 From: Daniel Luz Date: Wed, 4 Sep 2024 00:56:11 -0300 Subject: [PATCH 3/3] Update Rubygems before installing Rails https://github.com/ruby/psych/discussions/607 --- Earthfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Earthfile b/Earthfile index 6513f41..af2c8de 100644 --- a/Earthfile +++ b/Earthfile @@ -17,6 +17,7 @@ rails-app: FROM +ruby ARG RAILS_VERSION="~>7.0" + RUN gem update --system RUN gem install rails --version "$RAILS_VERSION" WORKDIR /usr/src