nexus_cqrs 0.0.4 → 0.0.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a0ab24d08b1c4793fef6e3834988672a80f16ebb82d6dbda3d5541c924b8c831
4
- data.tar.gz: ba846c3ce5ca8ca11254ad1521fe89498bed086f3fe1728bc8712343e7352962
3
+ metadata.gz: 847a980fa9ad933433817673a5a306453b7e293a38a41c12e355dd5f4d1e991e
4
+ data.tar.gz: e1041424ef479676ca5fddb56c503f7b353dd40f9f1220335842e1e1fb443524
5
5
  SHA512:
6
- metadata.gz: 94e1db49bdbe1d8a03e4341d95d88c4abd42c9c38be178ad85f813095dded808fa9a76b51b32a95d40886666d9208d2f3f74ce21936e8dda8b48b7fe34a87dee
7
- data.tar.gz: f560cb815379e847dd6cb347346d0eefdefda8234b8aa0ae146114b85be4109af81f6436e65e699a2a51da8219e7baa0dcebd5758ced123a54e47a44c7006a46
6
+ metadata.gz: aa430242485a2080a494b26805dc0d36f437625494dda151757418006f929f8cce1ad937cc31bc1f1f763fd46e1e7598cfb09f65bb93d7349a135e3e63083e7f
7
+ data.tar.gz: 8f41e2f25102d6ccf1d220054f7ea5885217fe337e5c066489895920a65697b8d1f2a15040588f441754cfccc5390e9ed98100698d47de82b12a31d40d34772f
@@ -16,7 +16,7 @@ module NexusCqrs
16
16
  template "register_cqrs_handlers.rb", handler_config
17
17
  end
18
18
 
19
- inject_into_file handler_config, " do_stuff(foo)\n"
19
+ inject_into_file handler_config, "$QUERY_EXECUTOR.register_command(Queries::Stripe::GetCustomerById, Queries::Stripe::GetCustomerByIdHandler)", after: "# Register Commands"
20
20
  end
21
21
  end
22
22
  end
@@ -1,4 +1,9 @@
1
1
  command_bus = NexusCqrs::CommandBus.new
2
2
  query_bus = NexusCqrs::CommandBus.new
3
3
 
4
- $CQRS_EXECUTOR = NexusCqrs::CommandExecutor.new command_bus
4
+ $COMMAND_EXECUTOR = NexusCqrs::CommandExecutor.new command_bus
5
+ $QUERY_EXECUTOR = NexusCqrs::CommandExecutor.new query_bus
6
+
7
+ # Register Queries
8
+
9
+ # Register Commands
@@ -2,17 +2,12 @@ module NexusCqrs
2
2
  module Helpers
3
3
  # Executes a CQRS Command
4
4
  def execute(command)
5
- command_executor.execute(command)
5
+ $COMMAND_EXECUTOR.execute(command)
6
6
  end
7
7
 
8
8
  # Executes a CQRS Query
9
9
  def query(query)
10
- command_executor.execute(query)
11
- end
12
-
13
- # Provide access to the CQRS executor
14
- def command_executor
15
- @command_executor ||= NexusCqrs::CommandExecutor.new
10
+ $QUERY_EXECUTOR.execute(query)
16
11
  end
17
12
  end
18
13
  end
@@ -1,3 +1,3 @@
1
1
  module NexusCqrs
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexus_cqrs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dean Lovett