unidom-authorization 1.4.5 → 1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0452e5f8f9c8d59d999f1d6ec3b3a3fd336d0077
4
- data.tar.gz: 28558f7b515d8028f6e7e68735a740d65d2856fa
3
+ metadata.gz: cf149681710bff4f470a6f3d25b18767038a4772
4
+ data.tar.gz: f1524067ef71b2a90635673674206d446bf966a6
5
5
  SHA512:
6
- metadata.gz: c5c900343d6233b7f173ac002b677aaf036474a6bf15e618249f1c09a6663949b2c99d881210ec3c0ad2e1a03b9bbed7a2df3e53a1d10f0e9c72cd29dec93460
7
- data.tar.gz: 932228df055c759573f05607146c2c890f5f0c41b9fc933cd3cd27dfb5e7b8c800765f2ef0fc943415c5eb865cc5831b2d30cfd984a0af9a6d2309b25b669e9f
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
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Authorization
3
- VERSION = '1.4.5'.freeze
3
+ VERSION = '1.5'.freeze
4
4
  end
5
5
  end
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.5
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-21 00:00:00.000000000 Z
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: