When using mutual TLS, you must specify the CA certificate chain to use
for verifying the peer. Using Puma's `ssl_bind` DSL did not give you the
option of doing so, which lead to confusing errors when attempting to
use it.
Now, when specifying the `verify_mode` as either `peer` or `force_peer`,
you can use the DSL to set the `ca` value as needed within the `Binder`.
This allows you to use the DSL instead of falling back to the default
`bind` syntax via the URI-style configuration pattern.
* Extract Puma::Configuration#config_files method and add few unit tests
* Add TestConfigFile#test_config_files_with_rack_env test
* Fix configuration loading based on RACK_ENV
* Add test case when config files files are not specified
* Refactor Puma::Configuration#config_files method
* Fix backwards compatibility issue.
Environment could be a String or Proc
running `rake` loads all files starting with `test_` which is not supposed to also load the helper,
since the helper should be loaded by each test and is not a test itself.
* Bump minitest version.
* Add basic test helper file.
* Use minitest for web server tests.
* Use Minitest for unix socket tests.
* Use Minitest for ThreadPool tests.
* Use Minitest for TCP-Rack tests
* Use Minitest for TCPLogger tests.
* Add missing helper to test helpers.
* Use Minitest for Rack server tests.
* Use Minitest for Rack handler tests.
* Use Minitest for Puma::Server tests.
* Use Minitest for Puma::Server with SSL tests.
* Use Minitest for persisten connections tests.
* Require puma in test_helper file.
* Use minitest for Puma::NullIO tests.
* Remove unnecessary requires on test files.
* Use Minitest for MiniSSL tests.
* Use Minitest for IOBuffer tests.
* Require bundler/setup in Rakefile.
* Use Minitest for HttpParser tests.
* Use Minitest for Puma::Configuration tests.
* Use Minitest for Puma::CLI tests.
* Bump Minitest version for Ruby 2.1 Gemfile.
* Use Minitest for integration tests.
* Use Minitest for Puma::App::Status tests.
* Remove test-unit from Gemfiles.
* Add timeout helper to Minitest::Test.
* Use Minitest for Puma::Binder tests.
* Remove testhelp file.
* Add missing require to Puma::Binder tests.
* Prefer require instead of require_relative.
- Currently it's not possible to override the default options for
Puma::Configuration with user provided options.
- I came across this issue while working on fixing server restart for
Rails.
- Rails can send it's own restart command to Puma and Puma should store
it in it's configuration object. So that Puma::Launcher can use it.
- After this patch it will be possible as user provided options will be
taken into account in Configuration object.
Right now if you specify a port via `-p $PORT` and via a `config/puma.rb` then puma will incorrectly try to bind to the same port twice and will fail.
This PR calls `uniq!` on the array to remove duplicate ports from the `binds` array.
Add a lowlevel_error_handler, so we can customize the default error
message.
example:
```
lowlevel_error_handler do
[302, {'Content-Type' => 'text', 'Location' => 'foo.html'}, ['302 found']]
end
```
[fix#458]