Skip to content

Commit

Permalink
With Propshaft migration from Sprockets version retrieval causes issue (
Browse files Browse the repository at this point in the history
#1452)

* make reference to sprockets unnnecesary

* added changelog entry
  • Loading branch information
victor-fdez authored May 24, 2024
1 parent fd65854 commit f7813cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## [Unreleased]

- Fix issue with sprockets reference being nil when
propshaft gem is used instead (https://github.com/heroku/heroku-buildpack-ruby/pull/1452)

## [v270] - 2024-04-23

Expand Down
4 changes: 3 additions & 1 deletion lib/language_pack/rails3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ def has_nginx?
def sprocket_version_upgrade_needed
# Due to https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-3760
sprockets_version = bundler.gem_version('sprockets')
if sprockets_version < Gem::Version.new("2.12.5")
if sprockets_version.nil?
return false
elsif sprockets_version < Gem::Version.new("2.12.5")
return "2.12.5"
elsif sprockets_version > Gem::Version.new("3") &&
sprockets_version < Gem::Version.new("3.7.2")
Expand Down

0 comments on commit f7813cf

Please sign in to comment.