Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support prerelease rubies in Gemfile template if possible #47584

Merged
merged 1 commit into from
Mar 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions railties/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
* Support prerelease rubies in Gemfile template if RubyGems version is 3.3.16 or higher.
yahonda marked this conversation as resolved.
Show resolved Hide resolved

*Yasuo Honda*, *David Rodríguez*

* Autoloading setup honors root directories manually set by the user.

This is relevant for custom namespaces. For example, if you'd like classes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby <%= "\"#{RUBY_VERSION}\"" -%>
ruby <%= "\"#{Gem::Version.new(Gem::VERSION) >= Gem::Version.new("3.3.13") ? Gem.ruby_version : RUBY_VERSION}\"" -%>

<% gemfile_entries.each do |gemfile_entry| %>
<%= gemfile_entry %>
Expand Down
2 changes: 1 addition & 1 deletion railties/test/generators/app_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ def test_inclusion_of_ruby_version
run_generator

assert_file "Gemfile" do |content|
assert_match(/ruby "#{RUBY_VERSION}"/, content)
assert_match(/ruby "#{Gem::Version.new(Gem::VERSION) >= Gem::Version.new("3.3.13") ? Gem.ruby_version : RUBY_VERSION}"/, content)
end
assert_file ".ruby-version" do |content|
if ENV["RBENV_VERSION"]
Expand Down