acts_as_paranoid 0.10.0 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -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 +36 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc7d2cde894cf0ffb0ebf005a7566067fbc98dd480e84b9223f9a10db7600d08
|
4
|
+
data.tar.gz: ac546f740e89eb1952f15664a4ce2999eb7e6b39dadf0fd78b32ce257ba4fa7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70c51a44ae30c08c2576615e9e1b525429f391c7fe3de8230fc0d79c6a53bc6ec06441e9e968d95c04e99e0b623d8a6a84c40008cd43df803a2973fb6fe92a82
|
7
|
+
data.tar.gz: 4676ffc62124118f4c2cc99b34d9c08b8c0ffaed07803674553fdd0326d5a38f9d5804f0d913808f3a2fe2533809ac08f9bd656552d4c7f874d6fd4e00602de1
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,26 @@
|
|
2
2
|
|
3
3
|
Notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
+
## 0.10.2
|
6
|
+
|
7
|
+
* Support Rails 7.2 ([#341] by [kalashnikovisme])
|
8
|
+
|
9
|
+
[kalashnikovisme]: https://github.com/kalashnikovisme
|
10
|
+
|
11
|
+
[#341]: https://github.com/ActsAsParanoid/acts_as_paranoid/pull/341
|
12
|
+
|
13
|
+
## 0.10.1
|
14
|
+
|
15
|
+
* Add changelog_uri to gemspec ([#332] by [fynsta])
|
16
|
+
* Improve contribution instructions ([#338] by [mvz])
|
17
|
+
* Make with_deleted work with paranoid join records ([#339] by [mvz])
|
18
|
+
|
19
|
+
[fynsta]: https://github.com/fynsta
|
20
|
+
|
21
|
+
[#332]: https://github.com/ActsAsParanoid/acts_as_paranoid/pull/332
|
22
|
+
[#338]: https://github.com/ActsAsParanoid/acts_as_paranoid/pull/338
|
23
|
+
[#339]: https://github.com/ActsAsParanoid/acts_as_paranoid/pull/339
|
24
|
+
|
5
25
|
## 0.10.0
|
6
26
|
|
7
27
|
* 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.2
|
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-08-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activerecord
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '6.1'
|
22
22
|
- - "<"
|
23
23
|
- !ruby/object:Gem::Version
|
24
|
-
version: '
|
24
|
+
version: '8'
|
25
25
|
type: :runtime
|
26
26
|
prerelease: false
|
27
27
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -31,7 +31,7 @@ dependencies:
|
|
31
31
|
version: '6.1'
|
32
32
|
- - "<"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '
|
34
|
+
version: '8'
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: activesupport
|
37
37
|
requirement: !ruby/object:Gem::Requirement
|
@@ -41,7 +41,7 @@ dependencies:
|
|
41
41
|
version: '6.1'
|
42
42
|
- - "<"
|
43
43
|
- !ruby/object:Gem::Version
|
44
|
-
version: '
|
44
|
+
version: '8'
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
47
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -51,7 +51,7 @@ dependencies:
|
|
51
51
|
version: '6.1'
|
52
52
|
- - "<"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '8'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: appraisal
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -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
|