Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration: Get environment from RAILS_ENV, too #2022

Merged

Conversation

olleolleolle
Copy link
Contributor

This PR changes configuration defaults.

The default value for environment is also read from RAILS_ENV, if RACK_ENV can't be found.

Overview

See #1949

The goal of that Issue is that configuration defaults in puma/puma-heroku move into lib/puma/configuration.rb.

@olleolleolle olleolleolle marked this pull request as ready for review October 10, 2019 17:19
@olleolleolle olleolleolle force-pushed the make-puma-heroku-configuration-default branch from ac9f3d7 to cf6412a Compare October 10, 2019 17:22
@olleolleolle olleolleolle force-pushed the make-puma-heroku-configuration-default branch 3 times, most recently from 5ce7365 to 7f2e147 Compare October 10, 2019 17:39
ENV.delete 'RACK_ENV'

Puma::CLI.new ["--environment", @environment]

assert_equal ENV['RACK_ENV'], @environment
assert_equal @environment, ENV['RACK_ENV']
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This improves the output on failing - the order of arguments is: assert_equal exp, actual

@nateberkopec nateberkopec added this to the 5.0.0 milestone Oct 10, 2019
@nateberkopec
Copy link
Member

@olleolleolle friendly nudge/reminder to fix the failing tests

@olleolleolle
Copy link
Contributor Author

Huh, it's just like I forgot to push one of the files. I'll get to my computer and investigate!

@olleolleolle olleolleolle force-pushed the make-puma-heroku-configuration-default branch from a6545a3 to 9a7f5c3 Compare October 23, 2019 16:33
Copy link
Contributor Author

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At last, I found something.]

lib/puma/control_cli.rb Outdated Show resolved Hide resolved
@olleolleolle
Copy link
Contributor Author

@nateberkopec There, I think this is ready for a Squash now.

  - as well as from RACK_ENV
  - this is part of the effort to bring the configuration defaults from
    the puma-heroku plugin to Puma
@olleolleolle olleolleolle force-pushed the make-puma-heroku-configuration-default branch from d763861 to 596fe0c Compare October 25, 2019 19:41
@nateberkopec nateberkopec merged commit 629b7ad into puma:master Nov 11, 2019
@olleolleolle olleolleolle deleted the make-puma-heroku-configuration-default branch November 11, 2019 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants