From 2fde0678d5ed4d976cf6a6cce35351469a31820f Mon Sep 17 00:00:00 2001 From: William Todd Date: Thu, 10 Dec 2020 10:53:46 -0700 Subject: [PATCH] See if we can't expand compatibility again --- Appraisals | 32 +++++++++++++++++++++++--------- bin/setup | 7 +++++-- devise_2fa.gemspec | 4 +++- 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/Appraisals b/Appraisals index 42e6ebd..605fdb0 100644 --- a/Appraisals +++ b/Appraisals @@ -1,21 +1,35 @@ # frozen_string_literal: true -appraise 'rails-5-sqlite3' do +appraise 'rails_4_2_sqlite3' do + gem 'rails', '4.2.11.3' + gem 'sqlite3', '~> 1.3.6' +end + +appraise 'rails_5_2_sqlite3' do gem 'rails', '5.2.4.4' - gem 'sqlite3' + gem 'sqlite3', '~> 1.3.6' +end + +if Gem::Requirement.new('>= 2.5.0').satisfied_by?(Gem::Version.new(RUBY_VERSION)) + appraise 'rails_6_0_sqlite3' do + gem 'rails', '6.0.3.4' + gem 'sqlite3', '~> 1.4' + end end -appraise 'rails-6-sqlite3' do - gem 'rails', '6.0.3.4' - gem 'sqlite3' +appraise 'rails_4_2_mongodb' do + gem 'rails', '4.2.11.3' + gem 'mongoid', '5.4' end -appraise 'rails-5-mongodb' do +appraise 'rails_5_2_mongodb' do gem 'rails', '5.2.4.4' gem 'mongoid', '6.4' end -appraise 'rails-6-mongodb' do - gem 'rails', '6.0.3.4' - gem 'mongoid', '7.2' +if Gem::Requirement.new('>= 2.5.0').satisfied_by?(Gem::Version.new(RUBY_VERSION)) + appraise 'rails_6_0_mongodb' do + gem 'rails', '6.0.3.4' + gem 'mongoid', '7.2' + end end diff --git a/bin/setup b/bin/setup index 44a17a1..be61fb2 100755 --- a/bin/setup +++ b/bin/setup @@ -6,8 +6,11 @@ set -e DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" echo "Installing dependencies" -gem install bundler --conservative -bundle check || bundle install +gem update --system --force --no-document +gem uninstall -v '>= 2' bundler || true +gem install bundler -v '< 2' --no-document + +bundle check || bundle install --jobs=3 --retry=3 bundle exec appraisal install diff --git a/devise_2fa.gemspec b/devise_2fa.gemspec index 51ea539..117c88e 100644 --- a/devise_2fa.gemspec +++ b/devise_2fa.gemspec @@ -18,7 +18,9 @@ Gem::Specification.new do |gem| gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) gem.require_paths = ['lib'] - gem.add_dependency "rails", ">= 4.1", "< 6.1" + gem.required_ruby_version = '>= 2.4.0' + + gem.add_dependency 'rails', '>= 4.1', '< 6.1' gem.add_runtime_dependency 'devise', '~> 4.6' gem.add_runtime_dependency 'rotp', '~> 5.1'