rails_event_store 2.7.0 → 2.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/rails_event_store/test_unit_generator.rb +4 -0
- data/lib/generators/templates/require_bc_test.rb +3 -0
- data/lib/rails_event_store/all.rb +2 -0
- data/lib/rails_event_store/default_client_profile.rb +9 -0
- data/lib/rails_event_store/json_client.rb +33 -0
- data/lib/rails_event_store/version.rb +1 -1
- metadata +13 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d14a0a9296ac00861142fbd2695b4593805acbb77d9dd1e25770887749e5196
|
4
|
+
data.tar.gz: 925baa193ad64c8ae058ad9539161bfbe30fb8278f0a2bf456ccc37bf8267765
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 361e469a72631d8c7dd2f29b719358514205adc56f21ff9c6bee3d99188db6dcdee792cb74078dead42bba6a4d988abe51cf6c3ad67991979e09be5d383e8acf
|
7
|
+
data.tar.gz: 17c9eac1478c9facc57041103e766f9d3d876fac83988dae7c9ddff3fb1a7606ca7389b484cf278e5d61fbed69d789e87ec881f67558ba7393df4665ca47c8c1
|
@@ -11,6 +11,10 @@ module RailsEventStore
|
|
11
11
|
template "test_helper.rb", "#{bounded_context_name}/test/test_helper.rb"
|
12
12
|
end
|
13
13
|
|
14
|
+
def require_bc_test
|
15
|
+
template "require_bc_test.rb", "test/#{bounded_context_name}_test.rb"
|
16
|
+
end
|
17
|
+
|
14
18
|
private
|
15
19
|
|
16
20
|
def bounded_context_name
|
@@ -6,9 +6,11 @@ require_relative "link_by_metadata"
|
|
6
6
|
require_relative "after_commit_async_dispatcher"
|
7
7
|
require_relative "active_job_scheduler"
|
8
8
|
require_relative "client"
|
9
|
+
require_relative "json_client"
|
9
10
|
require_relative "version"
|
10
11
|
require_relative "railtie"
|
11
12
|
require_relative "browser"
|
13
|
+
require_relative "default_client_profile"
|
12
14
|
|
13
15
|
module RailsEventStore
|
14
16
|
Event = RubyEventStore::Event
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RailsEventStore
|
4
|
+
class JSONClient < Client
|
5
|
+
def initialize(repository: RubyEventStore::ActiveRecord::EventRepository.new(serializer: RubyEventStore::NULL))
|
6
|
+
super(
|
7
|
+
mapper:
|
8
|
+
RubyEventStore::Mappers::PipelineMapper.new(
|
9
|
+
RubyEventStore::Mappers::Pipeline.new(
|
10
|
+
RubyEventStore::Mappers::Transformation::PreserveTypes
|
11
|
+
.new
|
12
|
+
.register(Symbol, serializer: ->(v) { v.to_s }, deserializer: ->(v) { v.to_sym })
|
13
|
+
.register(
|
14
|
+
Time,
|
15
|
+
serializer: ->(v) { v.iso8601(RubyEventStore::TIMESTAMP_PRECISION) },
|
16
|
+
deserializer: ->(v) { Time.iso8601(v) }
|
17
|
+
)
|
18
|
+
.register(
|
19
|
+
ActiveSupport::TimeWithZone,
|
20
|
+
serializer: ->(v) { v.iso8601(RubyEventStore::TIMESTAMP_PRECISION) },
|
21
|
+
deserializer: ->(v) { Time.iso8601(v).in_time_zone },
|
22
|
+
stored_type: ->(*) { "ActiveSupport::TimeWithZone" }
|
23
|
+
)
|
24
|
+
.register(Date, serializer: ->(v) { v.iso8601 }, deserializer: ->(v) { Date.iso8601(v) })
|
25
|
+
.register(DateTime, serializer: ->(v) { v.iso8601 }, deserializer: ->(v) { DateTime.iso8601(v) }),
|
26
|
+
RubyEventStore::Mappers::Transformation::SymbolizeMetadataKeys.new
|
27
|
+
)
|
28
|
+
),
|
29
|
+
repository: repository
|
30
|
+
)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
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: 2.
|
4
|
+
version: 2.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arkency
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby_event_store
|
@@ -16,56 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.8.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: 2.
|
26
|
+
version: 2.8.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: 2.
|
33
|
+
version: 2.8.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: 2.
|
40
|
+
version: 2.8.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: 2.
|
47
|
+
version: 2.8.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: 2.
|
54
|
+
version: 2.8.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: 2.
|
61
|
+
version: 2.8.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: 2.
|
68
|
+
version: 2.8.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: activesupport
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -139,6 +139,7 @@ files:
|
|
139
139
|
- lib/generators/templates/bc_spec.rb
|
140
140
|
- lib/generators/templates/module.rb
|
141
141
|
- lib/generators/templates/require_bc_spec.rb
|
142
|
+
- lib/generators/templates/require_bc_test.rb
|
142
143
|
- lib/generators/templates/spec_helper.rb
|
143
144
|
- lib/generators/templates/test_helper.rb
|
144
145
|
- lib/rails_event_store.rb
|
@@ -148,6 +149,8 @@ files:
|
|
148
149
|
- lib/rails_event_store/async_handler_helpers.rb
|
149
150
|
- lib/rails_event_store/browser.rb
|
150
151
|
- lib/rails_event_store/client.rb
|
152
|
+
- lib/rails_event_store/default_client_profile.rb
|
153
|
+
- lib/rails_event_store/json_client.rb
|
151
154
|
- lib/rails_event_store/link_by_metadata.rb
|
152
155
|
- lib/rails_event_store/middleware.rb
|
153
156
|
- lib/rails_event_store/railtie.rb
|