32 Commits

Author SHA1 Message Date
Carlos Antonio da Silva
35920d27e5 Exclude Rails main + Ruby 3.2
It dropped support to Ruby 3.2 which is expected to be EOL by
2026-03-31.
2026-01-05 09:55:48 -03:00
Carlos Antonio da Silva
6f8f38d795 Update dependencies and test with Ruby 4.0
https://www.ruby-lang.org/en/news/2025/12/25/ruby-4-0-0-released/

We need to add `ostruct` as a dev dependency because it doesn't come
as a default gem with Ruby 4.0 anymore.

Lock minitest < 6 since v6 has some incompatibilities with released
versions of Rails that will be fixed in future versions.

This is something I didn't run into a few other gems, but SimpleForm
did, presumabily because it touches additional areas like AV tests.
2025-12-29 17:37:19 -03:00
dependabot[bot]
c8a64b549c Bump actions/checkout from 5 to 6 (#5809)
* Bump actions/checkout from 5 to 6

Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...


* Bump supercharge/mongodb-github-action from 1.12.0 to 1.12.1 (#5808)

Bumps [supercharge/mongodb-github-action](https://github.com/supercharge/mongodb-github-action) from 1.12.0 to 1.12.1.
- [Release notes](https://github.com/supercharge/mongodb-github-action/releases)
- [Changelog](https://github.com/supercharge/mongodb-github-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/supercharge/mongodb-github-action/compare/1.12.0...1.12.1)

---
updated-dependencies:
- dependency-name: supercharge/mongodb-github-action
  dependency-version: 1.12.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...


Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-24 15:39:11 -03:00
Carlos Antonio da Silva
c6b08ae7e1 Bump actions/checkout and mongodb-github-action
Bump actions/checkout from 3 to 5 (#5805)

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Bump supercharge/mongodb-github-action from 1.11.0 to 1.12.0 (#5804)

Bumps [supercharge/mongodb-github-action](https://github.com/supercharge/mongodb-github-action) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/supercharge/mongodb-github-action/releases)
- [Changelog](https://github.com/supercharge/mongodb-github-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/supercharge/mongodb-github-action/compare/1.11.0...1.12.0)

---
updated-dependencies:
- dependency-name: supercharge/mongodb-github-action
  dependency-version: 1.12.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-03 18:52:57 -03:00
Carlos Antonio da Silva
dd7ee27f74 Bring back Mongoid official support (#5568)
Devise hasn't been tested with Mongoid since Rails version 5, only 4.x was still running those tests.

This enables the tests again on all currently supported Rails versions, with their respective mongoid supported versions. There were a couple of minor tweaks to make it happen, namely:

* The way we were dropping the session before doesn't work in later versions so I changed back to calling `purge!` which appears to work fine. We used to call `Mongoid.purge!` but that changed in #4686.
* Some of the configs in the Rails test app were setting Active Record values when outside of the AR ORM tests, updated those to make sure they are not set when running mongoid ORM tests.
* The validations added to the shared admin code in tests were only checking for Rails version 5.1, but we need to use the same check for AR 5.1 that is used in code, otherwise it will try to use methods not available in mongoid there.
2025-10-31 11:16:02 -03:00
Carlos Antonio da Silva
141ef37339 Add Ruby 3.4 & build updates (#5801)
Update bundle to avoid 3.4 mutex_m require error.

Test against Rails 7.0 branch which contains Ruby 3.4 fixes.

Update changelog to mention Rails < 7.0 support being dropped.

Builds on top of https://github.com/heartcombo/devise/pull/5770
Closes https://github.com/heartcombo/devise/pull/5776
Closes https://github.com/heartcombo/devise/pull/5761
2025-10-21 17:28:05 -03:00
Greg Molnar
dbc8e77ea0 Make test suite work (#5770)
* Drop support for Rails < 7 and Ruby < 2.7
* Add tests to support to Rails 8+
* Fix test suite across all supported versions
2025-10-21 16:52:04 -03:00
Jerome Dalbert
950721d6de Fix Rails 8 CI 2024-11-24 18:28:09 -08:00
Antonis Berkakis
c80026d955 Update CI to run to include Ruby 3.3
- Exclude Rubies >=3.1 from latest main Gemfile as it runs on 7.2
2024-04-09 14:56:07 +01:00
Carlos Antonio da Silva
49e4a991cf Remove some more code added to support older versions
Also change back to run CI on ubuntu-latest which should work with all
Ruby versions supported now.
2023-10-13 11:02:45 -03:00
Carlos Antonio da Silva
23633b70f0 Bring back Ruby 2.7 support
It's EOL but the current versions of Rails are still supporting it, so
it makes sense for us to keep supporting it as well. And it doesn't give
us any extra maintenance burden as older versions have been doing.
2023-10-13 10:44:05 -03:00
Rafael Mendonça França
c8207373ea Drop support to all EOL rails versions 2023-10-12 16:52:01 -03:00
Rafael Mendonça França
c4701866ae Drop support to EOL Rubies
All Ruby 2.x are EOL now.
2023-10-12 16:49:10 -03:00
Carlos Antonio da Silva
e688b2f256 Merge branch '4-stable' 2023-10-11 19:12:53 -03:00
Carlos Antonio da Silva
218d14a227 Lock ubuntu version to 20.04 to workaround older Ruby build issues
Trying to get the build fully green for now.
2023-10-10 11:29:29 -03:00
Carlos Antonio da Silva
373d83cc9d Use Bundler 1.x with Ruby <= 2.2
Here we go again.
2023-10-10 11:29:29 -03:00
Carlos Antonio da Silva
c4c8fad66c Use Rails 7.1 on main Gemfile and create a new one for 7.0 2023-10-10 10:51:46 -03:00
dependabot[bot]
285dc5d2fc Bump supercharge/mongodb-github-action from 1.3.0 to 1.9.0
Bumps [supercharge/mongodb-github-action](https://github.com/supercharge/mongodb-github-action) from 1.3.0 to 1.9.0.
- [Release notes](https://github.com/supercharge/mongodb-github-action/releases)
- [Changelog](https://github.com/supercharge/mongodb-github-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/supercharge/mongodb-github-action/compare/1.3.0...1.9.0)

---
updated-dependencies:
- dependency-name: supercharge/mongodb-github-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-09 23:23:28 +00:00
Peter Goldstein
11b6a99e88 Add Dependabot for GitHub Actions 2023-03-19 12:55:13 -04:00
Carlos Antonio da Silva
319d9fa648 Run with the latest rubygems on newer Ruby versions
Rails master on Ruby 2.7/3.0 is failing with the following error:

    Resolving dependencies...
    Could not find compatible versions
    Because every version of rails depends on RubyGems >= 3.3.13
      and Gemfile-rails-main depends on rails >= 0,
      RubyGems >= 3.3.13 is required.
    So, because current RubyGems version is = 3.1.6,
      version solving has failed.

Trying to run with the latest available rubygems to see if that can fix
the problem, but sticking to the "default" rubygems version on older
Ruby versions to avoid build issues there.
2023-01-19 09:58:53 -03:00
Carlos Antonio da Silva
fc1ac76ddf Add support to Ruby 3.2 (no changes needed) 2023-01-17 14:29:38 -03:00
Carlos Antonio da Silva
451ff6d49c Reorganize test matrix & use latest bundler
* Rails and Ruby versions follow the most recent to oldest, except for
  Rails main, so we can keep the Gemfile the first one.
* Excluding specific matrix combinations based on the Gemfile first,
  Ruby version next, and keep the same order (most recent -> oldest)
* Quote all Ruby versions to keep things consistent. It's required for
  the '3.0' version to avoid the float issue where it'd use the latest
  3.x instead.
2022-02-25 14:50:01 -03:00
Peter Goldstein
3c5acaf531 Add Ruby 3.1 to CI matrix. Lock to Nokogiri < 1.13 for webrat compatibility 2022-02-23 08:37:31 -08:00
Carlos Antonio da Silva
f3e8fd3baa Move the Gemfile to test with Rails 7.0 alpha2, fix session test issue
It appears setting the `rack.session` to a simple hash doesn't work
anymore as it now has a few additional methods Rails is relying on to
determine whether it's enabled or not:
https://github.com/rails/rails/pull/42231

Failure:
    NoMethodError: undefined method `enabled?' for {}:Hash
    rails (f55cdafe4b82) actionpack/lib/action_dispatch/middleware/flash.rb:62:in `commit_flash'

Turns we we don't seem to need to set `rack.session` for the tests here.
2021-10-07 18:08:16 -03:00
Alex Ghiculescu
b39faffde4 Test against Rails main and remove ActiveSupport::Dependencies.reference (#5357)
Remove `ActiveSupport::Dependencies.reference`

This was deleted from Rails: 14d4edd7c3

As far as I can tell, it was meant to add a performance boost at some point in the past but doesn't seem to do anything useful these days.
2021-10-07 17:18:37 -03:00
Carlos Antonio da Silva
e8e0c27599 Revert "Lock bundler to 2.2.9 instead of latest"
This reverts commit 1ba53dc369.

Let's give the latest bundler (2.2.15 as of today) a try again.
2021-03-30 21:53:57 -03:00
Carlos Antonio da Silva
1ba53dc369 Lock bundler to 2.2.9 instead of latest
2.2.10 is causing the dependency resolution on Rails 6-0-stable to fail:

```
  Bundler could not find compatible versions for gem "railties":
    In Gemfile-rails-6-0:
      devise was resolved to 4.7.3, which depends on
        railties (>= 4.1.0)

      rails was resolved to 6.0.3.5, which depends on
        railties (= 6.0.3.5)

      responders (~> 3.0) was resolved to 3.0.1, which depends on
        railties (>= 5.0)
  Took  27.49 seconds
```

https://github.com/heartcombo/devise/runs/1905780158?check_suite_focus=true#step:5:23

The `railties` version 6.0.3.5 should work, given the other two are
using >= declarations, but it fails in 2.2.10.

Downgrading to 2.2.9 works.
2021-02-15 16:33:14 -03:00
Carlos Antonio da Silva
ad91686b62 Test on Ruby 3+ with Rails 6+
And remove dupe entry in the exclude matrix.

In order to get Ruby 3 working we needed to install `rexml` as part of
the test dependencies, only done on the main Gemfile (Rails 6.1) and the
6.0 versions. (which are the only ones supported by Ruby 3.)

Devise itself doesn't require `rexml` as it does nothing with it, but a
dependency we use during tests seem to require it. I was able to track
it down to omniauth-openid -> rack-openid -> ruby-openid requiring it:

    13a88ad644/lib/openid/yadis/xrds.rb (L1)

So while we have tests using omniauth-openid, we'll need this require in
place as well. Ideally that upstream version of ruby-openid should have
it, but it seems that one isn't updated in a while.
2021-02-15 14:34:36 -03:00
Carlos Antonio da Silva
3048fe0960 Prevent Bundler 2.x. with Rails 4.x versions 2021-02-01 10:10:26 -03:00
Carlos Antonio da Silva
13ba27497b Use the latest 2.x patch version for each Ruby, remove ruby-head
ruby-head was always in allowed failures with travis anyway, and we
never really paid much attention to it, so let's just remove it entirely
for now.
2021-01-31 10:08:57 -03:00
Carlos Antonio da Silva
e07932c181 Rename gemfiles to keep consistency 2021-01-31 09:54:47 -03:00
Carlos Antonio da Silva
7e6da424e2 Move from Travis to GitHub Actions 2021-01-29 16:59:14 -03:00