diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 74b824c..c60c405 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,57 +1,43 @@ name: Tests on: [push, pull_request] +permissions: + contents: read + jobs: - test-27-plus: + tests: runs-on: ubuntu-latest env: BUNDLE_GEMFILE: ${{matrix.gemfile}} strategy: matrix: ruby: - - head - - "3.0" - - "2.7" + - "3.3" + - "3.2" + - "3.1" + - "jruby-9.4.8.0" gemfile: - - gemfiles/ar50.gemfile - - gemfiles/ar51.gemfile - - gemfiles/ar52.gemfile - - gemfiles/ar60.gemfile - - gemfiles/ar61.gemfile + - gemfiles/ar72.gemfile + - gemfiles/ar71.gemfile - gemfiles/ar70.gemfile - - gemfiles/rgeo1.gemfile - - gemfiles/rgeo3.gemfile - steps: - - name: Set Up Gems - uses: actions/checkout@v2 - - name: Set Up Deps - run: sudo apt-get install libgeos-dev - - name: Set Up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby }} - bundler-cache: true - - name: Test - run: bundle exec rake - test-26-lower: - runs-on: ubuntu-latest - env: - BUNDLE_GEMFILE: ${{matrix.gemfile}} - strategy: - matrix: - ruby: - - "jruby-9.3.7.0" - - "2.6" - gemfile: - - gemfiles/ar50.gemfile - - gemfiles/ar51.gemfile - - gemfiles/ar52.gemfile - - gemfiles/ar60.gemfile - - gemfiles/ar61.gemfile - - gemfiles/rgeo1.gemfile + channel: ['stable'] + include: + - ruby: head + gemfile: gemfiles/ar71.gemfile + channel: 'experimental' + - ruby: head + gemfile: gemfiles/ar72.gemfile + channel: 'experimental' + - ruby: jruby-head + gemfile: gemfiles/ar71.gemfile + channel: 'experimental' + - ruby: jruby-head + gemfile: gemfiles/ar72.gemfile + channel: 'experimental' + continue-on-error: ${{ matrix.channel != 'stable' }} steps: - name: Set Up Gems - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set Up Deps run: sudo apt-get install libgeos-dev - name: Set Up Ruby diff --git a/Appraisals b/Appraisals index d74e0d3..bf58d9e 100644 --- a/Appraisals +++ b/Appraisals @@ -1,33 +1,11 @@ -appraise "ar50" do - gem "activerecord", "~> 5.0.0" -end - -appraise "ar51" do - gem "activerecord", "~> 5.1.0" -end - -appraise "ar52" do - gem "activerecord", "~> 5.2.0" -end - -appraise "ar60" do - gem "activerecord", "~> 6.0.0.rc1" -end - -appraise "ar61" do - gem "activerecord", "~> 6.1.0" -end - appraise "ar70" do gem "activerecord", "~> 7.0.0" end -appraise "rgeo3" do - gem "activerecord", "~> 7.0.0" - gem "rgeo", "~> 3.0.0" +appraise "ar71" do + gem "activerecord", "~> 7.1.0" end -appraise "rgeo1" do - gem "activerecord", "~> 5.2.0" - gem "rgeo", "~> 1.0" +appraise "ar72" do + gem "activerecord", "~> 7.2.0" end diff --git a/README.md b/README.md index 7c36e65..aa6216d 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,8 @@ Gemfile: gem 'rgeo-activerecord' ``` +Version `8.0+` supports ActiveRecord 7.x with `rgeo` 3.0+ + Version `7.0+` supports ActiveRecord 5.x, 6.x, and 7.x with `rgeo` 1.0+ Version `6.2+` supports ActiveRecord 5.x and 6.x with `rgeo` 1.0+ diff --git a/gemfiles/ar52.gemfile b/gemfiles/ar52.gemfile deleted file mode 100644 index 027888d..0000000 --- a/gemfiles/ar52.gemfile +++ /dev/null @@ -1,7 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "activerecord", "~> 5.2.0" - -gemspec path: "../" diff --git a/gemfiles/ar60.gemfile b/gemfiles/ar60.gemfile deleted file mode 100644 index b52583e..0000000 --- a/gemfiles/ar60.gemfile +++ /dev/null @@ -1,7 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "activerecord", "~> 6.0.0.rc1" - -gemspec path: "../" diff --git a/gemfiles/ar61.gemfile b/gemfiles/ar61.gemfile deleted file mode 100644 index 07548db..0000000 --- a/gemfiles/ar61.gemfile +++ /dev/null @@ -1,7 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "activerecord", "~> 6.1.0" - -gemspec path: "../" diff --git a/gemfiles/ar50.gemfile b/gemfiles/ar71.gemfile similarity index 74% rename from gemfiles/ar50.gemfile rename to gemfiles/ar71.gemfile index a7a9bb0..69bc38a 100644 --- a/gemfiles/ar50.gemfile +++ b/gemfiles/ar71.gemfile @@ -2,6 +2,6 @@ source "https://rubygems.org" -gem "activerecord", "~> 5.0.0" +gem "activerecord", "~> 7.1.0" gemspec path: "../" diff --git a/gemfiles/ar51.gemfile b/gemfiles/ar72.gemfile similarity index 74% rename from gemfiles/ar51.gemfile rename to gemfiles/ar72.gemfile index e2f8f85..9a0f1ea 100644 --- a/gemfiles/ar51.gemfile +++ b/gemfiles/ar72.gemfile @@ -2,6 +2,6 @@ source "https://rubygems.org" -gem "activerecord", "~> 5.1.0" +gem "activerecord", "~> 7.2.0" gemspec path: "../" diff --git a/gemfiles/rgeo1.gemfile b/gemfiles/rgeo1.gemfile deleted file mode 100644 index 27b137a..0000000 --- a/gemfiles/rgeo1.gemfile +++ /dev/null @@ -1,8 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "activerecord", "~> 5.2.0" -gem "rgeo", "~> 1.0" - -gemspec path: "../" diff --git a/gemfiles/rgeo3.gemfile b/gemfiles/rgeo3.gemfile deleted file mode 100644 index ef31265..0000000 --- a/gemfiles/rgeo3.gemfile +++ /dev/null @@ -1,8 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "activerecord", "~> 7.0.0" -gem "rgeo", "~> 3.0.0" - -gemspec path: "../" diff --git a/lib/rgeo/active_record/version.rb b/lib/rgeo/active_record/version.rb index a1bf730..8d5c4ef 100644 --- a/lib/rgeo/active_record/version.rb +++ b/lib/rgeo/active_record/version.rb @@ -2,6 +2,6 @@ module RGeo module ActiveRecord - VERSION = "7.0.1" + VERSION = "8.0.0" end end diff --git a/rgeo-activerecord.gemspec b/rgeo-activerecord.gemspec index e4653da..93444c5 100644 --- a/rgeo-activerecord.gemspec +++ b/rgeo-activerecord.gemspec @@ -12,10 +12,10 @@ Gem::Specification.new do |spec| spec.files = Dir["lib/**/*", "README.md", "History.md", "LICENSE.txt"] - spec.required_ruby_version = ">= 2.5.0" + spec.required_ruby_version = ">= 3.1.0" - spec.add_dependency "activerecord", ">= 5.0" - spec.add_dependency "rgeo", ">= 1.0.0" + spec.add_dependency "activerecord", ">= 7.0" + spec.add_dependency "rgeo", ">= 3.0" spec.add_development_dependency "appraisal", "~> 2.1" spec.add_development_dependency "ffi-geos", "~> 1.2" diff --git a/test/support/fake_record.rb b/test/support/fake_record.rb index 711b857..2e29671 100644 --- a/test/support/fake_record.rb +++ b/test/support/fake_record.rb @@ -96,7 +96,7 @@ class ConnectionPool attr_reader :spec, :connection def initialize - @spec = Spec.new(adapter: "america") + @spec = Spec.new({ adapter: "america" }) @connection = Connection.new @connection.visitor = Arel::Visitors::ToSql.new(connection) end