isomorfeus-policy 1.0.0.zeta25 → 2.0.0.rc4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +21 -21
- data/README.md +181 -182
- data/lib/isomorfeus/policy/config.rb +36 -36
- data/lib/isomorfeus/policy/version.rb +5 -5
- data/lib/isomorfeus-policy.rb +22 -21
- data/lib/isomorfeus_policy/anonymous.rb +11 -11
- data/lib/isomorfeus_policy/lucid_authorization/base.rb +5 -5
- data/lib/isomorfeus_policy/lucid_authorization/mixin.rb +42 -42
- data/lib/isomorfeus_policy/lucid_policy/base.rb +10 -11
- data/lib/isomorfeus_policy/lucid_policy/exception.rb +4 -4
- data/lib/isomorfeus_policy/lucid_policy/helper.rb +18 -18
- data/lib/isomorfeus_policy/lucid_policy/mixin.rb +191 -195
- data/lib/lucid_props.rb +95 -95
- metadata +31 -31
data/lib/lucid_props.rb
CHANGED
@@ -1,95 +1,95 @@
|
|
1
|
-
class LucidProps
|
2
|
-
def initialize(props_hash)
|
3
|
-
props_hash = {} unless props_hash
|
4
|
-
@props_hash = props_hash
|
5
|
-
end
|
6
|
-
|
7
|
-
def any?
|
8
|
-
@props_hash.keys.size > 0
|
9
|
-
end
|
10
|
-
|
11
|
-
def to_h
|
12
|
-
@props_hash
|
13
|
-
end
|
14
|
-
|
15
|
-
def to_transport
|
16
|
-
{}.merge(@props_hash)
|
17
|
-
end
|
18
|
-
|
19
|
-
if RUBY_ENGINE == 'opal'
|
20
|
-
def [](prop_name)
|
21
|
-
@props_hash[prop_name]
|
22
|
-
end
|
23
|
-
|
24
|
-
def []=(prop_name, value)
|
25
|
-
@props_hash[prop_name] = value
|
26
|
-
end
|
27
|
-
|
28
|
-
def key?(prop_name)
|
29
|
-
@props_hash.key?(prop_name)
|
30
|
-
end
|
31
|
-
|
32
|
-
def keys
|
33
|
-
@props_hash.keys
|
34
|
-
end
|
35
|
-
|
36
|
-
def method_missing(prop_name, *args, &block)
|
37
|
-
return @props_hash[prop_name] if @props_hash.key?(prop_name)
|
38
|
-
super(prop_name, *args, &block)
|
39
|
-
end
|
40
|
-
|
41
|
-
def set(prop_name, value)
|
42
|
-
@props_hash[prop_name] = value
|
43
|
-
end
|
44
|
-
|
45
|
-
def to_json
|
46
|
-
JSON.dump(to_transport)
|
47
|
-
end
|
48
|
-
|
49
|
-
def to_n
|
50
|
-
@props_hash.to_n
|
51
|
-
end
|
52
|
-
else # RUBY_ENGINE
|
53
|
-
def [](prop_name)
|
54
|
-
name = prop_name.to_sym
|
55
|
-
return @props_hash[name] if @props_hash.key?(name)
|
56
|
-
name = prop_name.to_s
|
57
|
-
return @props_hash[name] if @props_hash.key?(name)
|
58
|
-
nil
|
59
|
-
end
|
60
|
-
|
61
|
-
def []=(prop_name, value)
|
62
|
-
@props_hash[prop_name.to_sym] = value
|
63
|
-
end
|
64
|
-
|
65
|
-
def key?(prop_name)
|
66
|
-
@props_hash.key?(prop_name.to_sym) || @props_hash.key?(prop_name.to_s)
|
67
|
-
end
|
68
|
-
|
69
|
-
def keys
|
70
|
-
@props_hash.keys.map(&:to_sym)
|
71
|
-
end
|
72
|
-
|
73
|
-
def method_missing(prop_name, *args, &block)
|
74
|
-
name = prop_name.to_sym
|
75
|
-
return @props_hash[name] if @props_hash.key?(name)
|
76
|
-
name = prop_name.to_s
|
77
|
-
return @props_hash[name] if @props_hash.key?(name)
|
78
|
-
super(prop_name, *args, &block)
|
79
|
-
end
|
80
|
-
|
81
|
-
def set(prop_name, value)
|
82
|
-
@props_hash[prop_name.to_sym] = value
|
83
|
-
end
|
84
|
-
|
85
|
-
def to_json
|
86
|
-
Oj.dump(to_transport, mode: :strict)
|
87
|
-
end
|
88
|
-
|
89
|
-
def to_n
|
90
|
-
@props_hash
|
91
|
-
end
|
92
|
-
end # RUBY_ENGINE
|
93
|
-
|
94
|
-
alias_method :has_key?, :key?
|
95
|
-
end
|
1
|
+
class LucidProps
|
2
|
+
def initialize(props_hash)
|
3
|
+
props_hash = {} unless props_hash
|
4
|
+
@props_hash = props_hash
|
5
|
+
end
|
6
|
+
|
7
|
+
def any?
|
8
|
+
@props_hash.keys.size > 0
|
9
|
+
end
|
10
|
+
|
11
|
+
def to_h
|
12
|
+
@props_hash
|
13
|
+
end
|
14
|
+
|
15
|
+
def to_transport
|
16
|
+
{}.merge(@props_hash)
|
17
|
+
end
|
18
|
+
|
19
|
+
if RUBY_ENGINE == 'opal'
|
20
|
+
def [](prop_name)
|
21
|
+
@props_hash[prop_name]
|
22
|
+
end
|
23
|
+
|
24
|
+
def []=(prop_name, value)
|
25
|
+
@props_hash[prop_name] = value
|
26
|
+
end
|
27
|
+
|
28
|
+
def key?(prop_name)
|
29
|
+
@props_hash.key?(prop_name)
|
30
|
+
end
|
31
|
+
|
32
|
+
def keys
|
33
|
+
@props_hash.keys
|
34
|
+
end
|
35
|
+
|
36
|
+
def method_missing(prop_name, *args, &block)
|
37
|
+
return @props_hash[prop_name] if @props_hash.key?(prop_name)
|
38
|
+
super(prop_name, *args, &block)
|
39
|
+
end
|
40
|
+
|
41
|
+
def set(prop_name, value)
|
42
|
+
@props_hash[prop_name] = value
|
43
|
+
end
|
44
|
+
|
45
|
+
def to_json
|
46
|
+
JSON.dump(to_transport)
|
47
|
+
end
|
48
|
+
|
49
|
+
def to_n
|
50
|
+
@props_hash.to_n
|
51
|
+
end
|
52
|
+
else # RUBY_ENGINE
|
53
|
+
def [](prop_name)
|
54
|
+
name = prop_name.to_sym
|
55
|
+
return @props_hash[name] if @props_hash.key?(name)
|
56
|
+
name = prop_name.to_s
|
57
|
+
return @props_hash[name] if @props_hash.key?(name)
|
58
|
+
nil
|
59
|
+
end
|
60
|
+
|
61
|
+
def []=(prop_name, value)
|
62
|
+
@props_hash[prop_name.to_sym] = value
|
63
|
+
end
|
64
|
+
|
65
|
+
def key?(prop_name)
|
66
|
+
@props_hash.key?(prop_name.to_sym) || @props_hash.key?(prop_name.to_s)
|
67
|
+
end
|
68
|
+
|
69
|
+
def keys
|
70
|
+
@props_hash.keys.map(&:to_sym)
|
71
|
+
end
|
72
|
+
|
73
|
+
def method_missing(prop_name, *args, &block)
|
74
|
+
name = prop_name.to_sym
|
75
|
+
return @props_hash[name] if @props_hash.key?(name)
|
76
|
+
name = prop_name.to_s
|
77
|
+
return @props_hash[name] if @props_hash.key?(name)
|
78
|
+
super(prop_name, *args, &block)
|
79
|
+
end
|
80
|
+
|
81
|
+
def set(prop_name, value)
|
82
|
+
@props_hash[prop_name.to_sym] = value
|
83
|
+
end
|
84
|
+
|
85
|
+
def to_json
|
86
|
+
Oj.dump(to_transport, mode: :strict)
|
87
|
+
end
|
88
|
+
|
89
|
+
def to_n
|
90
|
+
@props_hash
|
91
|
+
end
|
92
|
+
end # RUBY_ENGINE
|
93
|
+
|
94
|
+
alias_method :has_key?, :key?
|
95
|
+
end
|
metadata
CHANGED
@@ -1,85 +1,85 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomorfeus-policy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0.rc4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opal
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.3.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: 1.
|
26
|
+
version: 1.3.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: isomorfeus-
|
28
|
+
name: isomorfeus-asset-manager
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.13.9
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 0.13.9
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: isomorfeus-
|
42
|
+
name: isomorfeus-preact
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 10.6.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 10.6.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name: isomorfeus
|
56
|
+
name: isomorfeus-redux
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
62
|
-
type: :
|
61
|
+
version: 4.1.9
|
62
|
+
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.
|
68
|
+
version: 4.1.9
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: isomorfeus
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 2.0.0.rc4
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 2.0.0.rc4
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rake
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 3.
|
103
|
+
version: 3.10.0
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 3.
|
110
|
+
version: 3.10.0
|
111
111
|
description: Policies for Isomorfeus.
|
112
112
|
email: jan@kursator.de
|
113
113
|
executables: []
|
@@ -132,7 +132,7 @@ licenses:
|
|
132
132
|
- MIT
|
133
133
|
metadata:
|
134
134
|
github_repo: ssh://github.com/isomorfeus/gems
|
135
|
-
post_install_message:
|
135
|
+
post_install_message:
|
136
136
|
rdoc_options: []
|
137
137
|
require_paths:
|
138
138
|
- lib
|
@@ -147,8 +147,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
147
|
- !ruby/object:Gem::Version
|
148
148
|
version: 1.3.1
|
149
149
|
requirements: []
|
150
|
-
rubygems_version: 3.
|
151
|
-
signing_key:
|
150
|
+
rubygems_version: 3.2.22
|
151
|
+
signing_key:
|
152
152
|
specification_version: 4
|
153
153
|
summary: Policies for Isomorfeus.
|
154
154
|
test_files: []
|