unidom-authorization 1.4.5 → 1.5
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/README.md +15 -0
- data/lib/rspec/models/unidom/authorization/authorizing_spec.rb +23 -0
- data/lib/rspec/models/unidom/authorization/permission_spec.rb +20 -0
- data/lib/unidom/authorization/models_rspec.rb +2 -0
- data/lib/unidom/authorization/types_rspec.rb +0 -0
- data/lib/unidom/authorization/validators_rspec.rb +0 -0
- data/lib/unidom/authorization/version.rb +1 -1
- metadata +7 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cf149681710bff4f470a6f3d25b18767038a4772
|
|
4
|
+
data.tar.gz: f1524067ef71b2a90635673674206d446bf966a6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2fdadafbb33ed70678f478cca1e39241f2052be9877fb5b7945431d97d210d0ca7084d39208616c178ed8ec0985c691be62e24622bb507b1f0dae9075eedf0d2
|
|
7
|
+
data.tar.gz: f175c979d6640c9bc1bb1e243f6a805244a7b5d5f0bd9b2a1ef06a63609e0a312745b5c4da55f54ecee7b8f6e2d5ba575c80e7aad0246ec5fad92659398355f6
|
data/README.md
CHANGED
|
@@ -97,3 +97,18 @@ Unidom::Common.configure do |options|
|
|
|
97
97
|
|
|
98
98
|
end
|
|
99
99
|
```
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
## RSpec examples
|
|
104
|
+
|
|
105
|
+
```ruby
|
|
106
|
+
# spec/models/unidom_spec.rb
|
|
107
|
+
require 'unidom/authorization/models_rspec'
|
|
108
|
+
|
|
109
|
+
# spec/types/unidom_spec.rb
|
|
110
|
+
require 'unidom/authorization/types_rspec'
|
|
111
|
+
|
|
112
|
+
# spec/validators/unidom_spec.rb
|
|
113
|
+
require 'unidom/authorization/validators_rspec'
|
|
114
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
describe Unidom::Authorization::Authorizing, type: :model do
|
|
2
|
+
|
|
3
|
+
before :each do
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
after :each do
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
context do
|
|
10
|
+
|
|
11
|
+
model_attributes = {
|
|
12
|
+
authorizer_id: SecureRandom.uuid,
|
|
13
|
+
authorizer_type: 'Unidom::Authorization::Authorizer::Mock',
|
|
14
|
+
authorized_id: SecureRandom.uuid,
|
|
15
|
+
authorized_type: 'Unidom::Authorization::Authorized::Mock',
|
|
16
|
+
permission_id: SecureRandom.uuid
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
|
20
|
+
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
describe Unidom::Authorization::Permission, type: :model do
|
|
2
|
+
|
|
3
|
+
before :each do
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
after :each do
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
context do
|
|
10
|
+
|
|
11
|
+
model_attributes = {
|
|
12
|
+
name: 'User Management',
|
|
13
|
+
path: 'users'
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
|
17
|
+
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
end
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require 'rspec/models/unidom/authorization/authorizing_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Authorization::Authorizing'
|
|
2
|
+
require 'rspec/models/unidom/authorization/permission_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Authorization::Permission'
|
|
File without changes
|
|
File without changes
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: unidom-authorization
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: '1.5'
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Topbit Du
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-01-
|
|
11
|
+
date: 2017-01-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: unidom-common
|
|
@@ -52,9 +52,14 @@ files:
|
|
|
52
52
|
- config/routes.rb
|
|
53
53
|
- db/migrate/20000401000000_create_unidom_permissions.rb
|
|
54
54
|
- db/migrate/20000402000000_create_unidom_authorizings.rb
|
|
55
|
+
- lib/rspec/models/unidom/authorization/authorizing_spec.rb
|
|
56
|
+
- lib/rspec/models/unidom/authorization/permission_spec.rb
|
|
55
57
|
- lib/tasks/data_tasks.rake
|
|
56
58
|
- lib/unidom/authorization.rb
|
|
57
59
|
- lib/unidom/authorization/engine.rb
|
|
60
|
+
- lib/unidom/authorization/models_rspec.rb
|
|
61
|
+
- lib/unidom/authorization/types_rspec.rb
|
|
62
|
+
- lib/unidom/authorization/validators_rspec.rb
|
|
58
63
|
- lib/unidom/authorization/version.rb
|
|
59
64
|
homepage: https://github.com/topbitdu/unidom-authorization
|
|
60
65
|
licenses:
|