@vercel/ruby 1.3.25 → 1.3.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -11
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -8639,9 +8639,16 @@ async function matchPaths(configPatterns, workPath) {
|
|
|
8639
8639
|
async function bundleInstall(bundlePath, bundleDir, gemfilePath) {
|
|
8640
8640
|
build_utils_1.debug(`running "bundle install --deployment"...`);
|
|
8641
8641
|
const bundleAppConfig = await build_utils_1.getWriteableDirectory();
|
|
8642
|
-
const
|
|
8642
|
+
const gemfileContent = await fs_extra_1.readFile(gemfilePath, 'utf8');
|
|
8643
|
+
if (gemfileContent.includes('ruby "~> 2.7.x"')) {
|
|
8644
|
+
// Gemfile contains "2.7.x" which will cause an error message:
|
|
8645
|
+
// "Your Ruby patchlevel is 0, but your Gemfile specified -1"
|
|
8646
|
+
// See https://github.com/rubygems/bundler/blob/3f0638c6c8d340c2f2405ecb84eb3b39c433e36e/lib/bundler/errors.rb#L49
|
|
8647
|
+
// We must correct to the actual version in the build container.
|
|
8648
|
+
await fs_extra_1.writeFile(gemfilePath, gemfileContent.replace('ruby "~> 2.7.x"', 'ruby "~> 2.7.0"'));
|
|
8649
|
+
}
|
|
8650
|
+
await execa_1.default(bundlePath, ['install', '--deployment', '--gemfile', gemfilePath, '--path', bundleDir], {
|
|
8643
8651
|
stdio: 'pipe',
|
|
8644
|
-
reject: false,
|
|
8645
8652
|
env: {
|
|
8646
8653
|
...process.env,
|
|
8647
8654
|
BUNDLE_SILENCE_ROOT_WARNING: '1',
|
|
@@ -8649,15 +8656,6 @@ async function bundleInstall(bundlePath, bundleDir, gemfilePath) {
|
|
|
8649
8656
|
BUNDLE_JOBS: '4',
|
|
8650
8657
|
},
|
|
8651
8658
|
});
|
|
8652
|
-
if (exitCode === 0 ||
|
|
8653
|
-
(exitCode === 18 && stderr.includes('Gemfile specified -1'))) {
|
|
8654
|
-
// Gemfile might contain "2.7.x" so install might exit with code 18 and message:
|
|
8655
|
-
// "Your Ruby patchlevel is 0, but your Gemfile specified -1"
|
|
8656
|
-
// See https://github.com/rubygems/bundler/blob/3f0638c6c8d340c2f2405ecb84eb3b39c433e36e/lib/bundler/errors.rb#L49
|
|
8657
|
-
}
|
|
8658
|
-
else {
|
|
8659
|
-
throw new Error(`"bundle install" failed with exit code ${exitCode}: ${stdout}\n${stderr}`);
|
|
8660
|
-
}
|
|
8661
8659
|
}
|
|
8662
8660
|
exports.version = 3;
|
|
8663
8661
|
async function build({ workPath, files, entrypoint, config, meta = {}, }) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/ruby",
|
|
3
3
|
"author": "Nathan Cahill <nathan@nathancahill.com>",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.28",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index",
|
|
7
7
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/ruby",
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/fs-extra": "8.0.0",
|
|
24
24
|
"@types/semver": "6.0.0",
|
|
25
|
-
"@vercel/build-utils": "5.3.
|
|
25
|
+
"@vercel/build-utils": "5.3.2",
|
|
26
26
|
"@vercel/ncc": "0.24.0",
|
|
27
27
|
"execa": "2.0.4",
|
|
28
28
|
"fs-extra": "^7.0.1",
|
|
29
29
|
"semver": "6.1.1",
|
|
30
30
|
"typescript": "4.3.4"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "6700630feb23bdb4e94ea727911a9e10aa546361"
|
|
33
33
|
}
|