action_policy 0.3.0.beta1 → 0.3.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/CHANGELOG.md +1 -1
- data/README.md +1 -1
- data/docs/README.md +2 -0
- data/docs/reasons.md +0 -7
- data/docs/scoping.md +0 -7
- data/lib/action_policy/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ad9e103ab1e208d993b595bf24954cdce732d88b0b0a098575c4fa29bd1e51fc
|
|
4
|
+
data.tar.gz: 1e2d3ed392136834dab5cee6626a6c1f2b2c1baf7898453c20d4b8ba37768bd7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ac86e5d6437375cdfa33446633bffb66bf3cc8be82723991553945e95ae68805f38acff048540c82d537733c1eb4b1f77f0a2a2b626a1fcedf5eccd544e12f43
|
|
7
|
+
data.tar.gz: 4be9d2ea33273e3475f44c16163e87484db3d3ed95e36482a047198a217835d7d5918ffb3b3d35045121bec7381a48bae64a5581f0713240d4bb48d3ffd10876
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
data/docs/README.md
CHANGED
data/docs/reasons.md
CHANGED
|
@@ -55,13 +55,6 @@ p ex.result.reasons.details #=> { stage: [:show?] }
|
|
|
55
55
|
|
|
56
56
|
## Detailed Reasons
|
|
57
57
|
|
|
58
|
-
**NOTE:** this feature hasn't been released yet and planned for 0.3.0 release.
|
|
59
|
-
You can use it now by installing the gem from GitHub master:
|
|
60
|
-
|
|
61
|
-
```ruby
|
|
62
|
-
gem "action_policy", github: "palkan/action_policy"
|
|
63
|
-
```
|
|
64
|
-
|
|
65
58
|
You can provide additional details to your failure reasons by using a `details: { ... }` option:
|
|
66
59
|
|
|
67
60
|
```ruby
|
data/docs/scoping.md
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
# Scoping
|
|
2
2
|
|
|
3
|
-
**NOTE:** this feature hasn't been released yet and planned for 0.3.0 release.
|
|
4
|
-
You can use it now by installing the gem from GitHub master:
|
|
5
|
-
|
|
6
|
-
```ruby
|
|
7
|
-
gem "action_policy", github: "palkan/action_policy"
|
|
8
|
-
```
|
|
9
|
-
|
|
10
3
|
By _scoping_ we mean an ability to use policies to _scope data_ (or _filter/modify/transform/choose-your-verb_).
|
|
11
4
|
|
|
12
5
|
The most common situation is when you want to _scope_ ActiveRecord relations depending
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: action_policy
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.0
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vladimir Dementyev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-04-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -265,9 +265,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
265
265
|
version: 2.4.0
|
|
266
266
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
267
267
|
requirements:
|
|
268
|
-
- - "
|
|
268
|
+
- - ">="
|
|
269
269
|
- !ruby/object:Gem::Version
|
|
270
|
-
version:
|
|
270
|
+
version: '0'
|
|
271
271
|
requirements: []
|
|
272
272
|
rubygems_version: 3.0.2
|
|
273
273
|
signing_key:
|