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

Update the CI matrix and fix test suite on Rails 7.1 #707

Merged
merged 2 commits into from
Nov 22, 2023
Merged

Conversation

byroot
Copy link
Member

@byroot byroot commented Nov 22, 2023

No description provided.

@byroot byroot force-pushed the update-ci branch 3 times, most recently from 4bd0706 to fe84d24 Compare November 22, 2023 10:30
@byroot byroot merged commit 378e0ce into main Nov 22, 2023
36 checks passed
@byroot byroot deleted the update-ci branch November 22, 2023 11:32
if config.include?("config.cache_classes")
config.sub!(/config\.cache_classes\s*=\s*false/, "config.cache_classes = true")
else # 7.1+ doesn't have config.cache_classes in the config at all
config.sub!(/config.enable_reloading = true/, "config.enable_reloading = true\nconfig.cache_classes = true")

Choose a reason for hiding this comment

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

This is confusing

Why set both enable_reloading and cache_classes?
The settings are basically aliases but opposite. enable_reloading = !cache_classes.

The Rails documentation is confusing in its description of enable_reloading and cache_classes, so maybe that is why it ended up this way here.

Suggested change
config.sub!(/config.enable_reloading = true/, "config.enable_reloading = true\nconfig.cache_classes = true")
config.sub!(/config.enable_reloading = true/, "config.enable_reloading = false")

if c.include?("config.cache_classes")
c.sub!(/config\.cache_classes\s*=\s*true/, "config.cache_classes = false")
else # 7.1+ doesn't have config.cache_classes in the config at all
c.sub!(/config.enable_reloading = false/, "config.enable_reloading = false\nconfig.cache_classes = false")

Choose a reason for hiding this comment

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

Same as in acceptance_test.rb

Suggested change
c.sub!(/config.enable_reloading = false/, "config.enable_reloading = false\nconfig.cache_classes = false")
c.sub!(/config.enable_reloading = false/, "config.enable_reloading = true")

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

Successfully merging this pull request may close these issues.

2 participants