rails_event_store_active_record 2.5.1 → 2.6.0

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: 69d8d325c5426516fc81d49f88b94755beb1d72abe6b18733dd6a9da982f4ecd
4
- data.tar.gz: 6ecafc5ea5141d1e5ddd294f482bb18728ff70c9b060a6218f7b8aff5801a750
3
+ metadata.gz: 1445359a7bc2b8138812009c8d556e9a6deae03871ac6e7119f2bd987d67f993
4
+ data.tar.gz: 8252c208d67c7ede155d5b26590bff5bc66435b238412f8e64451f331050f4dc
5
5
  SHA512:
6
- metadata.gz: 20efbf78de457111c746532bee384329e08a550e5fd116d4b05ff90c252dd8dd843010eb54b4207b23a63b55b9e3dfcbac3a97291d86239e6bbd034a50cd3aa9
7
- data.tar.gz: ff7baed6e7dbccd3bb99a39d3395f176259f54d0566f890fd72cb324957ecc8fff22a42fa8da6b1f1b0ca2535857a5dc395b89c138760183c0235112a6713632
6
+ metadata.gz: 8e5f036edb8a06087486c6daf13ddb8ce9ebfd80faffd49ee00aeae030438f6c40082f094bed22ba6b03c4a1a9369e236703b0e7406dfe1b8b841ae72a712b11
7
+ data.tar.gz: 403c082973e88aa2a2dc87fe5ea1c2c1b4e9f8c6b622352f79d0fa80d3c7e3ff280f4d5ea9579cf31fec41a5d79b4540048a989a4a114c0e66ec51e4ec7f4262
@@ -7,10 +7,12 @@ module RailsEventStoreActiveRecord
7
7
  self.primary_key = :id
8
8
  self.table_name = "event_store_events"
9
9
  end
10
+ private_constant :Event
10
11
 
11
12
  class EventInStream < ::ActiveRecord::Base
12
13
  self.primary_key = :id
13
14
  self.table_name = "event_store_events_in_streams"
14
15
  belongs_to :event, primary_key: :event_id
15
16
  end
17
+ private_constant :EventInStream
16
18
  end
@@ -27,6 +27,8 @@ module RailsEventStoreActiveRecord
27
27
  end
28
28
 
29
29
  def link_to_stream(event_ids, stream, expected_version)
30
+ return if event_ids.empty?
31
+
30
32
  (event_ids - @event_klass.where(event_id: event_ids).pluck(:event_id)).each do |id|
31
33
  raise RubyEventStore::EventNotFound.new(id)
32
34
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsEventStoreActiveRecord
4
- VERSION = "2.5.1"
4
+ VERSION = "2.6.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_event_store_active_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.1
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arkency
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-24 00:00:00.000000000 Z
11
+ date: 2022-11-29 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: 2.5.1
19
+ version: 2.6.0
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: 2.5.1
26
+ version: 2.6.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activerecord
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  requirements: []
90
- rubygems_version: 3.3.7
90
+ rubygems_version: 3.3.26
91
91
  signing_key:
92
92
  specification_version: 4
93
93
  summary: Persistent event repository implementation for RubyEventStore based on ActiveRecord