Keep default puma settings in the test environment

The test environment was using the file in `config/puma.rb`, meaning it
wouldn't work with Rails 5.1, which uses a different setup for Puma.

I've decided to create a new file called `defaults.rb`, which will be
used in every environment but development and test. We could also add an
empty file in `config/puma/test.rb`; I think that's less intuitive, but
it's a subjective opinion.
This commit is contained in:
Javi Martín
2019-11-19 20:59:42 +01:00
parent 755bc8e88a
commit 69be13f7a7
4 changed files with 4 additions and 5 deletions

View File

@@ -1,10 +1,9 @@
#!/usr/bin/env puma
rails_root = File.expand_path("../..", __FILE__)
rails_root = File.expand_path("../../..", __FILE__)
directory rails_root
rackup "#{rails_root}/config.ru"
environment "production"
tag ""

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env puma
_load_from File.expand_path("../../puma.rb", __FILE__)
_load_from File.expand_path("../defaults.rb", __FILE__)
environment "preproduction"

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env puma
_load_from File.expand_path("../../puma.rb", __FILE__)
_load_from File.expand_path("../defaults.rb", __FILE__)
environment "production"

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env puma
_load_from File.expand_path("../../puma.rb", __FILE__)
_load_from File.expand_path("../defaults.rb", __FILE__)
environment "staging"