rails_event_store 0.40.1 → 0.41.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +6 -1
- data/lib/rails_event_store.rb +2 -0
- data/lib/rails_event_store/active_job_scheduler.rb +2 -0
- data/lib/rails_event_store/after_commit_async_dispatcher.rb +8 -6
- data/lib/rails_event_store/all.rb +2 -0
- data/lib/rails_event_store/async_handler_helpers.rb +2 -0
- data/lib/rails_event_store/browser.rb +2 -0
- data/lib/rails_event_store/client.rb +2 -0
- data/lib/rails_event_store/link_by_metadata.rb +2 -0
- data/lib/rails_event_store/middleware.rb +2 -0
- data/lib/rails_event_store/railtie.rb +2 -0
- data/lib/rails_event_store/version.rb +3 -1
- data/rails_event_store.gemspec +5 -5
- metadata +14 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 638bf6a3b2b4323d1f84d5c2341c72b50d96fc0ae73568a7dc3d8ce6f30b4555
|
4
|
+
data.tar.gz: 710025e875bc1f8ad21b1772bfb4d5d895a5e49367653ce6040c916b3e00e3f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6c8c8a7528df79051b9c1a5482dbe4e923bb16bb1fefdf315d020e046595edbcfda3fbf5fcc9b8409e66cef2d81202a39114644297359820172fc4d36916142
|
7
|
+
data.tar.gz: 35cf8e9e68c8e8b2f912d532bf584bbcab74008857aa177cf1c239d7aa5ac75a53b0ce503154d7bf198b91b6a221c76a94ac9419f464e262e839facfaf3ce395
|
data/Gemfile
CHANGED
@@ -11,8 +11,13 @@ gem 'aggregate_root', path: '../aggregate_root'
|
|
11
11
|
gem 'bounded_context', path: '../bounded_context'
|
12
12
|
gem 'protobuf_nested_struct'
|
13
13
|
gem 'sidekiq'
|
14
|
-
gem 'sqlite3', '1.3.13'
|
15
14
|
gem 'rack-test'
|
16
15
|
gem 'google-protobuf', '~> 3.7.0'
|
17
16
|
gem 'pry'
|
18
17
|
gem 'rails', ENV['RAILS_VERSION']
|
18
|
+
|
19
|
+
if Gem::Version.new(ENV['RAILS_VERSION']) >= Gem::Version.new('6.0.0.rc1')
|
20
|
+
gem 'sqlite3', '1.4.1'
|
21
|
+
else
|
22
|
+
gem 'sqlite3', '1.3.13'
|
23
|
+
end
|
data/lib/rails_event_store.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module RailsEventStore
|
2
4
|
class AfterCommitAsyncDispatcher
|
3
5
|
def initialize(scheduler:)
|
@@ -11,11 +13,12 @@ module RailsEventStore
|
|
11
13
|
end
|
12
14
|
|
13
15
|
def run(&schedule_proc)
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
transaction = ActiveRecord::Base.connection.current_transaction
|
17
|
+
|
18
|
+
if transaction.joinable?
|
19
|
+
transaction.add_record(
|
20
|
+
AsyncRecord.new(self, schedule_proc)
|
21
|
+
)
|
19
22
|
else
|
20
23
|
yield
|
21
24
|
end
|
@@ -25,7 +28,6 @@ module RailsEventStore
|
|
25
28
|
@scheduler.verify(subscriber)
|
26
29
|
end
|
27
30
|
|
28
|
-
private
|
29
31
|
class AsyncRecord
|
30
32
|
def initialize(dispatcher, schedule_proc)
|
31
33
|
@dispatcher = dispatcher
|
data/rails_event_store.gemspec
CHANGED
@@ -25,11 +25,11 @@ 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.
|
29
|
-
spec.add_dependency 'ruby_event_store-browser', '= 0.
|
30
|
-
spec.add_dependency 'rails_event_store_active_record', '= 0.
|
31
|
-
spec.add_dependency 'aggregate_root', '= 0.
|
32
|
-
spec.add_dependency 'bounded_context', '= 0.
|
28
|
+
spec.add_dependency 'ruby_event_store', '= 0.41.0'
|
29
|
+
spec.add_dependency 'ruby_event_store-browser', '= 0.41.0'
|
30
|
+
spec.add_dependency 'rails_event_store_active_record', '= 0.41.0'
|
31
|
+
spec.add_dependency 'aggregate_root', '= 0.41.0'
|
32
|
+
spec.add_dependency 'bounded_context', '= 0.41.0'
|
33
33
|
spec.add_dependency 'activesupport', '>= 3.0'
|
34
34
|
spec.add_dependency 'activemodel', '>= 3.0'
|
35
35
|
spec.add_dependency 'activejob', '>= 3.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_event_store
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.41.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arkency
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby_event_store
|
@@ -16,70 +16,70 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.41.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: 0.
|
26
|
+
version: 0.41.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: ruby_event_store-browser
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.41.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.41.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rails_event_store_active_record
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.41.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.41.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: aggregate_root
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.41.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: 0.41.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: bounded_context
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.41.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 0.41.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: activesupport
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -182,7 +182,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
182
182
|
- !ruby/object:Gem::Version
|
183
183
|
version: '0'
|
184
184
|
requirements: []
|
185
|
-
|
185
|
+
rubyforge_project:
|
186
|
+
rubygems_version: 2.7.6.2
|
186
187
|
signing_key:
|
187
188
|
specification_version: 4
|
188
189
|
summary: Event Store in Ruby
|