-
-
Notifications
You must be signed in to change notification settings - Fork 198
Update to Rails 7.2 #2343
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
base: master
Are you sure you want to change the base?
Update to Rails 7.2 #2343
Conversation
b591b4c to
468399b
Compare
|
Are you planning to squash this PR when merging, to remove the non-passing commits from the git history? |
Rails 7.2 app:update Rails 7.2: enum with positional args Rails 7.2: enum positional args Rails 7.2: Enable 7.2 defaults
|
@mroderick Now it is 1 commit. |
|
|
||
| # Disable serving static files from `public/`, relying on NGINX/Apache to do so instead. | ||
| config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? | ||
| # config.public_file_server.enabled = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this changing the app?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default is true. EDIT: https://guides.rubyonrails.org/configuring.html#config-public-file-server-enabled
The ENV is set on Heroku.
The result; the same.
| # See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. | ||
| Rails.application.config.filter_parameters += [ | ||
| :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn | ||
| :passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| @@ -1,51 +1,42 @@ | |||
| # Puma can serve each request in a thread from an internal thread pool. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is all of this rails defaults now?
| environment ENV.fetch("RAILS_ENV") { "development" } | ||
|
|
||
| # Specifies the `pidfile` that Puma will use. | ||
| pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, this moved to below.
|
|
||
| production: | ||
| adapter: redis | ||
| url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have Heroku Cache currently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right perhaps we also don't use Action Cable (websocket).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why have the config then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly because it is automatically generated each time the upgrade dance is performed. Benefit: By having it, unused, there's less diff to manage when upgrading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO it should at least contain a comment that it's currently not used.
This PR upgrades the configuration to Rails 7.2 configuration.
I attempted to keep close to what Rails outputs, so that the update to the next version of Rails is not so difficult.
In order to deploy this: