1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00
puma--puma/bin/puma-wild
Chris LaRose 6502c5ba01
Fix Bundler::GemNotFound errors for nio4r gem (#2427)
* Update extra_runtime_dependencies test to test master proccess's gems

The `extra_runtime_dependencies` option allows one to activate gems in
the puma master process after "pruning" the master process with
`prune_bundler`. This is useful for activating gems that need to be
loaded in the master process, such as `puma_worker_killer`.

The integration test for `extra_runtime_dependencies` tested the
`$LOAD_PATH` of the worker process instead. Since workers are forked
from the master, it's normally fine to do this, but we might as well
test the master process's `$LOAD_PATH` directly if we can.

* Add test to refute that nio4r is loaded into puma master process

* Remove nio4r from puma master $LOAD_PATH

* Remove list of gems to activate from puma-wild

* Update History.md

Co-authored-by: Nate Berkopec <nate.berkopec@gmail.com>
2020-10-20 07:31:23 -06:00

25 lines
303 B
Ruby

#!/usr/bin/env ruby
#
# Copyright (c) 2014 Evan Phoenix
#
require 'rubygems'
cli_arg = ARGV.shift
inc = ""
if cli_arg == "-I"
inc = ARGV.shift
$LOAD_PATH.concat inc.split(":")
end
module Puma; end
Puma.const_set("WILD_ARGS", ["-I", inc])
require 'puma/cli'
cli = Puma::CLI.new ARGV
cli.run