paranoia 2.6.1 → 2.6.2
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 +24 -34
- data/CHANGELOG.md +5 -0
- data/lib/paranoia/version.rb +1 -1
- data/lib/paranoia.rb +7 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5435d5ed0b4879dda1edf99c6cebfa860d8ae87a7420dea64289b6f53fc48314
|
4
|
+
data.tar.gz: af9635bbfa0477de0acf5cf18160b28e4f7e18ed0e41f551ae9e8a63146d3083
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a8b413670e0cfc193cb061ff7a9f4edec3765bfde3c4e3f37e43ecc0136f7adecf6ffb0ba5ee29791949e98b4a07daa0bdc58cbcd9c0ee30e13daddd9c4a3b9
|
7
|
+
data.tar.gz: 893ade53cdf583809902904061b8deae5a337042b41df30c373937b29fa310ea9945dd494b35ae566d52005f672bf1d4529d458c684a12a0226a0197898a5b2d
|
data/.github/workflows/build.yml
CHANGED
@@ -15,40 +15,30 @@ jobs:
|
|
15
15
|
strategy:
|
16
16
|
fail-fast: false
|
17
17
|
matrix:
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
- 2
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
#
|
26
|
-
|
27
|
-
|
28
|
-
-
|
29
|
-
|
30
|
-
-
|
31
|
-
|
32
|
-
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
ruby: 2.
|
37
|
-
|
38
|
-
ruby: 2.5
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
ruby: 2.5
|
43
|
-
# Legacy Rails with newer rubies
|
44
|
-
- rails: '~> 5.1.0'
|
45
|
-
ruby: '3.0'
|
46
|
-
- rails: '~> 5.2.0'
|
47
|
-
ruby: '3.0'
|
48
|
-
- rails: '~> 5.1.0'
|
49
|
-
ruby: 3.1
|
50
|
-
- rails: '~> 5.2.0'
|
51
|
-
ruby: 3.1
|
18
|
+
rails: ["~> 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
|
+
# single test failure with jruby
|
24
|
+
#- ruby: jruby-9.4
|
25
|
+
# rails: '~> 7.0.0'
|
26
|
+
- ruby: 2.6
|
27
|
+
rails: '~> 6.1.0'
|
28
|
+
- ruby: 2.6
|
29
|
+
rails: '~> 6.0.0'
|
30
|
+
- ruby: 2.6
|
31
|
+
rails: '~> 5.2.0'
|
32
|
+
- ruby: 2.6
|
33
|
+
rails: '~> 5.1.0'
|
34
|
+
- ruby: 2.5
|
35
|
+
rails: '~> 6.0.0'
|
36
|
+
- ruby: 2.5
|
37
|
+
rails: '~> 5.2.0'
|
38
|
+
- ruby: 2.5
|
39
|
+
rails: '~> 5.1.0'
|
40
|
+
#os: ubuntu-latest
|
41
|
+
#arch: x64
|
52
42
|
|
53
43
|
env:
|
54
44
|
RAILS: ${{ matrix.rails }}
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# paranoia Changelog
|
2
2
|
|
3
|
+
## 2.6.2
|
4
|
+
|
5
|
+
* [#441](https://github.com/rubysherpas/paranoia/pull/441) Recursive restore with has_many/one through assocs (#441)
|
6
|
+
[Emil Ong](https://github.com/emilong)
|
7
|
+
|
3
8
|
## 2.6.1
|
4
9
|
|
5
10
|
* [#535](https://github.com/rubysherpas/paranoia/pull/535) Allow to skip updating paranoia_destroy_attributes for records while really_destroy!
|
data/lib/paranoia/version.rb
CHANGED
data/lib/paranoia.rb
CHANGED
@@ -217,7 +217,12 @@ module Paranoia
|
|
217
217
|
|
218
218
|
if association_data.nil? && association.macro.to_s == "has_one"
|
219
219
|
association_class_name = association.klass.name
|
220
|
-
|
220
|
+
|
221
|
+
association_foreign_key = if association.options[:through].present?
|
222
|
+
association.klass.primary_key
|
223
|
+
else
|
224
|
+
association.foreign_key
|
225
|
+
end
|
221
226
|
|
222
227
|
if association.type
|
223
228
|
association_polymorphic_type = association.type
|
@@ -226,7 +231,7 @@ module Paranoia
|
|
226
231
|
association_find_conditions = { association_foreign_key => self.id }
|
227
232
|
end
|
228
233
|
|
229
|
-
association_class =
|
234
|
+
association_class = association.klass
|
230
235
|
if association_class.paranoid?
|
231
236
|
association_class.only_deleted.where(association_find_conditions).first
|
232
237
|
.try!(:restore, recursive: true, :recovery_window_range => recovery_window_range)
|
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.6.
|
4
|
+
version: 2.6.2
|
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-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
106
|
- !ruby/object:Gem::Version
|
107
107
|
version: 1.3.6
|
108
108
|
requirements: []
|
109
|
-
rubygems_version: 3.4.
|
109
|
+
rubygems_version: 3.4.11
|
110
110
|
signing_key:
|
111
111
|
specification_version: 4
|
112
112
|
summary: Paranoia is a re-implementation of acts_as_paranoid for Rails 3, 4, and 5,
|