diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..97f5b0f --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,34 @@ +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 }} + bundler-cache: true + + - 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'