Commit 6cf3b01e by Ryan Bigg Committed by GitHub

Merge pull request #519 from rubysherpas/rails7

Rails7
parents 032a2ad4 346bb167
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
name: build
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
ruby:
# - 3.0 # incompatible with rubysl
- 2.7
- 2.6
- 2.5
# - jruby-9.2.19.0
# - jruby-9.3.1.0
rails:
- '~> 5.1.0'
- '~> 5.2.0'
- '~> 6.0.0'
- '~> 6.1.0'
- '~> 7.0.0'
- 'edge'
exclude:
# Rails edge is now 7.x and requires ruby 2.7
- rails: 'edge'
ruby: 2.6
- rails: 'edge'
ruby: 2.5
- rails: '~> 7.0.0'
ruby: 2.6
- rails: '~> 7.0.0'
ruby: 2.5
# Legacy Rails with newer rubies
- rails: '~> 5.1.0'
ruby: 3.0
- rails: '~> 5.2.0'
ruby: 3.0
env:
RAILS: ${{ matrix.rails }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake
sudo: false
language: ruby
before_install:
- gem query -I -n "^bundler$" -v ">=2" || gem uninstall -x bundler -v ">=2" || rvm @global do gem uninstall -x bundler -v ">=2"
- gem query -i -n "^bundler$" -v "<2" || gem install bundler -v "<2"
cache: bundler
rvm:
- 2.3.8
- 2.4.5
- 2.5.3
- 2.6.3
- jruby-9.2.8.0
env:
matrix:
- RAILS='~> 4.2.0' SQLITE_VERSION='~> 1.3.6'
- RAILS='~> 5.0.0' SQLITE_VERSION='~> 1.3.6'
- RAILS='~> 5.1.0'
- RAILS='~> 5.2.0'
- RAILS='~> 6.1.0'
- RAILS='master'
matrix:
allow_failures:
- env: RAILS='~> 4.2.0' SQLITE_VERSION='~> 1.3.6'
rvm: jruby-9.2.8.0
- env: RAILS='~> 5.0.0' SQLITE_VERSION='~> 1.3.6'
rvm: jruby-9.2.8.0
- env: RAILS='~> 5.1.0'
rvm: jruby-9.2.8.0
- env: RAILS='~> 5.2.0'
rvm: jruby-9.2.8.0
- env: RAILS='master'
rvm: jruby-9.2.8.0
- env: RAILS='~> 6.1.0'
rvm: jruby-9.2.8.0
exclude:
- rvm: 2.3.8
env: RAILS='master'
- rvm: 2.4.5
env: RAILS='master'
- rvm: 2.3.8
env: RAILS='~> 6.1.0'
- rvm: 2.4.5
env: RAILS='~> 6.1.0'
......@@ -20,7 +20,7 @@ end
rails = ENV['RAILS'] || '~> 5.2.0'
if rails == 'master'
if rails == 'edge'
gem 'rails', github: 'rails/rails'
else
gem 'rails', rails
......
......@@ -230,7 +230,12 @@ module Paranoia
end
end
clear_association_cache if destroyed_associations.present?
if ActiveRecord.version.to_s > '7'
# Method deleted in https://github.com/rails/rails/commit/dd5886d00a2d5f31ccf504c391aad93deb014eb8
@association_cache.clear if persisted? && destroyed_associations.present?
else
clear_association_cache if destroyed_associations.present?
end
end
end
......
......@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
s.license = 'MIT'
s.summary = "Paranoia is a re-implementation of acts_as_paranoid for Rails 3, 4, and 5, using much, much, much less code."
s.description = <<-DSC
Paranoia is a re-implementation of acts_as_paranoid for Rails 4, 5, and 6,
Paranoia is a re-implementation of acts_as_paranoid for Rails 4, 5, 6, and 7,
using much, much, much less code. You would use either plugin / gem if you
wished that when you called destroy on an Active Record object that it
didn't actually destroy it, but just "hid" the record. Paranoia does this
......@@ -22,9 +22,9 @@ Gem::Specification.new do |s|
s.required_rubygems_version = ">= 1.3.6"
s.required_ruby_version = '>= 2.0'
s.required_ruby_version = '>= 2.5'
s.add_dependency 'activerecord', '>= 4.0', '< 6.2'
s.add_dependency 'activerecord', '>= 5.1', '< 7.1'
s.add_development_dependency "bundler", ">= 1.0.0"
s.add_development_dependency "rake"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment