Skip to content

Commit

Permalink
Drop Rails 5.2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
excid3 committed Dec 7, 2023
1 parent 6fd5edb commit 44a5b7c
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 269 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
matrix:
ruby: ['2.7', '3.0', '3.1', '3.2']
gemfile:
- rails_5
- rails_6
- rails_6_1
- rails_7
Expand All @@ -25,12 +24,6 @@ jobs:
- sidekiq_6
- sidekiq_7
exclude:
- ruby: '3.0'
gemfile: rails_5
- ruby: '3.1'
gemfile: rails_5
- ruby: '3.2'
gemfile: rails_5
- ruby: '3.2'
gemfile: rails_6

Expand Down
4 changes: 0 additions & 4 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
appraise "rails-5" do
gem "rails", "~> 5.2.0"
end

appraise "rails-6" do
gem "rails", "~> 6.0.0"
end
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Unreleased
----------

* [Breaking] Drop Rails 5.2 support
* Replace RequestStore dependency with CurrentAttributes. #313 - @excid3
* Easy integration with Sidekiq, not requiring to add any configuration to the initializer #314 - @nunommc
* Add `scope` support to `acts_as_tenant :account, ->{ with_deleted }` #282 - @adrian-gomez
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ Want to see how it works? Check out [the ActsAsTenant walkthrough video](https:/
Installation
------------

acts_as_tenant will only work on Rails 5.2 and up. This is due to changes made to the handling of `default_scope`, an essential pillar of the gem.

To use it, add it to your Gemfile:

```ruby
Expand Down Expand Up @@ -325,7 +323,15 @@ Background Processing libraries

ActsAsTenant supports

- [Sidekiq](//sidekiq.org/) - make sure to place acts_as_tenant gem after sidekiq in your gemfiles;
- ActiveJob - ActsAsTenant will automatically save the current tenant in ActiveJob arguments and set it when the job runs.

- [Sidekiq](//sidekiq.org/)
Add the following code to `config/initializers/acts_as_tenant.rb`:

```ruby
require 'acts_as_tenant/sidekiq'
```

- DelayedJob - [acts_as_tenant-delayed_job](https://github.com/nunommc/acts_as_tenant-delayed_job)

Testing
Expand Down
2 changes: 1 addition & 1 deletion acts_as_tenant.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ Gem::Specification.new do |spec|

spec.require_paths = ["lib"]

spec.add_dependency "rails", ">= 5.2"
spec.add_dependency "rails", ">= 6.0"
end
14 changes: 0 additions & 14 deletions gemfiles/rails_5.gemfile

This file was deleted.

239 changes: 0 additions & 239 deletions gemfiles/rails_5.gemfile.lock

This file was deleted.

1 change: 0 additions & 1 deletion lib/acts_as_tenant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ def self.should_require_tenant?

ActiveSupport.on_load(:active_record) do |base|
base.include ActsAsTenant::ModelExtensions
require "acts_as_tenant/sidekiq" if defined?(::Sidekiq)
end

ActiveSupport.on_load(:action_controller) do |base|
Expand Down
1 change: 1 addition & 0 deletions spec/acts_as_tenant/sidekiq_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require "spec_helper"
require "acts_as_tenant/sidekiq"

describe "ActsAsTenant::Sidekiq" do
let(:account) { Account.new(id: 1234) }
Expand Down

0 comments on commit 44a5b7c

Please sign in to comment.