paranoia 2.4.3 → 2.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +53 -0
- data/CHANGELOG.md +72 -0
- data/Gemfile +8 -6
- data/README.md +13 -2
- data/lib/paranoia/rspec.rb +20 -17
- data/lib/paranoia/version.rb +1 -1
- data/lib/paranoia.rb +41 -24
- data/paranoia.gemspec +9 -4
- metadata +10 -11
- data/.travis.yml +0 -45
- data/test/paranoia_test.rb +0 -1388
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f7493c138657c99cbb4eca5ed981c6bfac2400f18d34ad7fda9266ad672c39c
|
4
|
+
data.tar.gz: 4397c1ac47d8b67fb3db3a084bdaea2fec4d2ebe5c475c99b2914563e3011ae9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5acd851f9180575136c06b5e6c44db7a7b53462771d77d722790062ca7e4e2482e2938f35471b54d472f68c1d92b372334b3c269931d997bdd4562c5904ea800
|
7
|
+
data.tar.gz: 2efed9b375277b7c1d066499323fe23af8f1af9c139389c45f2688eeb231da1ab8584cd061ba49f66130af4751263eb52458d8d2f68ae1057765437cdc320811
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: build
|
9
|
+
|
10
|
+
on: [push, pull_request]
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
test:
|
14
|
+
runs-on: ubuntu-20.04
|
15
|
+
strategy:
|
16
|
+
fail-fast: false
|
17
|
+
matrix:
|
18
|
+
rails: ["~> 7.1.0", "~> 7.0.0", "~> 6.1.0", "~> 6.0.0"]
|
19
|
+
ruby: ["3.2.2", "3.1.4", "3.0.6", "2.7.8"]
|
20
|
+
include:
|
21
|
+
- ruby: 3.2
|
22
|
+
rails: 'edge'
|
23
|
+
- ruby: 3.2
|
24
|
+
rails: '~> 7.1.0'
|
25
|
+
# single test failure with jruby
|
26
|
+
#- ruby: jruby-9.4
|
27
|
+
# rails: '~> 7.0.0'
|
28
|
+
- ruby: 2.6
|
29
|
+
rails: '~> 6.1.0'
|
30
|
+
- ruby: 2.6
|
31
|
+
rails: '~> 6.0.0'
|
32
|
+
- ruby: 2.6
|
33
|
+
rails: '~> 5.2.0'
|
34
|
+
- ruby: 2.6
|
35
|
+
rails: '~> 5.1.0'
|
36
|
+
- ruby: 2.5
|
37
|
+
rails: '~> 6.0.0'
|
38
|
+
- ruby: 2.5
|
39
|
+
rails: '~> 5.2.0'
|
40
|
+
- ruby: 2.5
|
41
|
+
rails: '~> 5.1.0'
|
42
|
+
#os: ubuntu-latest
|
43
|
+
#arch: x64
|
44
|
+
|
45
|
+
env:
|
46
|
+
RAILS: ${{ matrix.rails }}
|
47
|
+
steps:
|
48
|
+
- uses: actions/checkout@v2
|
49
|
+
- uses: ruby/setup-ruby@v1
|
50
|
+
with:
|
51
|
+
ruby-version: ${{ matrix.ruby }}
|
52
|
+
bundler-cache: true
|
53
|
+
- run: bundle exec rake
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,77 @@
|
|
1
1
|
# paranoia Changelog
|
2
2
|
|
3
|
+
## 2.6.3
|
4
|
+
|
5
|
+
* [#548](https://github.com/rubysherpas/paranoia/pull/441) Add support for [Rails 7.1](https://github.com/rails/rails/releases/tag/v7.1.0) (#441)
|
6
|
+
|
7
|
+
[Indyarocks](https://github.com/indyarocks)
|
8
|
+
|
9
|
+
## 2.6.2
|
10
|
+
|
11
|
+
* [#441](https://github.com/rubysherpas/paranoia/pull/441) Recursive restore with has_many/one through assocs (#441)
|
12
|
+
[Emil Ong](https://github.com/emilong)
|
13
|
+
|
14
|
+
## 2.6.1
|
15
|
+
|
16
|
+
* [#535](https://github.com/rubysherpas/paranoia/pull/535) Allow to skip updating paranoia_destroy_attributes for records while really_destroy!
|
17
|
+
[Anton Bogdanov](https://github.com/kortirso)
|
18
|
+
|
19
|
+
## 2.6.0
|
20
|
+
|
21
|
+
* [#512](https://github.com/rubysherpas/paranoia/pull/512) Quote table names; Mysql 8 has keywords that might match table names which cause an exception.
|
22
|
+
* [#476](https://github.com/rubysherpas/paranoia/pull/476) Fix syntax error in documentation.
|
23
|
+
* [#485](https://github.com/rubysherpas/paranoia/pull/485) Rollback transaction if destroy aborted.
|
24
|
+
* [#522](https://github.com/rubysherpas/paranoia/pull/522) Add failing tests for association with abort on destroy.
|
25
|
+
* [#513](https://github.com/rubysherpas/paranoia/pull/513) Fix create callback called on destroy.
|
26
|
+
|
27
|
+
## 2.5.3
|
28
|
+
|
29
|
+
* [#532](https://github.com/rubysherpas/paranoia/pull/532) Fix: correct bug when sentinel_value is not a timestamp
|
30
|
+
[Hassanin Ahmed](https://github.com/sas1ni69)
|
31
|
+
* [#531](https://github.com/rubysherpas/paranoia/pull/531) Added test case to reproduce bug introduce in v2.5.1
|
32
|
+
[Sherif Elkassaby](https://github.com/sherif-nedap)
|
33
|
+
* [#529](https://github.com/rubysherpas/paranoia/pull/529) Fix: Do not define a RSpec matcher when RSpec isn't present
|
34
|
+
[Sebastian Welther](https://github.com/swelther)
|
35
|
+
|
36
|
+
## 2.5.2
|
37
|
+
|
38
|
+
* [#526](https://github.com/rubysherpas/paranoia/pull/526) Do not include tests files in packaged gem
|
39
|
+
|
40
|
+
[Jason Fleetwood-Boldt](https://github.com/jasonfb)
|
41
|
+
* [#492](https://github.com/rubysherpas/paranoia/pull/492) Warn if acts_as_paranoid is called more than once on the same model
|
42
|
+
|
43
|
+
[Ignatius Reza](https://github.com/ignatiusreza)
|
44
|
+
|
45
|
+
## 2.5.1
|
46
|
+
|
47
|
+
* [#481](https://github.com/rubysherpas/paranoia/pull/481) Replaces hard coded `deleted_at` with `paranoia_column`.
|
48
|
+
|
49
|
+
[Hassanin Ahmed](https://github.com/sas1ni69)
|
50
|
+
|
51
|
+
## 2.5.0
|
52
|
+
|
53
|
+
* [#516](https://github.com/rubysherpas/paranoia/pull/516) Add support for ActiveRecord 7.0, drop support for EOL Ruby < 2.5 and Rails < 5.1
|
54
|
+
adding support for Rails 7
|
55
|
+
|
56
|
+
[Mathieu Jobin](https://github.com/mathieujobin)
|
57
|
+
* [#515](https://github.com/rubysherpas/paranoia/pull/515) Switch from Travis CI to GitHub Actions
|
58
|
+
|
59
|
+
[Shinichi Maeshima](https://github.com/willnet)
|
60
|
+
|
61
|
+
## 2.4.3
|
62
|
+
|
63
|
+
* [#503](https://github.com/rubysherpas/paranoia/pull/503) Bump activerecord dependency for Rails 6.1
|
64
|
+
|
65
|
+
[Jörg Schiller](https://github.com/joergschiller)
|
66
|
+
|
67
|
+
* [#483](https://github.com/rubysherpas/paranoia/pull/483) Update JRuby version to 9.2.8.0 + remove EOL Ruby 2.2
|
68
|
+
|
69
|
+
[Uwe Kubosch](https://github.com/donv)
|
70
|
+
|
71
|
+
* [#482](https://github.com/rubysherpas/paranoia/pull/482) Fix after_commit for Rails 6
|
72
|
+
|
73
|
+
[Ashwin Hegde](https://github.com/hashwin)
|
74
|
+
|
3
75
|
## 2.4.2
|
4
76
|
|
5
77
|
* [#470](https://github.com/rubysherpas/paranoia/pull/470) Add support for ActiveRecord 6.0
|
data/Gemfile
CHANGED
@@ -12,15 +12,17 @@ platforms :jruby do
|
|
12
12
|
gem 'activerecord-jdbcsqlite3-adapter'
|
13
13
|
end
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
if RUBY_ENGINE == 'rbx'
|
16
|
+
platforms :rbx do
|
17
|
+
gem 'rubinius-developer_tools'
|
18
|
+
gem 'rubysl', '~> 2.0'
|
19
|
+
gem 'rubysl-test-unit'
|
20
|
+
end
|
19
21
|
end
|
20
22
|
|
21
|
-
rails = ENV['RAILS'] || '~>
|
23
|
+
rails = ENV['RAILS'] || '~> 6.0.4'
|
22
24
|
|
23
|
-
if rails == '
|
25
|
+
if rails == 'edge'
|
24
26
|
gem 'rails', github: 'rails/rails'
|
25
27
|
else
|
26
28
|
gem 'rails', rails
|
data/README.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/paranoia.svg)](https://badge.fury.io/rb/paranoia)
|
2
|
+
[![build](https://github.com/rubysherpas/paranoia/actions/workflows/build.yml/badge.svg)](https://github.com/rubysherpas/paranoia/actions/workflows/build.yml)
|
3
|
+
|
4
|
+
**Notice:**
|
2
5
|
|
3
6
|
`paranoia` has some surprising behaviour (like overriding ActiveRecord's `delete` and `destroy`) and is not recommended for new projects. See [`discard`'s README](https://github.com/jhawthorn/discard#why-not-paranoia-or-acts_as_paranoid) for more details.
|
4
7
|
|
@@ -100,6 +103,14 @@ If you really want it gone *gone*, call `really_destroy!`:
|
|
100
103
|
# => client
|
101
104
|
```
|
102
105
|
|
106
|
+
If you need skip updating timestamps for deleting records, call `really_destroy!(update_destroy_attributes: false)`.
|
107
|
+
When we call `really_destroy!(update_destroy_attributes: false)` on the parent `client`, then each child `email` will also have `really_destroy!(update_destroy_attributes: false)` called.
|
108
|
+
|
109
|
+
``` ruby
|
110
|
+
>> client.really_destroy!(update_destroy_attributes: false)
|
111
|
+
# => client
|
112
|
+
```
|
113
|
+
|
103
114
|
If you want to use a column other than `deleted_at`, you can pass it as an option:
|
104
115
|
|
105
116
|
``` ruby
|
@@ -190,7 +201,7 @@ client.restore(:recursive => true)
|
|
190
201
|
If you want to restore a record and only those dependently destroyed associated records that were deleted within 2 minutes of the object upon which they depend:
|
191
202
|
|
192
203
|
``` ruby
|
193
|
-
Client.restore(id, :recursive => true
|
204
|
+
Client.restore(id, :recursive => true, :recovery_window => 2.minutes)
|
194
205
|
# or
|
195
206
|
client.restore(:recursive => true, :recovery_window => 2.minutes)
|
196
207
|
```
|
data/lib/paranoia/rspec.rb
CHANGED
@@ -1,23 +1,26 @@
|
|
1
|
-
|
1
|
+
if defined?(RSpec)
|
2
|
+
require 'rspec/expectations'
|
2
3
|
|
3
|
-
# Validate the subject's class did call "acts_as_paranoid"
|
4
|
-
RSpec::Matchers.define :act_as_paranoid do
|
5
|
-
|
4
|
+
# Validate the subject's class did call "acts_as_paranoid"
|
5
|
+
RSpec::Matchers.define :act_as_paranoid do
|
6
|
+
match { |subject| subject.class.ancestors.include?(Paranoia) }
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
8
|
+
failure_message_proc = lambda do
|
9
|
+
"expected #{subject.class} to use `acts_as_paranoid`"
|
10
|
+
end
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
12
|
+
failure_message_when_negated_proc = lambda do
|
13
|
+
"expected #{subject.class} not to use `acts_as_paranoid`"
|
14
|
+
end
|
14
15
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
16
|
+
if respond_to?(:failure_message_when_negated)
|
17
|
+
failure_message(&failure_message_proc)
|
18
|
+
failure_message_when_negated(&failure_message_when_negated_proc)
|
19
|
+
else
|
20
|
+
# RSpec 2 compatibility:
|
21
|
+
failure_message_for_should(&failure_message_proc)
|
22
|
+
failure_message_for_should_not(&failure_message_when_negated_proc)
|
23
|
+
end
|
22
24
|
end
|
25
|
+
|
23
26
|
end
|
data/lib/paranoia/version.rb
CHANGED
data/lib/paranoia.rb
CHANGED
@@ -40,7 +40,7 @@ module Paranoia
|
|
40
40
|
# these will not match != sentinel value because "NULL != value" is
|
41
41
|
# NULL under the sql standard
|
42
42
|
# Scoping with the table_name is mandatory to avoid ambiguous errors when joining tables.
|
43
|
-
scoped_quoted_paranoia_column = "#{self.table_name}.#{connection.quote_column_name(paranoia_column)}"
|
43
|
+
scoped_quoted_paranoia_column = "#{connection.quote_table_name(self.table_name)}.#{connection.quote_column_name(paranoia_column)}"
|
44
44
|
with_deleted.where("#{scoped_quoted_paranoia_column} IS NULL OR #{scoped_quoted_paranoia_column} != ?", paranoia_sentinel_value)
|
45
45
|
end
|
46
46
|
alias_method :deleted, :only_deleted
|
@@ -58,9 +58,9 @@ module Paranoia
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def paranoia_destroy
|
61
|
-
|
62
|
-
run_callbacks(:destroy) do
|
63
|
-
@_disable_counter_cache =
|
61
|
+
with_transaction_returning_status do
|
62
|
+
result = run_callbacks(:destroy) do
|
63
|
+
@_disable_counter_cache = paranoia_destroyed?
|
64
64
|
result = paranoia_delete
|
65
65
|
next result unless result && ActiveRecord::VERSION::STRING >= '4.2'
|
66
66
|
each_counter_cached_associations do |association|
|
@@ -73,7 +73,9 @@ module Paranoia
|
|
73
73
|
@_disable_counter_cache = false
|
74
74
|
result
|
75
75
|
end
|
76
|
-
|
76
|
+
raise ActiveRecord::Rollback, "Not destroyed" unless paranoia_destroyed?
|
77
|
+
result
|
78
|
+
end || false
|
77
79
|
end
|
78
80
|
alias_method :destroy, :paranoia_destroy
|
79
81
|
|
@@ -129,21 +131,21 @@ module Paranoia
|
|
129
131
|
def get_recovery_window_range(opts)
|
130
132
|
return opts[:recovery_window_range] if opts[:recovery_window_range]
|
131
133
|
return unless opts[:recovery_window]
|
132
|
-
(
|
134
|
+
(deletion_time - opts[:recovery_window]..deletion_time + opts[:recovery_window])
|
133
135
|
end
|
134
136
|
|
135
137
|
def within_recovery_window?(recovery_window_range)
|
136
138
|
return true unless recovery_window_range
|
137
|
-
recovery_window_range.cover?(
|
139
|
+
recovery_window_range.cover?(deletion_time)
|
138
140
|
end
|
139
141
|
|
140
142
|
def paranoia_destroyed?
|
141
|
-
|
143
|
+
paranoia_column_value != paranoia_sentinel_value
|
142
144
|
end
|
143
145
|
alias :deleted? :paranoia_destroyed?
|
144
146
|
|
145
|
-
def really_destroy!
|
146
|
-
|
147
|
+
def really_destroy!(update_destroy_attributes: true)
|
148
|
+
with_transaction_returning_status do
|
147
149
|
run_callbacks(:real_destroy) do
|
148
150
|
@_disable_counter_cache = paranoia_destroyed?
|
149
151
|
dependent_reflections = self.class.reflections.select do |name, reflection|
|
@@ -156,12 +158,14 @@ module Paranoia
|
|
156
158
|
# .paranoid? will work for both instances and classes
|
157
159
|
next unless association_data && association_data.paranoid?
|
158
160
|
if reflection.collection?
|
159
|
-
next association_data.with_deleted.
|
161
|
+
next association_data.with_deleted.find_each { |record|
|
162
|
+
record.really_destroy!(update_destroy_attributes: update_destroy_attributes)
|
163
|
+
}
|
160
164
|
end
|
161
|
-
association_data.really_destroy!
|
165
|
+
association_data.really_destroy!(update_destroy_attributes: update_destroy_attributes)
|
162
166
|
end
|
163
167
|
end
|
164
|
-
update_columns(paranoia_destroy_attributes)
|
168
|
+
update_columns(paranoia_destroy_attributes) if update_destroy_attributes
|
165
169
|
destroy_without_paranoia
|
166
170
|
end
|
167
171
|
end
|
@@ -212,31 +216,36 @@ module Paranoia
|
|
212
216
|
end
|
213
217
|
|
214
218
|
if association_data.nil? && association.macro.to_s == "has_one"
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
if association.type
|
219
|
-
association_polymorphic_type = association.type
|
220
|
-
association_find_conditions = { association_polymorphic_type => self.class.name.to_s, association_foreign_key => self.id }
|
221
|
-
else
|
219
|
+
association_class = association.klass
|
220
|
+
if association_class.paranoid?
|
221
|
+
association_foreign_key = association.options[:through].present? ? association.klass.primary_key : association.foreign_key
|
222
222
|
association_find_conditions = { association_foreign_key => self.id }
|
223
|
-
|
223
|
+
association_find_conditions[association.type] = self.class.name if association.type
|
224
224
|
|
225
|
-
association_class = association_class_name.constantize
|
226
|
-
if association_class.paranoid?
|
227
225
|
association_class.only_deleted.where(association_find_conditions).first
|
228
226
|
.try!(:restore, recursive: true, :recovery_window_range => recovery_window_range)
|
229
227
|
end
|
230
228
|
end
|
231
229
|
end
|
232
230
|
|
233
|
-
|
231
|
+
if ActiveRecord.version.to_s > '7'
|
232
|
+
# Method deleted in https://github.com/rails/rails/commit/dd5886d00a2d5f31ccf504c391aad93deb014eb8
|
233
|
+
@association_cache.clear if persisted? && destroyed_associations.present?
|
234
|
+
else
|
235
|
+
clear_association_cache if destroyed_associations.present?
|
236
|
+
end
|
234
237
|
end
|
235
238
|
end
|
236
239
|
|
237
240
|
ActiveSupport.on_load(:active_record) do
|
238
241
|
class ActiveRecord::Base
|
239
242
|
def self.acts_as_paranoid(options={})
|
243
|
+
if included_modules.include?(Paranoia)
|
244
|
+
puts "[WARN] #{self.name} is calling acts_as_paranoid more than once!"
|
245
|
+
|
246
|
+
return
|
247
|
+
end
|
248
|
+
|
240
249
|
define_model_callbacks :restore, :real_destroy
|
241
250
|
|
242
251
|
alias_method :really_destroyed?, :destroyed?
|
@@ -285,9 +294,17 @@ ActiveSupport.on_load(:active_record) do
|
|
285
294
|
self.class.paranoia_column
|
286
295
|
end
|
287
296
|
|
297
|
+
def paranoia_column_value
|
298
|
+
send(paranoia_column)
|
299
|
+
end
|
300
|
+
|
288
301
|
def paranoia_sentinel_value
|
289
302
|
self.class.paranoia_sentinel_value
|
290
303
|
end
|
304
|
+
|
305
|
+
def deletion_time
|
306
|
+
paranoia_column_value.acts_like?(:time) ? paranoia_column_value : deleted_at
|
307
|
+
end
|
291
308
|
end
|
292
309
|
end
|
293
310
|
|
data/paranoia.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.license = 'MIT'
|
12
12
|
s.summary = "Paranoia is a re-implementation of acts_as_paranoid for Rails 3, 4, and 5, using much, much, much less code."
|
13
13
|
s.description = <<-DSC
|
14
|
-
Paranoia is a re-implementation of acts_as_paranoid for Rails
|
14
|
+
Paranoia is a re-implementation of acts_as_paranoid for Rails 5, 6, and 7,
|
15
15
|
using much, much, much less code. You would use either plugin / gem if you
|
16
16
|
wished that when you called destroy on an Active Record object that it
|
17
17
|
didn't actually destroy it, but just "hid" the record. Paranoia does this
|
@@ -22,14 +22,19 @@ Gem::Specification.new do |s|
|
|
22
22
|
|
23
23
|
s.required_rubygems_version = ">= 1.3.6"
|
24
24
|
|
25
|
-
s.required_ruby_version = '>= 2.
|
25
|
+
s.required_ruby_version = '>= 2.5'
|
26
26
|
|
27
|
-
s.add_dependency 'activerecord', '>=
|
27
|
+
s.add_dependency 'activerecord', '>= 5.1', '< 7.2'
|
28
28
|
|
29
29
|
s.add_development_dependency "bundler", ">= 1.0.0"
|
30
30
|
s.add_development_dependency "rake"
|
31
31
|
|
32
|
-
|
32
|
+
|
33
|
+
s.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
34
|
+
files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)}) }
|
35
|
+
files
|
36
|
+
end
|
37
|
+
|
33
38
|
s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
|
34
39
|
s.require_path = 'lib'
|
35
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paranoia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- radarlistener@gmail.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -16,20 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '5.1'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '7.2'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
29
|
+
version: '5.1'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '7.2'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: bundler
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,7 +59,7 @@ dependencies:
|
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '0'
|
61
61
|
description: |2
|
62
|
-
Paranoia is a re-implementation of acts_as_paranoid for Rails
|
62
|
+
Paranoia is a re-implementation of acts_as_paranoid for Rails 5, 6, and 7,
|
63
63
|
using much, much, much less code. You would use either plugin / gem if you
|
64
64
|
wished that when you called destroy on an Active Record object that it
|
65
65
|
didn't actually destroy it, but just "hid" the record. Paranoia does this
|
@@ -73,8 +73,8 @@ executables: []
|
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
+
- ".github/workflows/build.yml"
|
76
77
|
- ".gitignore"
|
77
|
-
- ".travis.yml"
|
78
78
|
- CHANGELOG.md
|
79
79
|
- CODE_OF_CONDUCT.md
|
80
80
|
- CONTRIBUTING.md
|
@@ -87,7 +87,6 @@ files:
|
|
87
87
|
- lib/paranoia/rspec.rb
|
88
88
|
- lib/paranoia/version.rb
|
89
89
|
- paranoia.gemspec
|
90
|
-
- test/paranoia_test.rb
|
91
90
|
homepage: https://github.com/rubysherpas/paranoia
|
92
91
|
licenses:
|
93
92
|
- MIT
|
@@ -100,14 +99,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
100
99
|
requirements:
|
101
100
|
- - ">="
|
102
101
|
- !ruby/object:Gem::Version
|
103
|
-
version: '2.
|
102
|
+
version: '2.5'
|
104
103
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
104
|
requirements:
|
106
105
|
- - ">="
|
107
106
|
- !ruby/object:Gem::Version
|
108
107
|
version: 1.3.6
|
109
108
|
requirements: []
|
110
|
-
rubygems_version: 3.
|
109
|
+
rubygems_version: 3.4.18
|
111
110
|
signing_key:
|
112
111
|
specification_version: 4
|
113
112
|
summary: Paranoia is a re-implementation of acts_as_paranoid for Rails 3, 4, and 5,
|
data/.travis.yml
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
sudo: false
|
2
|
-
language: ruby
|
3
|
-
before_install:
|
4
|
-
- gem query -I -n "^bundler$" -v ">=2" || gem uninstall -x bundler -v ">=2" || rvm @global do gem uninstall -x bundler -v ">=2"
|
5
|
-
- gem query -i -n "^bundler$" -v "<2" || gem install bundler -v "<2"
|
6
|
-
cache: bundler
|
7
|
-
rvm:
|
8
|
-
- 2.3.8
|
9
|
-
- 2.4.5
|
10
|
-
- 2.5.3
|
11
|
-
- 2.6.3
|
12
|
-
- jruby-9.2.8.0
|
13
|
-
|
14
|
-
env:
|
15
|
-
matrix:
|
16
|
-
- RAILS='~> 4.2.0' SQLITE_VERSION='~> 1.3.6'
|
17
|
-
- RAILS='~> 5.0.0' SQLITE_VERSION='~> 1.3.6'
|
18
|
-
- RAILS='~> 5.1.0'
|
19
|
-
- RAILS='~> 5.2.0'
|
20
|
-
- RAILS='~> 6.1.0'
|
21
|
-
- RAILS='master'
|
22
|
-
|
23
|
-
matrix:
|
24
|
-
allow_failures:
|
25
|
-
- env: RAILS='~> 4.2.0' SQLITE_VERSION='~> 1.3.6'
|
26
|
-
rvm: jruby-9.2.8.0
|
27
|
-
- env: RAILS='~> 5.0.0' SQLITE_VERSION='~> 1.3.6'
|
28
|
-
rvm: jruby-9.2.8.0
|
29
|
-
- env: RAILS='~> 5.1.0'
|
30
|
-
rvm: jruby-9.2.8.0
|
31
|
-
- env: RAILS='~> 5.2.0'
|
32
|
-
rvm: jruby-9.2.8.0
|
33
|
-
- env: RAILS='master'
|
34
|
-
rvm: jruby-9.2.8.0
|
35
|
-
- env: RAILS='~> 6.1.0'
|
36
|
-
rvm: jruby-9.2.8.0
|
37
|
-
exclude:
|
38
|
-
- rvm: 2.3.8
|
39
|
-
env: RAILS='master'
|
40
|
-
- rvm: 2.4.5
|
41
|
-
env: RAILS='master'
|
42
|
-
- rvm: 2.3.8
|
43
|
-
env: RAILS='~> 6.1.0'
|
44
|
-
- rvm: 2.4.5
|
45
|
-
env: RAILS='~> 6.1.0'
|