diff --git a/History.md b/History.md index 8e2f1e4e37..b0dfc2a8f8 100644 --- a/History.md +++ b/History.md @@ -9,6 +9,7 @@ * Fix Errno::EINVAL when SSL is enabled and browser rejects cert (#1564) * Fix pumactl defaulting puma to development if an environment was not specified (#2035) * Fix closing file stream when reading pid from pidfile (#2048) + * Fix a typo in configuration option `--extra_runtime_dependencies` (#2050) ## 4.2.1 / 2019-10-07 diff --git a/lib/puma/cli.rb b/lib/puma/cli.rb index aa940f84d5..cff30af861 100644 --- a/lib/puma/cli.rb +++ b/lib/puma/cli.rb @@ -162,7 +162,7 @@ def setup_options end o.on "--extra-runtime-dependencies GEM1,GEM2", "Defines any extra needed gems when using --prune-bundler" do |arg| - c.extra_runtime_dependencies arg.split(',') + user_config.extra_runtime_dependencies arg.split(',') end o.on "-q", "--quiet", "Do not log requests internally (default true)" do diff --git a/test/test_cli.rb b/test/test_cli.rb index 44d548051d..d49236246a 100644 --- a/test/test_cli.rb +++ b/test/test_cli.rb @@ -352,6 +352,14 @@ def test_load_path $LOAD_PATH.shift end + def test_extra_runtime_dependencies + cli = Puma::CLI.new ['--extra-runtime-dependencies', 'a,b'] + extra_dependencies = cli.instance_variable_get(:@conf) + .instance_variable_get(:@options)[:extra_runtime_dependencies] + + assert_equal %w[a b], extra_dependencies + end + def test_environment ENV.delete 'RACK_ENV'