From 92a659a1329542f908cc00e3d7c802d017110c68 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Wed, 23 Oct 2019 18:44:39 +0200 Subject: [PATCH 1/2] Fix typo "c" -> "user_config" --- lib/puma/cli.rb | 2 +- test/test_cli.rb | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) 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' From b286f7ee716c6c60e36042e5e8b4fffe19eb9b0d Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Wed, 23 Oct 2019 18:49:48 +0200 Subject: [PATCH 2/2] Changelog entry on #2050 --- History.md | 1 + 1 file changed, 1 insertion(+) 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