rails_event_store 0.35.0 → 0.36.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: 0b01df9d8c09b133625cf97bea208101ecde3c3156a8798292a3c76ede51e5ef
4
- data.tar.gz: 3299f39865d19a86e51fa9272cc3cf3973ea9b0144883150a028bc7ef169611f
3
+ metadata.gz: 1c20aaba4816e987ca65cc62c1d962b2ce453548e54416ea7d53e650539c35a3
4
+ data.tar.gz: a30447805fcdc2558b88082c3773fe0e963636b6ea339e4ab174f83ea9747441
5
5
  SHA512:
6
- metadata.gz: 7d159d028a4d27f5d1bd612cda7c0132075b11cadbb2797dee6c35cd4e4d9518e9cbfd4d8904cf1b07b1120267ea69a325290593346f8aba1ef986308bd8b030
7
- data.tar.gz: 88c9ada926b11c991129d062fcf7a2a6cd6cdca9e3093283fe8f930f508991d1dff940b1572c9ef63533c6ed297e62271d2a44c3ade8de71abc530e5be8adac4
6
+ metadata.gz: ba94e637591672d4abb6dd7b0ace23fa5afd473199c7ec49ea1c3c2b543759369b093a713c0063f65957c6245fc10af0d2c78d77f1dad230d4270d709d253157
7
+ data.tar.gz: 278634acd34f388b78a43ce473883366887269dd2fd9367e57a7ef77c20e87094a06f3b82b65bb93ceca268edde910f49b1cf16db58e6f067a844daeab751634
data/Gemfile CHANGED
@@ -12,6 +12,6 @@ gem 'protobuf_nested_struct'
12
12
  gem 'sidekiq'
13
13
  gem 'sqlite3'
14
14
  gem 'rack-test'
15
- gem 'google-protobuf', '~> 3.5.1.2'
15
+ gem 'google-protobuf', '= 3.6.1', source: 'https://gem.fury.io/pawelpacana/'
16
16
  gem 'pry'
17
17
  gem 'rails', ENV['RAILS_VERSION']
data/Makefile CHANGED
@@ -2,9 +2,7 @@ GEM_VERSION = $(shell cat ../RES_VERSION)
2
2
  GEM_NAME = rails_event_store
3
3
  REQUIRE = $(GEM_NAME)
4
4
  IGNORE = RailsEventStore::Client\#initialize \
5
- RailsEventStore::AfterCommitAsyncDispatcher::AsyncRecord\#rolledback! \
6
- RailsEventStore::AsyncProxyStrategy::AfterCommit* \
7
- RailsEventStore::ActiveJobDispatcher*
5
+ RailsEventStore::AfterCommitAsyncDispatcher::AsyncRecord\#rolledback!
8
6
  SUBJECT ?= RailsEventStore*
9
7
  DATABASE_URL ?= sqlite3::memory:
10
8
 
@@ -1,3 +1,5 @@
1
+ require 'active_job'
2
+
1
3
  module RailsEventStore
2
4
  class ActiveJobScheduler
3
5
  def call(klass, serialized_event)
@@ -32,7 +32,7 @@ module RailsEventStore
32
32
  @schedule_proc = schedule_proc
33
33
  end
34
34
 
35
- def committed!
35
+ def committed!(*)
36
36
  schedule_proc.call
37
37
  end
38
38
 
@@ -1,6 +1,4 @@
1
1
  require 'ruby_event_store'
2
- require 'rails_event_store/async_proxy_strategy'
3
- require 'rails_event_store/active_job_dispatcher'
4
2
  require 'rails_event_store/async_handler_helpers'
5
3
  require 'rails_event_store/link_by_metadata'
6
4
  require 'rails_event_store/after_commit_async_dispatcher'
@@ -26,7 +24,5 @@ module RailsEventStore
26
24
  CorrelatedCommands = RubyEventStore::CorrelatedCommands
27
25
  GLOBAL_STREAM = RubyEventStore::GLOBAL_STREAM
28
26
  PAGE_SIZE = RubyEventStore::PAGE_SIZE
29
- AsyncProxyStrategy::Inline = RubyEventStore::AsyncProxyStrategy::Inline
30
- AsyncDispatcher = RubyEventStore::AsyncDispatcher
31
27
  ImmediateAsyncDispatcher = RubyEventStore::ImmediateAsyncDispatcher
32
28
  end
@@ -1,8 +1,7 @@
1
1
  module RailsEventStore
2
-
3
2
  module AsyncHandler
4
3
  def perform(payload)
5
- super(Rails.configuration.event_store.deserialize(payload))
4
+ super(Rails.configuration.event_store.deserialize(payload.symbolize_keys))
6
5
  end
7
6
  end
8
7
 
@@ -16,5 +15,4 @@ module RailsEventStore
16
15
  end
17
16
  end
18
17
  end
19
-
20
18
  end
@@ -1,3 +1,3 @@
1
1
  module RailsEventStore
2
- VERSION = "0.35.0"
2
+ VERSION = "0.36.0"
3
3
  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.35.0'
