rails_event_store 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/CHANGELOG.md +16 -0
- data/Makefile +1 -1
- data/lib/rails_event_store/client.rb +17 -7
- data/lib/rails_event_store/middleware.rb +0 -1
- data/lib/rails_event_store/version.rb +1 -1
- data/rails_event_store.gemspec +3 -3
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58646a3c0ac5dc59b471a036bf3d45c1d83eaace
|
4
|
+
data.tar.gz: 9f85d03e701be19f70c175da9a72ab87ffc3ad0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c2a011aacfafd8569f72f03b31c1c9289db7377d6754049dcbbf75d5e58fe6d76cdfb50724c57108837c8ee5e2b2ee9ac1ccb368871f149acdbfa68f3def1ec
|
7
|
+
data.tar.gz: 2f8d29ef7dfb8f0c9e50fb43fac512246391413cced02e3bc7ae2dff5ed03deeb26d764b806a545075541349f9b684cabc84e9e32724c258748ac17394df4122
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
### 0.11.0 (12.07.2016)
|
2
|
+
|
3
|
+
* Breaking change in domain event class (Part of PR #48)
|
4
|
+
* no more simple `TestEvent.new(some_attr: 'some value')`
|
5
|
+
use `TestEvent.new(data: { some_attr: 'some value' })` instead
|
6
|
+
* all data & metadata attributes accessible via `data` & `metadata` properties
|
7
|
+
of event class
|
8
|
+
* This will avoid name clashes when defining domain event data,
|
9
|
+
especially important for `event_id`
|
10
|
+
* Breaking change: deprecated `handle_event` method removed, use `call` instead
|
11
|
+
* some domain event handlers might need method rename
|
12
|
+
* Change: Mark aliased methods as deprecated (soon to be removed)
|
13
|
+
* Change: Update RubyEventStore to 0.11.0 PR #48
|
14
|
+
* RubyEventStore::Facade renamed to RubyEventStore::Client
|
15
|
+
* Fix: Improve mutation tests coverage PR #47
|
16
|
+
|
1
17
|
### 0.10.0 (30.06.2016)
|
2
18
|
|
3
19
|
* Change: Rails request details in event metadata PR #39
|
data/Makefile
CHANGED
@@ -10,7 +10,7 @@ test: ## Run tests
|
|
10
10
|
|
11
11
|
mutate: test ## Run mutation tests
|
12
12
|
@echo "Running mutation tests - only 100% free mutation will be accepted"
|
13
|
-
@bundle exec mutant --include lib --require rails_event_store --use rspec "RailsEventStore*" --expected-coverage
|
13
|
+
@bundle exec mutant --include lib --require rails_event_store --use rspec "RailsEventStore*" --expected-coverage 497/636
|
14
14
|
|
15
15
|
.PHONY: help
|
16
16
|
|
@@ -10,9 +10,7 @@ module RailsEventStore
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def publish_event(event, stream_name = GLOBAL_STREAM, expected_version = :any)
|
13
|
-
|
14
|
-
enriched_event = event.class.new(event_id: event.event_id, metadata: captured_metadata.merge(event.metadata), **event.data)
|
15
|
-
event_store.publish_event(enriched_event, stream_name, expected_version)
|
13
|
+
event_store.publish_event(event, stream_name, expected_version)
|
16
14
|
end
|
17
15
|
|
18
16
|
def append_to_stream(event, stream_name = GLOBAL_STREAM, expected_version = :any)
|
@@ -26,7 +24,10 @@ module RailsEventStore
|
|
26
24
|
def read_events_forward(stream_name, start = :head, count = page_size)
|
27
25
|
event_store.read_events_forward(stream_name, start, count)
|
28
26
|
end
|
29
|
-
|
27
|
+
def read_events(stream_name, start = :head, count = page_size)
|
28
|
+
warn "[DEPRECATION] `read_events` is deprecated. Please use `read_events_forward` instead."
|
29
|
+
read_events_forward(stream_name, start, count)
|
30
|
+
end
|
30
31
|
|
31
32
|
def read_events_backward(stream_name, start = :head, count = page_size)
|
32
33
|
event_store.read_events_backward(stream_name, start, count)
|
@@ -35,7 +36,10 @@ module RailsEventStore
|
|
35
36
|
def read_stream_events_forward(stream_name)
|
36
37
|
event_store.read_stream_events_forward(stream_name)
|
37
38
|
end
|
38
|
-
|
39
|
+
def read_all_events(stream_name)
|
40
|
+
warn "[DEPRECATION] `read_all_events` is deprecated. Please use `read_stream_events_forward` instead."
|
41
|
+
read_stream_events_forward(stream_name)
|
42
|
+
end
|
39
43
|
|
40
44
|
def read_stream_events_backward(stream_name)
|
41
45
|
event_store.read_stream_events_backward(stream_name)
|
@@ -44,7 +48,10 @@ module RailsEventStore
|
|
44
48
|
def read_all_streams_forward(start = :head, count = page_size)
|
45
49
|
event_store.read_all_streams_forward(start, count)
|
46
50
|
end
|
47
|
-
|
51
|
+
def read_all_streams(start = :head, count = page_size)
|
52
|
+
warn "[DEPRECATION] `read_all_streams` is deprecated. Please use `read_all_streams_forward` instead."
|
53
|
+
read_all_streams_forward(start, count)
|
54
|
+
end
|
48
55
|
|
49
56
|
def read_all_streams_backward(start = :head, count = page_size)
|
50
57
|
event_store.read_all_streams_backward(start, count)
|
@@ -62,7 +69,10 @@ module RailsEventStore
|
|
62
69
|
attr_reader :repository, :page_size, :event_broker
|
63
70
|
|
64
71
|
def event_store
|
65
|
-
|
72
|
+
capture_metadata = ->{ Thread.current[:rails_event_store] }
|
73
|
+
@event_store ||= RubyEventStore::Client.new(repository,
|
74
|
+
event_broker: event_broker,
|
75
|
+
metadata_proc: capture_metadata)
|
66
76
|
end
|
67
77
|
end
|
68
78
|
end
|
data/rails_event_store.gemspec
CHANGED
@@ -27,9 +27,9 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.add_development_dependency 'sqlite3'
|
28
28
|
spec.add_development_dependency 'rack-test'
|
29
29
|
|
30
|
-
spec.add_dependency 'ruby_event_store', '~> 0.
|
31
|
-
spec.add_dependency 'rails_event_store_active_record', '~> 0.6.
|
32
|
-
spec.add_dependency 'aggregate_root', '~> 0.3.
|
30
|
+
spec.add_dependency 'ruby_event_store', '~> 0.11.0'
|
31
|
+
spec.add_dependency 'rails_event_store_active_record', '~> 0.6.6'
|
32
|
+
spec.add_dependency 'aggregate_root', '~> 0.3.2'
|
33
33
|
spec.add_dependency 'activesupport', '>= 3.0'
|
34
34
|
spec.add_dependency 'activemodel', '>= 3.0'
|
35
35
|
spec.add_development_dependency 'mutant-rspec', '~> 0.8'
|
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.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arkency
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -114,42 +114,42 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.
|
117
|
+
version: 0.11.0
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.
|
124
|
+
version: 0.11.0
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: rails_event_store_active_record
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.6.
|
131
|
+
version: 0.6.6
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.6.
|
138
|
+
version: 0.6.6
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: aggregate_root
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.3.
|
145
|
+
version: 0.3.2
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.3.
|
152
|
+
version: 0.3.2
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: activesupport
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|