From 951b9441c2fb097bdcfde922b712eac83338b9b7 Mon Sep 17 00:00:00 2001 From: "heroku-linguist[bot]" <136119646+heroku-linguist[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 17:29:36 +0000 Subject: [PATCH 1/5] Prepare release v300 (#1578) Co-authored-by: heroku-linguist[bot] <136119646+heroku-linguist[bot]@users.noreply.github.com> --- CHANGELOG.md | 8 +++++++- lib/language_pack/version.rb | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99b0138b2..af58b6b59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ ## [Unreleased] +## [v300] - 2025-04-14 + +- Ruby 3.4.3 is now available + + ## [v299] - 2025-04-07 @@ -1662,7 +1667,8 @@ Bugfixes: * Change gem detection to use lockfile parser * use `$RACK_ENV` when thin is detected for rack apps -[unreleased]: https://github.com/heroku/heroku-buildpack-ruby/compare/v299...main +[unreleased]: https://github.com/heroku/heroku-buildpack-ruby/compare/v300...main +[v300]: https://github.com/heroku/heroku-buildpack-ruby/compare/v299...v300 [v299]: https://github.com/heroku/heroku-buildpack-ruby/compare/v298...v299 [v298]: https://github.com/heroku/heroku-buildpack-ruby/compare/v297...v298 [v297]: https://github.com/heroku/heroku-buildpack-ruby/compare/v296...v297 diff --git a/lib/language_pack/version.rb b/lib/language_pack/version.rb index 7b044dcac..8544bf322 100644 --- a/lib/language_pack/version.rb +++ b/lib/language_pack/version.rb @@ -2,6 +2,6 @@ module LanguagePack class LanguagePack::Base - BUILDPACK_VERSION = "v299" + BUILDPACK_VERSION = "v300" end end From 9266aa7bf2de566b4880e9ce1ad12e89bdf2c988 Mon Sep 17 00:00:00 2001 From: Richard Schneeman Date: Mon, 14 Apr 2025 12:54:20 -0500 Subject: [PATCH 2/5] Add `.ruby-version` formats to observability metrics (#1576) * Normalize observability keys * Capture .ruby-version file information Rails 8 stopped generating `RUBY VERSION` in the Gemfile.lock and started generating a `.ruby-version` file. We will support this file in the future, but there is no spec for it. This commit will observe the formats to help guide implementation decisions. It can also tell us how many people's `.ruby-version` files already align with their `Gemfile.lock` versions. The logic is inside of the bundler wrapper class as this is the first class to read the ruby version from the Gemfile.lock via `$ bundle platform --ruby`. * Changelog --- CHANGELOG.md | 1 + lib/language_pack/helpers/bundler_wrapper.rb | 16 +++++++++++----- lib/language_pack/ruby.rb | 4 ++-- spec/helpers/bundler_wrapper_spec.rb | 11 ++++++----- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af58b6b59..d0ba43581 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## [Unreleased] +- Observe `.ruby-version` formats (https://github.com/heroku/heroku-buildpack-ruby/pull/1576) ## [v300] - 2025-04-14 diff --git a/lib/language_pack/helpers/bundler_wrapper.rb b/lib/language_pack/helpers/bundler_wrapper.rb index 7c7689bc4..3d8ecd651 100644 --- a/lib/language_pack/helpers/bundler_wrapper.rb +++ b/lib/language_pack/helpers/bundler_wrapper.rb @@ -112,8 +112,14 @@ def initialize(options = {}) contents = @gemfile_lock_path.read(mode: "rt") bundled_with = contents.match(BUNDLED_WITH_REGEX) + dot_ruby_version_file = @gemfile_lock_path.join("..").join(".ruby-version") @report.capture( - "bundled_with" => bundled_with&.[]("version") || "empty" + "bundler.bundled_with" => bundled_with&.[]("version") || "empty", + # We use this bundler class to detect the Requested ruby version from the Gemfile.lock + # Rails 8 stopped generating `RUBY VERSION` in the Gemfile.lock and started generating + # a `.ruby-version` file. This will observe the formats to help guide implementation + # decisions + "ruby.dot_ruby_version" => dot_ruby_version_file.exist? ? dot_ruby_version_file.read&.strip : nil ) @version = self.class.detect_bundler_version( contents: contents, @@ -121,10 +127,10 @@ def initialize(options = {}) ) parts = @version.split(".") @report.capture( - "bundler_version_installed" => @version, - "bundler_major" => parts&.shift, - "bundler_minor" => parts&.shift, - "bundler_patch" => parts&.shift + "bundler.version_installed" => @version, + "bundler.major" => parts&.shift, + "bundler.minor" => parts&.shift, + "bundler.patch" => parts&.shift ) @dir_name = "bundler-#{@version}" diff --git a/lib/language_pack/ruby.rb b/lib/language_pack/ruby.rb index 4a16ccd05..5ab5c13aa 100644 --- a/lib/language_pack/ruby.rb +++ b/lib/language_pack/ruby.rb @@ -98,8 +98,8 @@ def compile run_assets_precompile_rake_task end @report.capture( - "railties_version" => bundler.gem_version('railties'), - "rack_version" => bundler.gem_version('rack') + "gem.railties_version" => bundler.gem_version('railties'), + "gem.rack_version" => bundler.gem_version('rack') ) config_detect best_practice_warnings diff --git a/spec/helpers/bundler_wrapper_spec.rb b/spec/helpers/bundler_wrapper_spec.rb index b90c2c2f9..a27ef2d32 100644 --- a/spec/helpers/bundler_wrapper_spec.rb +++ b/spec/helpers/bundler_wrapper_spec.rb @@ -64,11 +64,12 @@ expect(report.data).to eq( { - "bundled_with" => "2.5.7", - "bundler_major" => "2", - "bundler_minor" => "5", - "bundler_patch" => "23", - "bundler_version_installed" => "2.5.23", + "ruby.dot_ruby_version" => nil, + "bundler.bundled_with" => "2.5.7", + "bundler.major" => "2", + "bundler.minor" => "5", + "bundler.patch" => "23", + "bundler.version_installed" => "2.5.23", } ) end From b5c2f4d9b25799e3314ccdaf8e5d10fcfba9f731 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 12:55:12 -0500 Subject: [PATCH 3/5] Bump toml-rb from 2.2.0 to 4.0.0 (#1570) Bumps [toml-rb](https://github.com/emancu/toml-rb) from 2.2.0 to 4.0.0. - [Release notes](https://github.com/emancu/toml-rb/releases) - [Commits](https://github.com/emancu/toml-rb/compare/v2.2.0...v4.0.0) --- updated-dependencies: - dependency-name: toml-rb dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4def54426..6210961c1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -34,6 +34,7 @@ GEM heroics (~> 0.1.1) moneta (~> 1.0.0) rate_throttle_client (~> 0.1.0) + racc (1.8.1) rake (13.2.1) rate_throttle_client (0.1.2) redis (5.3.0) @@ -51,8 +52,9 @@ GEM rspec-support (3.13.1) thor (1.3.1) threaded (0.0.4) - toml-rb (2.2.0) + toml-rb (4.0.0) citrus (~> 3.0, > 3.0) + racc (~> 1.7) webrick (1.8.2) PLATFORMS From 0f855becc21fd456580c157749a29cfadf9fdfb2 Mon Sep 17 00:00:00 2001 From: "heroku-linguist[bot]" <136119646+heroku-linguist[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 18:03:29 +0000 Subject: [PATCH 4/5] Prepare release v301 (#1579) Co-authored-by: heroku-linguist[bot] <136119646+heroku-linguist[bot]@users.noreply.github.com> --- CHANGELOG.md | 6 +++++- lib/language_pack/version.rb | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0ba43581..8e547c575 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## [Unreleased] + +## [v301] - 2025-04-14 + - Observe `.ruby-version` formats (https://github.com/heroku/heroku-buildpack-ruby/pull/1576) ## [v300] - 2025-04-14 @@ -1668,7 +1671,8 @@ Bugfixes: * Change gem detection to use lockfile parser * use `$RACK_ENV` when thin is detected for rack apps -[unreleased]: https://github.com/heroku/heroku-buildpack-ruby/compare/v300...main +[unreleased]: https://github.com/heroku/heroku-buildpack-ruby/compare/v301...main +[v301]: https://github.com/heroku/heroku-buildpack-ruby/compare/v300...v301 [v300]: https://github.com/heroku/heroku-buildpack-ruby/compare/v299...v300 [v299]: https://github.com/heroku/heroku-buildpack-ruby/compare/v298...v299 [v298]: https://github.com/heroku/heroku-buildpack-ruby/compare/v297...v298 diff --git a/lib/language_pack/version.rb b/lib/language_pack/version.rb index 8544bf322..57e10059c 100644 --- a/lib/language_pack/version.rb +++ b/lib/language_pack/version.rb @@ -2,6 +2,6 @@ module LanguagePack class LanguagePack::Base - BUILDPACK_VERSION = "v300" + BUILDPACK_VERSION = "v301" end end From 31f816dd10326e740c4f1006b4ea7b81231cbd7f Mon Sep 17 00:00:00 2001 From: "heroku-linguist[bot]" <136119646+heroku-linguist[bot]@users.noreply.github.com> Date: Wed, 16 Apr 2025 16:45:43 +0000 Subject: [PATCH 5/5] Prepare release v302 (#1580) Co-authored-by: heroku-linguist[bot] <136119646+heroku-linguist[bot]@users.noreply.github.com> --- CHANGELOG.md | 8 +++++++- lib/language_pack/version.rb | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e547c575..9f1fa3a8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ ## [Unreleased] +## [v302] - 2025-04-16 + +- Ruby 3.3.8 is now available + + ## [v301] - 2025-04-14 - Observe `.ruby-version` formats (https://github.com/heroku/heroku-buildpack-ruby/pull/1576) @@ -1671,7 +1676,8 @@ Bugfixes: * Change gem detection to use lockfile parser * use `$RACK_ENV` when thin is detected for rack apps -[unreleased]: https://github.com/heroku/heroku-buildpack-ruby/compare/v301...main +[unreleased]: https://github.com/heroku/heroku-buildpack-ruby/compare/v302...main +[v302]: https://github.com/heroku/heroku-buildpack-ruby/compare/v301...v302 [v301]: https://github.com/heroku/heroku-buildpack-ruby/compare/v300...v301 [v300]: https://github.com/heroku/heroku-buildpack-ruby/compare/v299...v300 [v299]: https://github.com/heroku/heroku-buildpack-ruby/compare/v298...v299 diff --git a/lib/language_pack/version.rb b/lib/language_pack/version.rb index 57e10059c..3a72e8cf3 100644 --- a/lib/language_pack/version.rb +++ b/lib/language_pack/version.rb @@ -2,6 +2,6 @@ module LanguagePack class LanguagePack::Base - BUILDPACK_VERSION = "v301" + BUILDPACK_VERSION = "v302" end end