Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop legacy dependencies support #77

Merged
merged 2 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 26 additions & 40 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
30 changes: 4 additions & 26 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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+
Comment on lines +32 to 34
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

major version bumped because of this approach. I can bump minor and change 8.0+ to 7.1+


Version `6.2+` supports ActiveRecord 5.x and 6.x with `rgeo` 1.0+
Expand Down
7 changes: 0 additions & 7 deletions gemfiles/ar52.gemfile

This file was deleted.

7 changes: 0 additions & 7 deletions gemfiles/ar60.gemfile

This file was deleted.

7 changes: 0 additions & 7 deletions gemfiles/ar61.gemfile

This file was deleted.

2 changes: 1 addition & 1 deletion gemfiles/ar50.gemfile → gemfiles/ar71.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

source "https://rubygems.org"

gem "activerecord", "~> 5.0.0"
gem "activerecord", "~> 7.1.0"

gemspec path: "../"
2 changes: 1 addition & 1 deletion gemfiles/ar51.gemfile → gemfiles/ar72.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

source "https://rubygems.org"

gem "activerecord", "~> 5.1.0"
gem "activerecord", "~> 7.2.0"

gemspec path: "../"
8 changes: 0 additions & 8 deletions gemfiles/rgeo1.gemfile

This file was deleted.

8 changes: 0 additions & 8 deletions gemfiles/rgeo3.gemfile

This file was deleted.

2 changes: 1 addition & 1 deletion lib/rgeo/active_record/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module RGeo
module ActiveRecord
VERSION = "7.0.1"
VERSION = "8.0.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BuonOmo will we have to synchronize this with the postgis adapter PR that you have up? Do we need a major version bump here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well since there is no change in the codebase, I don't think we have to do anything. TBH I would even consider not bumping major.

end
end
6 changes: 3 additions & 3 deletions rgeo-activerecord.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion test/support/fake_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down