rails_event_store 1.3.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6c1aeaddb960c56b5f24a99e31da93e6e2283cd94ff97fa10839183979ea8dc
4
- data.tar.gz: d3e46d36ca1ea8453a9b1c7e3470f2081eca5fc3603e9ad89370c5376fdbe059
3
+ metadata.gz: 586675e2b2821f83f1366522b755fe53d2d117c2f11b018e0b2f51ca2293801c
4
+ data.tar.gz: dc24606c67dcca51a3b34f64e04daaaea80c849c3df82f078dcc3811bf766b10
5
5
  SHA512:
6
- metadata.gz: a40bbe84e3196bc5015c5530776b6c0dfefe02aa9e865a5a7947364ea8a6dd2c0092a4d46e45927de2e682ccda317e278d13010131b73ee72ee59d3c4a1ff136
7
- data.tar.gz: 4255e9fdd1033fb05c748aac6341203356cf5726afabf008056778639901c6593c237a3fb2394c735039ca2a0b5d603d0f8956cf0e2d07b4a5b51c8063578852
6
+ metadata.gz: a53fe7ba30c8b43bc2ff1f8e7d391a99e5992464d12d9396f632861e4a78e3eda9dbeb03fae1908d648dc07258a621225cce896ed2ad5c057aa34250646a4bcd
7
+ data.tar.gz: 2ca555bfc94f13a69ce5214eba73ddc447072b56c70485b8c64efbcca264aa88efa735784287584d5354977b60d4b95d0f724c1738655e42abd264680e35cf8c
data/README.md CHANGED
@@ -1,3 +1,7 @@
1
1
  # RailsEventStore
2
2
 
