@vercel/ruby 2.5.0 → 2.5.1

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 CHANGED
@@ -7345,6 +7345,9 @@ var startDevServer = async (opts) => {
7345
7345
  const projectDir = gemfile ? (0, import_path2.dirname)(gemfile) : workPath;
7346
7346
  if (gemfile) {
7347
7347
  env.BUNDLE_GEMFILE = gemfile;
7348
+ if (meta.syncDependencies) {
7349
+ env.BUNDLE_PATH = (0, import_path2.join)(workPath, ".vercel", "ruby", "bundle");
7350
+ }
7348
7351
  }
7349
7352
  const checkDeps = async () => {
7350
7353
  if (gemfile && bundlerPath) {
@@ -7360,7 +7363,23 @@ var startDevServer = async (opts) => {
7360
7363
  }
7361
7364
  );
7362
7365
  if (check.code !== 0) {
7363
- return false;
7366
+ if (!meta.syncDependencies) {
7367
+ return false;
7368
+ }
7369
+ const sync = "\x1B[90mSynchronizing dependencies...\x1B[0m\n";
7370
+ if (opts.onStdout) {
7371
+ opts.onStdout(Buffer.from(sync));
7372
+ } else {
7373
+ process.stdout.write(sync);
7374
+ }
7375
+ (0, import_build_utils3.debug)(`Running "bundle install" for ${gemfile}`);
7376
+ const install = await run(bundlerPath, ["install"], {
7377
+ cwd: projectDir,
7378
+ env,
7379
+ onStdout: opts.onStdout,
7380
+ onStderr: opts.onStderr
7381
+ });
7382
+ return install.code === 0;
7364
7383
  }
7365
7384
  }
7366
7385
  return true;
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": "2.5.0",
4
+ "version": "2.5.1",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./dist/index",
7
7
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/ruby",
@@ -25,7 +25,7 @@
25
25
  "semver": "6.3.1",
26
26
  "vitest": "2.0.3",
27
27
  "which": "3.0.0",
28
- "@vercel/build-utils": "13.31.0"
28
+ "@vercel/build-utils": "13.31.1"
29
29
  },
30
30
  "scripts": {
31
31
  "build": "node ../../utils/build-builder.mjs",
package/vc_init_dev.rb CHANGED
@@ -73,11 +73,16 @@ def static_then_app(user_app)
73
73
  end
74
74
 
75
75
  host = '127.0.0.1'
76
- begin
77
- sock = TCPServer.new(host, 0)
78
- port = sock.addr[1]
79
- ensure
80
- sock&.close
76
+ requested_port = ENV['VERCEL_DEV_PORT']
77
+ if requested_port && !requested_port.empty?
78
+ port = requested_port.to_i
79
+ else
80
+ begin
81
+ sock = TCPServer.new(host, 0)
82
+ port = sock.addr[1]
83
+ ensure
84
+ sock&.close
85
+ end
81
86
  end
82
87
 
83
88
  app = static_then_app(build_user_app)