acts_as_paranoid 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +4 -4
- data/lib/acts_as_paranoid/core.rb +1 -1
- data/lib/acts_as_paranoid/version.rb +1 -1
- data/lib/acts_as_paranoid.rb +12 -10
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 992c8836d7fa518c06baf1be695fcad08a9f9332cbd25596041cdbcf7c61d525
|
4
|
+
data.tar.gz: 2deedb7d195a333cd869b60ada4fe9f91c3d68005a04470e5fb97115c3acb748
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 120588d3f6db69ca22c70d554bb82fcad1fe6471e411df9711ba111ea8b63aba93fa312b60216fd033457e6ff6f9b2d8bbc2cd5d8ca276e0c0b1d3a4b6d5a159
|
7
|
+
data.tar.gz: 73eee9f04521fb530034d81dcdbe41a3bf8c84f83f0dfa37db26f38d8a66d89c681d0ba0cbf6aae2f3cb3fb5c0588678ea6de506137983ab9c07a5d5e2d637b7
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,18 @@
|
|
2
2
|
|
3
3
|
Notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
+
## 0.10.0
|
6
|
+
|
7
|
+
* Support Ruby 3.0 through 3.3, dropping support for 2.7 ([#322] by [mvz])
|
8
|
+
* Use correct sqlite3 versions in tests ([#329] by [fatkodima])
|
9
|
+
* Do not load `ActiveRecord` too early ([#330] by [fatkodima])
|
10
|
+
|
11
|
+
[fatkodima]: https://github.com/fatkodima
|
12
|
+
|
13
|
+
[#322]: https://github.com/ActsAsParanoid/acts_as_paranoid/pull/322
|
14
|
+
[#329]: https://github.com/ActsAsParanoid/acts_as_paranoid/pull/329
|
15
|
+
[#330]: https://github.com/ActsAsParanoid/acts_as_paranoid/pull/330
|
16
|
+
|
5
17
|
## 0.9.0
|
6
18
|
|
7
19
|
* Support JRuby 9.4 ([#299] by [Matijs van Zuijlen][mvz])
|
data/README.md
CHANGED
@@ -9,9 +9,9 @@ recoverable later.
|
|
9
9
|
|
10
10
|
## Support
|
11
11
|
|
12
|
-
**This version targets Rails 6.1+ and Ruby
|
12
|
+
**This version targets Rails 6.1+ and Ruby 3.0+ only**
|
13
13
|
|
14
|
-
If you're working with Rails 6.0 and earlier, or with Ruby 2.
|
14
|
+
If you're working with Rails 6.0 and earlier, or with Ruby 2.7 or earlier,
|
15
15
|
please require an older version of the `acts_as_paranoid` gem.
|
16
16
|
|
17
17
|
### Known issues
|
@@ -23,7 +23,7 @@ please require an older version of the `acts_as_paranoid` gem.
|
|
23
23
|
|
24
24
|
## Usage
|
25
25
|
|
26
|
-
#### Install gem
|
26
|
+
#### Install gem
|
27
27
|
|
28
28
|
```ruby
|
29
29
|
gem 'acts_as_paranoid'
|
@@ -245,7 +245,7 @@ p1.recover #=> fails validation!
|
|
245
245
|
|
246
246
|
### Status
|
247
247
|
|
248
|
-
A paranoid object could be deleted or destroyed fully.
|
248
|
+
A paranoid object could be deleted or destroyed fully.
|
249
249
|
|
250
250
|
You can check if the object is deleted with the `deleted?` helper
|
251
251
|
|
@@ -312,7 +312,7 @@ module ActsAsParanoid
|
|
312
312
|
end
|
313
313
|
|
314
314
|
def each_counter_cached_association_reflection
|
315
|
-
_reflections.
|
315
|
+
_reflections.each_value do |reflection|
|
316
316
|
yield reflection if reflection.belongs_to? && reflection.counter_cache_column
|
317
317
|
end
|
318
318
|
end
|
data/lib/acts_as_paranoid.rb
CHANGED
@@ -51,17 +51,19 @@ module ActsAsParanoid
|
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
|
-
|
55
|
-
ActiveRecord
|
54
|
+
ActiveSupport.on_load(:active_record) do
|
55
|
+
# Extend ActiveRecord's functionality
|
56
|
+
extend ActsAsParanoid
|
56
57
|
|
57
|
-
# Extend ActiveRecord::Base with paranoid associations
|
58
|
-
|
58
|
+
# Extend ActiveRecord::Base with paranoid associations
|
59
|
+
include ActsAsParanoid::Associations
|
59
60
|
|
60
|
-
# Override ActiveRecord::Relation's behavior
|
61
|
-
ActiveRecord::Relation.include ActsAsParanoid::Relation
|
61
|
+
# Override ActiveRecord::Relation's behavior
|
62
|
+
ActiveRecord::Relation.include ActsAsParanoid::Relation
|
62
63
|
|
63
|
-
# Push the recover callback onto the activerecord callback list
|
64
|
-
ActiveRecord::Callbacks::CALLBACKS.push(:before_recover, :after_recover)
|
64
|
+
# Push the recover callback onto the activerecord callback list
|
65
|
+
ActiveRecord::Callbacks::CALLBACKS.push(:before_recover, :after_recover)
|
65
66
|
|
66
|
-
ActiveRecord::Reflection::AssociationReflection
|
67
|
-
|
67
|
+
ActiveRecord::Reflection::AssociationReflection
|
68
|
+
.prepend ActsAsParanoid::AssociationReflection
|
69
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_paranoid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zachary Scott
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2024-05-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activerecord
|
@@ -170,14 +170,14 @@ dependencies:
|
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: 0.
|
173
|
+
version: 0.35.0
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: 0.
|
180
|
+
version: 0.35.0
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: rubocop-packaging
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -265,14 +265,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
265
265
|
requirements:
|
266
266
|
- - ">="
|
267
267
|
- !ruby/object:Gem::Version
|
268
|
-
version:
|
268
|
+
version: 3.0.0
|
269
269
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
270
270
|
requirements:
|
271
271
|
- - ">="
|
272
272
|
- !ruby/object:Gem::Version
|
273
273
|
version: '0'
|
274
274
|
requirements: []
|
275
|
-
rubygems_version: 3.
|
275
|
+
rubygems_version: 3.5.10
|
276
276
|
signing_key:
|
277
277
|
specification_version: 4
|
278
278
|
summary: Active Record plugin which allows you to hide and restore records without
|