rails_event_store 0.14.0 → 0.14.1
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/CHANGELOG.md +6 -0
- data/lib/rails_event_store/all.rb +20 -0
- data/lib/rails_event_store/client.rb +1 -1
- data/lib/rails_event_store/version.rb +1 -1
- data/lib/rails_event_store.rb +9 -19
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ee6ef9f0a3a5aa3e01bc4e38ce52af3c885950a
|
4
|
+
data.tar.gz: 8178f8807b08e50bad8e4fd86d4ef32ab487b7f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: faacc6caeacc3bd6a3ee393e886a4a35e100efd287103ea2218c9bca3e4cdbb85b88e6377bcdcb00a419656dc25b3eb11f5e69394baa3160d55eb877f102342a
|
7
|
+
data.tar.gz: cf5753c56548181867316ff32949c17a1525f7649ac5613d0993de0e5d788a223ccc7c39e4710ab549124776c6954ee9cf540042afe5db14745b9d0310cfb999
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
### 0.14.1 (21.11.2016)
|
2
|
+
|
3
|
+
* Change: Allows to set the event repository used. #61
|
4
|
+
Allow to avoid ActiveRecord dependency when not using rails_event_store_active_record's
|
5
|
+
event repository. See documentation for mode details http://railseventstore.arkency.com/docs/repository.html
|
6
|
+
|
1
7
|
### 0.14.0 (28.10.2016)
|
2
8
|
|
3
9
|
* Change: aggregate_root updated to 0.4.0
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'ruby_event_store'
|
2
|
+
require 'rails_event_store/client'
|
3
|
+
require 'rails_event_store/version'
|
4
|
+
|
5
|
+
module RailsEventStore
|
6
|
+
Event = RubyEventStore::Event
|
7
|
+
InMemoryRepository = RubyEventStore::InMemoryRepository
|
8
|
+
EventBroker = RubyEventStore::PubSub::Broker
|
9
|
+
Projection = RubyEventStore::Projection
|
10
|
+
WrongExpectedEventVersion = RubyEventStore::WrongExpectedEventVersion
|
11
|
+
InvalidExpectedVersion = RubyEventStore::InvalidExpectedVersion
|
12
|
+
IncorrectStreamData = RubyEventStore::IncorrectStreamData
|
13
|
+
EventNotFound = RubyEventStore::EventNotFound
|
14
|
+
SubscriberNotExist = RubyEventStore::SubscriberNotExist
|
15
|
+
MethodNotDefined = RubyEventStore::MethodNotDefined
|
16
|
+
InvalidPageStart = RubyEventStore::InvalidPageStart
|
17
|
+
InvalidPageSize = RubyEventStore::InvalidPageSize
|
18
|
+
GLOBAL_STREAM = RubyEventStore::GLOBAL_STREAM
|
19
|
+
PAGE_SIZE = RubyEventStore::PAGE_SIZE
|
20
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module RailsEventStore
|
2
2
|
class Client < RubyEventStore::Client
|
3
|
-
def initialize(repository:
|
3
|
+
def initialize(repository: RailsEventStore.event_repository,
|
4
4
|
event_broker: EventBroker.new,
|
5
5
|
page_size: PAGE_SIZE)
|
6
6
|
capture_metadata = ->{ Thread.current[:rails_event_store] }
|
data/lib/rails_event_store.rb
CHANGED
@@ -1,25 +1,15 @@
|
|
1
|
-
require '
|
1
|
+
require 'active_support/core_ext/class/attribute_accessors'
|
2
2
|
require 'rails_event_store_active_record'
|
3
|
+
require 'rails_event_store/all'
|
3
4
|
|
4
5
|
module RailsEventStore
|
5
|
-
|
6
|
-
InMemoryRepository = RubyEventStore::InMemoryRepository
|
7
|
-
EventBroker = RubyEventStore::PubSub::Broker
|
8
|
-
Projection = RubyEventStore::Projection
|
6
|
+
mattr_reader :event_repository
|
9
7
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
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
|
8
|
+
def self.event_repository=(event_repository)
|
9
|
+
raise ArgumentError unless event_repository
|
10
|
+
@@event_repository = event_repository
|
11
|
+
end
|
21
12
|
end
|
22
13
|
|
23
|
-
|
24
|
-
|
25
|
-
require 'rails_event_store/railtie' if defined?(Rails::Railtie)
|
14
|
+
# Use active record by default
|
15
|
+
RailsEventStore.event_repository = RailsEventStoreActiveRecord::EventRepository.new
|
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.14.
|
4
|
+
version: 0.14.1
|
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-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -209,6 +209,7 @@ files:
|
|
209
209
|
- README.md
|
210
210
|
- Rakefile
|
211
211
|
- lib/rails_event_store.rb
|
212
|
+
- lib/rails_event_store/all.rb
|
212
213
|
- lib/rails_event_store/client.rb
|
213
214
|
- lib/rails_event_store/middleware.rb
|
214
215
|
- lib/rails_event_store/railtie.rb
|