29
- spec.add_dependency 'ruby_event_store-browser', '= 0.35.0'
30
- spec.add_dependency 'rails_event_store_active_record', '= 0.35.0'
31
- spec.add_dependency 'aggregate_root', '= 0.35.0'
32
- spec.add_dependency 'bounded_context', '= 0.35.0'
28
+ spec.add_dependency 'ruby_event_store', '= 0.36.0'
29
+ spec.add_dependency 'ruby_event_store-browser', '= 0.36.0'
30
+ spec.add_dependency 'rails_event_store_active_record', '= 0.36.0'
31
+ spec.add_dependency 'aggregate_root', '= 0.36.0'
32
+ spec.add_dependency 'bounded_context', '= 0.36.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.35.0
4
+ version: 0.36.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arkency
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-07 00:00:00.000000000 Z
11
+ date: 2019-01-22 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.35.0
19
+ version: 0.36.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.35.0
26
+ version: 0.36.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.35.0
33
+ version: 0.36.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.35.0
40
+ version: 0.36.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.35.0
47
+ version: 0.36.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.35.0
54
+ version: 0.36.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.35.0
61
+ version: 0.36.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.35.0
68
+ version: 0.36.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.35.0
75
+ version: 0.36.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.35.0
82
+ version: 0.36.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: activesupport
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -148,12 +148,10 @@ files:
148
148
  - Makefile
149
149
  - README.md
150
150
  - lib/rails_event_store.rb
151
- - lib/rails_event_store/active_job_dispatcher.rb
152
151
  - lib/rails_event_store/active_job_scheduler.rb
153
152
  - lib/rails_event_store/after_commit_async_dispatcher.rb
154
153
  - lib/rails_event_store/all.rb
155
154
  - lib/rails_event_store/async_handler_helpers.rb
156
- - lib/rails_event_store/async_proxy_strategy.rb
157
155
  - lib/rails_event_store/browser.rb
158
156
  - lib/rails_event_store/client.rb
159
157
  - lib/rails_event_store/link_by_metadata.rb
@@ -184,8 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
182
  - !ruby/object:Gem::Version
185
183
  version: '0'
186
184
  requirements: []
187
- rubyforge_project:
188
- rubygems_version: 2.7.6
185
+ rubygems_version: 3.0.2
189
186
  signing_key:
190
187
  specification_version: 4
191
188
  summary: Event Store in Ruby
@@ -1,33 +0,0 @@
1
- require 'active_job'
2
-
3
- module RailsEventStore
4
- # @deprecated Use RailsEventStore::ComposedDispatcher and RailsEventStore::ActiveJobScheduler instead
5
- class ActiveJobDispatcher < RubyEventStore::AsyncDispatcher
6
- def initialize(proxy_strategy: AsyncProxyStrategy::Inline.new)
7
- super(proxy_strategy: proxy_strategy, scheduler: ActiveJobScheduler.new)
8
- warn <<~EOW
9
- RailsEventStore::ActiveJobDispatcher has been deprecated.
10
-
11
- Use RailsEventStore::ComposedDispatcher and RailsEventStore::ActiveJobScheduler instead
12
- EOW
13
- end
14
-
15
- # @deprecated Use RailsEventStore::ActiveJobScheduler with RubyEventStore::ImmediateAsyncDispatcher or RailsEventStore::AfterCommitAsyncDispatcher instead
16
- class ActiveJobScheduler
17
- def initialize
18
- warn <<~EOW
19
- RailsEventStore::ActiveJobDispatcher::ActiveJobScheduler has been deprecated.
20
-
21
- Use RailsEventStore::ActiveJobScheduler with RubyEventStore::ImmediateAsyncDispatcher or RailsEventStore::AfterCommitAsyncDispatcher instead
22
- EOW
23
- end
24
- def call(klass, serialized_event)
25
- klass.perform_later(serialized_event.to_h)
26
- end
27
-
28
- def async_handler?(klass)
29
- Class === klass && klass < ActiveJob::Base
30
- end
31
- end
32
- end
33
- end
@@ -1,48 +0,0 @@
1
- module RailsEventStore
2
- module AsyncProxyStrategy
3
- # @deprecated Use RailsEventStore::AfterCommitAsyncDispatcher instead
4
- class AfterCommit
5
- def initialize
6
- warn <<~EOW
7
- RailsEventStore::AsyncProxyStrategy::AfterCommit has been deprecated.
8
-
9
- Use RailsEventStore::AfterCommitAsyncDispatcher instead
10
- EOW
11
- end
12
-
13
- def call(schedule_proc)
14
- if ActiveRecord::Base.connection.transaction_open?
15
- ActiveRecord::Base.
16
- connection.
17
- current_transaction.
18
- add_record(AsyncRecord.new(schedule_proc))
19
- else
20
- schedule_proc.call
21
- end
22
- end
23
-
24
- private
25
- class AsyncRecord
26
- def initialize(schedule_proc)
27
- @schedule_proc = schedule_proc
28
- end
29
-
30
- def committed!
31
- schedule_proc.call
32
- end
33
-
34
- def rolledback!(*)
35
- end
36
-
37
- def before_committed!
38
- end
39
-
40
- def add_to_transaction
41
- AfterCommit.new.call(schedule_proc)
42
- end
43
-
44
- attr_reader :schedule_proc
45
- end
46
- end
47
- end
48
- end