nexus_cqrs 0.4.8 → 0.4.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/Gemfile.lock +58 -56
- data/lib/nexus_cqrs/auth/auth.rb +3 -0
- data/lib/nexus_cqrs/version.rb +2 -2
- 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: 6e8ee5ed4253fc4a5aa94759a8f3c367421b0d7be44d6777c90c276787d9ea4b
|
4
|
+
data.tar.gz: 76b40be983df9643f0a5f3d3e2840680df819d50833705effeff16742169cb47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7adb30cee344cd75643c0a62ccca0731d78e425756a678d079a8e975bf562565f3f1aa10f4a18946117fd2e4bb216ee0b9d5b64c00c756c059c5d9ab4f27457
|
7
|
+
data.tar.gz: cec44e682a10b09e837a98a34b05d25b7b63486c775dafafa8f54880d113d63941199d754d0047f9616db037e6d5b1d37c54a9e45193aa7cee793e55e353ef86
|
data/.rubocop.yml
CHANGED
@@ -2,12 +2,14 @@ inherit_gem:
|
|
2
2
|
rubocop-shopify: rubocop.yml
|
3
3
|
|
4
4
|
AllCops:
|
5
|
+
TargetRubyVersion: 3.2
|
5
6
|
Exclude:
|
6
7
|
- db/schema.rb
|
7
8
|
- db/seeds.rb
|
8
9
|
- db/migrate/*.rb
|
9
10
|
- config/initializers/devise.rb
|
10
11
|
- spec/**/*
|
12
|
+
- lib/generators/nexus_cqrs/templates/*
|
11
13
|
|
12
14
|
Style/Documentation:
|
13
15
|
Enabled: false
|
data/Gemfile.lock
CHANGED
@@ -12,106 +12,108 @@ PATH
|
|
12
12
|
GEM
|
13
13
|
remote: https://rubygems.org/
|
14
14
|
specs:
|
15
|
-
actionpack (
|
16
|
-
actionview (=
|
17
|
-
activesupport (=
|
18
|
-
rack (~> 2.0, >= 2.0
|
15
|
+
actionpack (7.0.4.3)
|
16
|
+
actionview (= 7.0.4.3)
|
17
|
+
activesupport (= 7.0.4.3)
|
18
|
+
rack (~> 2.0, >= 2.2.0)
|
19
19
|
rack-test (>= 0.6.3)
|
20
20
|
rails-dom-testing (~> 2.0)
|
21
21
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
22
|
-
actionview (
|
23
|
-
activesupport (=
|
22
|
+
actionview (7.0.4.3)
|
23
|
+
activesupport (= 7.0.4.3)
|
24
24
|
builder (~> 3.1)
|
25
25
|
erubi (~> 1.4)
|
26
26
|
rails-dom-testing (~> 2.0)
|
27
27
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
28
|
-
activesupport (
|
28
|
+
activesupport (7.0.4.3)
|
29
29
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
30
30
|
i18n (>= 1.6, < 2)
|
31
31
|
minitest (>= 5.1)
|
32
32
|
tzinfo (~> 2.0)
|
33
|
-
zeitwerk (~> 2.3)
|
34
33
|
ast (2.4.2)
|
35
34
|
builder (3.2.4)
|
36
|
-
concurrent-ruby (1.
|
35
|
+
concurrent-ruby (1.2.2)
|
37
36
|
crass (1.0.6)
|
38
|
-
diff-lcs (1.
|
39
|
-
erubi (1.
|
37
|
+
diff-lcs (1.5.0)
|
38
|
+
erubi (1.12.0)
|
40
39
|
generator_spec (0.9.4)
|
41
40
|
activesupport (>= 3.0.0)
|
42
41
|
railties (>= 3.0.0)
|
43
|
-
i18n (1.
|
42
|
+
i18n (1.12.0)
|
44
43
|
concurrent-ruby (~> 1.0)
|
45
44
|
ibsciss-middleware (0.4.2)
|
46
|
-
|
45
|
+
json (2.6.3)
|
46
|
+
loofah (2.20.0)
|
47
47
|
crass (~> 1.0.2)
|
48
48
|
nokogiri (>= 1.5.9)
|
49
49
|
method_source (1.0.0)
|
50
|
-
mini_portile2 (2.
|
51
|
-
minitest (5.
|
52
|
-
nokogiri (1.
|
53
|
-
mini_portile2 (~> 2.
|
50
|
+
mini_portile2 (2.8.1)
|
51
|
+
minitest (5.18.0)
|
52
|
+
nokogiri (1.14.2)
|
53
|
+
mini_portile2 (~> 2.8.0)
|
54
54
|
racc (~> 1.4)
|
55
|
-
parallel (1.
|
56
|
-
parser (3.
|
55
|
+
parallel (1.22.1)
|
56
|
+
parser (3.2.2.0)
|
57
57
|
ast (~> 2.4.1)
|
58
|
-
pundit (2.
|
58
|
+
pundit (2.3.0)
|
59
59
|
activesupport (>= 3.0.0)
|
60
|
-
racc (1.6.
|
61
|
-
rack (2.2.
|
62
|
-
rack-test (
|
63
|
-
rack (>= 1.
|
60
|
+
racc (1.6.2)
|
61
|
+
rack (2.2.6.4)
|
62
|
+
rack-test (2.1.0)
|
63
|
+
rack (>= 1.3)
|
64
64
|
rails-dom-testing (2.0.3)
|
65
65
|
activesupport (>= 4.2.0)
|
66
66
|
nokogiri (>= 1.6)
|
67
|
-
rails-html-sanitizer (1.
|
68
|
-
loofah (~> 2.
|
69
|
-
railties (
|
70
|
-
actionpack (=
|
71
|
-
activesupport (=
|
67
|
+
rails-html-sanitizer (1.5.0)
|
68
|
+
loofah (~> 2.19, >= 2.19.1)
|
69
|
+
railties (7.0.4.3)
|
70
|
+
actionpack (= 7.0.4.3)
|
71
|
+
activesupport (= 7.0.4.3)
|
72
72
|
method_source
|
73
|
-
rake (>=
|
73
|
+
rake (>= 12.2)
|
74
74
|
thor (~> 1.0)
|
75
|
-
|
75
|
+
zeitwerk (~> 2.5)
|
76
|
+
rainbow (3.1.1)
|
76
77
|
rake (13.0.6)
|
77
|
-
regexp_parser (2.
|
78
|
-
request_store (1.5.
|
78
|
+
regexp_parser (2.7.0)
|
79
|
+
request_store (1.5.1)
|
79
80
|
rack (>= 1.4)
|
80
81
|
rexml (3.2.5)
|
81
|
-
rspec (3.
|
82
|
-
rspec-core (~> 3.
|
83
|
-
rspec-expectations (~> 3.
|
84
|
-
rspec-mocks (~> 3.
|
85
|
-
rspec-core (3.
|
86
|
-
rspec-support (~> 3.
|
87
|
-
rspec-expectations (3.
|
82
|
+
rspec (3.12.0)
|
83
|
+
rspec-core (~> 3.12.0)
|
84
|
+
rspec-expectations (~> 3.12.0)
|
85
|
+
rspec-mocks (~> 3.12.0)
|
86
|
+
rspec-core (3.12.1)
|
87
|
+
rspec-support (~> 3.12.0)
|
88
|
+
rspec-expectations (3.12.2)
|
88
89
|
diff-lcs (>= 1.2.0, < 2.0)
|
89
|
-
rspec-support (~> 3.
|
90
|
-
rspec-mocks (3.
|
90
|
+
rspec-support (~> 3.12.0)
|
91
|
+
rspec-mocks (3.12.5)
|
91
92
|
diff-lcs (>= 1.2.0, < 2.0)
|
92
|
-
rspec-support (~> 3.
|
93
|
-
rspec-support (3.
|
94
|
-
rubocop (1.
|
93
|
+
rspec-support (~> 3.12.0)
|
94
|
+
rspec-support (3.12.0)
|
95
|
+
rubocop (1.50.0)
|
96
|
+
json (~> 2.3)
|
95
97
|
parallel (~> 1.10)
|
96
|
-
parser (>= 3.
|
98
|
+
parser (>= 3.2.0.0)
|
97
99
|
rainbow (>= 2.2.2, < 4.0)
|
98
100
|
regexp_parser (>= 1.8, < 3.0)
|
99
|
-
rexml
|
100
|
-
rubocop-ast (>= 1.
|
101
|
+
rexml (>= 3.2.5, < 4.0)
|
102
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
101
103
|
ruby-progressbar (~> 1.7)
|
102
|
-
unicode-display_width (>=
|
103
|
-
rubocop-ast (1.
|
104
|
-
parser (>= 3.
|
104
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
105
|
+
rubocop-ast (1.28.0)
|
106
|
+
parser (>= 3.2.1.0)
|
105
107
|
rubocop-shopify (1.0.7)
|
106
108
|
rubocop (~> 1.4)
|
107
|
-
ruby-progressbar (1.
|
109
|
+
ruby-progressbar (1.13.0)
|
108
110
|
strings-case (0.3.0)
|
109
|
-
thor (1.1
|
111
|
+
thor (1.2.1)
|
110
112
|
thread_safe (0.3.6)
|
111
|
-
tzinfo (2.0.
|
113
|
+
tzinfo (2.0.6)
|
112
114
|
concurrent-ruby (~> 1.0)
|
113
|
-
unicode-display_width (2.
|
114
|
-
zeitwerk (2.
|
115
|
+
unicode-display_width (2.4.2)
|
116
|
+
zeitwerk (2.6.7)
|
115
117
|
|
116
118
|
PLATFORMS
|
117
119
|
ruby
|
data/lib/nexus_cqrs/auth/auth.rb
CHANGED
@@ -23,6 +23,9 @@ module NexusCqrs
|
|
23
23
|
user = message.metadata[:current_user]
|
24
24
|
global_permissions = message.metadata[:global_permissions]
|
25
25
|
|
26
|
+
# Raise issue if policy class doesn't exist
|
27
|
+
raise Pundit::NotAuthorizedError, query: query, record: record if policy_class.nil?
|
28
|
+
|
26
29
|
# Instantiate new policy class, with context
|
27
30
|
policy = policy_class.new(UserContext.new(user, global_permissions), record)
|
28
31
|
raise Pundit::NotAuthorizedError, query: query, record: record, policy: policy unless policy.public_send(query)
|
data/lib/nexus_cqrs/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nexus_cqrs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dean Lovett
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: generator_spec
|
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
154
|
- !ruby/object:Gem::Version
|
155
155
|
version: '0'
|
156
156
|
requirements: []
|
157
|
-
rubygems_version: 3.
|
157
|
+
rubygems_version: 3.4.11
|
158
158
|
signing_key:
|
159
159
|
specification_version: 4
|
160
160
|
summary: Core package for the nexus cqrs gem
|