dynamican 1.0.1 → 1.0.2
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/dynamican.gemspec +2 -2
- data/lib/dynamican/evaluator.rb +5 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57e35df3eaa7632f3e703de8ee81fa03205baf0f34678cc6f1cb7e4d1de30519
|
4
|
+
data.tar.gz: 6a0f272dba7e3c6fb4575c1b491cd4aa1b7c82c074a28cbde012e6233120d4bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8302dc81c027a3256e4d943f2633c5d4a311dfebcc274c69c4f831607bd6ee68d4ab69615d8e66b2923e9fef1c472f16208855f07b30e5e5ac080300b78267a
|
7
|
+
data.tar.gz: '09ef56baf0b012223b1c562bfc1f57d2559bb9009ccb311322eab8750baa894c922f21f32b5e540a162e360e4b714b71a14f5ac764c52d6d7535f56b299c0f51'
|
data/dynamican.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'dynamican'
|
3
|
-
s.version = '1.0.
|
4
|
-
s.date = '
|
3
|
+
s.version = '1.0.2'
|
4
|
+
s.date = '2021-06-30'
|
5
5
|
s.summary = "Dynamic permissions"
|
6
6
|
s.description = "Dynamic and flexible database configurable permissions for your application"
|
7
7
|
s.authors = ["Valerio Bellaveglia"]
|
data/lib/dynamican/evaluator.rb
CHANGED
@@ -32,11 +32,15 @@ module Dynamican
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def calculate_item_name
|
35
|
-
if item.class.in? [Symbol, String, Class]
|
35
|
+
class_name = if item.class.in? [Symbol, String, Class]
|
36
36
|
item.to_s.classify
|
37
37
|
else
|
38
38
|
item.class.name.demodulize
|
39
39
|
end
|
40
|
+
|
41
|
+
given_item_name = item.class.try(:dynamican_item_name)
|
42
|
+
|
43
|
+
given_item_name || class_name
|
40
44
|
end
|
41
45
|
end
|
42
46
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynamican
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Valerio Bellaveglia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Dynamic and flexible database configurable permissions for your application
|
14
14
|
email:
|
@@ -47,7 +47,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
requirements: []
|
50
|
-
rubygems_version: 3.
|
50
|
+
rubygems_version: 3.2.3
|
51
51
|
signing_key:
|
52
52
|
specification_version: 4
|
53
53
|
summary: Dynamic permissions
|