nexus_cqrs 0.0.8 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/lib/generators/nexus_cqrs/command_generator.rb +1 -1
- data/lib/generators/nexus_cqrs/query_generator.rb +1 -1
- data/lib/nexus_cqrs/base_query_handler.rb +2 -0
- data/lib/nexus_cqrs/command_bus.rb +1 -1
- data/lib/nexus_cqrs/command_executor.rb +1 -1
- data/lib/nexus_cqrs/helpers.rb +5 -1
- data/lib/nexus_cqrs/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cdfe50446a77c51b914898af69e47f8cb90d5bbaf6b952570722bf22c5f1c216
|
4
|
+
data.tar.gz: 50117d1c8c04e2855a966357038ce57c71f39c527b240b36a57c5862058cc64e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c2fce71a6eb75cf91a616dbaea01e6cc572a16d2ddc3d58036b61345e0c10d99120d24c15eb2c2fa02590131d4dc89ba2926ebd722a3d0555ff52de8801015b
|
7
|
+
data.tar.gz: 582a7d078d000a12fe16959bb20da9c4b65770d6dc6c4dc13e9e6f53aa5dce11768ba4b15771dd7e0c9dbec790fe8b547a35c7b38f4f7bd0b44b371395bf3d4d
|
data/.gitignore
CHANGED
@@ -22,7 +22,7 @@ module NexusCqrs
|
|
22
22
|
template('register_cqrs_handlers.rb', handler_config)
|
23
23
|
end
|
24
24
|
|
25
|
-
code_to_inject = "$COMMAND_EXECUTOR.register_command(#{full_name}, #{full_name}Handler)"
|
25
|
+
code_to_inject = "$COMMAND_EXECUTOR.register_command(#{full_name}, #{full_name}Handler.new)\n"
|
26
26
|
|
27
27
|
inject_into_file(handler_config, code_to_inject, after: "# Register Commands\n")
|
28
28
|
end
|
@@ -22,7 +22,7 @@ module NexusCqrs
|
|
22
22
|
template('register_cqrs_handlers.rb', handler_config)
|
23
23
|
end
|
24
24
|
|
25
|
-
code_to_inject = "$QUERY_EXECUTOR.register_command(#{full_name}, #{full_name}Handler)"
|
25
|
+
code_to_inject = "$QUERY_EXECUTOR.register_command(#{full_name}, #{full_name}Handler.new)\n"
|
26
26
|
|
27
27
|
inject_into_file(handler_config, code_to_inject, after: "# Register Queries\n")
|
28
28
|
end
|
@@ -20,7 +20,7 @@ module NexusCqrs
|
|
20
20
|
unregistered_handler = proc { raise UnregisteredHandler, "Missing handler for #{command.class}" }
|
21
21
|
|
22
22
|
handlers
|
23
|
-
.fetch(command.class, &unregistered_handler)
|
23
|
+
.fetch(command.class.name, &unregistered_handler)
|
24
24
|
.call(command)
|
25
25
|
end
|
26
26
|
|
data/lib/nexus_cqrs/helpers.rb
CHANGED
@@ -7,12 +7,16 @@ module NexusCqrs
|
|
7
7
|
|
8
8
|
# Executes a CQRS Query
|
9
9
|
def query(query)
|
10
|
-
|
10
|
+
query_executor.execute(query)
|
11
11
|
end
|
12
12
|
|
13
13
|
# Provide access to the CQRS executor
|
14
14
|
def command_executor
|
15
15
|
@command_executor ||= $COMMAND_EXECUTOR
|
16
16
|
end
|
17
|
+
|
18
|
+
def query_executor
|
19
|
+
@query_executor ||= $QUERY_EXECUTOR
|
20
|
+
end
|
17
21
|
end
|
18
22
|
end
|
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.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dean Lovett
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|