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

Upgrade has_scope #253

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Upgrade has_scope #253

wants to merge 6 commits into from

Conversation

bagedevimo
Copy link
Contributor

The previous version of has_scope doesn't support Rails 5. Support for
Rails 5 was introduced in version 7.0, but we may as well as go all the
way to 0.7.2 which is the last version that supports Rails < 5.2.

https://github.com/heartcombo/has_scope/blob/main/CHANGELOG.md#072

Copy link
Contributor Author

bagedevimo commented Jan 5, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @bagedevimo and the rest of your teammates on Graphite Graphite

@coveralls
Copy link

coveralls commented Jan 5, 2024

Coverage Status

coverage: 37.131%. remained the same
when pulling 7b670e1 on 01-06-Upgrade_has_scope
into 99b2e7c on master.

Devise 4.0.0 introduced support for Rails 5

Follow up commits will fix deprecations
Devise updated this in version 4.0.0rc1, so this is just bringing us up
to the new system: https://github.com/heartcombo/devise/blob/main/CHANGELOG.md#400rc1---2016-02-01
Devise 4.1.0 fixed a race condition with email sending, where an email
could try to be sent before the record that email is referring too is
not yet persisted [1]. They unfortunately fixed this using an after_commit,
which under Rails 4.2 doesn't work with transactional fixtures [2]. This
is fixed under Rails 5 [3], so we can just comment these out to get this
merged, and get the rails upgrade out, then re-enable these tests.

[1] https://github.com/heartcombo/devise/blob/main/CHANGELOG.md#410
[2] config/spec_helper.rb:34
[3] rails/rails@eb72e34
Devise 4.6.0 deprecated the `devise_error_messages!` helper method in
favour if just rendering a partial including the library. [1]

We can (optionally) copy that partial into our codebase, where we can
edit it, and it will be preferentially used over the one in the gem
code. However, the existing helper had no customisations so I didn't go
down that route yet.

[1] https://github.com/heartcombo/devise/blob/main/CHANGELOG.md#460---2019-02-07
Devise 4.2.0 deprecated the Devise::TestHelpers module in favour of the
Devise::Test::ControllerHelpers module, which is because they wanted to
split the different test helpers into different modules.

https://github.com/heartcombo/devise/blob/main/CHANGELOG.md#420---2016-07-01
The previous version of has_scope doesn't support Rails 5. Support for
Rails 5 was introduced in version 7.0, but we may as well as go all the
way to 0.7.2 which is the last version that supports Rails < 5.2.

https://github.com/heartcombo/has_scope/blob/main/CHANGELOG.md#072
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