Skip to content

Commit

Permalink
Merge pull request citusdata#176 from citusdata/remove-5-2-support
Browse files Browse the repository at this point in the history
2.2.0: Remove support for Ruby 2.5 & ActiveRecord 5.2
  • Loading branch information
serprex authored Dec 6, 2022
2 parents 805db10 + ebb1975 commit 8da5a40
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 76 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,24 @@ jobs:
fail-fast: false
matrix:
ruby:
- '2.5'
- '2.6'
- '2.7'
- '3.0'
- '3.1'
gemfile:
- rails_5.2
- rails_6.0
- rails_6.1
- rails_7.0
- active_record_5.2
- active_record_6.0
- active_record_6.1
- active_record_7.0
prepared_statements: [true, false]
exclude:
# activesupport-7.0.0 requires ruby version >= 2.7.0
- ruby: '2.5'
gemfile: 'rails_7.0'
- ruby: '2.5'
gemfile: 'active_record_7.0'
- ruby: '2.6'
gemfile: 'rails_7.0'
- ruby: '2.6'
gemfile: 'active_record_7.0'
# ruby >3 and activesupport 5.2 are not compatible
- ruby: '3.0'
gemfile: 'rails_5.2'
- ruby: '3.0'
gemfile: 'active_record_5.2'
- ruby: '3.1'
gemfile: 'rails_5.2'
- ruby: '3.1'
gemfile: 'active_record_5.2'
name: Ruby ${{ matrix.ruby }} / ${{ matrix.gemfile }} ${{ (matrix.prepared_statements && 'w/ prepared statements') || '' }}
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
Expand Down
24 changes: 0 additions & 24 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
appraise 'rails-5.2' do
gem 'rails', '~> 5.2.0'
gem 'i18n', '~> 0.9.5'
gem 'nokogiri', '~> 1.7.1'
gem 'nio4r', '~> 2.3.1'
gem 'sprockets', '~> 3.7.1'
gem 'byebug', '~> 11.0'
gem 'rake', '12.0.0'
gem 'redis', '3.3.3'
gem 'pry-byebug', '3.9.0'
end

appraise 'rails-6.0' do
gem 'rails', '~> 6.0.3'
end
Expand All @@ -22,18 +10,6 @@ appraise 'rails-7.0' do
gem 'rails', '~> 7.0.0'
end

appraise 'active-record-5.2' do
gem 'activerecord', '~> 5.2.0'
gem 'i18n', '~> 0.9.5'
gem 'nokogiri', '~> 1.7.1'
gem 'nio4r', '~> 2.3.1'
gem 'sprockets', '~> 3.7.1'
gem 'byebug', '~> 11.0'
gem 'rake', '12.0.0'
gem 'redis', '3.3.3'
gem 'pry-byebug', '3.9.0'
end

appraise 'active-record-6.0' do
gem 'activerecord', '~> 6.0.3'
end
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog

## 2.2.0 2022-12-06
* Handle changing tenant from `nil` to a value [#173](https://github.com/citusdata/activerecord-multi-tenant/pull/173)
* Allow Partitioned tables to be created without a primary key [#172](https://github.com/citusdata/activerecord-multi-tenant/pull/172)
* Only attempt to reload with MultiTenant when parition_key is present [#175](https://github.com/citusdata/activerecord-multi-tenant/pull/175)
* Remove support for Ruby 2.5 & ActiveRecord 5.2

## 2.1.6 2022-11-23
* Fix undefined wrap_methods error & wrap_methods version check [#170](https://github.com/citusdata/activerecord-multi-tenant/pull/170)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ gem 'activerecord-multi-tenant'

## Supported Rails versions

All Ruby on Rails versions starting with 5.2 or newer (up to 7.0) are supported.
All Ruby on Rails versions starting with 6.0 or newer (up to 7.0) are supported.

This gem only supports ActiveRecord (the Rails default ORM), and not alternative ORMs like Sequel.

Expand Down
2 changes: 1 addition & 1 deletion activerecord-multi-tenant.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Gem::Specification.new do |s|
s.homepage = 'https://github.com/citusdata/activerecord-multi-tenant'
s.license = 'MIT'

s.add_dependency 'rails', '>= 5.2'
s.add_dependency 'rails', '>= 6'

s.add_development_dependency 'rspec', '>= 3.0'
s.add_development_dependency 'rspec-rails'
Expand Down
16 changes: 0 additions & 16 deletions gemfiles/active_record_5.2.gemfile

This file was deleted.

16 changes: 0 additions & 16 deletions gemfiles/rails_5.2.gemfile

This file was deleted.

1 change: 0 additions & 1 deletion lib/activerecord-multi-tenant/model_extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ def inherited(subclass)
# Rails 5 `attribute_will_change!` uses the attribute-method-call rather than `read_attribute`
# and will raise ActiveModel::MissingAttributeError if that column was not selected.
# This is rescued as NoMethodError and in MRI attribute_was is assigned an arbitrary Object
# This is still true after the Rails 5.2 refactor
was = send("#{partition_key}_was")
was_nil_or_skipped = was.nil? || was.class == Object

Expand Down
2 changes: 1 addition & 1 deletion lib/activerecord-multi-tenant/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module MultiTenant
VERSION = '2.1.6'
VERSION = '2.2.0'
end

0 comments on commit 8da5a40

Please sign in to comment.