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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 974efd9c3a28ad1bbcd2cfc7ca15251ee09ffae12795c959015c911614109089
4
- data.tar.gz: 44d6fa638694b6298cd90ea0ca4b7d82c840104cb45f74aa0b462299077ee67c
3
+ metadata.gz: 638bf6a3b2b4323d1f84d5c2341c72b50d96fc0ae73568a7dc3d8ce6f30b4555
4
+ data.tar.gz: 710025e875bc1f8ad21b1772bfb4d5d895a5e49367653ce6040c916b3e00e3f9
5
5
  SHA512:
6
- metadata.gz: eff3973ac1bd453600f54a5cb6770670506656c73b94e2b77fcb54d9304d8f7321b4c264b106dd5041f721f5f2ef440d2987bd958d6d6ca8c6d1cd6f533cd7a2
7
- data.tar.gz: 8fa6c6fc9e27fb1147c670943cff5c17a7bedd01550eedd9ebe70857de60d862f6b566fb7a6c440fd42df196baa92c62a28a95bd445f65824943718a31e97ae1
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
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rails_event_store_active_record'
2
4
  require 'rails_event_store/all'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'active_job'
2
4
 
3
5
  module RailsEventStore
@@ -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
- if ActiveRecord::Base.connection.transaction_open?
15
- ActiveRecord::Base.
16
- connection.
17
- current_transaction.
18
- add_record(AsyncRecord.new(self, schedule_proc))
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
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'ruby_event_store'
2
4
  require 'rails_event_store/async_handler_helpers'
3
5
  require 'rails_event_store/link_by_metadata'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RailsEventStore
2
4
  module AsyncHandler
3
5
  def perform(payload)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'ruby_event_store/browser/app'
2
4
 
3
5
  module RailsEventStore
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RailsEventStore
2
4
  class Client < RubyEventStore::Client
3
5
  attr_reader :request_metadata
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RailsEventStore
2
4
 
3
5
  class LinkByMetadata < RubyEventStore::LinkByMetadata
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RailsEventStore
2
4
  class Middleware
3
5
  def initialize(app)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rails/railtie'
2
4
  require 'rails_event_store/middleware'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RailsEventStore
2
- VERSION = "0.40.1"
4
+ VERSION = "0.41.0"
3
5
  end
@@ -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.40.1'
29
- spec.add_dependency 'ruby_event_store-browser', '= 0.40.1'
30
- spec.add_dependency 'rails_event_store_active_record', '= 0.40.1'
31
- spec.add_dependency 'aggregate_root', '= 0.40.1'
32
- spec.add_dependency 'bounded_context', '= 0.40.1'
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.40.1
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-06-27 00:00:00.000000000 Z
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.40.1
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.40.1
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.40.1
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.1
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.40.1
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.40.1
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.40.1
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.40.1
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.40.1
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.40.1
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
- rubygems_version: 3.0.3
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