euston-eventstore 1.0.4-java → 1.1.0-java

Sign up to get free protection for your applications and to get access to all the features.
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,178 +1,190 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: euston-eventstore
3
- version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 1.0.4
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 1.1.0
6
6
  platform: java
7
- authors:
8
- - Lee Henson
9
- - Guy Boertje
10
- autorequire:
7
+ authors:
8
+ - Lee Henson
9
+ - Guy Boertje
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2011-09-15 00:00:00.000000000Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: activesupport
17
- version_requirements: &2058 !ruby/object:Gem::Requirement
18
- requirements:
19
- - - ~>
20
- - !ruby/object:Gem::Version
21
- version: 3.0.9
22
- none: false
23
- requirement: *2058
24
- prerelease: false
25
- type: :runtime
26
- - !ruby/object:Gem::Dependency
27
- name: hash-keys
28
- version_requirements: &2076 !ruby/object:Gem::Requirement
29
- requirements:
30
- - - ~>
31
- - !ruby/object:Gem::Version
32
- version: 1.0.0
33
- none: false
34
- requirement: *2076
35
- prerelease: false
36
- type: :runtime
37
- - !ruby/object:Gem::Dependency
38
- name: require_all
39
- version_requirements: &2092 !ruby/object:Gem::Requirement
40
- requirements:
41
- - - ~>
42
- - !ruby/object:Gem::Version
43
- version: 1.2.0
44
- none: false
45
- requirement: *2092
46
- prerelease: false
47
- type: :runtime
48
- - !ruby/object:Gem::Dependency
49
- name: uuid
50
- version_requirements: &2108 !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ~>
53
- - !ruby/object:Gem::Version
54
- version: 2.3.0
55
- none: false
56
- requirement: *2108
57
- prerelease: false
58
- type: :runtime
59
- - !ruby/object:Gem::Dependency
60
- name: json-jruby
61
- version_requirements: &2124 !ruby/object:Gem::Requirement
62
- requirements:
63
- - - ~>
64
- - !ruby/object:Gem::Version
65
- version: 1.5.0
66
- none: false
67
- requirement: *2124
68
- prerelease: false
69
- type: :runtime
70
- - !ruby/object:Gem::Dependency
71
- name: jmongo
72
- version_requirements: &2140 !ruby/object:Gem::Requirement
73
- requirements:
74
- - - ~>
75
- - !ruby/object:Gem::Version
76
- version: 1.0.0
77
- none: false
78
- requirement: *2140
79
- prerelease: false
80
- type: :runtime
81
- - !ruby/object:Gem::Dependency
82
- name: awesome_print
83
- version_requirements: &2156 !ruby/object:Gem::Requirement
84
- requirements:
85
- - - ~>
86
- - !ruby/object:Gem::Version
87
- version: 0.4.0
88
- none: false
89
- requirement: *2156
90
- prerelease: false
91
- type: :development
92
- - !ruby/object:Gem::Dependency
93
- name: fuubar
94
- version_requirements: &2174 !ruby/object:Gem::Requirement
95
- requirements:
96
- - - ~>
97
- - !ruby/object:Gem::Version
98
- version: 0.0.0
99
- none: false
100
- requirement: *2174
101
- prerelease: false
102
- type: :development
103
- - !ruby/object:Gem::Dependency
104
- name: rspec
105
- version_requirements: &2190 !ruby/object:Gem::Requirement
106
- requirements:
107
- - - ~>
108
- - !ruby/object:Gem::Version
109
- version: 2.6.0
110
- none: false
111
- requirement: *2190
112
- prerelease: false
113
- type: :development
13
+
14
+ date: 2011-10-03 00:00:00 +01:00
15
+ default_executable:
16
+ dependencies:
17
+ - !ruby/object:Gem::Dependency
18
+ name: activesupport
19
+ prerelease: false
20
+ requirement: &id001 !ruby/object:Gem::Requirement
21
+ none: false
22
+ requirements:
23
+ - - ~>
24
+ - !ruby/object:Gem::Version
25
+ version: 3.0.9
26
+ type: :runtime
27
+ version_requirements: *id001
28
+ - !ruby/object:Gem::Dependency
29
+ name: euston
30
+ prerelease: false
31
+ requirement: &id002 !ruby/object:Gem::Requirement
32
+ none: false
33
+ requirements:
34
+ - - ~>
35
+ - !ruby/object:Gem::Version
36
+ version: 1.1.0
37
+ type: :runtime
38
+ version_requirements: *id002
39
+ - !ruby/object:Gem::Dependency
40
+ name: hash-keys
41
+ prerelease: false
42
+ requirement: &id003 !ruby/object:Gem::Requirement
43
+ none: false
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 1.0.0
48
+ type: :runtime
49
+ version_requirements: *id003
50
+ - !ruby/object:Gem::Dependency
51
+ name: json-jruby
52
+ prerelease: false
53
+ requirement: &id004 !ruby/object:Gem::Requirement
54
+ none: false
55
+ requirements:
56
+ - - ~>
57
+ - !ruby/object:Gem::Version
58
+ version: 1.5.0
59
+ type: :runtime
60
+ version_requirements: *id004
61
+ - !ruby/object:Gem::Dependency
62
+ name: jmongo
63
+ prerelease: false
64
+ requirement: &id005 !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: 1.1.0
70
+ type: :runtime
71
+ version_requirements: *id005
72
+ - !ruby/object:Gem::Dependency
73
+ name: awesome_print
74
+ prerelease: false
75
+ requirement: &id006 !ruby/object:Gem::Requirement
76
+ none: false
77
+ requirements:
78
+ - - ~>
79
+ - !ruby/object:Gem::Version
80
+ version: 0.4.0
81
+ type: :development
82
+ version_requirements: *id006
83
+ - !ruby/object:Gem::Dependency
84
+ name: fuubar
85
+ prerelease: false
86
+ requirement: &id007 !ruby/object:Gem::Requirement
87
+ none: false
88
+ requirements:
89
+ - - ~>
90
+ - !ruby/object:Gem::Version
91
+ version: 0.0.0
92
+ type: :development
93
+ version_requirements: *id007
94
+ - !ruby/object:Gem::Dependency
95
+ name: rake
96
+ prerelease: false
97
+ requirement: &id008 !ruby/object:Gem::Requirement
98
+ none: false
99
+ requirements:
100
+ - - ~>
101
+ - !ruby/object:Gem::Version
102
+ version: 0.9.2
103
+ type: :development
104
+ version_requirements: *id008
105
+ - !ruby/object:Gem::Dependency
106
+ name: rspec
107
+ prerelease: false
108
+ requirement: &id009 !ruby/object:Gem::Requirement
109
+ none: false
110
+ requirements:
111
+ - - ~>
112
+ - !ruby/object:Gem::Version
113
+ version: 2.6.0
114
+ type: :development
115
+ version_requirements: *id009
114
116
  description: Ruby port for Jonathan Oliver's EventStore. See https://github.com/joliver/EventStore for details.
115
- email:
116
- - lee.m.henson@gmail.com
117
- - guyboertje@gmail.com
117
+ email:
118
+ - lee.m.henson@gmail.com
119
+ - guyboertje@gmail.com
118
120
  executables: []
121
+
119
122
  extensions: []
123
+
120
124
  extra_rdoc_files: []
121
- files:
122
- - Rakefile
123
- - euston-eventstore.gemspec
124
- - lib/euston-eventstore.rb
125
- - lib/euston-eventstore/commit.rb
126
- - lib/euston-eventstore/constants.rb
127
- - lib/euston-eventstore/dispatcher/asynchronous_dispatcher.rb
128
- - lib/euston-eventstore/dispatcher/null_dispatcher.rb
129
- - lib/euston-eventstore/dispatcher/synchronous_dispatcher.rb
130
- - lib/euston-eventstore/errors.rb
131
- - lib/euston-eventstore/event_message.rb
132
- - lib/euston-eventstore/optimistic_event_store.rb
133
- - lib/euston-eventstore/optimistic_event_stream.rb
134
- - lib/euston-eventstore/persistence/mongodb/mongo_commit.rb
135
- - lib/euston-eventstore/persistence/mongodb/mongo_commit_id.rb
136
- - lib/euston-eventstore/persistence/mongodb/mongo_config.rb
137
- - lib/euston-eventstore/persistence/mongodb/mongo_event_message.rb
138
- - lib/euston-eventstore/persistence/mongodb/mongo_persistence_engine.rb
139
- - lib/euston-eventstore/persistence/mongodb/mongo_persistence_factory.rb
140
- - lib/euston-eventstore/persistence/mongodb/mongo_snapshot.rb
141
- - lib/euston-eventstore/persistence/mongodb/mongo_stream_head.rb
142
- - lib/euston-eventstore/persistence/stream_head.rb
143
- - lib/euston-eventstore/snapshot.rb
144
- - lib/euston-eventstore/version.rb
145
- - spec/event_store/dispatcher/asynchronous_dispatcher_spec.rb
146
- - spec/event_store/dispatcher/synchronous_dispatcher_spec.rb
147
- - spec/event_store/optimistic_event_store_spec.rb
148
- - spec/event_store/optimistic_event_stream_spec.rb
149
- - spec/event_store/persistence/mongodb_spec.rb
150
- - spec/event_store/serialization/simple_message.rb
151
- - spec/spec_helper.rb
152
- - spec/support/array_enumeration_counter.rb
125
+
126
+ files:
127
+ - Gemfile
128
+ - Rakefile
129
+ - euston-eventstore.gemspec
130
+ - lib/euston-eventstore.rb
131
+ - lib/euston-eventstore/commit.rb
132
+ - lib/euston-eventstore/constants.rb
133
+ - lib/euston-eventstore/dispatcher/asynchronous_dispatcher.rb
134
+ - lib/euston-eventstore/dispatcher/null_dispatcher.rb
135
+ - lib/euston-eventstore/dispatcher/synchronous_dispatcher.rb
136
+ - lib/euston-eventstore/errors.rb
137
+ - lib/euston-eventstore/event_message.rb
138
+ - lib/euston-eventstore/optimistic_event_store.rb
139
+ - lib/euston-eventstore/optimistic_event_stream.rb
140
+ - lib/euston-eventstore/persistence/mongodb/mongo_commit.rb
141
+ - lib/euston-eventstore/persistence/mongodb/mongo_commit_id.rb
142
+ - lib/euston-eventstore/persistence/mongodb/mongo_config.rb
143
+ - lib/euston-eventstore/persistence/mongodb/mongo_event_message.rb
144
+ - lib/euston-eventstore/persistence/mongodb/mongo_persistence_engine.rb
145
+ - lib/euston-eventstore/persistence/mongodb/mongo_persistence_factory.rb
146
+ - lib/euston-eventstore/persistence/mongodb/mongo_snapshot.rb
147
+ - lib/euston-eventstore/persistence/mongodb/mongo_stream_head.rb
148
+ - lib/euston-eventstore/persistence/stream_head.rb
149
+ - lib/euston-eventstore/repository.rb
150
+ - lib/euston-eventstore/snapshot.rb
151
+ - lib/euston-eventstore/snapshot_stream_pair.rb
152
+ - lib/euston-eventstore/version.rb
153
+ - spec/event_store/dispatcher/asynchronous_dispatcher_spec.rb
154
+ - spec/event_store/dispatcher/synchronous_dispatcher_spec.rb
155
+ - spec/event_store/optimistic_event_store_spec.rb
156
+ - spec/event_store/optimistic_event_stream_spec.rb
157
+ - spec/event_store/persistence/mongodb_spec.rb
158
+ - spec/event_store/serialization/simple_message.rb
159
+ - spec/spec_helper.rb
160
+ - spec/support/array_enumeration_counter.rb
161
+ has_rdoc: true
153
162
  homepage: http://github.com/leemhenson/euston-eventstore
154
163
  licenses: []
155
- post_install_message:
164
+
165
+ post_install_message:
156
166
  rdoc_options: []
157
- require_paths:
158
- - lib
159
- required_ruby_version: !ruby/object:Gem::Requirement
160
- requirements:
161
- - - ! '>='
162
- - !ruby/object:Gem::Version
163
- version: '0'
167
+
168
+ require_paths:
169
+ - lib
170
+ required_ruby_version: !ruby/object:Gem::Requirement
164
171
  none: false
165
- required_rubygems_version: !ruby/object:Gem::Requirement
166
- requirements:
167
- - - ! '>='
168
- - !ruby/object:Gem::Version
169
- version: '0'
172
+ requirements:
173
+ - - ">="
174
+ - !ruby/object:Gem::Version
175
+ version: "0"
176
+ required_rubygems_version: !ruby/object:Gem::Requirement
170
177
  none: false
178
+ requirements:
179
+ - - ">="
180
+ - !ruby/object:Gem::Version
181
+ version: "0"
171
182
  requirements: []
172
- rubyforge_project:
173
- rubygems_version: 1.8.9
174
- signing_key:
183
+
184
+ rubyforge_project:
185
+ rubygems_version: 1.5.1
186
+ signing_key:
175
187
  specification_version: 3
176
188
  summary: Event store for use with Euston.
177
189
  test_files: []
178
- ...
190
+