1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00
Commit graph

25 commits

Author SHA1 Message Date
MSP-Greg
35dbec0eaa add no_tlsv1_1 to binder, config, etc 2019-08-03 14:56:30 -05:00
Nate Berkopec
9f4edf4c66
Cleanup tests, parallelize a few (#1850)
+ Some tests getting frozen_string_literal
+ Remove unneccessary bundler setup
+ Fewer/tighter sleeps
2019-07-27 09:47:19 -07:00
Evan Phoenix
6568aaeaf5
Merge pull request #1689 from michaelherold/allow-ca-to-be-set-in-bind-dsl
Allow mutual TLS CA to be set using `ssl_bind` DSL
2019-03-11 16:39:52 -07:00
Michał Kulesza
ac0652f5a1 add tests 2019-02-21 21:31:35 +01:00
Michael Herold
5a92683afd
Allow mutual TLS CA to be set using ssl_bind DSL
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.
2019-02-20 14:27:00 -06:00
Evan Phoenix
336f8c1873 Fixup some busted testsn 2019-02-20 10:26:16 -08:00
Nate Benz
57bacd131e support ssl_cipher_filter in ssl_bind DSL
* update documentation in examples/config.rb
* add missing test for #ssl_bind
2018-11-12 11:35:03 -06:00
mitto
cf15db20b9 worker_timeout, worker_boot_timeout, worker_shutdown_timeout fix integer convert (#1450)
* worker_timeout, worker_boot_timeout, worker_shutdown_timeout fix integer convert

* persistent_timeout, first_data_timeout fix integer convert

* add integer convert test case

* fix method name typo

* switch gem update --system
2018-03-19 15:05:15 -06:00
Vilius Luneckas
ae6b1cef9a Fix environment file loader (#1340)
* 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
2017-10-16 16:22:14 -06:00
Michael Grosser
9d93a0f62f make test_helper no longer be loaded as a test (#1283)
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.
2017-05-12 12:16:55 -07:00
Michael Grosser
d25ef26465 warn when bundler fails and avoid having to use -I to run tests (#1270) 2017-04-11 14:48:11 -07:00
Michael Grosser
61de1a8891 sort configs/rackups/tests (#1268) 2017-04-11 14:08:18 -07:00
schneems
995ed8bd45 Test specifying config via config_files. 2017-03-09 11:38:26 -06:00
schneems
cda9317e71 Split out config into explicit user and file parts 2017-03-09 11:38:26 -06:00
Thomas Walpole
5f24229fbc Specified parameters should overwrite loaded config files 2017-01-30 20:29:19 -08:00
Francesco Rodriguez
b638dd1948 Use Minitest instead of Test::Unit (#1152)
* 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.
2016-11-22 08:05:49 -07:00
Ari Hiroki
8509829729 fix access priorities of each level in LeveledOptions (#1118)
Close #1103
2016-11-20 12:10:34 -07:00
Prathamesh Sonpatki
c4006b93fa Allow overriding options of Configuration object
- 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.
2016-03-30 10:56:25 +05:30
Evan Phoenix
f788af0c8f Continue API cleanup, preparing for 3.0 2016-02-06 19:00:29 -08:00
Costi
69449dc23a ruby 1.8.7 compatibility patches
1.8.7 doesn't have each_with_object, rand(range) or 1.9 hash syntax
2015-07-29 09:16:24 -05:00
Laurent Arnoud
8662c6c877 Added tests for bind configuration on rackup file
see b8c087d967
see #684
see #689
2015-05-25 12:15:32 +02:00
schneems
3f2fb13fcd Ignore multiple port declarations
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.
2015-02-17 08:58:19 -06:00
Arthur Neves
e424eaf052
Add config to customize the default error message
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]
2014-02-17 12:29:58 -05:00
Evan Phoenix
c1fc54a0fe Handle a config-based app properly 2013-02-06 18:17:25 -08:00
Evan Phoenix
e88fc14952 Refactor more of the configuration 2011-12-07 13:43:10 -08:00