acts_as_paranoid 0.10.0 → 0.10.1
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/CONTRIBUTING.md +19 -13
- data/lib/acts_as_paranoid/associations.rb +1 -0
- data/lib/acts_as_paranoid/core.rb +4 -7
- data/lib/acts_as_paranoid/version.rb +1 -1
- metadata +32 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45d8ec4adf62543fc1eaba6560fde9b075ecf0fef95b8e2d2811ee08a9093d24
|
4
|
+
data.tar.gz: 51da12bf09c6d0aab09d835d44aa7a74e617ad5f31b0a624af32148ffb63b17c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d419f338d8ab828856188404eb2c1f84f31508af15cae65fee647c050ed1efbe41f69951ebf0f3e9de69a5416b0ff7157fb3ad999642eae0dc4dc804fce59634
|
7
|
+
data.tar.gz: 236842d046c63ac8b0efedf5937911ddca18a7232006d7459fb19027902ef38534b70a32c674916972c9b7aec08b1c6f109e6c07979b1de1afdf88a7c6a45094
|
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.1
|
6
|
+
|
7
|
+
* Add changelog_uri to gemspec ([#332] by [fynsta])
|
8
|
+
* Improve contribution instructions ([#338] by [mvz])
|
9
|
+
* Make with_deleted work with paranoid join records ([#339] by [mvz])
|
10
|
+
|
11
|
+
[fynsta]: https://github.com/fynsta
|
12
|
+
|
13
|
+
[#332]: https://github.com/ActsAsParanoid/acts_as_paranoid/pull/332
|
14
|
+
[#338]: https://github.com/ActsAsParanoid/acts_as_paranoid/pull/338
|
15
|
+
[#339]: https://github.com/ActsAsParanoid/acts_as_paranoid/pull/339
|
16
|
+
|
5
17
|
## 0.10.0
|
6
18
|
|
7
19
|
* Support Ruby 3.0 through 3.3, dropping support for 2.7 ([#322] by [mvz])
|
data/CONTRIBUTING.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Contributing to ActsAsParanoid
|
2
2
|
|
3
|
-
We welcome
|
4
|
-
|
3
|
+
We welcome contributions to ActsAsParanoid. Please follow the guidelines below to help the
|
4
|
+
process of handling issues and pull requests go smoothly.
|
5
5
|
|
6
6
|
## Issues
|
7
7
|
|
@@ -14,30 +14,35 @@ ticket.
|
|
14
14
|
- Describe what you are trying to achieve
|
15
15
|
- Describe what you did, preferably including relevant code
|
16
16
|
- Describe what you expected to happen
|
17
|
-
- Describe what happened instead
|
17
|
+
- Describe what happened instead. Include relevant output if possible
|
18
|
+
- State the version of ActsAsParanoid you are using
|
18
19
|
- Use [code blocks](https://github.github.com/gfm/#fenced-code-blocks) to
|
19
20
|
format any code and output in your ticket to make it readable.
|
20
21
|
|
21
|
-
## Pull
|
22
|
+
## Pull Requests
|
22
23
|
|
23
24
|
If you have an idea for a particular feature, it's probably best to create a
|
24
25
|
GitHub issue for it before trying to implement it yourself. That way, we can
|
25
26
|
discuss the feature and whether it makes sense to include in ActsAsParanoid itself
|
26
27
|
before putting in the work to implement it.
|
27
28
|
|
28
|
-
|
29
|
-
**If you get stuck, please make a pull request anyway and we'll try to
|
30
|
-
help out.**
|
29
|
+
When sending a pull request, please follow **all of** the instructions below:
|
31
30
|
|
32
|
-
- Make sure `bundle exec rake` runs without reporting any failures.
|
33
|
-
|
34
|
-
|
31
|
+
- Make sure `bundle exec rake` runs without reporting any failures. See
|
32
|
+
*Testing your changes* below for more details.
|
33
|
+
- Add tests for your feature. Otherwise, we can't see if it works or if
|
34
|
+
we break it later.
|
35
35
|
- Create a separate branch for your feature based off of latest master.
|
36
|
+
- Write [good commit messages](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
|
36
37
|
- Do not include changes that are irrelevant to your feature in the same
|
37
38
|
commit.
|
38
39
|
- Keep an eye on the build results in GitHub Actions. If the build fails and it
|
39
40
|
seems due to your changes, please update your pull request with a fix.
|
40
41
|
|
42
|
+
If you're not sure how to test the problem, or what the best solution is, or
|
43
|
+
get stuck on something else, please open an issue first so that we can discuss
|
44
|
+
the best approach.
|
45
|
+
|
41
46
|
### Testing your changes
|
42
47
|
|
43
48
|
You can run the test suite with the latest version of all dependencies by running the following:
|
@@ -62,9 +67,10 @@ documentation for details.
|
|
62
67
|
that just fix a mistake in a previous commits, we will ask you to clean up
|
63
68
|
the history.
|
64
69
|
Again, [the git-rebase guide](https://git-rebase.io/) should help out.
|
65
|
-
|
66
|
-
|
70
|
+
Note that we will not squash-merge pull requests, since that results in a loss of history.
|
71
|
+
- **At the end of the review process we may still choose not to merge your pull
|
72
|
+
request.** For example, this could happen if we decide the proposed feature
|
67
73
|
should not be part of ActsAsParanoid, or if the technical implementation does not
|
68
|
-
match where we want to go with the architecture the project.
|
74
|
+
match where we want to go with the architecture of the project.
|
69
75
|
- We will generally not merge any pull requests that make the build fail, unless
|
70
76
|
it's very clearly not related to the changes in the pull request.
|
@@ -118,13 +118,10 @@ module ActsAsParanoid
|
|
118
118
|
def without_paranoid_default_scope
|
119
119
|
scope = all
|
120
120
|
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
ActiveRecord::Relation::WhereClause.new([paranoid_default_scope])
|
126
|
-
|
127
|
-
scope.where_clause = all.where_clause - paranoid_where_clause
|
121
|
+
unless scope.unscope_values.include?({ where: paranoid_column })
|
122
|
+
# unscope avoids applying the default scope when using this scope for associations
|
123
|
+
scope = scope.unscope(where: paranoid_column)
|
124
|
+
end
|
128
125
|
|
129
126
|
scope
|
130
127
|
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.10.
|
4
|
+
version: 0.10.1
|
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: 2024-
|
13
|
+
date: 2024-07-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activerecord
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '5.14'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: minitest-around
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0.5'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0.5'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: minitest-focus
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,6 +108,20 @@ dependencies:
|
|
94
108
|
- - "~>"
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: '1.3'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: minitest-stub-const
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0.6'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0.6'
|
97
125
|
- !ruby/object:Gem::Dependency
|
98
126
|
name: pry
|
99
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -256,6 +284,7 @@ homepage: https://github.com/ActsAsParanoid/acts_as_paranoid
|
|
256
284
|
licenses:
|
257
285
|
- MIT
|
258
286
|
metadata:
|
287
|
+
changelog_uri: https://github.com/ActsAsParanoid/acts_as_paranoid/blob/master/CHANGELOG.md
|
259
288
|
rubygems_mfa_required: 'true'
|
260
289
|
post_install_message:
|
261
290
|
rdoc_options: []
|
@@ -272,7 +301,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
272
301
|
- !ruby/object:Gem::Version
|
273
302
|
version: '0'
|
274
303
|
requirements: []
|
275
|
-
rubygems_version: 3.5.
|
304
|
+
rubygems_version: 3.5.16
|
276
305
|
signing_key:
|
277
306
|
specification_version: 4
|
278
307
|
summary: Active Record plugin which allows you to hide and restore records without
|