unidom-authorization 1.6 → 1.6.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa88ea09708ff93a8e36dccea63e8443ad8dd9a0
4
- data.tar.gz: 544cccc83c3f7d4b3faacdfd248d9863464b4490
3
+ metadata.gz: 7984b6c161a9b4aca20a2cde74685ae17608f298
4
+ data.tar.gz: 23452781745ca69a5d06a94536f242cb61dfd02b
5
5
  SHA512:
6
- metadata.gz: 2c8973978d955828416f21e2db425843503d904177fa5d6d61821a1cebf365f40f0ff2611a245a18aeef52f6fb3cbb897574e7b59fd4ed5c240006cba897ee7a
7
- data.tar.gz: d25f9fdc913dfeebf11b4f552d791c1e2d3bcac20077da612f48364f19995aec26a3bcbc8f58572cdce099f444715bff0f512744aa699ac3371737b6a691c261
6
+ metadata.gz: cca7a56defb0241a5591abe3a98e10366dc7ed9128d62930c2339983298cd3cf67c51b0b144d8c3a9fe77a763f852ad43842ac88e59eacdd59a9ff7459dea919
7
+ data.tar.gz: '09b998963d29d63be072ac8460ef824c72e964486713b441f330302b3623544c6320979beb3adab61d5a352d16af94ab28e88c6598a2531d3249bb39c4f66077'
@@ -18,6 +18,14 @@ describe Unidom::Authorization::Authorizing, type: :model do
18
18
 
19
19
  it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
20
20
 
21
+ #it_behaves_like 'belongs_to', model_attributes, :permission, Unidom::Authorization::Permission, { name: 'User Management', path: 'administration/users'}
22
+
23
+ it_behaves_like 'scope', :permission_is, [
24
+ { attributes_collection: [ model_attributes ], count_diff: 1, args: [ model_attributes[:permission_id] ] },
25
+ { attributes_collection: [ model_attributes ], count_diff: 1, args: [ Unidom::Authorization::Permission.new(id: model_attributes[:permission_id]) ] },
26
+ { attributes_collection: [ model_attributes ], count_diff: 0, args: [ model_attributes[:authorized_id] ] },
27
+ { attributes_collection: [ model_attributes ], count_diff: 0, args: [ Unidom::Authorization::Permission.new(id: model_attributes[:authorized_id]) ] } ]
28
+
21
29
  end
22
30
 
23
31
  end
@@ -15,6 +15,11 @@ describe Unidom::Authorization::Permission, type: :model do
15
15
 
16
16
  it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
17
17
 
18
+ it_behaves_like 'scope', :path_is, [
19
+ { attributes_collection: [ model_attributes ], count_diff: 1, args: [ model_attributes[:path] ] },
20
+ { attributes_collection: [ model_attributes ], count_diff: 0, args: [ "/#{model_attributes[:path]}" ] },
21
+ { attributes_collection: [ model_attributes ], count_diff: 0, args: [ "#{model_attributes[:path]}.html" ] } ]
22
+
18
23
  end
19
24
 
20
25
  end
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Authorization
3
- VERSION = '1.6'.freeze
3
+ VERSION = '1.6.1'.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.6'
4
+ version: 1.6.1
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-02-09 00:00:00.000000000 Z
11
+ date: 2017-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common