Skip to content

Commit

Permalink
Fix typo "c" -> "user_config"
Browse files Browse the repository at this point in the history
  • Loading branch information
olleolleolle committed Oct 25, 2019
1 parent cea74d7 commit 92a659a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
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 92a659a

Please sign in to comment.