nexus_cqrs 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +60 -58
- data/Rakefile +1 -0
- data/bin/console +1 -0
- data/lib/generators/nexus_cqrs/templates/register_cqrs_handlers.rb +0 -1
- data/lib/nexus_cqrs/command_executor.rb +10 -7
- data/lib/nexus_cqrs/version.rb +1 -1
- data/nexus_cqrs.gemspec +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22851e4cf72bdb9d4895163003f9ccaef81182f71ba64de7b9729c80f06ea40b
|
4
|
+
data.tar.gz: a39184dedf35d590ad9b7f3dab51facbd233fd5e9ec7ddeab27c714604c47018
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5dd0e3cf9cb2014329a289bb94a9659144109988775709566996eb69aeaf663cc504ceb9cc83fb33b9e99fe2fc3e424c2584d0269d0b57564cecb148c1e0006c
|
7
|
+
data.tar.gz: 92497f3e118eb6bfad46e842fc0713fb64a8785ac0251296215003449593515c445de351c0afe9ff5f30efb9e5df1e0c4cf72c9c5c486ec253293c0e1e3094d4
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
nexus_cqrs (0.3.
|
4
|
+
nexus_cqrs (0.3.1)
|
5
5
|
generator_spec
|
6
6
|
ibsciss-middleware
|
7
7
|
thread_safe
|
@@ -9,99 +9,101 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
actionpack (6.
|
13
|
-
actionview (= 6.
|
14
|
-
activesupport (= 6.
|
15
|
-
rack (~> 2.0, >= 2.0.
|
12
|
+
actionpack (6.1.4.1)
|
13
|
+
actionview (= 6.1.4.1)
|
14
|
+
activesupport (= 6.1.4.1)
|
15
|
+
rack (~> 2.0, >= 2.0.9)
|
16
16
|
rack-test (>= 0.6.3)
|
17
17
|
rails-dom-testing (~> 2.0)
|
18
18
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
19
|
-
actionview (6.
|
20
|
-
activesupport (= 6.
|
19
|
+
actionview (6.1.4.1)
|
20
|
+
activesupport (= 6.1.4.1)
|
21
21
|
builder (~> 3.1)
|
22
22
|
erubi (~> 1.4)
|
23
23
|
rails-dom-testing (~> 2.0)
|
24
24
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
25
|
-
activesupport (6.
|
25
|
+
activesupport (6.1.4.1)
|
26
26
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
27
|
-
i18n (>=
|
28
|
-
minitest (
|
29
|
-
tzinfo (~>
|
30
|
-
zeitwerk (~> 2.
|
31
|
-
ast (2.4.
|
27
|
+
i18n (>= 1.6, < 2)
|
28
|
+
minitest (>= 5.1)
|
29
|
+
tzinfo (~> 2.0)
|
30
|
+
zeitwerk (~> 2.3)
|
31
|
+
ast (2.4.2)
|
32
32
|
builder (3.2.4)
|
33
|
-
concurrent-ruby (1.1.
|
33
|
+
concurrent-ruby (1.1.9)
|
34
34
|
crass (1.0.6)
|
35
35
|
diff-lcs (1.4.4)
|
36
|
-
erubi (1.
|
36
|
+
erubi (1.10.0)
|
37
37
|
generator_spec (0.9.4)
|
38
38
|
activesupport (>= 3.0.0)
|
39
39
|
railties (>= 3.0.0)
|
40
|
-
i18n (1.8.
|
40
|
+
i18n (1.8.11)
|
41
41
|
concurrent-ruby (~> 1.0)
|
42
42
|
ibsciss-middleware (0.4.2)
|
43
|
-
loofah (2.
|
43
|
+
loofah (2.12.0)
|
44
44
|
crass (~> 1.0.2)
|
45
45
|
nokogiri (>= 1.5.9)
|
46
46
|
method_source (1.0.0)
|
47
|
-
mini_portile2 (2.
|
48
|
-
minitest (5.14.
|
49
|
-
nokogiri (1.
|
50
|
-
mini_portile2 (~> 2.
|
51
|
-
|
52
|
-
|
47
|
+
mini_portile2 (2.6.1)
|
48
|
+
minitest (5.14.4)
|
49
|
+
nokogiri (1.12.5)
|
50
|
+
mini_portile2 (~> 2.6.1)
|
51
|
+
racc (~> 1.4)
|
52
|
+
parallel (1.21.0)
|
53
|
+
parser (3.0.2.0)
|
53
54
|
ast (~> 2.4.1)
|
55
|
+
racc (1.6.0)
|
54
56
|
rack (2.2.3)
|
55
57
|
rack-test (1.1.0)
|
56
58
|
rack (>= 1.0, < 3)
|
57
59
|
rails-dom-testing (2.0.3)
|
58
60
|
activesupport (>= 4.2.0)
|
59
61
|
nokogiri (>= 1.6)
|
60
|
-
rails-html-sanitizer (1.
|
62
|
+
rails-html-sanitizer (1.4.2)
|
61
63
|
loofah (~> 2.3)
|
62
|
-
railties (6.
|
63
|
-
actionpack (= 6.
|
64
|
-
activesupport (= 6.
|
64
|
+
railties (6.1.4.1)
|
65
|
+
actionpack (= 6.1.4.1)
|
66
|
+
activesupport (= 6.1.4.1)
|
65
67
|
method_source
|
66
|
-
rake (>= 0.
|
67
|
-
thor (
|
68
|
+
rake (>= 0.13)
|
69
|
+
thor (~> 1.0)
|
68
70
|
rainbow (3.0.0)
|
69
|
-
rake (13.0.
|
70
|
-
regexp_parser (1.
|
71
|
-
rexml (3.2.
|
72
|
-
rspec (3.
|
73
|
-
rspec-core (~> 3.
|
74
|
-
rspec-expectations (~> 3.
|
75
|
-
rspec-mocks (~> 3.
|
76
|
-
rspec-core (3.
|
77
|
-
rspec-support (~> 3.
|
78
|
-
rspec-expectations (3.
|
71
|
+
rake (13.0.6)
|
72
|
+
regexp_parser (2.1.1)
|
73
|
+
rexml (3.2.5)
|
74
|
+
rspec (3.10.0)
|
75
|
+
rspec-core (~> 3.10.0)
|
76
|
+
rspec-expectations (~> 3.10.0)
|
77
|
+
rspec-mocks (~> 3.10.0)
|
78
|
+
rspec-core (3.10.1)
|
79
|
+
rspec-support (~> 3.10.0)
|
80
|
+
rspec-expectations (3.10.1)
|
79
81
|
diff-lcs (>= 1.2.0, < 2.0)
|
80
|
-
rspec-support (~> 3.
|
81
|
-
rspec-mocks (3.
|
82
|
+
rspec-support (~> 3.10.0)
|
83
|
+
rspec-mocks (3.10.2)
|
82
84
|
diff-lcs (>= 1.2.0, < 2.0)
|
83
|
-
rspec-support (~> 3.
|
84
|
-
rspec-support (3.
|
85
|
-
rubocop (
|
85
|
+
rspec-support (~> 3.10.0)
|
86
|
+
rspec-support (3.10.3)
|
87
|
+
rubocop (1.22.3)
|
86
88
|
parallel (~> 1.10)
|
87
|
-
parser (>=
|
89
|
+
parser (>= 3.0.0.0)
|
88
90
|
rainbow (>= 2.2.2, < 4.0)
|
89
|
-
regexp_parser (>= 1.
|
91
|
+
regexp_parser (>= 1.8, < 3.0)
|
90
92
|
rexml
|
91
|
-
rubocop-ast (>=
|
93
|
+
rubocop-ast (>= 1.12.0, < 2.0)
|
92
94
|
ruby-progressbar (~> 1.7)
|
93
|
-
unicode-display_width (>= 1.4.0, <
|
94
|
-
rubocop-ast (
|
95
|
-
parser (>=
|
96
|
-
rubocop-shopify (1.0.
|
97
|
-
rubocop (
|
98
|
-
ruby-progressbar (1.
|
99
|
-
thor (1.0
|
95
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
96
|
+
rubocop-ast (1.13.0)
|
97
|
+
parser (>= 3.0.1.1)
|
98
|
+
rubocop-shopify (1.0.7)
|
99
|
+
rubocop (~> 1.4)
|
100
|
+
ruby-progressbar (1.11.0)
|
101
|
+
thor (1.1.0)
|
100
102
|
thread_safe (0.3.6)
|
101
|
-
tzinfo (
|
102
|
-
|
103
|
-
unicode-display_width (1.
|
104
|
-
zeitwerk (2.
|
103
|
+
tzinfo (2.0.4)
|
104
|
+
concurrent-ruby (~> 1.0)
|
105
|
+
unicode-display_width (2.1.0)
|
106
|
+
zeitwerk (2.5.1)
|
105
107
|
|
106
108
|
PLATFORMS
|
107
109
|
ruby
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
@@ -7,16 +7,15 @@ module NexusCqrs
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def autoregister(base_class, dir = 'app/domain/commands', ignore_strings = ['.rb', 'app/domain/'])
|
10
|
-
|
11
10
|
# Iterate over the director passed and find all ruby files, removing unwanted parts of the string.
|
12
11
|
Dir["#{dir}/*.rb"].each do |file|
|
13
|
-
ignore_strings.each
|
12
|
+
ignore_strings.each do |i|
|
14
13
|
file.slice!(i)
|
15
|
-
|
14
|
+
end
|
16
15
|
begin
|
17
16
|
# Constantize class name to constant to force rails to autoload this class
|
18
17
|
file.camelize.constantize
|
19
|
-
rescue NameError
|
18
|
+
rescue NameError
|
20
19
|
puts "WARN: Tried to autoregister #{file.camelize} but class could not be found"
|
21
20
|
end
|
22
21
|
end
|
@@ -25,15 +24,19 @@ module NexusCqrs
|
|
25
24
|
handler_name = (c.to_s + "Handler")
|
26
25
|
begin
|
27
26
|
handler = handler_name.constantize.new
|
28
|
-
rescue NameError
|
29
|
-
Rails.logger.error
|
27
|
+
rescue NameError
|
28
|
+
Rails.logger.error(
|
29
|
+
"WARN: A command `#{c}` tried to autoregister `#{handler_name}` but the class was not found"
|
30
|
+
)
|
30
31
|
next
|
31
32
|
end
|
32
33
|
|
33
34
|
if handler.respond_to?(:call)
|
34
35
|
register_command(c, handler)
|
35
36
|
else
|
36
|
-
Rails.logger.error
|
37
|
+
Rails.logger.error(
|
38
|
+
"WARN: A command `#{c}` tried to autoregister `#{handler_name}` but `call` method did not exist"
|
39
|
+
)
|
37
40
|
end
|
38
41
|
end
|
39
42
|
end
|
data/lib/nexus_cqrs/version.rb
CHANGED
data/nexus_cqrs.gemspec
CHANGED