From 7be29760577fc395d071b2b4766c9fddf27cfbc9 Mon Sep 17 00:00:00 2001 From: "G. Torres" Date: Fri, 16 May 2025 14:51:11 -0400 Subject: [PATCH 1/6] Adds back old ruby versions --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 127d266..b0b804f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby-version: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7", "2.6", "2.5"] + ruby-version: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7", "2.6", "2.5", "2.4", "2.3"] steps: - uses: actions/checkout@v2 From 5af16baff8d92b717f37c09727c11b8d53797e68 Mon Sep 17 00:00:00 2001 From: "G. Torres" Date: Fri, 16 May 2025 15:33:34 -0400 Subject: [PATCH 2/6] Downgrades webmock and adds base64 to keep both Ruby 3.4 support and add support back for older Ruby versions --- next_rails.gemspec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/next_rails.gemspec b/next_rails.gemspec index dc59c4b..0a9065c 100644 --- a/next_rails.gemspec +++ b/next_rails.gemspec @@ -30,5 +30,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency "timecop", "~> 0.9.1" spec.add_development_dependency "byebug" spec.add_development_dependency "rexml", "3.3.8" # limited on purpose, new versions don't work with old rubies - spec.add_development_dependency "webmock", "3.20.0" + spec.add_development_dependency "webmock", "3.16.2" + spec.add_development_dependency "base64" end From b673d9f451a5f04d39fe0161cbaea5d0b75129f5 Mon Sep 17 00:00:00 2001 From: "G. Torres" Date: Fri, 16 May 2025 15:45:30 -0400 Subject: [PATCH 3/6] Downgrades rexml to most recent version that doesn't set required Ruby version --- next_rails.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/next_rails.gemspec b/next_rails.gemspec index 0a9065c..ce160b9 100644 --- a/next_rails.gemspec +++ b/next_rails.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency "simplecov", "~> 0.17.1" spec.add_development_dependency "timecop", "~> 0.9.1" spec.add_development_dependency "byebug" - spec.add_development_dependency "rexml", "3.3.8" # limited on purpose, new versions don't work with old rubies + spec.add_development_dependency "rexml", "3.2.5" # limited on purpose, new versions don't work with old rubies spec.add_development_dependency "webmock", "3.16.2" spec.add_development_dependency "base64" end From 7eb1d60cd204cc1a79355180a9cf5c038e71a0ed Mon Sep 17 00:00:00 2001 From: "G. Torres" Date: Fri, 16 May 2025 16:26:19 -0400 Subject: [PATCH 4/6] Replaces match? with match to make code Ruby 2.3 compatible --- lib/next_rails/bundle_report/cli.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/next_rails/bundle_report/cli.rb b/lib/next_rails/bundle_report/cli.rb index db578bc..f40f77c 100644 --- a/lib/next_rails/bundle_report/cli.rb +++ b/lib/next_rails/bundle_report/cli.rb @@ -3,6 +3,7 @@ require "optparse" require "next_rails" require "next_rails/bundle_report" +require 'byebug' class NextRails::BundleReport::CLI def initialize(argv) @@ -21,11 +22,11 @@ def validate_arguments(argv) end argv.each do |arg| - if arg.start_with?("--rails-version") && !arg.match?(/--rails-version=+\d+(\.\d+)*$/) + if arg.start_with?("--rails-version") && !/--rails-version=+\d+(\.\d+)*$/.match(arg) raise ArgumentError, "Invalid Rails version format. Example: --rails-version=5.0.7" end - if arg.start_with?("--ruby-version") && !arg.match?(/--ruby-version=+\d+(\.\d+)*$/) + if arg.start_with?("--ruby-version") && !/--ruby-version=+\d+(\.\d+)*$/.match(arg) raise ArgumentError, "Invalid Ruby version format. Example: --ruby-version=3.3" end end From 9687f80a209d072ab3919e30b9ac6e9e8b9c2d6b Mon Sep 17 00:00:00 2001 From: "G. Torres" Date: Fri, 16 May 2025 16:51:07 -0400 Subject: [PATCH 5/6] Updates Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 571dc37..9f8f574 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - [BUGFIX: example](https://github.com/fastruby/next_rails/pull/) - [CHORE: Create an entry point for the BundleReport command](https://github.com/fastruby/next_rails/pull/154) +- [CHORE: Bring back support of Ruby 2.3, 2.4 and 2.5](https://github.com/fastruby/next_rails/pull/155) * Your changes/patches go here. From 2c367d578cadb583d7c02e1a99916cd4b20923d0 Mon Sep 17 00:00:00 2001 From: "G. Torres" Date: Thu, 22 May 2025 13:02:39 -0400 Subject: [PATCH 6/6] Update byebug to use double quotes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Juan Vásquez --- lib/next_rails/bundle_report/cli.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/next_rails/bundle_report/cli.rb b/lib/next_rails/bundle_report/cli.rb index f40f77c..cefd1f4 100644 --- a/lib/next_rails/bundle_report/cli.rb +++ b/lib/next_rails/bundle_report/cli.rb @@ -3,7 +3,7 @@ require "optparse" require "next_rails" require "next_rails/bundle_report" -require 'byebug' +require "byebug" class NextRails::BundleReport::CLI def initialize(argv)