From 38f22cb780c07d9e4939b9b1ca7f1463bc4dd5f7 Mon Sep 17 00:00:00 2001 From: Aaron Lasseigne Date: Mon, 12 Aug 2024 19:09:12 -0500 Subject: [PATCH] improve testing and update requirements --- .github/workflows/test.yml | 36 +++++++++++++++++++ .travis.yml | 23 ------------ changelog.md | 4 +++ ...iverecord4.rb => activerecord-5.2.gemfile} | 4 +-- ...iverecord3.rb => activerecord-6.0.gemfile} | 4 +-- gemfiles/activerecord-6.1.gemfile | 5 +++ gemfiles/activerecord-7.0.gemfile | 5 +++ gemfiles/activerecord-7.1.gemfile | 5 +++ sqlite3_ar_regexp.gemspec | 4 +-- 9 files changed, 59 insertions(+), 31 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml rename gemfiles/{activerecord4.rb => activerecord-5.2.gemfile} (53%) rename gemfiles/{activerecord3.rb => activerecord-6.0.gemfile} (52%) create mode 100644 gemfiles/activerecord-6.1.gemfile create mode 100644 gemfiles/activerecord-7.0.gemfile create mode 100644 gemfiles/activerecord-7.1.gemfile diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..f7afda3 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,36 @@ +name: Test + +on: [push, pull_request] + +jobs: + test: + name: Test Ruby ${{ matrix.ruby }} on activerecord ${{ matrix.activerecord }} + strategy: + matrix: + ruby: ["3.3"] + activerecord: ["7.1"] + include: + - activerecord: "7.0" + ruby: "3.2" + - activerecord: "6.1" + ruby: "3.1" + - activerecord: "6.0" + ruby: "3.0" + + runs-on: ubuntu-latest + env: + BUNDLE_GEMFILE: gemfiles/activerecord-${{ matrix.activerecord }}.gemfile + + steps: + - uses: actions/checkout@v4 + + - name: Set up Ruby ${{ matrix.ruby }} + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + + - name: Install Gems + run: bundle install + + - name: Test + run: bundle exec rake spec diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index dc320ef..0000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -before_install: gem update bundler -language: ruby -matrix: - include: - # test lastest config - - rvm: 2.3 - - # test versions of ActiveRecord - - gemfile: gemfiles/activerecord4.rb - rvm: 2.3 - - gemfile: gemfiles/activerecord3.rb - rvm: 2.3 - - # test versions of MRI - - gemfile: gemfiles/activerecord4.rb - rvm: 2.2 - - gemfile: gemfiles/activerecord4.rb - rvm: 2.1 - - gemfile: gemfiles/activerecord4.rb - rvm: 2.0 - - gemfile: gemfiles/activerecord4.rb - rvm: 1.9 -script: bundle exec rake spec diff --git a/changelog.md b/changelog.md index 4abfdd1..19da579 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,7 @@ +## 3.0.0 + * Drop support for Ruby < 3.0 + * Drop support for ActiveRecord < 6.0 + ## 2.2.0 * Add support for ActiveRecord >= 5 diff --git a/gemfiles/activerecord4.rb b/gemfiles/activerecord-5.2.gemfile similarity index 53% rename from gemfiles/activerecord4.rb rename to gemfiles/activerecord-5.2.gemfile index 45db0c5..ab961a7 100644 --- a/gemfiles/activerecord4.rb +++ b/gemfiles/activerecord-5.2.gemfile @@ -1,7 +1,5 @@ -# coding: utf-8 - source 'https://rubygems.org' gemspec path: '..' -gem 'activemodel', '~> 4.0' +gem 'activemodel', '~> 5.2.0' diff --git a/gemfiles/activerecord3.rb b/gemfiles/activerecord-6.0.gemfile similarity index 52% rename from gemfiles/activerecord3.rb rename to gemfiles/activerecord-6.0.gemfile index 14c3a6b..ad46a64 100644 --- a/gemfiles/activerecord3.rb +++ b/gemfiles/activerecord-6.0.gemfile @@ -1,7 +1,5 @@ -# coding: utf-8 - source 'https://rubygems.org' gemspec path: '..' -gem 'activerecord', '~> 3.0' +gem 'activemodel', '~> 6.0.0' diff --git a/gemfiles/activerecord-6.1.gemfile b/gemfiles/activerecord-6.1.gemfile new file mode 100644 index 0000000..38150ca --- /dev/null +++ b/gemfiles/activerecord-6.1.gemfile @@ -0,0 +1,5 @@ +source 'https://rubygems.org' + +gemspec path: '..' + +gem 'activemodel', '~> 6.1.0' diff --git a/gemfiles/activerecord-7.0.gemfile b/gemfiles/activerecord-7.0.gemfile new file mode 100644 index 0000000..2c1f8fe --- /dev/null +++ b/gemfiles/activerecord-7.0.gemfile @@ -0,0 +1,5 @@ +source 'https://rubygems.org' + +gemspec path: '..' + +gem 'activemodel', '~> 7.0.0' diff --git a/gemfiles/activerecord-7.1.gemfile b/gemfiles/activerecord-7.1.gemfile new file mode 100644 index 0000000..d6c2b2b --- /dev/null +++ b/gemfiles/activerecord-7.1.gemfile @@ -0,0 +1,5 @@ +source 'https://rubygems.org' + +gemspec path: '..' + +gem 'activemodel', '~> 7.1.0' diff --git a/sqlite3_ar_regexp.gemspec b/sqlite3_ar_regexp.gemspec index 455604e..f5269fe 100644 --- a/sqlite3_ar_regexp.gemspec +++ b/sqlite3_ar_regexp.gemspec @@ -19,10 +19,10 @@ Gem::Specification.new do |spec| spec.test_files = spec.files.grep(%r{^spec/}) spec.require_paths = ['lib'] - spec.required_ruby_version = '>= 1.9.3' + spec.required_ruby_version = '>= 3.0' spec.add_dependency 'sqlite3' - spec.add_dependency 'activerecord', '>= 3.2' + spec.add_dependency 'activerecord', '>= 6.0' spec.add_development_dependency 'rake' spec.add_development_dependency 'rspec'