mongoid_ability 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +5 -0
- data/Gemfile +0 -2
- data/lib/cancancan/model_adapters/mongoid_adapter.rb +4 -2
- data/lib/mongoid_ability/version.rb +1 -1
- data/mongoid_ability.gemspec +2 -2
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: cccd3fd24f60f4b34354c4ded9ad957fc4fb70137fc42d38ec38e74b84fa8904
|
4
|
+
data.tar.gz: 55950648a4435d08485617178431cc60326e38b2f83c094d20909c11d9f0a1ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a99121ecb016a80bb5cbc94ca5ae325dcc7303ece2f419f92bdb83380cd4bf970baefde9a1c99aa433c737c7ad76ad5399df14d2bdd3190190856a4b82d5f2d1
|
7
|
+
data.tar.gz: 3a5297b943f849c774bf8162b7a3bbf796df4ce676d49c5f30f83e46d9ac9fb989e97553a547b86aa8b239a534b817c2db96f8d5899185c56d9474f4aa891d6b
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'set'
|
2
|
+
|
1
3
|
module CanCan
|
2
4
|
module ModelAdapters
|
3
5
|
class MongoidAdapter < AbstractAdapter
|
@@ -51,12 +53,12 @@ module CanCan
|
|
51
53
|
|
52
54
|
def open_subject_types
|
53
55
|
@open_subject_types ||= begin
|
54
|
-
subject_types.inject([]) do |res, cls|
|
56
|
+
subject_types.inject(Set[]) do |res, cls|
|
55
57
|
subject_type_rules_for(cls).each do |rule|
|
56
58
|
cls_list = [cls, *cls.descendants].compact
|
57
59
|
rule.base_behavior ? res += cls_list : res -= cls_list
|
58
60
|
end
|
59
|
-
res.
|
61
|
+
res.to_a
|
60
62
|
end
|
61
63
|
end
|
62
64
|
end
|
data/mongoid_ability.gemspec
CHANGED
@@ -18,8 +18,8 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_dependency 'cancancan', '
|
22
|
-
spec.add_dependency 'mongoid', '>= 5'
|
21
|
+
spec.add_dependency 'cancancan', '~> 2.2'
|
22
|
+
spec.add_dependency 'mongoid', '>= 5', '< 7'
|
23
23
|
|
24
24
|
spec.add_development_dependency 'bundler'
|
25
25
|
spec.add_development_dependency 'coveralls'
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid_ability
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Celizna
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cancancan
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mongoid
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -31,6 +31,9 @@ dependencies:
|
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '5'
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '7'
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -38,6 +41,9 @@ dependencies:
|
|
38
41
|
- - ">="
|
39
42
|
- !ruby/object:Gem::Version
|
40
43
|
version: '5'
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '7'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: bundler
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -202,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
202
208
|
version: '0'
|
203
209
|
requirements: []
|
204
210
|
rubyforge_project:
|
205
|
-
rubygems_version: 2.
|
211
|
+
rubygems_version: 2.7.6
|
206
212
|
signing_key:
|
207
213
|
specification_version: 4
|
208
214
|
summary: Custom Ability class that allows CanCanCan authorization library store permissions
|