From f809f7cb27c01374da6f2f862e039a6405094446 Mon Sep 17 00:00:00 2001 From: Neil Carvalho Date: Fri, 7 Feb 2025 15:02:34 -0300 Subject: [PATCH 1/5] Run Cucumber feature tests The CI builds are just too fast. We're only running RSpec and Minitest there, skipping the much slower Cucumber feature tests. This has happened because we broke the RSpec and Minitest runs into two different CI steps, forgetting Cucumber was there. This commit re-adds Cucumber as a separate step. --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c4eaa6a..15e2e78 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,6 +35,8 @@ jobs: run: bundle exec rake spec - name: Minitest tests run: bundle exec rake test + - name: Cucumber tests + run: bundle exec rake cucumber standard: name: Run standard From 777ea847be0f57e8c6f2cda17195af3519924486 Mon Sep 17 00:00:00 2001 From: Neil Carvalho Date: Fri, 7 Feb 2025 15:34:54 -0300 Subject: [PATCH 2/5] Add `bigdecimal` gem to Rails versions without it --- Appraisals | 2 ++ gemfiles/rails6.1.gemfile | 1 + gemfiles/rails7.0.gemfile | 1 + 3 files changed, 4 insertions(+) diff --git a/Appraisals b/Appraisals index eef44fa..7d204cc 100644 --- a/Appraisals +++ b/Appraisals @@ -1,4 +1,5 @@ appraise "rails6.1" do + gem "bigdecimal" gem "byebug" gem "concurrent-ruby", "< 1.3.5" gem "drb" @@ -11,6 +12,7 @@ appraise "rails6.1" do end appraise "rails7.0" do + gem "bigdecimal" gem "byebug" gem "concurrent-ruby", "< 1.3.5" gem "drb" diff --git a/gemfiles/rails6.1.gemfile b/gemfiles/rails6.1.gemfile index fa3a335..eefdbf4 100644 --- a/gemfiles/rails6.1.gemfile +++ b/gemfiles/rails6.1.gemfile @@ -8,6 +8,7 @@ gem "cucumber" gem "rake" gem "rspec-rails" gem "standard" +gem "bigdecimal" gem "byebug" gem "concurrent-ruby", "< 1.3.5" gem "drb" diff --git a/gemfiles/rails7.0.gemfile b/gemfiles/rails7.0.gemfile index 08039b5..18827b1 100644 --- a/gemfiles/rails7.0.gemfile +++ b/gemfiles/rails7.0.gemfile @@ -8,6 +8,7 @@ gem "cucumber" gem "rake" gem "rspec-rails" gem "standard" +gem "bigdecimal" gem "byebug" gem "concurrent-ruby", "< 1.3.5" gem "drb" From dd03f04c947e651c33f4db6a040d65b2be61bc86 Mon Sep 17 00:00:00 2001 From: Neil Carvalho Date: Fri, 7 Feb 2025 18:32:46 -0300 Subject: [PATCH 3/5] Add unvendored gems on generated Rails < 7.1 sample apps --- .tool-versions | 1 + features/support/rails_template | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 .tool-versions diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..041df9a --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +ruby 3.4.1 diff --git a/features/support/rails_template b/features/support/rails_template index c22cc94..0122ddf 100644 --- a/features/support/rails_template +++ b/features/support/rails_template @@ -1,5 +1,8 @@ -if Rails.gem_version < Gem::Version.new('6') - gsub_file "Gemfile", /^gem 'sqlite3'$/, 'gem "sqlite3", "~> 1.3.6"' +if Rails.gem_version < Gem::Version.new('7.1') + append_to_file("Gemfile", %(gem "bigdecimal"\n)) + append_to_file("Gemfile", %(gem "logger"\n)) + append_to_file("Gemfile", %(gem "mutex_m"\n)) + append_to_file("Gemfile", %(gem "drb"\n)) end gsub_file "Gemfile", /^ gem 'spring'$/, ' gem "spring", "!= 2.1.1"' From 36a1ca475c6e55a5efb977d13ab3f131c37f6c66 Mon Sep 17 00:00:00 2001 From: Neil Carvalho Date: Fri, 7 Feb 2025 18:56:07 -0300 Subject: [PATCH 4/5] Add supported `concurrent-ruby` version for Rails < 7.1 --- features/support/rails_template | 1 + 1 file changed, 1 insertion(+) diff --git a/features/support/rails_template b/features/support/rails_template index 0122ddf..215a007 100644 --- a/features/support/rails_template +++ b/features/support/rails_template @@ -3,6 +3,7 @@ if Rails.gem_version < Gem::Version.new('7.1') append_to_file("Gemfile", %(gem "logger"\n)) append_to_file("Gemfile", %(gem "mutex_m"\n)) append_to_file("Gemfile", %(gem "drb"\n)) + append_to_file("Gemfile", %(gem "concurrent-ruby", "< 1.3.5"\n)) end gsub_file "Gemfile", /^ gem 'spring'$/, ' gem "spring", "!= 2.1.1"' From 7830c6877bb7ce27fc5a14d34de9d4c2b5db2d5b Mon Sep 17 00:00:00 2001 From: Neil Carvalho Date: Fri, 28 Feb 2025 10:47:57 -0300 Subject: [PATCH 5/5] Add missing gems required by some Rails versions --- gemfiles/rails7.1.gemfile | 9 +++++---- gemfiles/rails7.2.gemfile | 10 ++++++---- gemfiles/rails8.0.gemfile | 9 +++++---- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/gemfiles/rails7.1.gemfile b/gemfiles/rails7.1.gemfile index b79350f..d2ca2a1 100644 --- a/gemfiles/rails7.1.gemfile +++ b/gemfiles/rails7.1.gemfile @@ -4,16 +4,17 @@ source "https://rubygems.org" gem "appraisal" gem "aruba" -gem "cucumber" -gem "rake" -gem "rspec-rails" -gem "standard" gem "byebug" +gem "cucumber" +gem "error_highlight" gem "listen", "~> 3.2" gem "puma", "~> 6.0" gem "rails", "~> 7.1.0" +gem "rake" +gem "rspec-rails" gem "spring", "!= 2.1.1" gem "spring-watcher-listen", "~> 2.0.0" gem "sqlite3", "~> 1.4" +gem "standard" gemspec name: "factory_bot_rails", path: "../" diff --git a/gemfiles/rails7.2.gemfile b/gemfiles/rails7.2.gemfile index 14c409f..22814cb 100644 --- a/gemfiles/rails7.2.gemfile +++ b/gemfiles/rails7.2.gemfile @@ -4,16 +4,18 @@ source "https://rubygems.org" gem "appraisal" gem "aruba" -gem "cucumber" -gem "rake" -gem "rspec-rails" -gem "standard" +gem "brakeman" gem "byebug" +gem "cucumber" gem "listen", "~> 3.2" gem "puma", "~> 6.0" gem "rails", "~> 7.2.0" +gem "rake" +gem "rspec-rails" +gem "rubocop-rails-omakase" gem "spring", "!= 2.1.1" gem "spring-watcher-listen", "~> 2.0.0" gem "sqlite3", "~> 1.4" +gem "standard" gemspec name: "factory_bot_rails", path: "../" diff --git a/gemfiles/rails8.0.gemfile b/gemfiles/rails8.0.gemfile index 9610cfc..c09e83e 100644 --- a/gemfiles/rails8.0.gemfile +++ b/gemfiles/rails8.0.gemfile @@ -4,21 +4,22 @@ source "https://rubygems.org" gem "appraisal" gem "aruba" -gem "cucumber" -gem "rake" -gem "rspec-rails" -gem "standard" gem "brakeman" gem "byebug" +gem "cucumber" gem "kamal" gem "listen", "~> 3.2" gem "puma", "~> 6.0" gem "rails", "~> 8.0.0" +gem "rake" +gem "rspec-rails" gem "rubocop-rails-omakase" +gem "solid_cache" gem "solid_queue" gem "spring", "!= 2.1.1" gem "spring-watcher-listen", "~> 2.0.0" gem "sqlite3", ">= 2.1" +gem "standard" gem "thruster" gemspec name: "factory_bot_rails", path: "../"