Skip to content

Commit

Permalink
Fix typo "c" -> "user_config" for --extra_runtime_dependencies (#2050)
Browse files Browse the repository at this point in the history
* Fix typo "c" -> "user_config"

* Changelog entry on #2050
  • Loading branch information
olleolleolle authored and nateberkopec committed Oct 25, 2019
1 parent cea74d7 commit 122e08f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
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

0 comments on commit 122e08f

Please sign in to comment.