Skip to content

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

Merged
byroot merged 2 commits intomainfrom
update-ci
Nov 22, 2023
Merged

Update the CI matrix and fix test suite on Rails 7.1#707
byroot merged 2 commits intomainfrom
update-ci

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
@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