Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
## [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)

## [v300] - 2025-04-14

- Ruby 3.4.3 is now available


## [v299] - 2025-04-07


Expand Down Expand Up @@ -1661,7 +1675,10 @@ 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/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
[v298]: https://github.com/heroku/heroku-buildpack-ruby/compare/v297...v298
[v297]: https://github.com/heroku/heroku-buildpack-ruby/compare/v296...v297
Expand Down
4 changes: 3 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
16 changes: 11 additions & 5 deletions lib/language_pack/helpers/bundler_wrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,25 @@ 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,
bundled_with: bundled_with
)
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}"

Expand Down
7 changes: 2 additions & 5 deletions lib/language_pack/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ def best_practice_warnings
# warn(<<-WARNING)
# You are using the `asset_sync` gem.
# This is not recommended.
# See https://devcenter.heroku.com/articles/please-do-not-use-asset-sync for more information.
# WARNING
# end
end
Expand Down Expand Up @@ -99,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
Expand Down Expand Up @@ -1225,7 +1224,6 @@ def valid_bundler_cache?(path, metadata)
)
return [false, <<-MESSAGE]
Need to recompile gems for CVE-2014-2014-9130. Clearing bundler cache.
See https://devcenter.heroku.com/changelog-items/1016.
MESSAGE
end

Expand Down Expand Up @@ -1313,7 +1311,6 @@ def load_bundler_cache
bundler.has_gem?("psych")
)
puts "Need to recompile gems for CVE-2014-2014-9130. Clearing bundler cache."
puts "See https://devcenter.heroku.com/changelog-items/1016."
purge_bundler_cache
end

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 = "v299"
BUILDPACK_VERSION = "v302"
end
end