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

Configuring the environment name in Rails #356

Merged
merged 5 commits into from
Mar 16, 2024

Conversation

neilwilliams
Copy link
Contributor

I've finally found some time to raise a new PR for this. I originally raised it as #290.

This small new configuration option allows us to specify the name for the rails environment, rather than being limited to using 'development', 'test' and 'production'.

We have multiple rails 'production' environments, so this is needed to support that.

For example, when this new config is enabled (it defaults to how it works now), we would need to set the new environment variable:

ENVIRONMENT=preprod

or

ENVIRONMENT=perf

And have an associated config for it in ./config:. e.g.

./config
  settings.yml
  settings/
    preprod.yml
    perf.yml

@cjlarose FYI - hopefully we can get this in this time, and we can stop referencing a copy of this gem from our private gem repository 😄

neilwilliamsdvla and others added 4 commits May 25, 2022 09:40
…veride the default config environment which is the Rails.env. This allows us to have multiple different environments, without having to worry about making custom rails environments
@cjlarose
Copy link
Member

Previously, we wanted a test for the Railtie, but that ended up being a big hassle. I think we're gonna figure it out in #353 though, so I'm comfortable merging this in as-is and we can add a test later

@cjlarose cjlarose merged commit 59fffa6 into rubyconfig:master Mar 16, 2024
8 checks passed
@cjlarose
Copy link
Member

Released in version 5.4.0

@neilwilliams
Copy link
Contributor Author

Thanks @cjlarose !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants