euston-eventstore 1.0.4 → 1.1.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.
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source :rubygems
2
+ gemspec
data/Rakefile CHANGED
@@ -65,11 +65,10 @@ end
65
65
  #
66
66
  #############################################################################
67
67
 
68
- default_rspec_opts = %w[--colour --format Fuubar]
69
-
70
68
  desc "Run all examples"
71
69
  RSpec::Core::RakeTask.new(:spec) do |t|
72
- t.rspec_opts = default_rspec_opts
70
+ t.rspec_opts = ['-r ./spec/spec_helper.rb', '--colour', '--format Fuubar']
71
+ t.pattern = 'spec/**/*_spec.rb'
73
72
  end
74
73
 
75
74
  #############################################################################
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'euston-eventstore'
3
- s.version = '1.0.4'
4
- s.date = '2011-09-15'
3
+ s.version = '1.1.0'
4
+ s.date = '2011-10-03'
5
5
  s.platform = RUBY_PLATFORM.to_s == 'java' ? 'java' : Gem::Platform::RUBY
6
6
  s.authors = ['Lee Henson', 'Guy Boertje']
7
7
  s.email = ['lee.m.henson@gmail.com', 'guyboertje@gmail.com']
@@ -10,6 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.homepage = 'http://github.com/leemhenson/euston-eventstore'
11
11
  # = MANIFEST =
12
12
  s.files = %w[
13
+ Gemfile
13
14
  Rakefile
14
15
  euston-eventstore.gemspec
15
16
  lib/euston-eventstore.rb
@@ -31,7 +32,9 @@ Gem::Specification.new do |s|
31
32
  lib/euston-eventstore/persistence/mongodb/mongo_snapshot.rb
32
33
  lib/euston-eventstore/persistence/mongodb/mongo_stream_head.rb
33
34
  lib/euston-eventstore/persistence/stream_head.rb
35
+ lib/euston-eventstore/repository.rb
34
36
  lib/euston-eventstore/snapshot.rb
37
+ lib/euston-eventstore/snapshot_stream_pair.rb
35
38
  lib/euston-eventstore/version.rb
36
39
  spec/event_store/dispatcher/asynchronous_dispatcher_spec.rb
37
40
  spec/event_store/dispatcher/synchronous_dispatcher_spec.rb
@@ -48,20 +51,22 @@ Gem::Specification.new do |s|
48
51
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
49
52
 
50
53
  s.add_dependency 'activesupport', '~> 3.0.9'
54
+ s.add_dependency 'euston', '~> 1.1.0'
51
55
  s.add_dependency 'hash-keys', '~> 1.0.0'
52
- s.add_dependency 'require_all', '~> 1.2.0'
53
- s.add_dependency 'uuid', '~> 2.3.0'
54
56
 
55
57
  if RUBY_PLATFORM.to_s == 'java'
56
58
  s.add_dependency 'json-jruby', '~> 1.5.0'
57
- s.add_dependency 'jmongo', '~> 1.0.0'
59
+ s.add_dependency 'jmongo', '~> 1.1.0'
58
60
  else
61
+ s.add_dependency 'bson', '~> 1.3.1'
59
62
  s.add_dependency 'bson_ext', '~> 1.3.1'
60
63
  s.add_dependency 'json', '~> 1.5.0'
61
64
  s.add_dependency 'mongo', '~> 1.3.1'
65
+ s.add_dependency 'uuid', '~> 2.3.0'
62
66
  end
63
67
 
64
68
  s.add_development_dependency 'awesome_print', '~> 0.4.0'
65
69
  s.add_development_dependency 'fuubar', '~> 0.0.0'
70
+ s.add_development_dependency 'rake', '~> 0.9.2'
66
71
  s.add_development_dependency 'rspec', '~> 2.6.0'
67
- end
72
+ end
@@ -31,7 +31,7 @@ module Euston
31
31
  :max_revision => max_revision).to_enum
32
32
  end
33
33
 
34
- def get_snapshot(stream_id, max_revision)
34
+ def get_snapshot(stream_id, max_revision = 0)
35
35
  @persistence.get_snapshot stream_id, validate_max_revision(max_revision)
36
36
  end
37
37
 
@@ -39,6 +39,13 @@ module Euston
39
39
  @persistence.get_streams_to_snapshot max_threshold
40
40
  end
41
41
 
42
+ def get_snapshot_stream_pair stream_id
43
+ snapshot = get_snapshot stream_id
44
+ stream = open_stream :stream_id => stream_id, :snapshot => snapshot
45
+
46
+ SnapshotStreamPair.new snapshot, stream
47
+ end
48
+
42
49
  def open_stream(options)
43
50
  options = { :stream_id => nil,
44
51
  :min_revision => 0,
@@ -4,6 +4,7 @@ module Euston
4
4
  def initialize(options)
5
5
  @persistence = options[:persistence]
6
6
  @committed_events = []
7
+ @committed_headers = {}
7
8
  @uncommitted_events = []
8
9
  @uncommitted_headers = {}
9
10
  @commit_sequence = 0
@@ -30,7 +31,7 @@ module Euston
30
31
  end
31
32
  end
32
33
 
33
- attr_reader :stream_id, :stream_revision, :commit_sequence, :committed_events, :uncommitted_events, :uncommitted_headers
34
+ attr_reader :stream_id, :stream_revision, :commit_sequence, :committed_events, :committed_headers, :uncommitted_events, :uncommitted_headers
34
35
 
35
36
  def <<(event)
36
37
  @uncommitted_events << event unless event.nil? || event.body.nil?
@@ -84,6 +85,7 @@ module Euston
84
85
  commits.each do |commit|
85
86
  @identifiers << commit.commit_id
86
87
  @commit_sequence = commit.commit_sequence
88
+ @committed_headers.merge! commit.to_hash[:headers] || {}
87
89
 
88
90
  current_revision = commit.stream_revision - commit.events.length + 1
89
91
 
@@ -8,6 +8,8 @@ module Euston
8
8
  included do
9
9
  alias_method :original_initialize, :initialize
10
10
  alias_method :initialize, :mongo_initialize
11
+ alias_method :original_to_hash, :to_hash
12
+ alias_method :to_hash, :to_mongo_hash
11
13
  end
12
14
 
13
15
  class << self
@@ -36,33 +38,31 @@ module Euston
36
38
 
37
39
  attr_reader :dispatched
38
40
 
39
- def to_hash
40
- {
41
- :_id => { :stream_id => stream_id, :commit_sequence => commit_sequence },
42
- :commit_id => commit_id,
43
- :commit_timestamp => commit_timestamp.to_f,
44
- :dispatched => dispatched || false,
45
- :events => events.map { |e| e.to_hash },
46
- :headers => headers
47
- }
41
+ def to_mongo_hash
42
+ hash = original_to_hash
43
+ hash[:_id] = { :stream_id => hash.delete(:stream_id), :commit_sequence => hash.delete(:commit_sequence) }
44
+ hash.delete :stream_revision
45
+ hash.delete :commit_sequence
46
+ hash[:dispatched] ||= false
47
+ hash[:events] = hash[:events].map { |e| e.to_hash }
48
+ hash[:commit_timestamp] = hash[:commit_timestamp].to_f
49
+ hash
48
50
  end
49
51
 
50
52
  def to_mongo_commit
51
53
  mongo_stream_revision = stream_revision - (events.length - 1)
52
- mongo_events = events.map do |e|
53
- hash = { :stream_revision => mongo_stream_revision, :payload => e.to_hash }
54
+
55
+ hash = to_mongo_hash
56
+
57
+ hash[:events] = events.map do |e|
58
+ event_hash = { :stream_revision => mongo_stream_revision, :payload => e.to_hash }
54
59
  mongo_stream_revision += 1
55
- hash
60
+ event_hash
56
61
  end
57
62
 
58
- {
59
- :_id => { :stream_id => stream_id, :commit_sequence => commit_sequence },
60
- :commit_id => commit_id,
61
- :commit_timestamp => commit_timestamp.to_f,
62
- :headers => headers,
63
- :events => mongo_events,
64
- :dispatched => false
65
- }
63
+ hash[:commit_timestamp_for_humans] = Time.at(hash[:commit_timestamp]).utc
64
+
65
+ hash
66
66
  end
67
67
 
68
68
  def to_id_query
@@ -7,19 +7,15 @@ module Euston
7
7
  class Config
8
8
  include ::Singleton
9
9
 
10
- def host
11
- @host ||= 'localhost'
12
- end
13
-
14
- def port
15
- @port ||= 27017
10
+ def uri
11
+ @uri ||= 'mongodb://0.0.0.0:27017/'
16
12
  end
17
13
 
18
14
  def options
19
- @options ||= { :safe => { :fsync => true }}
15
+ @options ||= { :safe => true, :fsync => true, :journal => true }
20
16
  end
21
17
 
22
- attr_writer :host, :port, :options
18
+ attr_writer :uri, :options
23
19
  attr_accessor :database, :logger
24
20
  end
25
21
  end
@@ -7,9 +7,9 @@ module Euston
7
7
  @store = store
8
8
 
9
9
  collection_names = store.collection_names
10
- store.create_collection 'commits' unless collection_names.include? 'commits' # :safe = true
11
- store.create_collection 'snapshot' unless collection_names.include? 'snapshot' # :safe = false
12
- store.create_collection 'streams' unless collection_names.include? 'streams' # :safe = false
10
+ store.create_collection 'commits' unless collection_names.include? 'commits'
11
+ store.create_collection 'snapshots' unless collection_names.include? 'snapshots'
12
+ store.create_collection 'streams' unless collection_names.include? 'streams'
13
13
  end
14
14
 
15
15
  def add_snapshot(snapshot)
@@ -17,20 +17,28 @@ module Euston
17
17
 
18
18
  begin
19
19
  mongo_snapshot = snapshot.is_a?(Hash) ? snapshot : snapshot.to_hash
20
- id = { '_id' => mongo_snapshot[:_id] }
21
20
 
22
- persisted_snapshots.update(id, { 'payload' => mongo_snapshot[:payload] }.merge(id), { :upsert => true })
21
+ id = { '_id' => mongo_snapshot[:_id] }
22
+ doc = { 'headers' => mongo_snapshot[:headers],
23
+ 'payload' => mongo_snapshot[:payload] }.merge(id)
24
+
25
+ # jmongo doesn't currently honour the safe mode on the connection, so we have to specify safe here
26
+ persisted_snapshots.update id, doc, :upsert => true, :safe => true
27
+
28
+ id = { '_id' => snapshot.stream_id }
23
29
 
24
30
  # jmongo's find_one is broken
25
31
  if defined?(JMongo)
26
- stream_head = MongoStreamHead.from_hash persisted_stream_heads.find({ '_id' => snapshot.stream_id }).to_a.first
32
+ stream_head = MongoStreamHead.from_hash persisted_stream_heads.find(id).to_a.first
27
33
  else
28
- stream_head = MongoStreamHead.from_hash persisted_stream_heads.find_one({ '_id' => snapshot.stream_id })
34
+ stream_head = MongoStreamHead.from_hash persisted_stream_heads.find_one(id)
29
35
  end
30
36
 
31
- unsnapshotted = stream_head.head_revision - snapshot.stream_revision
32
- persisted_stream_heads.update({ '_id' => snapshot.stream_id },
33
- { '$set' => { 'snapshot_revision' => snapshot.stream_revision, 'unsnapshotted' => unsnapshotted } })
37
+ modifiers = { '$set' => { 'snapshot_revision' => snapshot.stream_revision,
38
+ 'unsnapshotted' => stream_head.head_revision - snapshot.stream_revision } }
39
+
40
+ # jmongo doesn't currently honour the safe mode on the connection, so we have to specify safe here
41
+ persisted_stream_heads.update id, modifiers, :safe => true
34
42
  return true
35
43
  rescue Mongo::OperationFailure
36
44
  return false
@@ -42,8 +50,9 @@ module Euston
42
50
  commit = attempt.to_mongo_commit
43
51
 
44
52
  begin
45
- # for concurrency / duplicate commit detection safe mode is required
53
+ # jmongo doesn't currently honour the safe mode on the connection, so we have to specify safe here
46
54
  persisted_commits.insert commit, :safe => true
55
+
47
56
  update_stream_head_async attempt.stream_id, attempt.stream_revision, attempt.events.length
48
57
  rescue Mongo::OperationFailure, NativeException => e
49
58
  raise(Euston::EventStore::StorageError, e.message, e.backtrace) unless e.message.include? CONCURRENCY_EXCEPTION
@@ -122,7 +131,8 @@ module Euston
122
131
 
123
132
  def mark_commit_as_dispatched(commit)
124
133
  try_mongo do
125
- persisted_commits.update commit.to_id_query, { '$set' => { 'dispatched' => true }}
134
+ # jmongo doesn't currently honour the safe mode on the connection, so we have to specify safe here
135
+ persisted_commits.update commit.to_id_query, { '$set' => { 'dispatched' => true }}, :safe => true
126
136
  end
127
137
  end
128
138
 
@@ -152,10 +162,12 @@ module Euston
152
162
 
153
163
  def update_stream_head_async(stream_id, stream_revision, events_count)
154
164
  Thread.fork do
155
- persisted_stream_heads.update(
156
- { '_id' => stream_id },
157
- { '$set' => { 'head_revision' => stream_revision }, '$inc' => { 'snapshot_revision' => 0, 'unsnapshotted' => events_count } },
158
- { :upsert => true })
165
+ # jmongo doesn't currently honour the safe mode on the connection, so we have to specify safe here
166
+ id = { '_id' => stream_id }
167
+ doc = { '$set' => { 'head_revision' => stream_revision },
168
+ '$inc' => { 'snapshot_revision' => 0, 'unsnapshotted' => events_count } }
169
+
170
+ persisted_stream_heads.update id, doc, :upsert => true, :safe => true
159
171
  end
160
172
  end
161
173
 
@@ -17,12 +17,12 @@ module Euston
17
17
  class MongoPersistenceFactory
18
18
  def self.build
19
19
  config = Config.instance
20
- connection = ::Mongo::Connection.new(config.host, config.port, config.options)
20
+ options = config.options
21
+ options.merge!(:logger => config.logger) unless config.logger.nil?
21
22
 
22
- MongoPersistenceEngine.new connection.db(config.database)
23
- end
24
- def self.build_with_proxy()
25
- ZmqPersistenceEngineProxy.new(build.init)
23
+ @connection ||= Mongo::Connection.from_uri config.uri, options
24
+
25
+ MongoPersistenceEngine.new @connection.db(config.database)
26
26
  end
27
27
  end
28
28
  end
@@ -11,13 +11,17 @@ module Euston
11
11
 
12
12
  id = hash['_id']
13
13
 
14
- Euston::EventStore::Snapshot.new id['stream_id'], id['stream_revision'], hash['payload']
14
+ Euston::EventStore::Snapshot.new id['stream_id'],
15
+ id['stream_revision'],
16
+ hash['payload'].recursive__symbolize__keys!,
17
+ hash['headers'].recursive__symbolize__keys!
15
18
  end
16
19
  end
17
20
 
18
21
  def to_hash
19
22
  {
20
23
  :_id => { :stream_id => stream_id, :stream_revision => stream_revision },
24
+ :headers => headers,
21
25
  :payload => payload.recursive_stringify_symbol_values!
22
26
  }
23
27
  end
@@ -6,7 +6,8 @@ module Euston
6
6
  extend ::ActiveSupport::Concern
7
7
 
8
8
  class << self
9
- def from_hash(hash)
9
+ def from_hash hash
10
+ return nil if hash.nil?
10
11
  Euston::EventStore::Persistence::StreamHead.new hash['_id'], hash['head_revision'], hash['snapshot_revision']
11
12
  end
12
13
  end
@@ -3,7 +3,7 @@ module Euston
3
3
  module Persistence
4
4
  # Indicates the most recent information representing the head of a given stream.
5
5
  class StreamHead
6
- def initialize(stream_id, head_revision, snapshot_revision)
6
+ def initialize stream_id, head_revision, snapshot_revision
7
7
  @stream_id = stream_id
8
8
  @head_revision = head_revision
9
9
  @snapshot_revision = snapshot_revision
@@ -0,0 +1,19 @@
1
+ module Euston
2
+ module Repository
3
+ class << self
4
+ def find type, id
5
+ pair = event_store.get_snapshot_stream_pair id
6
+ return nil if pair.snapshot.nil? && pair.stream.committed_events.empty?
7
+
8
+ type.hydrate pair.stream, pair.snapshot
9
+ end
10
+
11
+ def save aggregate
12
+ stream = event_store.open_stream :stream_id => aggregate.aggregate_id
13
+ aggregate.uncommitted_events.each { |e| stream << Euston::EventStore::EventMessage.new(e.to_hash.stringify__keys) }
14
+ stream.uncommitted_headers[:aggregate_type] = aggregate.class.to_s
15
+ stream.commit_changes Euston.uuid.generate
16
+ end
17
+ end
18
+ end
19
+ end
@@ -2,10 +2,11 @@ module Euston
2
2
  module EventStore
3
3
  # Represents a materialized view of a stream at specific revision.
4
4
  class Snapshot
5
- def initialize(stream_id, stream_revision, payload)
5
+ def initialize stream_id, stream_revision, payload, headers = nil
6
6
  @stream_id = stream_id
7
7
  @stream_revision = stream_revision
8
8
  @payload = payload
9
+ @headers = headers || {}
9
10
  end
10
11
 
11
12
  # Gets the value which uniquely identifies the stream to which the snapshot applies.
@@ -16,6 +17,9 @@ module Euston
16
17
 
17
18
  # Gets the snapshot or materialized view of the stream at the revision indicated.
18
19
  attr_reader :payload
20
+
21
+ # Gets the metadata which provides additional, unstructured information about this snapshot.
22
+ attr_reader :headers
19
23
  end
20
24
  end
21
- end
25
+ end
@@ -0,0 +1,17 @@
1
+ module Euston
2
+ module EventStore
3
+ # A pair of snapshot & stream to reload an object in a performant way
4
+ class SnapshotStreamPair
5
+ def initialize snapshot, stream
6
+ @snapshot = snapshot
7
+ @stream = stream
8
+ end
9
+
10
+ # A snapshot providing the state of the object up to the start of the stream
11
+ attr_reader :snapshot
12
+
13
+ # A stream of commits since the snapshot was taken
14
+ attr_reader :stream
15
+ end
16
+ end
17
+ end
@@ -1,5 +1,5 @@
1
1
  module Euston
2
2
  module EventStore
3
- VERSION = "1.0.4"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
@@ -1,7 +1,26 @@
1
1
  require 'active_support/concern'
2
2
  require 'hash-keys'
3
- require 'require_all'
4
3
 
5
- require_rel 'euston-eventstore'
4
+ require 'euston-eventstore/commit'
5
+ require 'euston-eventstore/constants'
6
+ require 'euston-eventstore/errors'
7
+ require 'euston-eventstore/event_message'
8
+ require 'euston-eventstore/optimistic_event_store'
9
+ require 'euston-eventstore/optimistic_event_stream'
10
+ require 'euston-eventstore/repository'
11
+ require 'euston-eventstore/snapshot'
12
+ require 'euston-eventstore/snapshot_stream_pair'
13
+ require 'euston-eventstore/dispatcher/asynchronous_dispatcher'
14
+ require 'euston-eventstore/dispatcher/null_dispatcher'
15
+ require 'euston-eventstore/dispatcher/synchronous_dispatcher'
16
+ require 'euston-eventstore/persistence/stream_head'
17
+ require 'euston-eventstore/persistence/mongodb/mongo_commit'
18
+ require 'euston-eventstore/persistence/mongodb/mongo_commit_id'
19
+ require 'euston-eventstore/persistence/mongodb/mongo_config'
20
+ require 'euston-eventstore/persistence/mongodb/mongo_event_message'
21
+ require 'euston-eventstore/persistence/mongodb/mongo_persistence_engine'
22
+ require 'euston-eventstore/persistence/mongodb/mongo_persistence_factory'
23
+ require 'euston-eventstore/persistence/mongodb/mongo_snapshot'
24
+ require 'euston-eventstore/persistence/mongodb/mongo_stream_head'
6
25
 
7
26
  Json = JSON if defined?(JSON) && !defined?(Json)
@@ -1,5 +1,3 @@
1
- require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
2
-
3
1
  describe Euston::EventStore do
4
2
  let(:uuid) { Uuid }
5
3
 
@@ -72,4 +70,4 @@ describe Euston::EventStore do
72
70
  Euston::EventStore::Commit.new(defaults.merge options)
73
71
  end
74
72
  end
75
- end
73
+ end
@@ -1,5 +1,3 @@
1
- require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
2
-
3
1
  describe Euston::EventStore do
4
2
  let(:uuid) { Uuid }
5
3
 
@@ -1,5 +1,3 @@
1
- require File.join(File.dirname(__FILE__), '..', 'spec_helper')
2
-
3
1
  describe Euston::EventStore do
4
2
  let(:uuid) { Uuid }
5
3
  let(:stream_id) { uuid.generate }
@@ -1,5 +1,3 @@
1
- require File.join(File.dirname(__FILE__), '..', 'spec_helper')
2
-
3
1
  describe Euston::EventStore do
4
2
  let(:uuid) { Uuid }
5
3
  let(:default_stream_revision) { 1 }
@@ -1,5 +1,3 @@
1
- require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
2
-
3
1
  describe Euston::EventStore do
4
2
  describe 'mongodb persistence' do
5
3
  let(:uuid) { Uuid }
@@ -181,7 +179,7 @@ describe Euston::EventStore do
181
179
 
182
180
  context 'when retrieving a snapshot' do
183
181
  let(:too_far_back) { Euston::EventStore::Snapshot.new stream_id, 1, {} }
184
- let(:correct) { Euston::EventStore::Snapshot.new stream_id, 3, { 'key' => 'value' } }
182
+ let(:correct) { Euston::EventStore::Snapshot.new stream_id, 3, { :key => 'value' } }
185
183
  let(:too_far_forward) { Euston::EventStore::Snapshot.new stream_id, 5, {} }
186
184
  let(:commit1) { new_attempt }
187
185
  let(:commit2) { next_attempt commit1 }
@@ -271,6 +269,7 @@ describe Euston::EventStore do
271
269
  end
272
270
 
273
271
  it('returns all commits on or after the point in time specified') { @committed.should have(4).items }
272
+ it('returns commits with the same accuracy of timestamp') { @committed[0].commit_timestamp.should == first.commit_timestamp.to_f }
274
273
  end
275
274
 
276
275
  def new_attempt(options = {})
data/spec/spec_helper.rb CHANGED
@@ -22,17 +22,19 @@ require 'rspec/core'
22
22
  require 'rspec/core/rake_task'
23
23
  require 'rspec/expectations'
24
24
  require 'rspec/mocks'
25
+ require 'logger'
25
26
 
26
27
  require 'support/array_enumeration_counter'
27
28
 
28
29
  mongo_config = Euston::EventStore::Persistence::Mongodb::Config.instance
29
30
  mongo_config.database = 'event_store_tests'
31
+ mongo_config.options = { :safe => true, :fsync => true, :journal => true } #, :logger => Logger.new(STDOUT)
30
32
 
31
33
  RSpec.configure do |config|
32
34
  config.fail_fast = true
33
35
 
34
36
  config.before :each do
35
- connection = Mongo::Connection.new(mongo_config.host, mongo_config.port, mongo_config.options)
37
+ connection = Mongo::Connection.from_uri 'mongodb://0.0.0.0:27017/', mongo_config.options
36
38
  db = connection.db(mongo_config.database)
37
39
  db.collections.select { |c| c.name !~ /system/ }.each { |c| db.drop_collection c.name }
38
40
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: euston-eventstore
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2011-09-15 00:00:00.000000000 Z
13
+ date: 2011-10-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
17
- requirement: &78419350 !ruby/object:Gem::Requirement
17
+ requirement: &76979100 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,43 +22,43 @@ dependencies:
22
22
  version: 3.0.9
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *78419350
25
+ version_requirements: *76979100
26
26
  - !ruby/object:Gem::Dependency
27
- name: hash-keys
28
- requirement: &78418870 !ruby/object:Gem::Requirement
27
+ name: euston
28
+ requirement: &77012460 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: 1.0.0
33
+ version: 1.1.0
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *78418870
36
+ version_requirements: *77012460
37
37
  - !ruby/object:Gem::Dependency
38
- name: require_all
39
- requirement: &78418440 !ruby/object:Gem::Requirement
38
+ name: hash-keys
39
+ requirement: &77011560 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
43
43
  - !ruby/object:Gem::Version
44
- version: 1.2.0
44
+ version: 1.0.0
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *78418440
47
+ version_requirements: *77011560
48
48
  - !ruby/object:Gem::Dependency
49
- name: uuid
50
- requirement: &78417730 !ruby/object:Gem::Requirement
49
+ name: bson
50
+ requirement: &77010990 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
54
54
  - !ruby/object:Gem::Version
55
- version: 2.3.0
55
+ version: 1.3.1
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *78417730
58
+ version_requirements: *77010990
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: bson_ext
61
- requirement: &78416900 !ruby/object:Gem::Requirement
61
+ requirement: &77010070 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ~>
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: 1.3.1
67
67
  type: :runtime
68
68
  prerelease: false
69
- version_requirements: *78416900
69
+ version_requirements: *77010070
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: json
72
- requirement: &78416520 !ruby/object:Gem::Requirement
72
+ requirement: &77009580 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ~>
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: 1.5.0
78
78
  type: :runtime
79
79
  prerelease: false
80
- version_requirements: *78416520
80
+ version_requirements: *77009580
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: mongo
83
- requirement: &78415720 !ruby/object:Gem::Requirement
83
+ requirement: &77008960 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ~>
@@ -88,10 +88,21 @@ dependencies:
88
88
  version: 1.3.1
89
89
  type: :runtime
90
90
  prerelease: false
91
- version_requirements: *78415720
91
+ version_requirements: *77008960
92
+ - !ruby/object:Gem::Dependency
93
+ name: uuid
94
+ requirement: &77008510 !ruby/object:Gem::Requirement
95
+ none: false
96
+ requirements:
97
+ - - ~>
98
+ - !ruby/object:Gem::Version
99
+ version: 2.3.0
100
+ type: :runtime
101
+ prerelease: false
102
+ version_requirements: *77008510
92
103
  - !ruby/object:Gem::Dependency
93
104
  name: awesome_print
94
- requirement: &78409330 !ruby/object:Gem::Requirement
105
+ requirement: &77007730 !ruby/object:Gem::Requirement
95
106
  none: false
96
107
  requirements:
97
108
  - - ~>
@@ -99,10 +110,10 @@ dependencies:
99
110
  version: 0.4.0
100
111
  type: :development
101
112
  prerelease: false
102
- version_requirements: *78409330
113
+ version_requirements: *77007730
103
114
  - !ruby/object:Gem::Dependency
104
115
  name: fuubar
105
- requirement: &80165070 !ruby/object:Gem::Requirement
116
+ requirement: &77006970 !ruby/object:Gem::Requirement
106
117
  none: false
107
118
  requirements:
108
119
  - - ~>
@@ -110,10 +121,21 @@ dependencies:
110
121
  version: 0.0.0
111
122
  type: :development
112
123
  prerelease: false
113
- version_requirements: *80165070
124
+ version_requirements: *77006970
125
+ - !ruby/object:Gem::Dependency
126
+ name: rake
127
+ requirement: &77006470 !ruby/object:Gem::Requirement
128
+ none: false
129
+ requirements:
130
+ - - ~>
131
+ - !ruby/object:Gem::Version
132
+ version: 0.9.2
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: *77006470
114
136
  - !ruby/object:Gem::Dependency
115
137
  name: rspec
116
- requirement: &80164770 !ruby/object:Gem::Requirement
138
+ requirement: &77005820 !ruby/object:Gem::Requirement
117
139
  none: false
118
140
  requirements:
119
141
  - - ~>
@@ -121,7 +143,7 @@ dependencies:
121
143
  version: 2.6.0
122
144
  type: :development
123
145
  prerelease: false
124
- version_requirements: *80164770
146
+ version_requirements: *77005820
125
147
  description: Ruby port for Jonathan Oliver's EventStore. See https://github.com/joliver/EventStore
126
148
  for details.
127
149
  email:
@@ -131,6 +153,7 @@ executables: []
131
153
  extensions: []
132
154
  extra_rdoc_files: []
133
155
  files:
156
+ - Gemfile
134
157
  - Rakefile
135
158
  - euston-eventstore.gemspec
136
159
  - lib/euston-eventstore.rb
@@ -152,7 +175,9 @@ files:
152
175
  - lib/euston-eventstore/persistence/mongodb/mongo_snapshot.rb
153
176
  - lib/euston-eventstore/persistence/mongodb/mongo_stream_head.rb
154
177
  - lib/euston-eventstore/persistence/stream_head.rb
178
+ - lib/euston-eventstore/repository.rb
155
179
  - lib/euston-eventstore/snapshot.rb
180
+ - lib/euston-eventstore/snapshot_stream_pair.rb
156
181
  - lib/euston-eventstore/version.rb
157
182
  - spec/event_store/dispatcher/asynchronous_dispatcher_spec.rb
158
183
  - spec/event_store/dispatcher/synchronous_dispatcher_spec.rb