Skip to content

Commit 322278d

Browse files
authored
Merge pull request #107 from Scalingo/deps/upstream_v302
Sync with upstream v302
2 parents 6be9e71 + 071ba93 commit 322278d

File tree

5 files changed

+35
-13
lines changed

5 files changed

+35
-13
lines changed

CHANGELOG.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@
33
## [Unreleased]
44

55

6+
## [v302] - 2025-04-16
7+
8+
- Ruby 3.3.8 is now available
9+
10+
11+
## [v301] - 2025-04-14
12+
13+
- Observe `.ruby-version` formats (https://github.com/heroku/heroku-buildpack-ruby/pull/1576)
14+
15+
## [v300] - 2025-04-14
16+
17+
- Ruby 3.4.3 is now available
18+
19+
620
## [v299] - 2025-04-07
721

822

@@ -1661,7 +1675,10 @@ Bugfixes:
16611675
* Change gem detection to use lockfile parser
16621676
* use `$RACK_ENV` when thin is detected for rack apps
16631677

1664-
[unreleased]: https://github.com/heroku/heroku-buildpack-ruby/compare/v299...main
1678+
[unreleased]: https://github.com/heroku/heroku-buildpack-ruby/compare/v302...main
1679+
[v302]: https://github.com/heroku/heroku-buildpack-ruby/compare/v301...v302
1680+
[v301]: https://github.com/heroku/heroku-buildpack-ruby/compare/v300...v301
1681+
[v300]: https://github.com/heroku/heroku-buildpack-ruby/compare/v299...v300
16651682
[v299]: https://github.com/heroku/heroku-buildpack-ruby/compare/v298...v299
16661683
[v298]: https://github.com/heroku/heroku-buildpack-ruby/compare/v297...v298
16671684
[v297]: https://github.com/heroku/heroku-buildpack-ruby/compare/v296...v297

Gemfile.lock

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ GEM
3434
heroics (~> 0.1.1)
3535
moneta (~> 1.0.0)
3636
rate_throttle_client (~> 0.1.0)
37+
racc (1.8.1)
3738
rake (13.2.1)
3839
rate_throttle_client (0.1.2)
3940
redis (5.3.0)
@@ -51,8 +52,9 @@ GEM
5152
rspec-support (3.13.1)
5253
thor (1.3.1)
5354
threaded (0.0.4)
54-
toml-rb (2.2.0)
55+
toml-rb (4.0.0)
5556
citrus (~> 3.0, > 3.0)
57+
racc (~> 1.7)
5658
webrick (1.8.2)
5759

5860
PLATFORMS

lib/language_pack/helpers/bundler_wrapper.rb

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,19 +112,25 @@ def initialize(options = {})
112112

113113
contents = @gemfile_lock_path.read(mode: "rt")
114114
bundled_with = contents.match(BUNDLED_WITH_REGEX)
115+
dot_ruby_version_file = @gemfile_lock_path.join("..").join(".ruby-version")
115116
@report.capture(
116-
"bundled_with" => bundled_with&.[]("version") || "empty"
117+
"bundler.bundled_with" => bundled_with&.[]("version") || "empty",
118+
# We use this bundler class to detect the Requested ruby version from the Gemfile.lock
119+
# Rails 8 stopped generating `RUBY VERSION` in the Gemfile.lock and started generating
120+
# a `.ruby-version` file. This will observe the formats to help guide implementation
121+
# decisions
122+
"ruby.dot_ruby_version" => dot_ruby_version_file.exist? ? dot_ruby_version_file.read&.strip : nil
117123
)
118124
@version = self.class.detect_bundler_version(
119125
contents: contents,
120126
bundled_with: bundled_with
121127
)
122128
parts = @version.split(".")
123129
@report.capture(
124-
"bundler_version_installed" => @version,
125-
"bundler_major" => parts&.shift,
126-
"bundler_minor" => parts&.shift,
127-
"bundler_patch" => parts&.shift
130+
"bundler.version_installed" => @version,
131+
"bundler.major" => parts&.shift,
132+
"bundler.minor" => parts&.shift,
133+
"bundler.patch" => parts&.shift
128134
)
129135
@dir_name = "bundler-#{@version}"
130136

lib/language_pack/ruby.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ def best_practice_warnings
6969
# warn(<<-WARNING)
7070
# You are using the `asset_sync` gem.
7171
# This is not recommended.
72-
# See https://devcenter.heroku.com/articles/please-do-not-use-asset-sync for more information.
7372
# WARNING
7473
# end
7574
end
@@ -99,8 +98,8 @@ def compile
9998
run_assets_precompile_rake_task
10099
end
101100
@report.capture(
102-
"railties_version" => bundler.gem_version('railties'),
103-
"rack_version" => bundler.gem_version('rack')
101+
"gem.railties_version" => bundler.gem_version('railties'),
102+
"gem.rack_version" => bundler.gem_version('rack')
104103
)
105104
config_detect
106105
best_practice_warnings
@@ -1225,7 +1224,6 @@ def valid_bundler_cache?(path, metadata)
12251224
)
12261225
return [false, <<-MESSAGE]
12271226
Need to recompile gems for CVE-2014-2014-9130. Clearing bundler cache.
1228-
See https://devcenter.heroku.com/changelog-items/1016.
12291227
MESSAGE
12301228
end
12311229

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

lib/language_pack/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
module LanguagePack
44
class LanguagePack::Base
5-
BUILDPACK_VERSION = "v299"
5+
BUILDPACK_VERSION = "v302"
66
end
77
end

0 commit comments

Comments
 (0)