Skip to content

Commit

Permalink
Merge pull request #92 from Scalingo/deps/upstream_v288
Browse files Browse the repository at this point in the history
Sync with upstream v288
  • Loading branch information
Frzk authored Jan 16, 2025
2 parents cdd3f3e + 19d64c0 commit 43432b1
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 7 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
## [Unreleased]


## [v288] - 2025-01-06

- Ruby apps using bundler 2.6+ will now receive bundler 2.6.2 (https://github.com/heroku/heroku-buildpack-ruby/pull/1535)
- Ruby apps using bundler 2.5.x will now receive bundler 2.5.23 (https://github.com/heroku/heroku-buildpack-ruby/pull/1535)

## [v287] - 2024-12-25

- Ruby 3.4.0 is now available (https://github.com/heroku/heroku-buildpack-ruby/pull/1531)
Expand Down Expand Up @@ -1611,7 +1616,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/v287...main
[unreleased]: https://github.com/heroku/heroku-buildpack-ruby/compare/v288...main
[v288]: https://github.com/heroku/heroku-buildpack-ruby/compare/v287...v288
[v287]: https://github.com/heroku/heroku-buildpack-ruby/compare/v286...v287
[v286]: https://github.com/heroku/heroku-buildpack-ruby/compare/v285...v286
[v285]: https://github.com/heroku/heroku-buildpack-ruby/compare/v284...v285
Expand Down
15 changes: 15 additions & 0 deletions changelogs/v288/bundler_2.5.23.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Bundler version 2.5.23 is now available for Ruby Applications

The [Ruby Buildpack](https://devcenter.heroku.com/articles/ruby-support#libraries) installs a version of bundler based on the major and minor version listed in the `Gemfile.lock` under the `BUNDLED WITH` key:

- `BUNDLED WITH` 2.5.x will receive bundler `2.5.23`

It is strongly recommended that you have both a `RUBY VERSION` and `BUNDLED WITH` version listed in your `Gemfile.lock`. If you do not have those values, you can generate them and commit them to git:

```
$ bundle update --ruby
$ git add Gemfile.lock
$ git commit -m "Update Gemfile.lock"
```

Applications without these values specified in the `Gemfile.lock` may break unexpectedly when the defaults change.
15 changes: 15 additions & 0 deletions changelogs/v288/bundler_2.6.x_support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Bundler version 2.6.2 is now available for Ruby Applications

The [Ruby Buildpack](https://devcenter.heroku.com/articles/ruby-support#libraries) installs a version of bundler based on the major and minor version listed in the `Gemfile.lock` under the `BUNDLED WITH` key:

- `BUNDLED WITH` 2.6.x and above will receive bundler `2.6.2`

It is strongly recommended that you have both a `RUBY VERSION` and `BUNDLED WITH` version listed in your `Gemfile.lock`. If you do not have those values, you can generate them and commit them to git:

```
$ bundle update --ruby
$ git add Gemfile.lock
$ git commit -m "Update Gemfile.lock"
```

Applications without these values specified in the `Gemfile.lock` may break unexpectedly when the defaults change.
7 changes: 4 additions & 3 deletions lib/language_pack/helpers/bundler_wrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@ class LanguagePack::Helpers::BundlerWrapper
# Heroku-20's oldest Ruby verison is 2.5.x which doesn't work with bundler 2.4
BLESSED_BUNDLER_VERSIONS["2.3"] = "2.3.25"
BLESSED_BUNDLER_VERSIONS["2.4"] = "2.4.22"
BLESSED_BUNDLER_VERSIONS["2.5"] = "2.5.6"
BLESSED_BUNDLER_VERSIONS["2.5"] = "2.5.23"
BLESSED_BUNDLER_VERSIONS["2.6"] = "2.6.2"
BLESSED_BUNDLER_VERSIONS.default_proc = Proc.new do |hash, key|
if Gem::Version.new(key).segments.first == 1
hash["1"]
elsif Gem::Version::new(key).segments.first == 2
if Gem::Version.new(key) > Gem::Version.new("2.5")
hash["2.5"]
if Gem::Version.new(key) > Gem::Version.new("2.6")
hash["2.6"]
elsif Gem::Version.new(key) < Gem::Version.new("2.3")
hash["2.3"]
else
Expand Down
2 changes: 1 addition & 1 deletion lib/language_pack/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module LanguagePack
class LanguagePack::Base
BUILDPACK_VERSION = "v287"
BUILDPACK_VERSION = "v288"
end
end
8 changes: 6 additions & 2 deletions spec/helpers/bundler_wrapper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@
expect(version).to eq(wrapper_klass::BLESSED_BUNDLER_VERSIONS["2.5"])

version = wrapper_klass.detect_bundler_version(contents: "BUNDLED WITH\n 2.6.7")
expect(wrapper_klass::BLESSED_BUNDLER_VERSIONS.key?("2.5")).to be_truthy
expect(version).to eq(wrapper_klass::BLESSED_BUNDLER_VERSIONS["2.5"])
expect(wrapper_klass::BLESSED_BUNDLER_VERSIONS.key?("2.6")).to be_truthy
expect(version).to eq(wrapper_klass::BLESSED_BUNDLER_VERSIONS["2.6"])

version = wrapper_klass.detect_bundler_version(contents: "BUNDLED WITH\n 2.999.7")
expect(wrapper_klass::BLESSED_BUNDLER_VERSIONS.key?("2.6")).to be_truthy
expect(version).to eq(wrapper_klass::BLESSED_BUNDLER_VERSIONS["2.6"])

expect {
wrapper_klass.detect_bundler_version(contents: "BUNDLED WITH\n 3.6.7")
Expand Down

0 comments on commit 43432b1

Please sign in to comment.