-
Notifications
You must be signed in to change notification settings - Fork 9
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
Feature: Rails 7 #1147
Merged
Merged
Feature: Rails 7 #1147
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
camillevilla
changed the title
Upgrade spring gem in preparation for Rails 7
Feature: Rails 7
Dec 20, 2024
camillevilla
force-pushed
the
rails-7
branch
from
December 20, 2024 21:12
3320aa0
to
2f11217
Compare
PhilipDeFraties
force-pushed
the
rails-7
branch
from
December 20, 2024 23:20
a0cac81
to
986004b
Compare
camillevilla
force-pushed
the
rails-7
branch
from
December 20, 2024 23:28
986004b
to
a2f5b59
Compare
PhilipDeFraties
force-pushed
the
rails-7
branch
from
December 27, 2024 18:17
1ee4d38
to
14be8de
Compare
PhilipDeFraties
force-pushed
the
rails-7
branch
from
December 27, 2024 18:39
ea7492b
to
f803891
Compare
* Apply changes from Rails 7 app:update - Updated configuration files to align with Rails 7 defaults, many are just updating commented examples/instructions or replacing single quotes with double. - Updated Redis caching configuration in development and test environments. - remove sidekiq as queue adapted in env configs - Applied updates to logging, caching, and middleware configurations for improved performance and maintainability. - Updated schema.rb to reflect changes introduced by Rails 7, previously set precision values removed will be added back via migration in next commit * Reapply timestamp precision values precision values were removed via app:update command as per rails 7 update va_facilities and visns tables previously had precision set to 11 which is outside the supported range of 0-6, so reimplementing with the max of 6
* enable rails 7 button_to config update * enable rails 7 config apply_stylesheet_media_default setting * add cookie_rotator initializer as per rails 7 upgrade guide: https://guides.rubyonrails.org/v7.0/upgrading_ruby_on_rails.html#key-generator-digest-class-changing-to-use-sha256 * update active_support.key_generator_hash_digest_class to enable SHA256 encryption * update active_support.hash_digest_class to enable SHA256 encryption * update active_support.remove_deprecated_time_with_zone_name config to true * enable active_support.executor_around_test_case in default configs file * set action_mailer.smtp_timeout in default configs file * set config.active_storage.video_preview_arguments as per rails 7 defaults * set config.active_record.automatic_scope_inversing as per rails 7 defaults * set config.active_record.verify_foreign_keys_for_fixtures as per rails 7 defaults * set config.active_record.partial_inserts as per rails 7 defaults * set config.action_controller.raise_on_open_redirects as per rails 7 defaults * set config.active_storage.variant_processor as per rails 7 defaults * set config.action_controller.wrap_parameters_by_defaultas per rails 7 defaults * set config.active_support.use_rfc4122_namespaced_uuids per rails 7 defaults * set config.action_dispatch.default_headers per rails 7 defaults * set config.active_support.cache_format_version per rails 7 defaults * set config.action_dispatch.cookies_serializer per rails 7 defaults * set config.action_dispatch.return_only_request_media_type_on_content_type per rails 7 defaults * set config.active_storage.multiple_file_field_include_hidden as per rails 7 defaults * set config.active_support.disable_to_s_conversion as per rails 7 defaults * remove temporary config settings and bump config.load_defaults to 7.0 * remove new_framework_defaults_7_0 file * add bottom blank line
camillevilla
reviewed
Jan 7, 2025
camillevilla
approved these changes
Jan 8, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
JIRA issue link
Description - what does this code do?
Updates
rails
gem to 7.0Numerous updates to various config files via app:update command.
I went through and reviewed each file updated line by line, reverting changes that needed to be kept (ie keeping the settings for redis caching in the environment config files). Many changes were just adding/updating commented instructions and examples in the config files or replacing single quotes with double.
One notable change was the adding of default precision values for timestamp columns on in the schema, which occurred automatically in the process of running the
app:update
command and unfortunately removed the existing precision settings that needed to be subsequently added back via migration in the second commit. Note: the va_facilities and visns tables' timestamp columns were previously set to a precision of 11 which is (and was) outside the supported range of 0-6 so I reimplemented at the max of 6. Going forward on this version of rails, any time there is an update to the schema there it will automatically addprecision: nil
to any timestamp column that doesn't already have it explicitly set. There is no specific place in the documentation that explains this change, the best I could find is this issue where the change is discussed.Another change of note is the new
cookie_rotator
initializer added to ensure backwards compatibility with cookies generated prior to the upgrade which includes a change to the key generator from SHA1 to SHA256. The initializer implemented was taken directly from the rails upgrade documentation seen here.Testing done - how did you test it/steps on how can another person can test it
Screenshots, Gifs, Videos from application (if applicable)
Link to mock-ups/mock ups (image file if you have it) (if applicable)
Acceptance criteria
Definition of done