Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- [BUGFIX: example](https://github.com/fastruby/next_rails/pull/<number>)
- [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.

Expand Down
5 changes: 3 additions & 2 deletions lib/next_rails/bundle_report/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
require "optparse"
require "next_rails"
require "next_rails/bundle_report"
require 'byebug'

class NextRails::BundleReport::CLI
def initialize(argv)
Expand All @@ -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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

raise ArgumentError, "Invalid Ruby version format. Example: --ruby-version=3.3"
end
end
Expand Down
5 changes: 3 additions & 2 deletions next_rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +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 "webmock", "3.20.0"
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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@torresga why is this gem needed? can you please add a reference?

Copy link
Author

@torresga torresga May 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuanVqz which gem are you referring to specifically? I have this in the description (edited it a bit in case the original description wasn't clear):

  • Several months ago, rexml was updated to 3.3.8 . I had to downgrade it from 3.3.8 to 3.2.5, as 3.2.6 and above set Ruby 2.5 as the minimum requirement as seen in rexml’s gemspec ruby/rexml@072b02f.
  • We added Ruby 3.4 support in February: 816e5b6 by updating webmock to 3.20.0. webmock version 3.20.0 is incompatible with Ruby versions below 2.5.
  • To keep support for both Ruby 3.4 and Ruby 2.5 and below, I decided to downgrade webmock back to its' previous version and added base64 as a dependency in the gemspec because Ruby 3.4 removed the base64 default gem because it became bundled.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, I missed the explanation for the base64 in the description :S

end
Loading