3
- Rails wrapper for Ruby Event Store with batteries included.
3
+ Rails wrapper for RubyEventStore with batteries included.
4
+
5
+ Ships with asynchronous after-commit event dispatch on top of ActiveJob, ActiveSupport::Notifications instrumentation enabled, request metadata enrichment and opinionated directory structure generator for bounded contexts.
6
+
7
+ Find out more at [https://railseventstore.org](https://railseventstore.org/)
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rails/generators'
4
+
5
+ module RailsEventStore
6
+ module Generators
7
+ class BoundedContextGenerator < Rails::Generators::NamedBase
8
+ source_root File.expand_path(File.join(File.dirname(__FILE__), '../templates'))
9
+ hook_for :test_framework
10
+
11
+ def create_bounded_context
12
+ create_file "#{bounded_context_name}/lib/#{bounded_context_name}/.keep"
13
+
14
+ template "module.rb", "#{bounded_context_name}/lib/#{bounded_context_name}.rb"
15
+
16
+ application do
17
+ "config.paths.add '#{bounded_context_name}/lib', eager_load: true"
18
+ end
19
+ end
20
+
21
+ private
22
+
23
+ def bounded_context_namespace
24
+ name.camelize
25
+ end
26
+
27
+ def bounded_context_name
28
+ name.underscore
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rails/generators'
4
+
5
+ module RailsEventStore
6
+ module Generators
7
+ class RspecGenerator < Rails::Generators::NamedBase
8
+ source_root File.expand_path(File.join(File.dirname(__FILE__), '../templates'))
9
+
10
+ def spec_helper
11
+ template "spec_helper.rb", "#{bounded_context_name}/spec/spec_helper.rb"
12
+ end
13
+
14
+ def bc_spec
15
+ template "bc_spec.rb", "#{bounded_context_name}/spec/#{bounded_context_name}_spec.rb"
16
+ end
17
+
18
+ def require_bc_spec
19
+ template "require_bc_spec.rb", "spec/#{bounded_context_name}_spec.rb"
20
+ end
21
+
22
+ private
23
+
24
+ def bounded_context_namespace
25
+ name.camelize
26
+ end
27
+
28
+ def bounded_context_name
29
+ name.underscore
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rails/generators'
4
+
5
+ module RailsEventStore
6
+ module Generators
7
+ class TestUnitGenerator < Rails::Generators::NamedBase
8
+ source_root File.expand_path(File.join(File.dirname(__FILE__), '../templates'))
9
+
10
+ def test_helper
11
+ template "test_helper.rb", "#{bounded_context_name}/test/test_helper.rb"
12
+ end
13
+
14
+ private
15
+
16
+ def bounded_context_name
17
+ name.underscore
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,4 @@
1
+ require_relative 'spec_helper'
2
+
3
+ RSpec.describe <%= bounded_context_namespace %> do
4
+ end
@@ -0,0 +1,2 @@
1
+ module <%= bounded_context_namespace %>
2
+ end
@@ -0,0 +1,6 @@
1
+ require 'rails_helper'
2
+
3
+ path = Rails.root.join('<%= bounded_context_name %>/spec')
4
+ Dir.glob("#{path}/**/*_spec.rb") do |file|
5
+ require file
6
+ end
@@ -0,0 +1,7 @@
1
+ ENV['RAILS_ENV'] = 'test'
2
+
3
+ $LOAD_PATH.push File.expand_path('../../../spec', __FILE__)
4
+ require File.expand_path('../../../config/environment', __FILE__)
5
+ require File.expand_path('../../../spec/rails_helper', __FILE__)
6
+
7
+ require_relative '../lib/<%= bounded_context_name %>'
@@ -0,0 +1 @@
1
+ require_relative '../lib/<%= bounded_context_name %>'
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'rails_event_store_active_record'
4
- require 'rails_event_store/all'
4
+ require_relative 'rails_event_store/all'
@@ -4,12 +4,19 @@ require 'active_job'
4
4
 
5
5
  module RailsEventStore
6
6
  class ActiveJobScheduler
7
- def call(klass, serialized_event)
8
- klass.perform_later(serialized_event.to_h)
7
+ def initialize(serializer:)
8
+ @serializer = serializer
9
+ end
10
+
11
+ def call(klass, record)
12
+ klass.perform_later(record.serialize(serializer).to_h)
9
13
  end
10
14
 
11
15
  def verify(subscriber)
12
16
  Class === subscriber && !!(subscriber < ActiveJob::Base)
13
17
  end
18
+
19
+ private
20
+ attr_reader :serializer
14
21
  end
15
22
  end
@@ -6,9 +6,9 @@ module RailsEventStore
6
6
  @scheduler = scheduler
7
7
  end
8
8
 
9
- def call(subscriber, _, serialized_event)
9
+ def call(subscriber, _, record)
10
10
  run do
11
- @scheduler.call(subscriber, serialized_event)
11
+ @scheduler.call(subscriber, record)
12
12
  end
13
13
  end
14
14
 
@@ -1,14 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'ruby_event_store'
4
- require 'rails_event_store/async_handler_helpers'
5
- require 'rails_event_store/link_by_metadata'
6
- require 'rails_event_store/after_commit_async_dispatcher'
7
- require 'rails_event_store/active_job_scheduler'
8
- require 'rails_event_store/client'
9
- require 'rails_event_store/version'
10
- require 'rails_event_store/railtie'
11
- require 'rails_event_store/browser'
4
+ require_relative 'async_handler_helpers'
5
+ require_relative 'link_by_metadata'
6
+ require_relative 'after_commit_async_dispatcher'
7
+ require_relative 'active_job_scheduler'
8
+ require_relative 'client'
9
+ require_relative 'version'
10
+ require_relative 'railtie'
11
+ require_relative 'browser'
12
12
 
13
13
  module RailsEventStore
14
14
  Event = RubyEventStore::Event
@@ -2,8 +2,24 @@
2
2
 
3
3
  module RailsEventStore
4
4
  module AsyncHandler
5
- def perform(payload)
6
- super(Rails.configuration.event_store.deserialize(**payload.symbolize_keys))
5
+ def self.with_defaults
6
+ Module.new do
7
+ def self.prepended(host_class)
8
+ host_class.prepend AsyncHandler.with
9
+ end
10
+ end
11
+ end
12
+
13
+ def self.with(event_store: Rails.configuration.event_store, serializer: YAML)
14
+ Module.new do
15
+ define_method :perform do |payload|
16
+ super(event_store.deserialize(serializer: serializer, **payload.symbolize_keys))
17
+ end
18
+ end
19
+ end
20
+
21
+ def self.prepended(host_class)
22
+ host_class.prepend with_defaults
7
23
  end
8
24
  end
9
25
 
@@ -4,16 +4,20 @@ module RailsEventStore
4
4
  class Client < RubyEventStore::Client
5
5
  attr_reader :request_metadata
6
6
 
7
- def initialize(repository: RailsEventStoreActiveRecord::EventRepository.new,
8
- mapper: RubyEventStore::Mappers::Default.new,
7
+ def initialize(mapper: RubyEventStore::Mappers::Default.new,
8
+ repository: RailsEventStoreActiveRecord::EventRepository.new(serializer: YAML),
9
9
  subscriptions: RubyEventStore::Subscriptions.new,
10
10
  dispatcher: RubyEventStore::ComposedDispatcher.new(
11
- RubyEventStore::ImmediateAsyncDispatcher.new(scheduler: ActiveJobScheduler.new),
11
+ RailsEventStore::AfterCommitAsyncDispatcher.new(scheduler: ActiveJobScheduler.new(serializer: YAML)),
12
12
  RubyEventStore::Dispatcher.new),
13
+ clock: default_clock,
14
+ correlation_id_generator: default_correlation_id_generator,
13
15
  request_metadata: default_request_metadata)
14
16
  super(repository: RubyEventStore::InstrumentedRepository.new(repository, ActiveSupport::Notifications),
15
17
  mapper: RubyEventStore::Mappers::InstrumentedMapper.new(mapper, ActiveSupport::Notifications),
16
18
  subscriptions: subscriptions,
19
+ clock: clock,
20
+ correlation_id_generator: correlation_id_generator,
17
21
  dispatcher: RubyEventStore::InstrumentedDispatcher.new(dispatcher, ActiveSupport::Notifications)
18
22
  )
19
23
  @request_metadata = request_metadata
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'rails/railtie'
4
- require 'rails_event_store/middleware'
4
+ require_relative 'middleware'
5
5
 
6
6
  module RailsEventStore
7
7
  class Railtie < ::Rails::Railtie
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsEventStore
4
- VERSION = "1.3.0"
4
+ VERSION = "2.2.0"
5
5
  end
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: 1.3.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arkency
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-15 00:00:00.000000000 Z
11
+ date: 2021-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby_event_store
@@ -16,70 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.3.0
19
+ version: 2.2.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: 1.3.0
26
+ version: 2.2.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: 1.3.0
33
+ version: 2.2.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: 1.3.0
40
+ version: 2.2.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: 1.3.0
47
+ version: 2.2.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: 1.3.0
54
+ version: 2.2.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: 1.3.0
61
+ version: 2.2.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: 1.3.0
69
- - !ruby/object:Gem::Dependency
70
- name: bounded_context
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - '='
74
- - !ruby/object:Gem::Version
75
- version: 1.3.0
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - '='
81
- - !ruby/object:Gem::Version
82
- version: 1.3.0
68
+ version: 2.2.0
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: activesupport
85
71
  requirement: !ruby/object:Gem::Requirement
@@ -136,17 +122,25 @@ dependencies:
136
122
  - - ">="
137
123
  - !ruby/object:Gem::Version
138
124
  version: '0.4'
139
- description: Implementation of Event Store in Ruby
140
- email:
141
- - dev@arkency.com
125
+ description: |
126
+ Rails wrapper for RubyEventStore with batteries included. Ships with asynchronous after-commit event dispatch
127
+ on top of ActiveJob, ActiveSupport::Notifications instrumentation enabled, request metadata enrichment
128
+ and opinionated directory structure generator for bounded contexts.
129
+ email: dev@arkency.com
142
130
  executables: []
143
131
  extensions: []
144
- extra_rdoc_files: []
132
+ extra_rdoc_files:
133
+ - README.md
145
134
  files:
146
- - CHANGELOG.md
147
- - Gemfile
148
- - Makefile
149
135
  - README.md
136
+ - lib/generators/rails_event_store/bounded_context_generator.rb
137
+ - lib/generators/rails_event_store/rspec_generator.rb
138
+ - lib/generators/rails_event_store/test_unit_generator.rb
139
+ - lib/generators/templates/bc_spec.rb
140
+ - lib/generators/templates/module.rb
141
+ - lib/generators/templates/require_bc_spec.rb
142
+ - lib/generators/templates/spec_helper.rb
143
+ - lib/generators/templates/test_helper.rb
150
144
  - lib/rails_event_store.rb
151
145
  - lib/rails_event_store/active_job_scheduler.rb
152
146
  - lib/rails_event_store/after_commit_async_dispatcher.rb
@@ -158,12 +152,11 @@ files:
158
152
  - lib/rails_event_store/middleware.rb
159
153
  - lib/rails_event_store/railtie.rb
160
154
  - lib/rails_event_store/version.rb
161
- - rails_event_store.gemspec
162
155
  homepage: https://railseventstore.org
163
156
  licenses:
164
157
  - MIT
165
158
  metadata:
166
- homepage_uri: https://railseventstore.org/
159
+ homepage_uri: https://railseventstore.org
167
160
  changelog_uri: https://github.com/RailsEventStore/rails_event_store/releases
168
161
  source_code_uri: https://github.com/RailsEventStore/rails_event_store
169
162
  bug_tracker_uri: https://github.com/RailsEventStore/rails_event_store/issues
@@ -175,7 +168,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
175
168
  requirements:
176
169
  - - ">="
177
170
  - !ruby/object:Gem::Version
178
- version: '0'
171
+ version: '2.6'
179
172
  required_rubygems_version: !ruby/object:Gem::Requirement
180
173
  requirements:
181
174
  - - ">="
@@ -185,5 +178,5 @@ requirements: []
185
178
  rubygems_version: 3.1.4
186
179
  signing_key:
187
180
  specification_version: 4
188
- summary: Event Store in Ruby
181
+ summary: Rails wrapper for RubyEventStore with batteries included
189
182
  test_files: []
data/CHANGELOG.md DELETED
@@ -1,159 +0,0 @@
1
- Further changes can be tracked at [releases page](https://github.com/RailsEventStore/rails_event_store/releases).
2
-
3
- ### 0.14.5 (24.08.2017)
4
-
5
- * Change: ruby_event_store updated to 0.14.0
6
-
7
- ### 0.14.4 (18.08.2017)
8
-
9
- * Change: rails_event_store_active_record updated to 0.6.11
10
- * Fix: Explicit order when querying forward. Leaving it implcit to database engine choice gives different results on different engines.
11
- * Fix: Explicitly require railtie to load middleware in Rails to enrich event metadata with request metadata (PR #65)
12
-
13
- ### 0.14.3 (24.11.2016)
14
-
15
- * Fix: Fixes where is initialized event repository #62
16
-
17
- ### 0.14.2 (23.11.2016)
18
-
19
- * Change: rails_event_store_active_record updated to 0.6.10
20
- This time it will really allow to avoid ActiveRecord dependency when not using rails_event_store_active_record's
21
- event repository.
22
-
23
- ### 0.14.1 (21.11.2016)
24
-
25
- * Change: Allows to set the event repository used. #61
26
- Allow to avoid ActiveRecord dependency when not using rails_event_store_active_record's
27
- event repository. See documentation for mode details https://railseventstore.arkency.com/docs/repository.html
28
-
29
- ### 0.14.0 (28.10.2016)
30
-
31
- * Change: aggregate_root updated to 0.4.0
32
- This is a breaking change only if you use aggregate_root gem.
33
- Nothing has changed in RailsEventStore however the aggregate_root gem
34
- has been redesigned completely.
35
-
36
- ### 0.13.0 (21.10.2016)
37
-
38
- * Change: ruby_event_store updated to 0.13.0
39
- * Change: RailsEventStore::Client methods signarures aligned with RubyEventStore::Client
40
- RailsEventStore::Client is just a specialization of RubyEventStore::Client
41
- with sensible defaults. Nothing more. This will ensure both are compatible.
42
- * Change: No more ClosedStruct in Event class, you need use hashes to access data & metadata.
43
- This is a breaking change.
44
-
45
- ### 0.12.1 (11.08.2016)
46
-
47
- * Fix: aggregate_root gem updated to 0.3.5 fixing invalid method name generated for events wrapped in namespace
48
-
49
- ### 0.12.0 (10.08.2016)
50
-
51
- * Change: Updated Ruby Event Store method calls according to the newer version PR #53
52
-
53
- ### 0.11.0 (12.07.2016)
54
-
55
- * Breaking change in domain event class (Part of PR #48)
56
- * no more simple `TestEvent.new(some_attr: 'some value')`
57
- use `TestEvent.new(data: { some_attr: 'some value' })` instead
58
- * all data & metadata attributes accessible via `data` & `metadata` properties
59
- of event class
60
- * This will avoid name clashes when defining domain event data,
61
- especially important for `event_id`
62
- * Breaking change: deprecated `handle_event` method removed, use `call` instead
63
- * some domain event handlers might need method rename
64
- * Change: Mark aliased methods as deprecated (soon to be removed)
65
- * Change: Update RubyEventStore to 0.11.0 PR #48
66
- * RubyEventStore::Facade renamed to RubyEventStore::Client
67
- * Fix: Improve mutation tests coverage PR #47
68
-
69
- ### 0.10.0 (30.06.2016)
70
-
71
- * Change: Rails request details in event metadata PR #39
72
- * Change: Add dynamic subscriptions (implemented by ruby_event_store 0.9.0) PR #43
73
- * Fix: In-memory sqlite3 with schema load over prebaked filesystem blob in testing PR #41
74
-
75
- ### 0.9.0 (24.06.2016)
76
-
77
- * Change: ruby_event_store updated to 0.9.0 (Call instead of handle_event)
78
- * Change: aggregate_root updated to 0.3.1 (licensing info)
79
- * Fix: Clarify Licensing terms #36 - MIT licence it is from now
80
-
81
- ### 0.8.0 (21.06.2016)
82
-
83
- * Change: ruby_event_store updated to 0.8.0 (dynamic subscriptions)
84
- * Change: aggregate_root updated to 0.3.0 (fix circular dependency)
85
- * Change: remove SlackEventHandler
86
-
87
- ### 0.7.0 (01.06.2016)
88
-
89
- * Change: ruby_event_store updated to 0.6.0 (adding basic projections support)
90
-
91
- ### 0.6.1 (25.05.2016)
92
-
93
- * Fix: Allow to read events backward PR #32 (bugfix)
94
-
95
- ### 0.6.0 (11.04.2016)
96
-
97
- * Change: EventRepository moved to separate gem [rails_event_store_active_record](https://github.com/RailsEventStore/rails_event_store_active_record)
98
- * Change: rails_event_store_active_record updated to version 0.5.1 - allows to use custom event class
99
-
100
- ### 0.5.0 (21.03.2016)
101
-
102
- * Align with changes in `ruby_event_store` 0.5.0:
103
- * Change: Event class refactoring to make default values more explicit
104
- * Change: Let event broker to be given as a dependency
105
- * Change: No nils, use symbols instead - :any & :none replaced meaningless nil value
106
- * Change: Remove Event#event_type - use class instead
107
- * Fix: Typo fix (appent_to_stream corrected to append_to_stream)
108
- * Change: Encapsulate internals fo RailsEventStore::Client
109
- * Change: Hide `ruby_event_store` internals by adding classes in RailsEventStore module
110
-
111
- ### 0.4.1 (17.03.2016)
112
-
113
- * Fix: aggregate_root gem aligned with changes in rails_event_store
114
-
115
- ### 0.4.0 (17.03.2016)
116
-
117
- * Change: Use class names to subscribe events (ruby_event_store update to 0.4.0)
118
- * Change: EventRepository now recreate events using orginal classes
119
-
120
- ### 0.3.1 (13.03.2016)
121
-
122
- * Update to ruby_event_store 0.3.1 - fix changing timestamp on reads from repository
123
-
124
- ### 0.3.0 (03.03.2016)
125
-
126
- * Update to ruby_event_store 0.3.0 - see ruby_event_store changelog for more details
127
- * Implement reading forward & backward (aliasold methods to read forward)
128
- * Implement paging when reading from all streams
129
-
130
- ### 0.2.2 (25.02.2016)
131
-
132
- * Restore AggregateRoot in RES, but this time as a dependency on aggregate_root gem
133
-
134
- ### 0.2.1 (25.02.2016)
135
-
136
- * Fix: Error when trying to #read_all_streams #20
137
-
138
- ### 0.2.0 (29.01.2016)
139
-
140
- * Removed EventEntity class
141
- * All read & returned events are not instances of RailsEventStore::Event class
142
- * RailsEventStore::Event class allows for easier events creation and access to data attributes
143
- * AggregateRoot module & repository extracted to new gem (aggregate_root)
144
-
145
- ### 0.1.2 (26.05.2015)
146
-
147
- * Moved most core features to the separate gem `ruby_event_store`. We left only rails related implementation here.
148
- * It's now assumed that `event_id` has a unique index in the database (the same is applied to the initial migration generator)
149
- * Model is no longer validating uniqueness of `event_id` via ActiveRecord
150
- * Event does not need any data now, it can be created just like `OrderCreated.new` (without any arguments)
151
- * Migration generator is no more generating the `updated_at` field in the `event_store_events` table. We also advise to remove this column, since events shouldn't be *ever* modified.
152
- * In the event's metadata there's a new field `published_at`
153
- * Added the `subscribe_to_all_events` method to `RailsEventStore::Client`
154
- * Subscribing to only one event via `client.subscribe(subscriber, 'OrderCreated')` no longer works. You should use `client.subscribe(subscriber, ['OrderCreated'])` instead.
155
- * Default event's name is no longer `OrderCreated` for the `OrderCreated` event in the `Orders` namespace, now it's `Orders::OrderCreated`
156
-
157
- ### 0.1.1 (22.04.2015)
158
-
159
- Initial release.
data/Gemfile DELETED
@@ -1,23 +0,0 @@
1
- source 'https://rubygems.org'
2
- git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3
- gemspec
4
-
5
- eval_gemfile File.expand_path('../support/bundler/Gemfile.shared', __dir__)
6
-
7
- gem 'ruby_event_store', path: '../ruby_event_store'
8
- gem 'ruby_event_store-browser', path: '../ruby_event_store-browser'
9
- gem 'rails_event_store_active_record', path: '../rails_event_store_active_record'
10
- gem 'aggregate_root', path: '../aggregate_root'
11
- gem 'bounded_context', path: '../bounded_context'
12
- gem 'protobuf_nested_struct'
13
- gem 'sidekiq'
14
- gem 'rack-test'
15
- gem 'google-protobuf', '~> 3.12.2', '>= 3.12.2'
16
- gem 'pry'
17
- gem 'rails', ENV['RAILS_VERSION']
18
-
19
- if Gem::Version.new(ENV['RAILS_VERSION']) >= Gem::Version.new('6.0.0')
20
- gem 'sqlite3', '1.4.2'
21
- else
22
- gem 'sqlite3', '1.3.13'
23
- end
data/Makefile DELETED
@@ -1,14 +0,0 @@
1
- GEM_VERSION = $(shell cat ../RES_VERSION)
2
- GEM_NAME = rails_event_store
3
- REQUIRE = $(GEM_NAME)
4
- IGNORE = RailsEventStore::Client\#initialize \
5
- RailsEventStore::AfterCommitAsyncDispatcher::AsyncRecord* \
6
- RailsEventStore::AfterCommitAsyncDispatcher\#async_record
7
- SUBJECT ?= RailsEventStore*
8
- DATABASE_URL ?= sqlite3::memory:
9
-
10
- include ../support/make/install.mk
11
- include ../support/make/test.mk
12
- include ../support/make/mutant.mk
13
- include ../support/make/gem.mk
14
- include ../support/make/help.mk
@@ -1,37 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'rails_event_store/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = 'rails_event_store'
8
- spec.version = RailsEventStore::VERSION
9
- spec.licenses = ['MIT']
10
- spec.authors = ['Arkency']
11
- spec.email = ['dev@arkency.com']
12
-
13
- spec.summary = %q{Event Store in Ruby}
14
- spec.description = %q{Implementation of Event Store in Ruby}
15
- spec.homepage = 'https://railseventstore.org'
16
- spec.metadata = {
17
- "homepage_uri" => "https://railseventstore.org/",
18
- "changelog_uri" => "https://github.com/RailsEventStore/rails_event_store/releases",
19
- "source_code_uri" => "https://github.com/RailsEventStore/rails_event_store",
20
- "bug_tracker_uri" => "https://github.com/RailsEventStore/rails_event_store/issues",
21
- }
22
-
23
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
24
- spec.bindir = 'exe'
25
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
- spec.require_paths = ['lib']
27
-
28
- spec.add_dependency 'ruby_event_store', '= 1.3.0'
29
- spec.add_dependency 'ruby_event_store-browser', '= 1.3.0'
30
- spec.add_dependency 'rails_event_store_active_record', '= 1.3.0'
31
- spec.add_dependency 'aggregate_root', '= 1.3.0'
32
- spec.add_dependency 'bounded_context', '= 1.3.0'
33
- spec.add_dependency 'activesupport', '>= 3.0'
34
- spec.add_dependency 'activemodel', '>= 3.0'
35
- spec.add_dependency 'activejob', '>= 3.0'
36
- spec.add_dependency 'arkency-command_bus', '>= 0.4'
37
- end