sequent 3.2.2 → 4.0.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 +4 -4
- data/lib/notices.rb +4 -0
- data/lib/sequent.rb +3 -0
- data/lib/sequent/application_record.rb +7 -0
- data/lib/sequent/configuration.rb +13 -0
- data/lib/sequent/core/aggregate_repository.rb +7 -1
- data/lib/sequent/core/command.rb +13 -2
- data/lib/sequent/core/command_record.rb +5 -2
- data/lib/sequent/core/command_service.rb +28 -12
- data/lib/sequent/core/event_publisher.rb +4 -0
- data/lib/sequent/core/event_record.rb +2 -1
- data/lib/sequent/core/event_store.rb +23 -4
- data/lib/sequent/core/helpers/attribute_support.rb +28 -7
- data/lib/sequent/core/helpers/mergable.rb +1 -0
- data/lib/sequent/core/persistors/active_record_persistor.rb +1 -1
- data/lib/sequent/core/persistors/replay_optimized_postgres_persistor.rb +2 -2
- data/lib/sequent/core/projector.rb +23 -1
- data/lib/sequent/core/stream_record.rb +1 -1
- data/lib/sequent/core/transactions/active_record_transaction_provider.rb +6 -4
- data/lib/sequent/generator.rb +1 -4
- data/lib/sequent/generator/generator.rb +4 -0
- data/lib/sequent/generator/project.rb +1 -1
- data/lib/sequent/generator/template_project/Gemfile +1 -1
- data/lib/sequent/generator/template_project/app/records/post_record.rb +1 -1
- data/lib/sequent/generator/template_project/spec/app/projectors/post_projector_spec.rb +1 -1
- data/lib/sequent/generator/template_project/spec/lib/post/post_command_handler_spec.rb +1 -1
- data/lib/sequent/migrations/executor.rb +78 -0
- data/lib/sequent/migrations/functions.rb +76 -0
- data/lib/sequent/migrations/migrations.rb +1 -0
- data/lib/sequent/migrations/planner.rb +118 -0
- data/lib/sequent/migrations/projectors.rb +6 -5
- data/lib/sequent/migrations/sql.rb +17 -0
- data/lib/sequent/migrations/view_schema.rb +74 -73
- data/lib/sequent/rake/migration_tasks.rb +2 -2
- data/lib/sequent/rake/tasks.rb +1 -1
- data/lib/sequent/sequent.rb +5 -1
- data/lib/sequent/support/database.rb +11 -6
- data/lib/sequent/test/command_handler_helpers.rb +4 -0
- data/lib/sequent/util/dry_run.rb +191 -0
- data/lib/sequent/util/skip_if_already_processing.rb +19 -5
- data/lib/sequent/util/util.rb +1 -0
- data/lib/version.rb +1 -1
- metadata +77 -36
|
@@ -55,7 +55,7 @@ module Sequent
|
|
|
55
55
|
|
|
56
56
|
def create_event_store(db_config)
|
|
57
57
|
event_store_schema = Sequent.configuration.event_store_schema_name
|
|
58
|
-
sequent_schema = File.join(Sequent.configuration.
|
|
58
|
+
sequent_schema = File.join(Sequent.configuration.database_schema_directory, "#{event_store_schema}.rb")
|
|
59
59
|
fail "File #{sequent_schema} does not exist. Check your Sequent configuration." unless File.exists?(sequent_schema)
|
|
60
60
|
|
|
61
61
|
Sequent::Support::Database.establish_connection(db_config)
|
|
@@ -117,7 +117,7 @@ module Sequent
|
|
|
117
117
|
end
|
|
118
118
|
|
|
119
119
|
task :delete_all => ['sequent:init', :init] do
|
|
120
|
-
result =
|
|
120
|
+
result = Sequent::ApplicationRecord.connection.execute("DELETE FROM #{Sequent.configuration.event_record_class.table_name} WHERE event_type = 'Sequent::Core::SnapshotEvent'")
|
|
121
121
|
Sequent.logger.info "Deleted #{result.cmd_tuples} aggregate snapshots from the event store"
|
|
122
122
|
end
|
|
123
123
|
end
|
data/lib/sequent/rake/tasks.rb
CHANGED
data/lib/sequent/sequent.rb
CHANGED
|
@@ -6,7 +6,7 @@ require_relative 'core/aggregate_root'
|
|
|
6
6
|
require_relative 'core/projector'
|
|
7
7
|
require_relative 'core/workflow'
|
|
8
8
|
require_relative 'core/value_object'
|
|
9
|
-
require_relative '
|
|
9
|
+
require_relative 'migrations/migrations'
|
|
10
10
|
|
|
11
11
|
module Sequent
|
|
12
12
|
def self.new_uuid
|
|
@@ -64,6 +64,10 @@ module Sequent
|
|
|
64
64
|
configuration.aggregate_repository
|
|
65
65
|
end
|
|
66
66
|
|
|
67
|
+
def self.dry_run(*commands)
|
|
68
|
+
Sequent::Util::DryRun.these_commands(commands)
|
|
69
|
+
end
|
|
70
|
+
|
|
67
71
|
# Shortcut classes for easy usage
|
|
68
72
|
Event = Sequent::Core::Event
|
|
69
73
|
Command = Sequent::Core::Command
|
|
@@ -47,7 +47,7 @@ module Sequent
|
|
|
47
47
|
def self.create_schema(schema)
|
|
48
48
|
sql = "CREATE SCHEMA IF NOT EXISTS #{schema}"
|
|
49
49
|
if user = ActiveRecord::Base.connection_config[:username]
|
|
50
|
-
sql +=
|
|
50
|
+
sql += %Q{ AUTHORIZATION "#{user}"}
|
|
51
51
|
end
|
|
52
52
|
execute_sql(sql)
|
|
53
53
|
end
|
|
@@ -61,12 +61,16 @@ module Sequent
|
|
|
61
61
|
|
|
62
62
|
disconnect!
|
|
63
63
|
original_search_paths = db_config['schema_search_path'].dup
|
|
64
|
-
|
|
64
|
+
|
|
65
|
+
if ActiveRecord::VERSION::MAJOR < 6
|
|
66
|
+
ActiveRecord::Base.configurations[env.to_s] = ActiveSupport::HashWithIndifferentAccess.new(db_config).stringify_keys
|
|
67
|
+
end
|
|
68
|
+
|
|
65
69
|
db_config['schema_search_path'] = search_path
|
|
70
|
+
|
|
66
71
|
ActiveRecord::Base.establish_connection db_config
|
|
67
72
|
|
|
68
73
|
yield
|
|
69
|
-
|
|
70
74
|
ensure
|
|
71
75
|
disconnect!
|
|
72
76
|
db_config['schema_search_path'] = original_search_paths
|
|
@@ -95,14 +99,15 @@ module Sequent
|
|
|
95
99
|
self.class.execute_sql(sql)
|
|
96
100
|
end
|
|
97
101
|
|
|
98
|
-
def migrate(migrations_path, verbose: true)
|
|
102
|
+
def migrate(migrations_path, schema_migration: ActiveRecord::SchemaMigration, verbose: true)
|
|
99
103
|
ActiveRecord::Migration.verbose = verbose
|
|
100
|
-
if ActiveRecord::VERSION::MAJOR >=
|
|
104
|
+
if ActiveRecord::VERSION::MAJOR >= 6
|
|
105
|
+
ActiveRecord::MigrationContext.new([migrations_path], schema_migration).up
|
|
106
|
+
elsif ActiveRecord::VERSION::MAJOR >= 5 && ActiveRecord::VERSION::MINOR >= 2
|
|
101
107
|
ActiveRecord::MigrationContext.new([migrations_path]).up
|
|
102
108
|
else
|
|
103
109
|
ActiveRecord::Migrator.migrate(migrations_path)
|
|
104
110
|
end
|
|
105
|
-
|
|
106
111
|
end
|
|
107
112
|
end
|
|
108
113
|
end
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
require_relative '../test/command_handler_helpers'
|
|
2
|
+
|
|
3
|
+
module Sequent
|
|
4
|
+
module Util
|
|
5
|
+
##
|
|
6
|
+
# Dry run provides the ability to inspect what would
|
|
7
|
+
# happen if the given commands would be executed
|
|
8
|
+
# without actually committing the results.
|
|
9
|
+
# You can inspect which commands are executed
|
|
10
|
+
# and what the resulting events would be
|
|
11
|
+
# with theSequent::Projector's and Sequent::Workflow's
|
|
12
|
+
# that would be invoked (without actually invoking them).
|
|
13
|
+
#
|
|
14
|
+
# Since the Workflow's are not actually invoked new commands
|
|
15
|
+
# resulting from this Workflow will of course not be in the result.
|
|
16
|
+
#
|
|
17
|
+
# Caution: Since the Sequent Configuration is shared between threads this method
|
|
18
|
+
# is not Thread safe.
|
|
19
|
+
#
|
|
20
|
+
# Example usage:
|
|
21
|
+
#
|
|
22
|
+
# result = Sequent.dry_run(create_foo_command, ping_foo_command)
|
|
23
|
+
#
|
|
24
|
+
# result.print(STDOUT)
|
|
25
|
+
#
|
|
26
|
+
module DryRun
|
|
27
|
+
EventInvokedHandler = Struct.new(:event, :handler)
|
|
28
|
+
|
|
29
|
+
##
|
|
30
|
+
# Proxies the given EventStore implements commit_events
|
|
31
|
+
# that instead of publish and store just publishes the events.
|
|
32
|
+
class EventStoreProxy
|
|
33
|
+
attr_reader :command_with_events, :event_store
|
|
34
|
+
|
|
35
|
+
delegate :load_events_for_aggregates,
|
|
36
|
+
:load_events,
|
|
37
|
+
:publish_events,
|
|
38
|
+
:stream_exists?,
|
|
39
|
+
to: :event_store
|
|
40
|
+
|
|
41
|
+
def initialize(result)
|
|
42
|
+
@event_store = Sequent::Test::CommandHandlerHelpers::FakeEventStore.new
|
|
43
|
+
@command_with_events = {}
|
|
44
|
+
@result = result
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def commit_events(command, streams_with_events)
|
|
48
|
+
event_store.commit_events(command, streams_with_events)
|
|
49
|
+
|
|
50
|
+
new_events = streams_with_events.flat_map { |_, events| events }
|
|
51
|
+
@result.published_command_with_events(command, new_events)
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
##
|
|
56
|
+
# Records which Projector's and Workflow's are executed
|
|
57
|
+
#
|
|
58
|
+
class RecordingEventPublisher < Sequent::Core::EventPublisher
|
|
59
|
+
attr_reader :projectors, :workflows
|
|
60
|
+
|
|
61
|
+
def initialize(result)
|
|
62
|
+
@result = result
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def process_event(event)
|
|
66
|
+
Sequent.configuration.event_handlers.each do |handler|
|
|
67
|
+
next unless handler.class.handles_message?(event)
|
|
68
|
+
|
|
69
|
+
if handler.is_a?(Sequent::Workflow)
|
|
70
|
+
@result.invoked_workflow(EventInvokedHandler.new(event, handler.class))
|
|
71
|
+
elsif handler.is_a?(Sequent::Projector)
|
|
72
|
+
@result.invoked_projector(EventInvokedHandler.new(event, handler.class))
|
|
73
|
+
else
|
|
74
|
+
fail "Unrecognized event_handler #{handler.class} called for event #{event.class}"
|
|
75
|
+
end
|
|
76
|
+
rescue
|
|
77
|
+
raise PublishEventError.new(handler.class, event)
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
##
|
|
83
|
+
# Contains the result of a dry run.
|
|
84
|
+
#
|
|
85
|
+
# @see #tree
|
|
86
|
+
# @see #print
|
|
87
|
+
#
|
|
88
|
+
class Result
|
|
89
|
+
EventCalledHandlers = Struct.new(:event, :projectors, :workflows)
|
|
90
|
+
|
|
91
|
+
def initialize
|
|
92
|
+
@command_with_events = {}
|
|
93
|
+
@event_invoked_projectors = []
|
|
94
|
+
@event_invoked_workflows = []
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
def invoked_projector(event_invoked_handler)
|
|
98
|
+
event_invoked_projectors << event_invoked_handler
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
def invoked_workflow(event_invoked_handler)
|
|
102
|
+
event_invoked_workflows << event_invoked_handler
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
def published_command_with_events(command, events)
|
|
106
|
+
command_with_events[command] = events
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
##
|
|
110
|
+
# Returns the command with events as a tree structure.
|
|
111
|
+
#
|
|
112
|
+
# {
|
|
113
|
+
# command => [
|
|
114
|
+
# EventCalledHandlers,
|
|
115
|
+
# EventCalledHandlers,
|
|
116
|
+
# EventCalledHandlers,
|
|
117
|
+
# ]
|
|
118
|
+
# }
|
|
119
|
+
#
|
|
120
|
+
# The EventCalledHandlers contains an Event with the
|
|
121
|
+
# lists of `Sequent::Projector`s and `Sequent::Workflow`s
|
|
122
|
+
# that were called.
|
|
123
|
+
#
|
|
124
|
+
def tree
|
|
125
|
+
command_with_events.reduce({}) do |memo, (command, events)|
|
|
126
|
+
events_to_handlers = events.map do |event|
|
|
127
|
+
for_current_event = ->(pair) { pair.event == event }
|
|
128
|
+
EventCalledHandlers.new(
|
|
129
|
+
event,
|
|
130
|
+
event_invoked_projectors.select(&for_current_event).map(&:handler),
|
|
131
|
+
event_invoked_workflows.select(&for_current_event).map(&:handler),
|
|
132
|
+
)
|
|
133
|
+
end
|
|
134
|
+
memo[command] = events_to_handlers
|
|
135
|
+
memo
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
##
|
|
140
|
+
# Prints the output from #tree to the given `io`
|
|
141
|
+
#
|
|
142
|
+
def print(io)
|
|
143
|
+
tree.each_with_index do |(command, event_called_handlerss), index|
|
|
144
|
+
io.puts "+++++++++++++++++++++++++++++++++++" if index == 0
|
|
145
|
+
io.puts "Command: #{command.class} resulted in #{event_called_handlerss.length} events"
|
|
146
|
+
event_called_handlerss.each_with_index do |event_called_handlers, i|
|
|
147
|
+
io.puts "" if i > 0
|
|
148
|
+
io.puts "-- Event #{event_called_handlers.event.class} was handled by:"
|
|
149
|
+
io.puts "-- Projectors: [#{event_called_handlers.projectors.join(', ')}]"
|
|
150
|
+
io.puts "-- Workflows: [#{event_called_handlers.workflows.join(', ')}]"
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
io.puts "+++++++++++++++++++++++++++++++++++"
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
private
|
|
158
|
+
|
|
159
|
+
attr_reader :command_with_events, :event_invoked_projectors, :event_invoked_workflows
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
##
|
|
163
|
+
# Main method of the DryRun.
|
|
164
|
+
#
|
|
165
|
+
# Caution: Since the Sequent Configuration is changed and is shared between threads this method
|
|
166
|
+
# is not Thread safe.
|
|
167
|
+
#
|
|
168
|
+
# After invocation the sequent configuration is reset to the state it was before
|
|
169
|
+
# invoking this method.
|
|
170
|
+
#
|
|
171
|
+
# @param commands - the commands to dry run
|
|
172
|
+
# @return Result - the Result of the dry run. See Result.
|
|
173
|
+
#
|
|
174
|
+
def self.these_commands(commands)
|
|
175
|
+
current_event_store = Sequent.configuration.event_store
|
|
176
|
+
current_event_publisher = Sequent.configuration.event_publisher
|
|
177
|
+
result = Result.new
|
|
178
|
+
|
|
179
|
+
Sequent.configuration.event_store = EventStoreProxy.new(result)
|
|
180
|
+
Sequent.configuration.event_publisher = RecordingEventPublisher.new(result)
|
|
181
|
+
|
|
182
|
+
Sequent.command_service.execute_commands(*commands)
|
|
183
|
+
|
|
184
|
+
result
|
|
185
|
+
ensure
|
|
186
|
+
Sequent.configuration.event_store = current_event_store
|
|
187
|
+
Sequent.configuration.event_publisher = current_event_publisher
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
end
|
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
module Sequent
|
|
2
2
|
module Util
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
##
|
|
4
|
+
# Returns if the current Thread is already processing work
|
|
5
|
+
# given the +processing_key+ otherwise
|
|
6
|
+
# it yields the given +&block+.
|
|
7
|
+
#
|
|
8
|
+
# Useful in a Queue and Processing strategy
|
|
9
|
+
def self.skip_if_already_processing(processing_key, &block)
|
|
10
|
+
return if Thread.current[processing_key]
|
|
5
11
|
|
|
6
12
|
begin
|
|
7
|
-
Thread.current[
|
|
13
|
+
Thread.current[processing_key] = true
|
|
8
14
|
|
|
9
|
-
|
|
15
|
+
yield
|
|
10
16
|
ensure
|
|
11
|
-
Thread.current[
|
|
17
|
+
Thread.current[processing_key] = nil
|
|
12
18
|
end
|
|
13
19
|
end
|
|
20
|
+
|
|
21
|
+
##
|
|
22
|
+
# Reset the given +processing_key+ for the current Thread.
|
|
23
|
+
#
|
|
24
|
+
# Usefull to make a block protected by +skip_if_already_processing+ reentrant.
|
|
25
|
+
def self.done_processing(processing_key)
|
|
26
|
+
Thread.current[processing_key] = nil
|
|
27
|
+
end
|
|
14
28
|
end
|
|
15
29
|
end
|
data/lib/sequent/util/util.rb
CHANGED
data/lib/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sequent
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 4.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Lars Vonk
|
|
@@ -9,10 +9,10 @@ authors:
|
|
|
9
9
|
- Erik Rozendaal
|
|
10
10
|
- Mike van Diepen
|
|
11
11
|
- Stephan van Diepen
|
|
12
|
-
autorequire:
|
|
12
|
+
autorequire:
|
|
13
13
|
bindir: bin
|
|
14
14
|
cert_chain: []
|
|
15
|
-
date:
|
|
15
|
+
date: 2021-02-24 00:00:00.000000000 Z
|
|
16
16
|
dependencies:
|
|
17
17
|
- !ruby/object:Gem::Dependency
|
|
18
18
|
name: activerecord
|
|
@@ -23,7 +23,7 @@ dependencies:
|
|
|
23
23
|
version: '5.0'
|
|
24
24
|
- - "<"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
26
|
+
version: 6.0.4
|
|
27
27
|
type: :runtime
|
|
28
28
|
prerelease: false
|
|
29
29
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -33,7 +33,7 @@ dependencies:
|
|
|
33
33
|
version: '5.0'
|
|
34
34
|
- - "<"
|
|
35
35
|
- !ruby/object:Gem::Version
|
|
36
|
-
version:
|
|
36
|
+
version: 6.0.4
|
|
37
37
|
- !ruby/object:Gem::Dependency
|
|
38
38
|
name: activemodel
|
|
39
39
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -43,7 +43,7 @@ dependencies:
|
|
|
43
43
|
version: '5.0'
|
|
44
44
|
- - "<"
|
|
45
45
|
- !ruby/object:Gem::Version
|
|
46
|
-
version:
|
|
46
|
+
version: 6.0.4
|
|
47
47
|
type: :runtime
|
|
48
48
|
prerelease: false
|
|
49
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -53,21 +53,21 @@ dependencies:
|
|
|
53
53
|
version: '5.0'
|
|
54
54
|
- - "<"
|
|
55
55
|
- !ruby/object:Gem::Version
|
|
56
|
-
version:
|
|
56
|
+
version: 6.0.4
|
|
57
57
|
- !ruby/object:Gem::Dependency
|
|
58
58
|
name: pg
|
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
|
60
60
|
requirements:
|
|
61
61
|
- - "~>"
|
|
62
62
|
- !ruby/object:Gem::Version
|
|
63
|
-
version: '1.
|
|
63
|
+
version: '1.2'
|
|
64
64
|
type: :runtime
|
|
65
65
|
prerelease: false
|
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
|
67
67
|
requirements:
|
|
68
68
|
- - "~>"
|
|
69
69
|
- !ruby/object:Gem::Version
|
|
70
|
-
version: '1.
|
|
70
|
+
version: '1.2'
|
|
71
71
|
- !ruby/object:Gem::Dependency
|
|
72
72
|
name: postgresql_cursor
|
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -88,42 +88,42 @@ dependencies:
|
|
|
88
88
|
requirements:
|
|
89
89
|
- - "~>"
|
|
90
90
|
- !ruby/object:Gem::Version
|
|
91
|
-
version: '3
|
|
91
|
+
version: '3'
|
|
92
92
|
type: :runtime
|
|
93
93
|
prerelease: false
|
|
94
94
|
version_requirements: !ruby/object:Gem::Requirement
|
|
95
95
|
requirements:
|
|
96
96
|
- - "~>"
|
|
97
97
|
- !ruby/object:Gem::Version
|
|
98
|
-
version: '3
|
|
98
|
+
version: '3'
|
|
99
99
|
- !ruby/object:Gem::Dependency
|
|
100
100
|
name: thread_safe
|
|
101
101
|
requirement: !ruby/object:Gem::Requirement
|
|
102
102
|
requirements:
|
|
103
103
|
- - "~>"
|
|
104
104
|
- !ruby/object:Gem::Version
|
|
105
|
-
version: 0.3.
|
|
105
|
+
version: 0.3.6
|
|
106
106
|
type: :runtime
|
|
107
107
|
prerelease: false
|
|
108
108
|
version_requirements: !ruby/object:Gem::Requirement
|
|
109
109
|
requirements:
|
|
110
110
|
- - "~>"
|
|
111
111
|
- !ruby/object:Gem::Version
|
|
112
|
-
version: 0.3.
|
|
112
|
+
version: 0.3.6
|
|
113
113
|
- !ruby/object:Gem::Dependency
|
|
114
114
|
name: parallel
|
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
|
116
116
|
requirements:
|
|
117
117
|
- - "~>"
|
|
118
118
|
- !ruby/object:Gem::Version
|
|
119
|
-
version: 1.
|
|
119
|
+
version: '1.20'
|
|
120
120
|
type: :runtime
|
|
121
121
|
prerelease: false
|
|
122
122
|
version_requirements: !ruby/object:Gem::Requirement
|
|
123
123
|
requirements:
|
|
124
124
|
- - "~>"
|
|
125
125
|
- !ruby/object:Gem::Version
|
|
126
|
-
version: 1.
|
|
126
|
+
version: '1.20'
|
|
127
127
|
- !ruby/object:Gem::Dependency
|
|
128
128
|
name: bcrypt
|
|
129
129
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -142,30 +142,64 @@ dependencies:
|
|
|
142
142
|
name: parser
|
|
143
143
|
requirement: !ruby/object:Gem::Requirement
|
|
144
144
|
requirements:
|
|
145
|
-
- - "
|
|
145
|
+
- - ">="
|
|
146
146
|
- !ruby/object:Gem::Version
|
|
147
|
-
version:
|
|
147
|
+
version: 2.6.5
|
|
148
|
+
- - "<="
|
|
149
|
+
- !ruby/object:Gem::Version
|
|
150
|
+
version: '3'
|
|
148
151
|
type: :runtime
|
|
149
152
|
prerelease: false
|
|
150
153
|
version_requirements: !ruby/object:Gem::Requirement
|
|
151
154
|
requirements:
|
|
152
|
-
- - "
|
|
155
|
+
- - ">="
|
|
156
|
+
- !ruby/object:Gem::Version
|
|
157
|
+
version: 2.6.5
|
|
158
|
+
- - "<="
|
|
153
159
|
- !ruby/object:Gem::Version
|
|
154
|
-
version: '
|
|
160
|
+
version: '3'
|
|
161
|
+
- !ruby/object:Gem::Dependency
|
|
162
|
+
name: i18n
|
|
163
|
+
requirement: !ruby/object:Gem::Requirement
|
|
164
|
+
requirements:
|
|
165
|
+
- - ">="
|
|
166
|
+
- !ruby/object:Gem::Version
|
|
167
|
+
version: '0'
|
|
168
|
+
type: :runtime
|
|
169
|
+
prerelease: false
|
|
170
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
171
|
+
requirements:
|
|
172
|
+
- - ">="
|
|
173
|
+
- !ruby/object:Gem::Version
|
|
174
|
+
version: '0'
|
|
175
|
+
- !ruby/object:Gem::Dependency
|
|
176
|
+
name: tzinfo
|
|
177
|
+
requirement: !ruby/object:Gem::Requirement
|
|
178
|
+
requirements:
|
|
179
|
+
- - "<="
|
|
180
|
+
- !ruby/object:Gem::Version
|
|
181
|
+
version: 1.2.7
|
|
182
|
+
type: :runtime
|
|
183
|
+
prerelease: false
|
|
184
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
185
|
+
requirements:
|
|
186
|
+
- - "<="
|
|
187
|
+
- !ruby/object:Gem::Version
|
|
188
|
+
version: 1.2.7
|
|
155
189
|
- !ruby/object:Gem::Dependency
|
|
156
190
|
name: rspec
|
|
157
191
|
requirement: !ruby/object:Gem::Requirement
|
|
158
192
|
requirements:
|
|
159
193
|
- - "~>"
|
|
160
194
|
- !ruby/object:Gem::Version
|
|
161
|
-
version: '3.
|
|
195
|
+
version: '3.10'
|
|
162
196
|
type: :development
|
|
163
197
|
prerelease: false
|
|
164
198
|
version_requirements: !ruby/object:Gem::Requirement
|
|
165
199
|
requirements:
|
|
166
200
|
- - "~>"
|
|
167
201
|
- !ruby/object:Gem::Version
|
|
168
|
-
version: '3.
|
|
202
|
+
version: '3.10'
|
|
169
203
|
- !ruby/object:Gem::Dependency
|
|
170
204
|
name: timecop
|
|
171
205
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -186,70 +220,70 @@ dependencies:
|
|
|
186
220
|
requirements:
|
|
187
221
|
- - "~>"
|
|
188
222
|
- !ruby/object:Gem::Version
|
|
189
|
-
version: '3.
|
|
223
|
+
version: '3.10'
|
|
190
224
|
type: :development
|
|
191
225
|
prerelease: false
|
|
192
226
|
version_requirements: !ruby/object:Gem::Requirement
|
|
193
227
|
requirements:
|
|
194
228
|
- - "~>"
|
|
195
229
|
- !ruby/object:Gem::Version
|
|
196
|
-
version: '3.
|
|
230
|
+
version: '3.10'
|
|
197
231
|
- !ruby/object:Gem::Dependency
|
|
198
232
|
name: rspec-collection_matchers
|
|
199
233
|
requirement: !ruby/object:Gem::Requirement
|
|
200
234
|
requirements:
|
|
201
235
|
- - "~>"
|
|
202
236
|
- !ruby/object:Gem::Version
|
|
203
|
-
version: '1.
|
|
237
|
+
version: '1.2'
|
|
204
238
|
type: :development
|
|
205
239
|
prerelease: false
|
|
206
240
|
version_requirements: !ruby/object:Gem::Requirement
|
|
207
241
|
requirements:
|
|
208
242
|
- - "~>"
|
|
209
243
|
- !ruby/object:Gem::Version
|
|
210
|
-
version: '1.
|
|
244
|
+
version: '1.2'
|
|
211
245
|
- !ruby/object:Gem::Dependency
|
|
212
246
|
name: rake
|
|
213
247
|
requirement: !ruby/object:Gem::Requirement
|
|
214
248
|
requirements:
|
|
215
249
|
- - "~>"
|
|
216
250
|
- !ruby/object:Gem::Version
|
|
217
|
-
version: '
|
|
251
|
+
version: '13'
|
|
218
252
|
type: :development
|
|
219
253
|
prerelease: false
|
|
220
254
|
version_requirements: !ruby/object:Gem::Requirement
|
|
221
255
|
requirements:
|
|
222
256
|
- - "~>"
|
|
223
257
|
- !ruby/object:Gem::Version
|
|
224
|
-
version: '
|
|
258
|
+
version: '13'
|
|
225
259
|
- !ruby/object:Gem::Dependency
|
|
226
260
|
name: pry
|
|
227
261
|
requirement: !ruby/object:Gem::Requirement
|
|
228
262
|
requirements:
|
|
229
263
|
- - "~>"
|
|
230
264
|
- !ruby/object:Gem::Version
|
|
231
|
-
version: '0.
|
|
265
|
+
version: '0.13'
|
|
232
266
|
type: :development
|
|
233
267
|
prerelease: false
|
|
234
268
|
version_requirements: !ruby/object:Gem::Requirement
|
|
235
269
|
requirements:
|
|
236
270
|
- - "~>"
|
|
237
271
|
- !ruby/object:Gem::Version
|
|
238
|
-
version: '0.
|
|
272
|
+
version: '0.13'
|
|
239
273
|
- !ruby/object:Gem::Dependency
|
|
240
274
|
name: simplecov
|
|
241
275
|
requirement: !ruby/object:Gem::Requirement
|
|
242
276
|
requirements:
|
|
243
277
|
- - "~>"
|
|
244
278
|
- !ruby/object:Gem::Version
|
|
245
|
-
version: 0.
|
|
279
|
+
version: '0.21'
|
|
246
280
|
type: :development
|
|
247
281
|
prerelease: false
|
|
248
282
|
version_requirements: !ruby/object:Gem::Requirement
|
|
249
283
|
requirements:
|
|
250
284
|
- - "~>"
|
|
251
285
|
- !ruby/object:Gem::Version
|
|
252
|
-
version: 0.
|
|
286
|
+
version: '0.21'
|
|
253
287
|
description: Sequent is a CQRS and event sourcing framework for Ruby.
|
|
254
288
|
email:
|
|
255
289
|
- lars.vonk@gmail.com
|
|
@@ -264,7 +298,9 @@ extra_rdoc_files: []
|
|
|
264
298
|
files:
|
|
265
299
|
- bin/sequent
|
|
266
300
|
- db/sequent_schema.rb
|
|
301
|
+
- lib/notices.rb
|
|
267
302
|
- lib/sequent.rb
|
|
303
|
+
- lib/sequent/application_record.rb
|
|
268
304
|
- lib/sequent/configuration.rb
|
|
269
305
|
- lib/sequent/core/aggregate_repository.rb
|
|
270
306
|
- lib/sequent/core/aggregate_root.rb
|
|
@@ -318,6 +354,7 @@ files:
|
|
|
318
354
|
- lib/sequent/generator/aggregate.rb
|
|
319
355
|
- lib/sequent/generator/command.rb
|
|
320
356
|
- lib/sequent/generator/event.rb
|
|
357
|
+
- lib/sequent/generator/generator.rb
|
|
321
358
|
- lib/sequent/generator/project.rb
|
|
322
359
|
- lib/sequent/generator/template_aggregate/template_aggregate.rb
|
|
323
360
|
- lib/sequent/generator/template_aggregate/template_aggregate/commands.rb
|
|
@@ -344,9 +381,13 @@ files:
|
|
|
344
381
|
- lib/sequent/generator/template_project/spec/app/projectors/post_projector_spec.rb
|
|
345
382
|
- lib/sequent/generator/template_project/spec/lib/post/post_command_handler_spec.rb
|
|
346
383
|
- lib/sequent/generator/template_project/spec/spec_helper.rb
|
|
384
|
+
- lib/sequent/migrations/executor.rb
|
|
385
|
+
- lib/sequent/migrations/functions.rb
|
|
347
386
|
- lib/sequent/migrations/migrate_events.rb
|
|
348
387
|
- lib/sequent/migrations/migrations.rb
|
|
388
|
+
- lib/sequent/migrations/planner.rb
|
|
349
389
|
- lib/sequent/migrations/projectors.rb
|
|
390
|
+
- lib/sequent/migrations/sql.rb
|
|
350
391
|
- lib/sequent/migrations/view_schema.rb
|
|
351
392
|
- lib/sequent/rake/migration_tasks.rb
|
|
352
393
|
- lib/sequent/rake/tasks.rb
|
|
@@ -360,6 +401,7 @@ files:
|
|
|
360
401
|
- lib/sequent/test/event_handler_helpers.rb
|
|
361
402
|
- lib/sequent/test/event_stream_helpers.rb
|
|
362
403
|
- lib/sequent/test/time_comparison.rb
|
|
404
|
+
- lib/sequent/util/dry_run.rb
|
|
363
405
|
- lib/sequent/util/printer.rb
|
|
364
406
|
- lib/sequent/util/skip_if_already_processing.rb
|
|
365
407
|
- lib/sequent/util/timer.rb
|
|
@@ -369,7 +411,7 @@ homepage: https://github.com/zilverline/sequent
|
|
|
369
411
|
licenses:
|
|
370
412
|
- MIT
|
|
371
413
|
metadata: {}
|
|
372
|
-
post_install_message:
|
|
414
|
+
post_install_message:
|
|
373
415
|
rdoc_options: []
|
|
374
416
|
require_paths:
|
|
375
417
|
- lib
|
|
@@ -377,16 +419,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
377
419
|
requirements:
|
|
378
420
|
- - ">="
|
|
379
421
|
- !ruby/object:Gem::Version
|
|
380
|
-
version: '
|
|
422
|
+
version: '2.7'
|
|
381
423
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
382
424
|
requirements:
|
|
383
425
|
- - ">="
|
|
384
426
|
- !ruby/object:Gem::Version
|
|
385
427
|
version: '0'
|
|
386
428
|
requirements: []
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
signing_key:
|
|
429
|
+
rubygems_version: 3.2.3
|
|
430
|
+
signing_key:
|
|
390
431
|
specification_version: 4
|
|
391
432
|
summary: Event sourcing framework for Ruby
|
|
392
433
|
test_files: []
|