rails_event_store 0.12.1 → 0.13.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
  SHA1:
3
- metadata.gz: b31a859ca472437601ae64081eae65a957970886
4
- data.tar.gz: 9d0ce641da75da9be97ea201a169e8e1294b1b81
3
+ metadata.gz: 2e633ea67f706e887a8b953755eeb520327a3e8e
4
+ data.tar.gz: 4e056cd53cb63ef91ccccf38952fd6109f728a7c
5
5
  SHA512:
6
- metadata.gz: 457876d9fdeabb0da1fa583ef7c6c925f4e1bd5695e2d533028422d0ebb896cfea3cc48076dd601c8f6e7dc9b93149b5dcd76987cae1bda2e843440dd89e9337
7
- data.tar.gz: ccd3d09e1d7ce4557b7f214ff97808dc1dd6ae5cfc51ff219c5e8443afc9aa73dfe5e30cc40f0057f1af2ab9f8077bc7553c40d6b59b146bc6ac48e81abd0cf2
6
+ metadata.gz: 6a193b09724ba709bb44ed3840a5abd7d543746b6f30879b41bf57e48e62bd2ed398e816671d65756d9dad660386627ea9c4bf616f4ddd9e3b46cdb003dd0342
7
+ data.tar.gz: 36c5438c9604ddda0863b92d2583985849307fe85f62787572247e0bdf89fc5071d4da7a7b7f3a963ab8979c0d097629f7a9e49d1c791ba3937e6695e67b9ee6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ### 0.13.0 (21.10.2016)
2
+
3
+ * Change: ruby_event_store updated to 0.13.0
4
+ * Change: RailsEventStore::Client methods signarures aligned with RubyEventStore::Client
5
+ RailsEventStore::Client is just a specialization of RubyEventStore::Client
6
+ with sensible defaults. Nothing more. This will ensure both are compatible.
7
+ * Change: No more ClosedStruct in Event class, you need use hashes to access data & metadata.
8
+ This is a breaking change.
9
+
1
10
  ### 0.12.1 (11.08.2016)
2
11
 
3
12
  * Fix: aggregate_root gem updated to 0.3.5 fixing invalid method name generated for events wrapped in namespace
data/CONTRIBUTING.md CHANGED
@@ -16,7 +16,7 @@ Any kind of contribution is welcomed. Here is a few guidelines that we need cont
16
16
  ## Making Changes
17
17
 
18
18
  * Create a feature branch from where you want to base your work.
19
- * Do your work. Please try to keep your commits small and focussed.
19
+ * Do your work. Please try to keep your commits small and focused.
20
20
  * Make sure you have added the necessary tests for your changes.
21
21
  * Push your changes to a feature branch in your fork of the repository.
22
22
  * Submit a pull request to the RailsEventStore repository.
data/README.md CHANGED
@@ -25,13 +25,9 @@ Read the reasoning:
25
25
 
