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

olleolleolle commented Oct 10, 2019

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 Oct 10, 2019
@olleolleolle olleolleolle force-pushed the olleolleolle:make-puma-heroku-configuration-default branch from ac9f3d7 to cf6412a Oct 10, 2019
@olleolleolle olleolleolle force-pushed the olleolleolle:make-puma-heroku-configuration-default branch 3 times, most recently from 5ce7365 to 7f2e147 Oct 10, 2019
ENV.delete 'RACK_ENV'

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

assert_equal ENV['RACK_ENV'], @environment
assert_equal @environment, ENV['RACK_ENV']

This comment has been minimized.

Copy link
@olleolleolle

olleolleolle Oct 10, 2019

Author Contributor

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

nateberkopec commented Oct 21, 2019

@olleolleolle friendly nudge/reminder to fix the failing tests

@olleolleolle
Copy link
Contributor Author

olleolleolle commented Oct 21, 2019

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 olleolleolle:make-puma-heroku-configuration-default branch from a6545a3 to 9a7f5c3 Oct 23, 2019
Copy link
Contributor Author

olleolleolle left a comment

At last, I found something.]

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

olleolleolle commented Oct 25, 2019

@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 olleolleolle:make-puma-heroku-configuration-default branch from d763861 to 596fe0c Oct 25, 2019
@nateberkopec nateberkopec merged commit 629b7ad into puma:master Nov 11, 2019
1 check was pending
1 check was pending
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@olleolleolle olleolleolle deleted the olleolleolle:make-puma-heroku-configuration-default branch Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.