aggregate_root 0.40.0 → 0.40.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6af35e06f7f261f5275b2e0f74b4abba41d7437a94d9527d66e7add0bf6d3788
4
- data.tar.gz: fe132199dc2121bdb0bf5aa2591714aab84553a90a270307f79890b0276fca6a
3
+ metadata.gz: e63fa532bbaf6927f588d0cd50b2c89abc7b9f6ecedc287705f7d53340167101
4
+ data.tar.gz: 2e6f68ea32c8d440bae1737003bf80b212fa8941bd1fe89295b5d430530088d9
5
5
  SHA512:
6
- metadata.gz: 7157ba51608adc985fe90e595c7413b20ff15445d7c0830f05199c130f9449a4ac3f566b616beade6c19c4511168b078603f37e1dd79a4818f89c426c7b2f4fe
7
- data.tar.gz: 50fe99d76b6073c9068a0cb93dd6775839cda59aed9a4f761adaa097b11316e9e3c19dffd94102b6fdc75cf769f055977b1a5ee67752e18bdc577bb78de3b960
6
+ metadata.gz: 14630172c9ac1989c25faad5fd9044e983f5d6ab367f2833250aae5fd4739105acf6efbabab33965cb9495d4d8fff6fd681a9d33ea046e781a3c8b5200c43acc
7
+ data.tar.gz: eaab3e9575870575622285a2602295512ec9390158b31cf8c1250a8b324ce3ed89f4af9b076f437a3065163c3f50313da19fbaa0fabe3bc84612cfcc233acec6
@@ -25,5 +25,5 @@ Gem::Specification.new do |spec|
25
25
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
26
  spec.require_paths = ['lib']
27
27
 
28
- spec.add_dependency 'ruby_event_store', '= 0.40.0'
28
+ spec.add_dependency 'ruby_event_store', '= 0.40.1'
29
29
  end
@@ -8,10 +8,12 @@ require 'aggregate_root/instrumented_repository'
8
8
 
9
9
  module AggregateRoot
10
10
  module OnDSL
11
+ ANONYMOUS_CLASS = "#<Class:".freeze
12
+
11
13
  def on(*event_klasses, &block)
12
14
  event_klasses.each do |event_klass|
13
15
  name = event_klass.to_s
14
- raise(ArgumentError, "Anonymous class is missing name") if name.start_with? "#<Class:"
16
+ raise(ArgumentError, "Anonymous class is missing name") if name.start_with? ANONYMOUS_CLASS
15
17
  handler_name = "on_#{name}"
16
18
  define_method(handler_name, &block)
17
19
  @on_methods ||= {}
@@ -27,8 +29,8 @@ module AggregateRoot
27
29
  end
28
30
 
29
31
  module Constructor
30
- def new
31
- super().tap do |instance|
32
+ def new(*)
33
+ super.tap do |instance|
32
34
  instance.instance_variable_set(:@version, -1)
33
35
  instance.instance_variable_set(:@unpublished_events, [])
34
36
  end
@@ -1,3 +1,3 @@
1
1
  module AggregateRoot
2
- VERSION = "0.40.0"
2
+ VERSION = "0.40.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aggregate_root
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.40.0
4
+ version: 0.40.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arkency
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-06-25 00:00:00.000000000 Z
11
+ date: 2019-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby_event_store
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.40.0
19
+ version: 0.40.1
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: 0.40.0
26
+ version: 0.40.1
27
27
  description: Event sourced (with Rails Event Store) aggregate root implementation
28
28
  email:
29
29
  - dev@arkency.com
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0'
68
68
  requirements: []
69
- rubygems_version: 3.0.1
69
+ rubygems_version: 3.0.3
70
70
  signing_key:
71
71
  specification_version: 4
72
72
  summary: Event sourced (with Rails Event Store) aggregate root implementation