From f26e86ffe5b9f0ea70e1c86319b0b23b6351f907 Mon Sep 17 00:00:00 2001 From: Schneems Date: Mon, 6 Jan 2025 09:41:33 -0600 Subject: [PATCH] Update default Ruby version to 3.3.6 The latest Ruby is now 3.4.x. Our ideal default policy is to use the latest release of the prior year's version. This PR updates to the latest Ruby 3.3.x version which is 3.3.6. --- CHANGELOG.md | 1 + Gemfile.lock | 2 +- buildpack.toml | 2 +- changelogs/unreleased/default_ruby.md | 3 +++ lib/language_pack/ruby_version.rb | 4 ++-- spec/helpers/outdated_ruby_version_spec.rb | 6 +++--- 6 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 changelogs/unreleased/default_ruby.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 9678d7362..60660e758 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## [Unreleased] +- Default Ruby version is now 3.3.6 (https://github.com/heroku/heroku-buildpack-ruby/pull/NNNN) ## [v287] - 2024-12-25 diff --git a/Gemfile.lock b/Gemfile.lock index 86917b001..6b22f39a9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -73,7 +73,7 @@ DEPENDENCIES toml-rb RUBY VERSION - ruby 3.1.6p260 + ruby 3.3.6p260 BUNDLED WITH 2.5.11 diff --git a/buildpack.toml b/buildpack.toml index 253627574..73759298d 100644 --- a/buildpack.toml +++ b/buildpack.toml @@ -1,6 +1,6 @@ [buildpack] name = "Ruby" -ruby_version = "3.1.6" +ruby_version = "3.3.6" [publish.Ignore] files = [ diff --git a/changelogs/unreleased/default_ruby.md b/changelogs/unreleased/default_ruby.md new file mode 100644 index 000000000..b7bac43b9 --- /dev/null +++ b/changelogs/unreleased/default_ruby.md @@ -0,0 +1,3 @@ +## Default Ruby version for new apps is now 3.3.6 + +The [default Ruby version for new Ruby applications is 3.3.6](https://devcenter.heroku.com/articles/ruby-support#default-ruby-version-for-new-apps). You’ll only get the default if the application does not specify a ruby version. diff --git a/lib/language_pack/ruby_version.rb b/lib/language_pack/ruby_version.rb index 70ba0886e..708385618 100644 --- a/lib/language_pack/ruby_version.rb +++ b/lib/language_pack/ruby_version.rb @@ -12,8 +12,8 @@ def initialize(output = "") end end - BOOTSTRAP_VERSION_NUMBER = "3.1.6".freeze - DEFAULT_VERSION_NUMBER = "3.1.6".freeze + BOOTSTRAP_VERSION_NUMBER = "3.3.6".freeze + DEFAULT_VERSION_NUMBER = "3.3.6".freeze DEFAULT_VERSION = "ruby-#{DEFAULT_VERSION_NUMBER}".freeze LEGACY_VERSION_NUMBER = "1.9.2".freeze LEGACY_VERSION = "ruby-#{LEGACY_VERSION_NUMBER}".freeze diff --git a/spec/helpers/outdated_ruby_version_spec.rb b/spec/helpers/outdated_ruby_version_spec.rb index 410fd1ff3..dc30a23fe 100644 --- a/spec/helpers/outdated_ruby_version_spec.rb +++ b/spec/helpers/outdated_ruby_version_spec.rb @@ -19,11 +19,11 @@ ) outdated.call - expect(outdated.suggested_ruby_minor_version).to eq("3.1.6") + expect(outdated.suggested_ruby_minor_version).to eq("3.3.6") end it "handles arm 💪 architecture on heroku-24" do - ruby_version = LanguagePack::RubyVersion.new("ruby-3.1.0") + ruby_version = LanguagePack::RubyVersion.new("ruby-3.3.0") fetcher = LanguagePack::Fetcher.new( LanguagePack::Base::VENDOR_URL, stack: "heroku-24", @@ -35,7 +35,7 @@ ) outdated.call - expect(outdated.suggested_ruby_minor_version).to eq("3.1.6") + expect(outdated.suggested_ruby_minor_version).to eq("3.3.6") end it "finds the latest version on a stack" do