26
26
  [Mutation testing and continuous integration](http://blog.arkency.com/2015/05/mutation-testing-and-continuous-integration/)
27
27
 
28
- In practice, it means that we run `make mutate` as part of the CI process. As long as we don't have 100%, there's a hardcoded value we expect from the mutation coverage.
29
-
28
+ In practice, it means that we run `make mutate` as part of the CI process.
30
29
  Whenever you fix a bug or add a new feature, we require that the coverage doesn't go down.
31
30
 
32
- However, even if it goes up, you need to go the `Makefile` and apply the new expected coverage. We call this technique "raising the coverage bar". The goal here is to raise the bar so that the better coverage is maintained for later changes. The new value should be the Kills/Mutations number in your last `make mutate` output.
33
-
34
-
35
31
  ## About
36
32
 
37
33
  <img src="http://arkency.com/images/arkency.png" alt="Arkency" width="20%" align="left" />
@@ -1,66 +1,13 @@
1
1
  module RailsEventStore
2
- class Client
3
-
2
+ class Client < RubyEventStore::Client
4
3
  def initialize(repository: RailsEventStoreActiveRecord::EventRepository.new,
5
4
  event_broker: EventBroker.new,
6
5
  page_size: PAGE_SIZE)
7
- @repository = repository
8
- @page_size = page_size
9
- @event_broker = event_broker
10
- end
11
-
12
- def publish_event(event, stream_name: GLOBAL_STREAM, expected_version: :any)
13
- event_store.publish_event(event, stream_name: stream_name, expected_version: expected_version)
14
- end
15
-
16
- def append_to_stream(event, stream_name: GLOBAL_STREAM, expected_version: :any)
17
- event_store.append_to_stream(stream_name, event, expected_version: expected_version)
18
- end
19
-
20
- def delete_stream(stream_name)
21
- event_store.delete_stream(stream_name)
22
- end
23
-
24
- def read_events_forward(stream_name, start: :head, count: page_size)
25
- event_store.read_events_forward(stream_name, start, count)
26
- end
27
-
28
- def read_events_backward(stream_name, start: :head, count: page_size)
29
- event_store.read_events_backward(stream_name, start, count)
30
- end
31
-
32
- def read_stream_events_forward(stream_name)
33
- event_store.read_stream_events_forward(stream_name)
34
- end
35
-
36
- def read_stream_events_backward(stream_name)
37
- event_store.read_stream_events_backward(stream_name)
38
- end
39
-
40
- def read_all_streams_forward(start: :head, count: page_size)
41
- event_store.read_all_streams_forward(start, count)
42
- end
43
-
44
- def read_all_streams_backward(start: :head, count: page_size)
45
- event_store.read_all_streams_backward(start, count)
46
- end
47
-
48
- def subscribe(subscriber, event_types, &proc)
49
- event_store.subscribe(subscriber, event_types, &proc)
50
- end
51
-
52
- def subscribe_to_all_events(subscriber, &proc)
53
- event_store.subscribe_to_all_events(subscriber, &proc)
54
- end
55
-
56
- private
57
- attr_reader :repository, :page_size, :event_broker
58
-
59
- def event_store
60
6
  capture_metadata = ->{ Thread.current[:rails_event_store] }
61
- @event_store ||= RubyEventStore::Client.new(repository,
62
- event_broker: event_broker,
63
- metadata_proc: capture_metadata)
7
+ super(repository: repository,
8
+ event_broker: event_broker,
9
+ page_size: page_size,
10
+ metadata_proc: capture_metadata)
64
11
  end
65
12
  end
66
13
  end
@@ -1,3 +1,3 @@
1
1
  module RailsEventStore
2
- VERSION = '0.12.1'
2
+ VERSION = '0.13.0'
3
3
  end
@@ -6,9 +6,20 @@ module RailsEventStore
6
6
  InMemoryRepository = RubyEventStore::InMemoryRepository
7
7
  EventBroker = RubyEventStore::PubSub::Broker
8
8
  Projection = RubyEventStore::Projection
9
+
10
+ GLOBAL_STREAM = RubyEventStore::GLOBAL_STREAM
11
+ PAGE_SIZE = RubyEventStore::PAGE_SIZE
12
+
13
+ WrongExpectedEventVersion = RubyEventStore::WrongExpectedEventVersion
14
+ InvalidExpectedVersion = RubyEventStore::InvalidExpectedVersion
15
+ IncorrectStreamData = RubyEventStore::IncorrectStreamData
16
+ EventNotFound = RubyEventStore::EventNotFound
17
+ SubscriberNotExist = RubyEventStore::SubscriberNotExist
18
+ MethodNotDefined = RubyEventStore::MethodNotDefined
19
+ InvalidPageStart = RubyEventStore::InvalidPageStart
20
+ InvalidPageSize = RubyEventStore::InvalidPageSize
9
21
  end
10
22
 
11
23
  require 'rails_event_store/version'
12
24
  require 'rails_event_store/client'
13
- require 'rails_event_store/constants'
14
25
  require 'rails_event_store/railtie' if defined?(Rails::Railtie)
@@ -27,10 +27,10 @@ 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.12.0'
31
- spec.add_dependency 'rails_event_store_active_record', '~> 0.6.7'
32
- spec.add_dependency 'aggregate_root', '~> 0.3.5'
30
+ spec.add_dependency 'ruby_event_store', '~> 0.13.0'
31
+ spec.add_dependency 'rails_event_store_active_record', '~> 0.6.9'
32
+ spec.add_dependency 'aggregate_root', '~> 0.3.6'
33
33
  spec.add_dependency 'activesupport', '>= 3.0'
34
34
  spec.add_dependency 'activemodel', '>= 3.0'
35
- spec.add_development_dependency 'mutant-rspec', '~> 0.8'
35
+ spec.add_development_dependency 'mutant-rspec', '~> 0.8.11'
36
36
  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: 0.12.1
4
+ version: 0.13.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-08-11 00:00:00.000000000 Z
11
+ date: 2016-10-21 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.12.0
117
+ version: 0.13.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.12.0
124
+ version: 0.13.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.7
131
+ version: 0.6.9
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.7
138
+ version: 0.6.9
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.5
145
+ version: 0.3.6
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.5
152
+ version: 0.3.6
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: activesupport
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -184,14 +184,14 @@ dependencies:
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: '0.8'
187
+ version: 0.8.11
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: '0.8'
194
+ version: 0.8.11
195
195
  description: Implementation of Event Store in Ruby
196
196
  email:
197
197
  - dev@arkency.com
@@ -210,7 +210,6 @@ files:
210
210
  - Rakefile
211
211
  - lib/rails_event_store.rb
212
212
  - lib/rails_event_store/client.rb
213
- - lib/rails_event_store/constants.rb
214
213
  - lib/rails_event_store/middleware.rb
215
214
  - lib/rails_event_store/railtie.rb
216
215
  - lib/rails_event_store/version.rb
@@ -236,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
236
235
  version: '0'
237
236
  requirements: []
238
237
  rubyforge_project:
239
- rubygems_version: 2.5.1
238
+ rubygems_version: 2.6.7
240
239
  signing_key:
241
240
  specification_version: 4
242
241
  summary: Event Store in Ruby
@@ -1,4 +0,0 @@
1
- module RailsEventStore
2
- GLOBAL_STREAM = RubyEventStore::GLOBAL_STREAM
3
- PAGE_SIZE = 100.freeze
4
- end