Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo "c" -> "user_config" for --extra_runtime_dependencies #2050

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions History.md
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/puma/cli.rb
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions test/test_cli.rb
Expand Up @@ -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'

Expand Down