diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 207f5703fc..f0a84c8a49 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,67 +19,20 @@ jobs: - '3.2' - '3.1' - '3.0' - - '2.7' - - '2.6' - - '2.5' - - '2.4' - - '2.3' - - '2.2' - - '2.1' env: - DEVISE_ORM=active_record - DEVISE_ORM=mongoid exclude: - - gemfile: Gemfile - ruby: '2.6' - - gemfile: Gemfile - ruby: '2.5' - - gemfile: Gemfile - ruby: '2.4' - - gemfile: Gemfile - ruby: '2.3' - - gemfile: Gemfile - ruby: '2.2' - - gemfile: Gemfile - ruby: '2.1' - gemfile: Gemfile env: DEVISE_ORM=mongoid - - gemfile: gemfiles/Gemfile-rails-main - ruby: '2.6' - - gemfile: gemfiles/Gemfile-rails-main - ruby: '2.5' - - gemfile: gemfiles/Gemfile-rails-main - ruby: '2.4' - - gemfile: gemfiles/Gemfile-rails-main - ruby: '2.3' - - gemfile: gemfiles/Gemfile-rails-main - ruby: '2.2' - - gemfile: gemfiles/Gemfile-rails-main - ruby: '2.1' - gemfile: gemfiles/Gemfile-rails-main env: DEVISE_ORM=mongoid - - gemfile: gemfiles/Gemfile-rails-6-1 - ruby: '2.4' - - gemfile: gemfiles/Gemfile-rails-6-1 - ruby: '2.3' - - gemfile: gemfiles/Gemfile-rails-6-1 - ruby: '2.2' - - gemfile: gemfiles/Gemfile-rails-6-1 - ruby: '2.1' - gemfile: gemfiles/Gemfile-rails-6-1 env: DEVISE_ORM=mongoid - gemfile: gemfiles/Gemfile-rails-6-0 ruby: '3.2' - gemfile: gemfiles/Gemfile-rails-6-0 ruby: '3.1' - - gemfile: gemfiles/Gemfile-rails-6-0 - ruby: '2.4' - - gemfile: gemfiles/Gemfile-rails-6-0 - ruby: '2.3' - - gemfile: gemfiles/Gemfile-rails-6-0 - ruby: '2.2' - - gemfile: gemfiles/Gemfile-rails-6-0 - ruby: '2.1' - gemfile: gemfiles/Gemfile-rails-6-0 env: DEVISE_ORM=mongoid - gemfile: gemfiles/Gemfile-rails-5-2 @@ -88,12 +41,6 @@ jobs: ruby: '3.1' - gemfile: gemfiles/Gemfile-rails-5-2 ruby: '3.0' - - gemfile: gemfiles/Gemfile-rails-5-2 - ruby: '2.7' - - gemfile: gemfiles/Gemfile-rails-5-2 - ruby: '2.2' - - gemfile: gemfiles/Gemfile-rails-5-2 - ruby: '2.1' - gemfile: gemfiles/Gemfile-rails-5-2 env: DEVISE_ORM=mongoid - gemfile: gemfiles/Gemfile-rails-5-1 @@ -102,10 +49,6 @@ jobs: ruby: '3.1' - gemfile: gemfiles/Gemfile-rails-5-1 ruby: '3.0' - - gemfile: gemfiles/Gemfile-rails-5-1 - ruby: '2.7' - - gemfile: gemfiles/Gemfile-rails-5-1 - ruby: '2.1' - gemfile: gemfiles/Gemfile-rails-5-1 env: DEVISE_ORM=mongoid - gemfile: gemfiles/Gemfile-rails-5-0 @@ -114,10 +57,6 @@ jobs: ruby: '3.1' - gemfile: gemfiles/Gemfile-rails-5-0 ruby: '3.0' - - gemfile: gemfiles/Gemfile-rails-5-0 - ruby: '2.7' - - gemfile: gemfiles/Gemfile-rails-5-0 - ruby: '2.1' - gemfile: gemfiles/Gemfile-rails-5-0 env: DEVISE_ORM=mongoid - gemfile: gemfiles/Gemfile-rails-4-2 @@ -126,24 +65,12 @@ jobs: ruby: '3.1' - gemfile: gemfiles/Gemfile-rails-4-2 ruby: '3.0' - - gemfile: gemfiles/Gemfile-rails-4-2 - ruby: '2.7' - - gemfile: gemfiles/Gemfile-rails-4-2 - ruby: '2.6' - gemfile: gemfiles/Gemfile-rails-4-1 ruby: '3.2' - gemfile: gemfiles/Gemfile-rails-4-1 ruby: '3.1' - gemfile: gemfiles/Gemfile-rails-4-1 ruby: '3.0' - - gemfile: gemfiles/Gemfile-rails-4-1 - ruby: '2.7' - - gemfile: gemfiles/Gemfile-rails-4-1 - ruby: '2.6' - - gemfile: gemfiles/Gemfile-rails-4-1 - ruby: '2.5' - - gemfile: gemfiles/Gemfile-rails-4-1 - ruby: '2.4' runs-on: ubuntu-latest env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps BUNDLE_GEMFILE: ${{ matrix.gemfile }} @@ -152,12 +79,6 @@ jobs: - name: Setup Bundler 1.x for Rails 4.x if: ${{ matrix.gemfile == 'gemfiles/Gemfile-rails-4-1' || matrix.gemfile == 'gemfiles/Gemfile-rails-4-2' }} run: echo "BUNDLER_VERSION=1.17.3" >> $GITHUB_ENV - - name: Setup Rubygems version as default for Ruby < 2.5 - if: ${{ matrix.ruby < '2.5' }} - run: echo "RUBYGEMS_VERSION=default" >> $GITHUB_ENV - - name: Setup Rubygems version as 3.2.3 for Ruby 2.5 - if: ${{ matrix.ruby == '2.5' }} - run: echo "RUBYGEMS_VERSION=3.2.3" >> $GITHUB_ENV - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} diff --git a/README.md b/README.md index 0f2a7d64fe..7ef60c130c 100644 --- a/README.md +++ b/README.md @@ -129,9 +129,9 @@ Please note that the command output will show the variable value being used. ### BUNDLE_GEMFILE We can use this variable to tell bundler what Gemfile it should use (instead of the one in the current directory). Inside the [gemfiles](https://github.com/heartcombo/devise/tree/main/gemfiles) directory, we have one for each version of Rails we support. When you send us a pull request, it may happen that the test suite breaks using some of them. If that's the case, you can simulate the same environment using the `BUNDLE_GEMFILE` variable. -For example, if the tests broke using Ruby 2.4.2 and Rails 4.1, you can do the following: +For example, if the tests broke using Ruby 3.0.0 and Rails 4.1, you can do the following: ```bash -rbenv shell 2.4.2 # or rvm use 2.4.2 +rbenv shell 3.0.0 # or rvm use 3.0.0 BUNDLE_GEMFILE=gemfiles/Gemfile.rails-4.1-stable bundle install BUNDLE_GEMFILE=gemfiles/Gemfile.rails-4.1-stable bin/test ``` diff --git a/devise.gemspec b/devise.gemspec index 3efad0f4d6..bea117bb78 100644 --- a/devise.gemspec +++ b/devise.gemspec @@ -25,7 +25,7 @@ Gem::Specification.new do |s| s.files = Dir["{app,config,lib}/**/*", "CHANGELOG.md", "MIT-LICENSE", "README.md"] s.require_paths = ["lib"] - s.required_ruby_version = '>= 2.1.0' + s.required_ruby_version = '>= 3.0.0' s.add_dependency("warden", "~> 1.2.3") s.add_dependency("orm_adapter", "~> 0.1") diff --git a/gemfiles/Gemfile-rails-4-1 b/gemfiles/Gemfile-rails-4-1 index 6f0b77e83d..7bbabf9db0 100644 --- a/gemfiles/Gemfile-rails-4-1 +++ b/gemfiles/Gemfile-rails-4-1 @@ -38,9 +38,3 @@ end group :mongoid do gem "mongoid", "~> 4.0" end - -if RUBY_VERSION < "2.3.0" - # We're getting version 2.2.0 which doesn't play nice with Ruby 2.2, using - # `Object.deprecate_constant` which isn't available. - gem "multipart-post", "2.1.1" -end diff --git a/gemfiles/Gemfile-rails-4-2 b/gemfiles/Gemfile-rails-4-2 index 43367157fd..6e106b5e92 100644 --- a/gemfiles/Gemfile-rails-4-2 +++ b/gemfiles/Gemfile-rails-4-2 @@ -37,9 +37,3 @@ end group :mongoid do gem "mongoid", "~> 4.0" end - -if RUBY_VERSION < "2.3.0" - # We're getting version 2.2.0 which doesn't play nice with Ruby 2.2, using - # `Object.deprecate_constant` which isn't available. - gem "multipart-post", "2.1.1" -end diff --git a/gemfiles/Gemfile-rails-5-0 b/gemfiles/Gemfile-rails-5-0 index 382cf3c5d3..2f60c3a2b3 100644 --- a/gemfiles/Gemfile-rails-5-0 +++ b/gemfiles/Gemfile-rails-5-0 @@ -29,9 +29,3 @@ end # group :mongoid do # gem "mongoid", "~> 4.0.0" # end - -if RUBY_VERSION < "2.3.0" - # We're getting version 2.2.0 which doesn't play nice with Ruby 2.2, using - # `Object.deprecate_constant` which isn't available. - gem "multipart-post", "2.1.1" -end diff --git a/gemfiles/Gemfile-rails-5-1 b/gemfiles/Gemfile-rails-5-1 index 24fe1d5e98..c566e9c84f 100644 --- a/gemfiles/Gemfile-rails-5-1 +++ b/gemfiles/Gemfile-rails-5-1 @@ -22,9 +22,3 @@ end platforms :ruby do gem "sqlite3", "~> 1.3.6" end - -if RUBY_VERSION < "2.3.0" - # We're getting version 2.2.0 which doesn't play nice with Ruby 2.2, using - # `Object.deprecate_constant` which isn't available. - gem "multipart-post", "2.1.1" -end