mongoid_paranoia 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +21 -21
- data/README.md +126 -126
- data/lib/mongoid/paranoia/configuration.rb +13 -13
- data/lib/mongoid/paranoia/monkey_patches.rb +114 -114
- data/lib/mongoid/paranoia/version.rb +7 -7
- data/lib/mongoid/paranoia.rb +202 -196
- data/lib/mongoid-paranoia.rb +3 -3
- data/lib/mongoid_paranoia.rb +3 -3
- 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: 471c33a97a3ffa0203f5e704f44ef8212a58bcaba249f3c88c2c51a7f1d50da8
|
|
4
|
+
data.tar.gz: c3273f6fd2216f338c920c130bd8b06a969f12ec2d055649a63e14a671b3654e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a1b0d303379ad34a284cceb5c25409afa469f01da44024ee8c0d13ba015828595ef0969b81201e499b39d8a1e1987300434bfe6c2afebb0cb229906ee2b1e8fe
|
|
7
|
+
data.tar.gz: f902be3810ec5756caca3c32edc49f5a5c359c4ee8a79d2a357ae13b3c99012be6652d1be4e9701d89f285a4b7c4f3ddaa7a62b563015177fe2e50f7613bbe23
|
data/LICENSE
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
Copyright (c) 2013 Josef Šimánek
|
|
2
|
-
|
|
3
|
-
MIT License
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
-
a copy of this software and associated documentation files (the
|
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
-
the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
|
14
|
-
included in all copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
1
|
+
Copyright (c) 2013 Josef Šimánek
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
22
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
|
@@ -1,126 +1,126 @@
|
|
|
1
|
-
# Paranoid Documents for Mongoid
|
|
2
|
-
[](https://travis-ci.org/simi/mongoid_paranoia) [](https://rubygems.org/gems/mongoid_paranoia) [](https://gitter.im/simi/mongoid_paranoia)
|
|
3
|
-
|
|
4
|
-
`Mongoid::Paranoia` enables a "soft delete" of Mongoid documents.
|
|
5
|
-
Instead of being removed from the database, paranoid docs are flagged
|
|
6
|
-
with a `deleted_at` timestamp and are ignored from queries by default.
|
|
7
|
-
|
|
8
|
-
The `Mongoid::Paranoia` functionality was originally supported in Mongoid
|
|
9
|
-
itself, but was dropped from version 4.0 onwards. This gem was extracted
|
|
10
|
-
from the [Mongoid 3.0.0-stable branch](https://github.com/mongodb/mongoid/tree/3.0.0-stable).
|
|
11
|
-
|
|
12
|
-
**Caution:** This repo/gem `mongoid_paranoia` (underscored) is different than [mongoid-paranoia](https://github.com/haihappen/mongoid-paranoia) (hyphenated). The goal of `mongoid-paranoia` (hyphenated) is to stay API compatible and it only accepts security fixes.
|
|
13
|
-
|
|
14
|
-
## Version Support
|
|
15
|
-
|
|
16
|
-
* The current release is compatible with Mongoid 7.3 and later, and Ruby 2.7 and later.
|
|
17
|
-
* Earlier Mongoid and Ruby versions are supported on earlier releases.
|
|
18
|
-
|
|
19
|
-
## Installation
|
|
20
|
-
|
|
21
|
-
Add this line to your application's Gemfile:
|
|
22
|
-
|
|
23
|
-
```ruby
|
|
24
|
-
gem 'mongoid_paranoia'
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Usage
|
|
28
|
-
|
|
29
|
-
```ruby
|
|
30
|
-
class Person
|
|
31
|
-
include Mongoid::Document
|
|
32
|
-
include Mongoid::Paranoia
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
person.delete # Sets the deleted_at field to the current time, ignoring callbacks.
|
|
36
|
-
person.delete! # Permanently deletes the document, ignoring callbacks.
|
|
37
|
-
person.destroy # Sets the deleted_at field to the current time, firing callbacks.
|
|
38
|
-
person.destroy! # Permanently deletes the document, firing callbacks.
|
|
39
|
-
person.restore # Brings the "deleted" document back to life.
|
|
40
|
-
person.restore(:recursive => true) # Brings "deleted" associated documents back to life recursively
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
The documents that have been "flagged" as deleted (soft deleted) can be accessed at any time by calling the deleted class method on the class.
|
|
44
|
-
|
|
45
|
-
```ruby
|
|
46
|
-
Person.deleted # Returns documents that have been "flagged" as deleted.
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
You can also access all documents (both deleted and non-deleted) at any time by using the `unscoped` class method:
|
|
50
|
-
|
|
51
|
-
```ruby
|
|
52
|
-
Person.unscoped.all # Returns all documents, both deleted and non-deleted
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
You can also configure the paranoid field naming on a global basis. Within the context of a Rails app this is done via an initializer.
|
|
56
|
-
|
|
57
|
-
```ruby
|
|
58
|
-
# config/initializers/mongoid_paranoid.rb
|
|
59
|
-
|
|
60
|
-
Mongoid::Paranoia.configure do |c|
|
|
61
|
-
c.paranoid_field = :myFieldName
|
|
62
|
-
end
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### Validations
|
|
66
|
-
#### You need override uniqueness validates
|
|
67
|
-
|
|
68
|
-
```ruby
|
|
69
|
-
validates :title, uniqueness: { conditions: -> { where(deleted_at: nil) } }
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### Callbacks
|
|
73
|
-
|
|
74
|
-
#### Restore
|
|
75
|
-
`before_restore`, `after_restore` and `around_restore` callbacks are added to your model. They work similarly to the `before_destroy`, `after_destroy` and `around_destroy` callbacks.
|
|
76
|
-
|
|
77
|
-
#### Remove
|
|
78
|
-
`before_remove`, `after_remove` and `around_remove` are added to your model. They are called when record is deleted permanently .
|
|
79
|
-
|
|
80
|
-
#### Example
|
|
81
|
-
```ruby
|
|
82
|
-
class User
|
|
83
|
-
include Mongoid::Document
|
|
84
|
-
include Mongoid::Paranoia
|
|
85
|
-
|
|
86
|
-
before_restore :before_restore_action
|
|
87
|
-
after_restore :after_restore_action
|
|
88
|
-
around_restore :around_restore_action
|
|
89
|
-
|
|
90
|
-
private
|
|
91
|
-
|
|
92
|
-
def before_restore_action
|
|
93
|
-
puts "BEFORE"
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
def after_restore_action
|
|
97
|
-
puts "AFTER"
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
def around_restore_action
|
|
101
|
-
puts "AROUND - BEFORE"
|
|
102
|
-
yield # restoring
|
|
103
|
-
puts "AROUND - AFTER"
|
|
104
|
-
end
|
|
105
|
-
end
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
## TODO
|
|
109
|
-
- get rid of [monkey_patches.rb](https://github.com/simi/mongoid_paranoia/blob/master/lib/mongoid/paranoia/monkey_patches.rb)
|
|
110
|
-
- [review persisted? behaviour](https://github.com/simi/mongoid_paranoia/issues/2)
|
|
111
|
-
|
|
112
|
-
## Authors
|
|
113
|
-
|
|
114
|
-
* original [Mongoid](https://github.com/mongoid/mongoid) implementation by [@durran](https://github.com/durran)
|
|
115
|
-
* extracted from [Mongoid](https://github.com/mongoid/mongoid) by [@simi](https://github.com/simi)
|
|
116
|
-
* [documentation improvements](https://github.com/simi/mongoid_paranoia/pull/3) by awesome [@loopj](https://github.com/loopj)
|
|
117
|
-
* [latest mongoid support, restore_callback support](https://github.com/simi/mongoid_paranoia/pull/8) by fabulous [@zhouguangming](https://github.com/zhouguangming)
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
## Contributing
|
|
121
|
-
|
|
122
|
-
1. Fork it
|
|
123
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
124
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
125
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
|
126
|
-
5. Create new Pull Request
|
|
1
|
+
# Paranoid Documents for Mongoid
|
|
2
|
+
[](https://travis-ci.org/simi/mongoid_paranoia) [](https://rubygems.org/gems/mongoid_paranoia) [](https://gitter.im/simi/mongoid_paranoia)
|
|
3
|
+
|
|
4
|
+
`Mongoid::Paranoia` enables a "soft delete" of Mongoid documents.
|
|
5
|
+
Instead of being removed from the database, paranoid docs are flagged
|
|
6
|
+
with a `deleted_at` timestamp and are ignored from queries by default.
|
|
7
|
+
|
|
8
|
+
The `Mongoid::Paranoia` functionality was originally supported in Mongoid
|
|
9
|
+
itself, but was dropped from version 4.0 onwards. This gem was extracted
|
|
10
|
+
from the [Mongoid 3.0.0-stable branch](https://github.com/mongodb/mongoid/tree/3.0.0-stable).
|
|
11
|
+
|
|
12
|
+
**Caution:** This repo/gem `mongoid_paranoia` (underscored) is different than [mongoid-paranoia](https://github.com/haihappen/mongoid-paranoia) (hyphenated). The goal of `mongoid-paranoia` (hyphenated) is to stay API compatible and it only accepts security fixes.
|
|
13
|
+
|
|
14
|
+
## Version Support
|
|
15
|
+
|
|
16
|
+
* The current release is compatible with Mongoid 7.3 and later, and Ruby 2.7 and later.
|
|
17
|
+
* Earlier Mongoid and Ruby versions are supported on earlier releases.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
Add this line to your application's Gemfile:
|
|
22
|
+
|
|
23
|
+
```ruby
|
|
24
|
+
gem 'mongoid_paranoia'
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
```ruby
|
|
30
|
+
class Person
|
|
31
|
+
include Mongoid::Document
|
|
32
|
+
include Mongoid::Paranoia
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
person.delete # Sets the deleted_at field to the current time, ignoring callbacks.
|
|
36
|
+
person.delete! # Permanently deletes the document, ignoring callbacks.
|
|
37
|
+
person.destroy # Sets the deleted_at field to the current time, firing callbacks.
|
|
38
|
+
person.destroy! # Permanently deletes the document, firing callbacks.
|
|
39
|
+
person.restore # Brings the "deleted" document back to life.
|
|
40
|
+
person.restore(:recursive => true) # Brings "deleted" associated documents back to life recursively
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The documents that have been "flagged" as deleted (soft deleted) can be accessed at any time by calling the deleted class method on the class.
|
|
44
|
+
|
|
45
|
+
```ruby
|
|
46
|
+
Person.deleted # Returns documents that have been "flagged" as deleted.
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
You can also access all documents (both deleted and non-deleted) at any time by using the `unscoped` class method:
|
|
50
|
+
|
|
51
|
+
```ruby
|
|
52
|
+
Person.unscoped.all # Returns all documents, both deleted and non-deleted
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
You can also configure the paranoid field naming on a global basis. Within the context of a Rails app this is done via an initializer.
|
|
56
|
+
|
|
57
|
+
```ruby
|
|
58
|
+
# config/initializers/mongoid_paranoid.rb
|
|
59
|
+
|
|
60
|
+
Mongoid::Paranoia.configure do |c|
|
|
61
|
+
c.paranoid_field = :myFieldName
|
|
62
|
+
end
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Validations
|
|
66
|
+
#### You need override uniqueness validates
|
|
67
|
+
|
|
68
|
+
```ruby
|
|
69
|
+
validates :title, uniqueness: { conditions: -> { where(deleted_at: nil) } }
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Callbacks
|
|
73
|
+
|
|
74
|
+
#### Restore
|
|
75
|
+
`before_restore`, `after_restore` and `around_restore` callbacks are added to your model. They work similarly to the `before_destroy`, `after_destroy` and `around_destroy` callbacks.
|
|
76
|
+
|
|
77
|
+
#### Remove
|
|
78
|
+
`before_remove`, `after_remove` and `around_remove` are added to your model. They are called when record is deleted permanently .
|
|
79
|
+
|
|
80
|
+
#### Example
|
|
81
|
+
```ruby
|
|
82
|
+
class User
|
|
83
|
+
include Mongoid::Document
|
|
84
|
+
include Mongoid::Paranoia
|
|
85
|
+
|
|
86
|
+
before_restore :before_restore_action
|
|
87
|
+
after_restore :after_restore_action
|
|
88
|
+
around_restore :around_restore_action
|
|
89
|
+
|
|
90
|
+
private
|
|
91
|
+
|
|
92
|
+
def before_restore_action
|
|
93
|
+
puts "BEFORE"
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
def after_restore_action
|
|
97
|
+
puts "AFTER"
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
def around_restore_action
|
|
101
|
+
puts "AROUND - BEFORE"
|
|
102
|
+
yield # restoring
|
|
103
|
+
puts "AROUND - AFTER"
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## TODO
|
|
109
|
+
- get rid of [monkey_patches.rb](https://github.com/simi/mongoid_paranoia/blob/master/lib/mongoid/paranoia/monkey_patches.rb)
|
|
110
|
+
- [review persisted? behaviour](https://github.com/simi/mongoid_paranoia/issues/2)
|
|
111
|
+
|
|
112
|
+
## Authors
|
|
113
|
+
|
|
114
|
+
* original [Mongoid](https://github.com/mongoid/mongoid) implementation by [@durran](https://github.com/durran)
|
|
115
|
+
* extracted from [Mongoid](https://github.com/mongoid/mongoid) by [@simi](https://github.com/simi)
|
|
116
|
+
* [documentation improvements](https://github.com/simi/mongoid_paranoia/pull/3) by awesome [@loopj](https://github.com/loopj)
|
|
117
|
+
* [latest mongoid support, restore_callback support](https://github.com/simi/mongoid_paranoia/pull/8) by fabulous [@zhouguangming](https://github.com/zhouguangming)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
## Contributing
|
|
121
|
+
|
|
122
|
+
1. Fork it
|
|
123
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
124
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
125
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
|
126
|
+
5. Create new Pull Request
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Mongoid
|
|
4
|
-
module Paranoia
|
|
5
|
-
class Configuration
|
|
6
|
-
attr_accessor :paranoid_field
|
|
7
|
-
|
|
8
|
-
def initialize
|
|
9
|
-
@paranoid_field = :deleted_at
|
|
10
|
-
end
|
|
11
|
-
end
|
|
12
|
-
end
|
|
13
|
-
end
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mongoid
|
|
4
|
+
module Paranoia
|
|
5
|
+
class Configuration
|
|
6
|
+
attr_accessor :paranoid_field
|
|
7
|
+
|
|
8
|
+
def initialize
|
|
9
|
+
@paranoid_field = :deleted_at
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Mongoid
|
|
4
|
-
module Paranoia
|
|
5
|
-
module Document
|
|
6
|
-
extend ActiveSupport::Concern
|
|
7
|
-
|
|
8
|
-
included do
|
|
9
|
-
# Indicates whether or not the document includes Mongoid::Paranoia.
|
|
10
|
-
# In Mongoid 3, this method was defined on all Mongoid::Documents.
|
|
11
|
-
# In Mongoid 4, it is no longer defined, hence we are shimming it here.
|
|
12
|
-
class_attribute :paranoid
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
Mongoid::Document.include Mongoid::Paranoia::Document
|
|
19
|
-
|
|
20
|
-
module Mongoid
|
|
21
|
-
module Association
|
|
22
|
-
module Nested
|
|
23
|
-
class Many
|
|
24
|
-
# Destroy the child document, needs to do some checking for embedded
|
|
25
|
-
# relations and delay the destroy in case parent validation fails.
|
|
26
|
-
#
|
|
27
|
-
# @api private
|
|
28
|
-
#
|
|
29
|
-
# @example Destroy the child.
|
|
30
|
-
# builder.destroy(parent, relation, doc)
|
|
31
|
-
#
|
|
32
|
-
# @param [ Document ] parent The parent document.
|
|
33
|
-
# @param [ Proxy ] relation The relation proxy.
|
|
34
|
-
# @param [ Document ] doc The doc to destroy.
|
|
35
|
-
#
|
|
36
|
-
# @since 3.0.10
|
|
37
|
-
def destroy(parent, relation, doc)
|
|
38
|
-
doc.flagged_for_destroy = true
|
|
39
|
-
if !doc.embedded? || parent.new_record? || doc.paranoid?
|
|
40
|
-
destroy_document(relation, doc)
|
|
41
|
-
else
|
|
42
|
-
parent.flagged_destroys.push(-> { destroy_document(relation, doc) })
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
module Mongoid
|
|
51
|
-
module Association
|
|
52
|
-
module Embedded
|
|
53
|
-
class EmbedsMany
|
|
54
|
-
class Proxy < Association::Many
|
|
55
|
-
# Delete the supplied document from the target. This method is proxied
|
|
56
|
-
# in order to reindex the array after the operation occurs.
|
|
57
|
-
#
|
|
58
|
-
# @example Delete the document from the relation.
|
|
59
|
-
# person.addresses.delete(address)
|
|
60
|
-
#
|
|
61
|
-
# @param [ Document ] document The document to be deleted.
|
|
62
|
-
#
|
|
63
|
-
# @return [ Document, nil ] The deleted document or nil if nothing deleted.
|
|
64
|
-
#
|
|
65
|
-
# @since 2.0.0.rc.1
|
|
66
|
-
def delete(document)
|
|
67
|
-
execute_callback :before_remove, document
|
|
68
|
-
doc = _target.delete_one(document)
|
|
69
|
-
if doc && !_binding?
|
|
70
|
-
_unscoped.delete_one(doc) unless doc.paranoid?
|
|
71
|
-
if _assigning?
|
|
72
|
-
if doc.paranoid?
|
|
73
|
-
doc.destroy(suppress: true)
|
|
74
|
-
else
|
|
75
|
-
_base.add_atomic_pull(doc)
|
|
76
|
-
end
|
|
77
|
-
else
|
|
78
|
-
doc.delete(suppress: true)
|
|
79
|
-
unbind_one(doc)
|
|
80
|
-
end
|
|
81
|
-
end
|
|
82
|
-
reindex
|
|
83
|
-
execute_callback :after_remove, document
|
|
84
|
-
doc
|
|
85
|
-
end
|
|
86
|
-
end
|
|
87
|
-
end
|
|
88
|
-
end
|
|
89
|
-
end
|
|
90
|
-
end
|
|
91
|
-
|
|
92
|
-
module Mongoid
|
|
93
|
-
module Association
|
|
94
|
-
module Embedded
|
|
95
|
-
class EmbedsMany
|
|
96
|
-
class Proxy < Association::Many
|
|
97
|
-
# For use only with Mongoid::Paranoia - will be removed in 4.0.
|
|
98
|
-
#
|
|
99
|
-
# @example Get the deleted documents from the relation.
|
|
100
|
-
# person.paranoid_phones.deleted
|
|
101
|
-
#
|
|
102
|
-
# @return [ Criteria ] The deleted documents.
|
|
103
|
-
#
|
|
104
|
-
# @since 3.0.10
|
|
105
|
-
def deleted
|
|
106
|
-
unscoped.deleted
|
|
107
|
-
end
|
|
108
|
-
# This class handles the behaviour for a document that embeds many other
|
|
109
|
-
# documents within in it as an array.
|
|
110
|
-
end
|
|
111
|
-
end
|
|
112
|
-
end
|
|
113
|
-
end
|
|
114
|
-
end
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mongoid
|
|
4
|
+
module Paranoia
|
|
5
|
+
module Document
|
|
6
|
+
extend ActiveSupport::Concern
|
|
7
|
+
|
|
8
|
+
included do
|
|
9
|
+
# Indicates whether or not the document includes Mongoid::Paranoia.
|
|
10
|
+
# In Mongoid 3, this method was defined on all Mongoid::Documents.
|
|
11
|
+
# In Mongoid 4, it is no longer defined, hence we are shimming it here.
|
|
12
|
+
class_attribute :paranoid
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
Mongoid::Document.include Mongoid::Paranoia::Document
|
|
19
|
+
|
|
20
|
+
module Mongoid
|
|
21
|
+
module Association
|
|
22
|
+
module Nested
|
|
23
|
+
class Many
|
|
24
|
+
# Destroy the child document, needs to do some checking for embedded
|
|
25
|
+
# relations and delay the destroy in case parent validation fails.
|
|
26
|
+
#
|
|
27
|
+
# @api private
|
|
28
|
+
#
|
|
29
|
+
# @example Destroy the child.
|
|
30
|
+
# builder.destroy(parent, relation, doc)
|
|
31
|
+
#
|
|
32
|
+
# @param [ Document ] parent The parent document.
|
|
33
|
+
# @param [ Proxy ] relation The relation proxy.
|
|
34
|
+
# @param [ Document ] doc The doc to destroy.
|
|
35
|
+
#
|
|
36
|
+
# @since 3.0.10
|
|
37
|
+
def destroy(parent, relation, doc)
|
|
38
|
+
doc.flagged_for_destroy = true
|
|
39
|
+
if !doc.embedded? || parent.new_record? || doc.paranoid?
|
|
40
|
+
destroy_document(relation, doc)
|
|
41
|
+
else
|
|
42
|
+
parent.flagged_destroys.push(-> { destroy_document(relation, doc) })
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
module Mongoid
|
|
51
|
+
module Association
|
|
52
|
+
module Embedded
|
|
53
|
+
class EmbedsMany
|
|
54
|
+
class Proxy < Association::Many
|
|
55
|
+
# Delete the supplied document from the target. This method is proxied
|
|
56
|
+
# in order to reindex the array after the operation occurs.
|
|
57
|
+
#
|
|
58
|
+
# @example Delete the document from the relation.
|
|
59
|
+
# person.addresses.delete(address)
|
|
60
|
+
#
|
|
61
|
+
# @param [ Document ] document The document to be deleted.
|
|
62
|
+
#
|
|
63
|
+
# @return [ Document, nil ] The deleted document or nil if nothing deleted.
|
|
64
|
+
#
|
|
65
|
+
# @since 2.0.0.rc.1
|
|
66
|
+
def delete(document)
|
|
67
|
+
execute_callback :before_remove, document
|
|
68
|
+
doc = _target.delete_one(document)
|
|
69
|
+
if doc && !_binding?
|
|
70
|
+
_unscoped.delete_one(doc) unless doc.paranoid?
|
|
71
|
+
if _assigning?
|
|
72
|
+
if doc.paranoid?
|
|
73
|
+
doc.destroy(suppress: true)
|
|
74
|
+
else
|
|
75
|
+
_base.add_atomic_pull(doc)
|
|
76
|
+
end
|
|
77
|
+
else
|
|
78
|
+
doc.delete(suppress: true)
|
|
79
|
+
unbind_one(doc)
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
reindex
|
|
83
|
+
execute_callback :after_remove, document
|
|
84
|
+
doc
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
module Mongoid
|
|
93
|
+
module Association
|
|
94
|
+
module Embedded
|
|
95
|
+
class EmbedsMany
|
|
96
|
+
class Proxy < Association::Many
|
|
97
|
+
# For use only with Mongoid::Paranoia - will be removed in 4.0.
|
|
98
|
+
#
|
|
99
|
+
# @example Get the deleted documents from the relation.
|
|
100
|
+
# person.paranoid_phones.deleted
|
|
101
|
+
#
|
|
102
|
+
# @return [ Criteria ] The deleted documents.
|
|
103
|
+
#
|
|
104
|
+
# @since 3.0.10
|
|
105
|
+
def deleted
|
|
106
|
+
unscoped.deleted
|
|
107
|
+
end
|
|
108
|
+
# This class handles the behaviour for a document that embeds many other
|
|
109
|
+
# documents within in it as an array.
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Mongoid
|
|
4
|
-
module Paranoia
|
|
5
|
-
VERSION = '0.
|
|
6
|
-
end
|
|
7
|
-
end
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mongoid
|
|
4
|
+
module Paranoia
|
|
5
|
+
VERSION = '0.7.0'
|
|
6
|
+
end
|
|
7
|
+
end
|
data/lib/mongoid/paranoia.rb
CHANGED
|
@@ -1,196 +1,202 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'mongoid/paranoia/monkey_patches'
|
|
4
|
-
require 'mongoid/paranoia/configuration'
|
|
5
|
-
require 'active_support'
|
|
6
|
-
require 'active_support/deprecation'
|
|
7
|
-
|
|
8
|
-
module Mongoid
|
|
9
|
-
# Include this module to get soft deletion of root level documents.
|
|
10
|
-
# This will add a deleted_at field to the +Document+, managed automatically.
|
|
11
|
-
# Potentially incompatible with unique indices. (if collisions with deleted items)
|
|
12
|
-
#
|
|
13
|
-
# @example Make a document paranoid.
|
|
14
|
-
# class Person
|
|
15
|
-
# include Mongoid::Document
|
|
16
|
-
# include Mongoid::Paranoia
|
|
17
|
-
# end
|
|
18
|
-
module Paranoia
|
|
19
|
-
include Mongoid::Persistable::Deletable
|
|
20
|
-
extend ActiveSupport::Concern
|
|
21
|
-
|
|
22
|
-
class << self
|
|
23
|
-
def configuration
|
|
24
|
-
@configuration ||= Configuration.new
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
def reset
|
|
28
|
-
@configuration = Configuration.new
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
# Allow the paranoid +Document+ to use an alternate field name for deleted_at.
|
|
32
|
-
#
|
|
33
|
-
# @example
|
|
34
|
-
# Mongoid::Paranoia.configure do |c|
|
|
35
|
-
# c.paranoid_field = :myFieldName
|
|
36
|
-
# end
|
|
37
|
-
def configure
|
|
38
|
-
yield(configuration)
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
included do
|
|
43
|
-
field Paranoia.configuration.paranoid_field, as: :deleted_at, type: Time
|
|
44
|
-
|
|
45
|
-
self.paranoid = true
|
|
46
|
-
|
|
47
|
-
default_scope -> { where(deleted_at: nil) }
|
|
48
|
-
scope :deleted, -> { ne(deleted_at: nil) }
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
#
|
|
60
|
-
#
|
|
61
|
-
#
|
|
62
|
-
#
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
#
|
|
68
|
-
#
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
#
|
|
74
|
-
#
|
|
75
|
-
#
|
|
76
|
-
#
|
|
77
|
-
#
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
#
|
|
97
|
-
#
|
|
98
|
-
#
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
#
|
|
122
|
-
#
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
#
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
#
|
|
135
|
-
#
|
|
136
|
-
#
|
|
137
|
-
#
|
|
138
|
-
#
|
|
139
|
-
#
|
|
140
|
-
#
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
#
|
|
180
|
-
#
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
# @return [
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
end
|
|
195
|
-
|
|
196
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'mongoid/paranoia/monkey_patches'
|
|
4
|
+
require 'mongoid/paranoia/configuration'
|
|
5
|
+
require 'active_support'
|
|
6
|
+
require 'active_support/deprecation'
|
|
7
|
+
|
|
8
|
+
module Mongoid
|
|
9
|
+
# Include this module to get soft deletion of root level documents.
|
|
10
|
+
# This will add a deleted_at field to the +Document+, managed automatically.
|
|
11
|
+
# Potentially incompatible with unique indices. (if collisions with deleted items)
|
|
12
|
+
#
|
|
13
|
+
# @example Make a document paranoid.
|
|
14
|
+
# class Person
|
|
15
|
+
# include Mongoid::Document
|
|
16
|
+
# include Mongoid::Paranoia
|
|
17
|
+
# end
|
|
18
|
+
module Paranoia
|
|
19
|
+
include Mongoid::Persistable::Deletable
|
|
20
|
+
extend ActiveSupport::Concern
|
|
21
|
+
|
|
22
|
+
class << self
|
|
23
|
+
def configuration
|
|
24
|
+
@configuration ||= Configuration.new
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def reset
|
|
28
|
+
@configuration = Configuration.new
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Allow the paranoid +Document+ to use an alternate field name for deleted_at.
|
|
32
|
+
#
|
|
33
|
+
# @example
|
|
34
|
+
# Mongoid::Paranoia.configure do |c|
|
|
35
|
+
# c.paranoid_field = :myFieldName
|
|
36
|
+
# end
|
|
37
|
+
def configure
|
|
38
|
+
yield(configuration)
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
included do
|
|
43
|
+
field Paranoia.configuration.paranoid_field, as: :deleted_at, type: Time
|
|
44
|
+
|
|
45
|
+
self.paranoid = true
|
|
46
|
+
|
|
47
|
+
default_scope -> { where(deleted_at: nil) }
|
|
48
|
+
scope :deleted, -> { ne(deleted_at: nil) }
|
|
49
|
+
scope :with_deleted, lambda {
|
|
50
|
+
msg = 'This scope requires Mongoid >= 9 and allow_scopes_to_unset_default_scope to be set to true'
|
|
51
|
+
raise msg unless Mongoid.try(:allow_scopes_to_unset_default_scope)
|
|
52
|
+
|
|
53
|
+
criteria.remove_scoping(unscoped.where(deleted_at: nil))
|
|
54
|
+
}
|
|
55
|
+
define_model_callbacks :restore
|
|
56
|
+
define_model_callbacks :remove
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Override the persisted method to allow for the paranoia gem.
|
|
60
|
+
# If a paranoid record is selected, then we only want to check
|
|
61
|
+
# if it's a new record, not if it is "destroyed"
|
|
62
|
+
#
|
|
63
|
+
# @example
|
|
64
|
+
# document.persisted?
|
|
65
|
+
#
|
|
66
|
+
# @return [ true, false ] If the operation succeeded.
|
|
67
|
+
#
|
|
68
|
+
# @since 4.0.0
|
|
69
|
+
def persisted?
|
|
70
|
+
!new_record?
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Delete the +Document+, will set the deleted_at timestamp and not actually
|
|
74
|
+
# delete it.
|
|
75
|
+
#
|
|
76
|
+
# @example Soft remove the document.
|
|
77
|
+
# document.remove
|
|
78
|
+
#
|
|
79
|
+
# @param [ Hash ] options The database options.
|
|
80
|
+
#
|
|
81
|
+
# @return [ true ] True.
|
|
82
|
+
#
|
|
83
|
+
# @since 1.0.0
|
|
84
|
+
alias orig_delete delete
|
|
85
|
+
|
|
86
|
+
def remove(_ = {}) # rubocop:disable Naming/PredicateMethod
|
|
87
|
+
time = self.deleted_at = Time.now
|
|
88
|
+
_paranoia_update('$set' => { paranoid_field => time })
|
|
89
|
+
@destroyed = true
|
|
90
|
+
true
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
alias delete remove
|
|
94
|
+
alias delete! orig_delete
|
|
95
|
+
|
|
96
|
+
# Delete the paranoid +Document+ from the database completely. This will
|
|
97
|
+
# run the destroy and remove callbacks.
|
|
98
|
+
#
|
|
99
|
+
# @example Hard destroy the document.
|
|
100
|
+
# document.destroy!
|
|
101
|
+
#
|
|
102
|
+
# @return [ true, false ] If the operation succeeded.
|
|
103
|
+
#
|
|
104
|
+
# @since 1.0.0
|
|
105
|
+
def destroy!(options = {})
|
|
106
|
+
raise Errors::ReadonlyDocument.new(self.class) if readonly?
|
|
107
|
+
self.flagged_for_destroy = true
|
|
108
|
+
result = run_callbacks(:destroy) do
|
|
109
|
+
run_callbacks(:remove) do
|
|
110
|
+
if catch(:abort) { apply_destroy_dependencies! }
|
|
111
|
+
delete!(options || {})
|
|
112
|
+
else
|
|
113
|
+
false
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
self.flagged_for_destroy = false
|
|
118
|
+
result
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Determines if this document is destroyed.
|
|
122
|
+
#
|
|
123
|
+
# @example Is the document destroyed?
|
|
124
|
+
# person.destroyed?
|
|
125
|
+
#
|
|
126
|
+
# @return [ true, false ] If the document is destroyed.
|
|
127
|
+
#
|
|
128
|
+
# @since 1.0.0
|
|
129
|
+
def destroyed?
|
|
130
|
+
(@destroyed ||= false) || !!deleted_at
|
|
131
|
+
end
|
|
132
|
+
alias deleted? destroyed?
|
|
133
|
+
|
|
134
|
+
# Restores a previously soft-deleted document. Handles this by removing the
|
|
135
|
+
# deleted_at flag.
|
|
136
|
+
#
|
|
137
|
+
# @example Restore the document from deleted state.
|
|
138
|
+
# document.restore
|
|
139
|
+
#
|
|
140
|
+
# For resoring associated documents use :recursive => true
|
|
141
|
+
# @example Restore the associated documents from deleted state.
|
|
142
|
+
# document.restore(:recursive => true)
|
|
143
|
+
#
|
|
144
|
+
# TODO: @return [ Time ] The time the document had been deleted.
|
|
145
|
+
#
|
|
146
|
+
# @since 1.0.0
|
|
147
|
+
def restore(opts = {})
|
|
148
|
+
run_callbacks(:restore) do
|
|
149
|
+
_paranoia_update('$unset' => { paranoid_field => true })
|
|
150
|
+
attributes.delete('deleted_at')
|
|
151
|
+
@destroyed = false
|
|
152
|
+
restore_relations if opts[:recursive]
|
|
153
|
+
true
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Returns a string representing the documents's key suitable for use in URLs.
|
|
158
|
+
def to_param
|
|
159
|
+
new_record? ? nil : to_key.join('-')
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
def restore_relations
|
|
163
|
+
relations.each_pair do |name, association|
|
|
164
|
+
next unless association.dependent == :destroy
|
|
165
|
+
relation = send(name)
|
|
166
|
+
next unless relation.present? && relation.paranoid?
|
|
167
|
+
Array.wrap(relation).each do |doc|
|
|
168
|
+
doc.restore(recursive: true)
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
private
|
|
174
|
+
|
|
175
|
+
# Get the collection to be used for paranoid operations.
|
|
176
|
+
#
|
|
177
|
+
# @example Get the paranoid collection.
|
|
178
|
+
# document.paranoid_collection
|
|
179
|
+
#
|
|
180
|
+
# @return [ Collection ] The root collection.
|
|
181
|
+
def paranoid_collection
|
|
182
|
+
embedded? ? _root.collection : collection
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Get the field to be used for paranoid operations.
|
|
186
|
+
#
|
|
187
|
+
# @example Get the paranoid field.
|
|
188
|
+
# document.paranoid_field
|
|
189
|
+
#
|
|
190
|
+
# @return [ String ] The deleted at field.
|
|
191
|
+
def paranoid_field
|
|
192
|
+
field = Paranoia.configuration.paranoid_field
|
|
193
|
+
embedded? ? "#{atomic_position}.#{field}" : field
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# @return [ Object ] Update result.
|
|
197
|
+
#
|
|
198
|
+
def _paranoia_update(value)
|
|
199
|
+
paranoid_collection.find(atomic_selector).update_one(value, session: _session)
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
end
|
data/lib/mongoid-paranoia.rb
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'mongoid/paranoia'
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'mongoid/paranoia'
|
data/lib/mongoid_paranoia.rb
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'mongoid/paranoia'
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'mongoid/paranoia'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mongoid_paranoia
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Durran Jordan
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2026-07-18 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: mongoid
|
|
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
61
61
|
- !ruby/object:Gem::Version
|
|
62
62
|
version: '0'
|
|
63
63
|
requirements: []
|
|
64
|
-
rubygems_version: 3.4.
|
|
64
|
+
rubygems_version: 3.4.19
|
|
65
65
|
signing_key:
|
|
66
66
|
specification_version: 4
|
|
67
67
|
summary: Paranoid documents
|