From 44511735964dcb71245e7e55f72539531f7bc0eb Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Sat, 30 Aug 2025 13:55:15 +0200 Subject: [PATCH] Remove workaround for old truffleruby version from 2021 --- bundler.js | 12 ------------ dist/index.js | 12 ------------ 2 files changed, 24 deletions(-) diff --git a/bundler.js b/bundler.js index 816c56b..e9c3b11 100644 --- a/bundler.js +++ b/bundler.js @@ -48,16 +48,6 @@ function readBundledWithFromGemfileLock(lockFile) { return null } -async function afterLockFile(lockFile, platform, engine, rubyVersion) { - if (engine.startsWith('truffleruby') && common.floatVersion(rubyVersion) < 21.1 && platform.startsWith('ubuntu-')) { - const contents = fs.readFileSync(lockFile, 'utf8') - if (contents.includes('nokogiri')) { - await common.measure('Installing libxml2-dev libxslt-dev, required to install nokogiri on TruffleRuby < 21.1', async () => - exec.exec('sudo', ['apt-get', '-yqq', 'install', 'libxml2-dev', 'libxslt-dev'], { silent: true })) - } - } -} - export async function installBundler(bundlerVersionInput, rubygemsInputSet, lockFile, platform, rubyPrefix, engine, rubyVersion) { let bundlerVersion = bundlerVersionInput @@ -175,8 +165,6 @@ export async function bundleInstall(gemfile, lockFile, platform, engine, rubyVer await exec.exec('bundle', ['lock'], envOptions) } - await afterLockFile(lockFile, platform, engine, rubyVersion) - // cache key const paths = [cachePath] const baseKey = await computeBaseKey(engine, rubyVersion, lockFile, cacheVersion) diff --git a/dist/index.js b/dist/index.js index 7a34cf4..99afa5a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -62,16 +62,6 @@ function readBundledWithFromGemfileLock(lockFile) { return null } -async function afterLockFile(lockFile, platform, engine, rubyVersion) { - if (engine.startsWith('truffleruby') && common.floatVersion(rubyVersion) < 21.1 && platform.startsWith('ubuntu-')) { - const contents = fs.readFileSync(lockFile, 'utf8') - if (contents.includes('nokogiri')) { - await common.measure('Installing libxml2-dev libxslt-dev, required to install nokogiri on TruffleRuby < 21.1', async () => - exec.exec('sudo', ['apt-get', '-yqq', 'install', 'libxml2-dev', 'libxslt-dev'], { silent: true })) - } - } -} - async function installBundler(bundlerVersionInput, rubygemsInputSet, lockFile, platform, rubyPrefix, engine, rubyVersion) { let bundlerVersion = bundlerVersionInput @@ -189,8 +179,6 @@ async function bundleInstall(gemfile, lockFile, platform, engine, rubyVersion, b await exec.exec('bundle', ['lock'], envOptions) } - await afterLockFile(lockFile, platform, engine, rubyVersion) - // cache key const paths = [cachePath] const baseKey = await computeBaseKey(engine, rubyVersion, lockFile, cacheVersion)