euston-daemons 1.2.4-java → 1.2.5-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'euston-daemons'
3
- s.version = '1.2.4'
3
+ s.version = '1.2.5'
4
4
  s.platform = RUBY_PLATFORM.to_s == 'java' ? 'java' : Gem::Platform::RUBY
5
5
  s.authors = ['Lee Henson', 'Guy Boertje']
6
6
  s.email = ['lee.m.henson@gmail.com', 'guyboertje@gmail.com']
@@ -19,6 +19,7 @@ module Euston
19
19
  end
20
20
 
21
21
  def setup_euston event_store_database_name
22
+ Euston::EventStore::Persistence::Mongodb::Config.instance.uri = self.class.mongodb_uri
22
23
  Euston::EventStore::Persistence::Mongodb::Config.instance.logger = @logger
23
24
  Euston::EventStore::Persistence::Mongodb::Config.instance.database = event_store_database_name
24
25
 
@@ -33,14 +34,15 @@ module Euston
33
34
  end
34
35
 
35
36
  def setup_mongo config
36
- # logger arg will not work until jmongo forwards it correctly
37
- uri = "mongodb://#{config[:host]}:#{config[:port]}/?#{config[:uri_options]}"
38
- connection = Mongo::Connection.from_uri uri, :logger => @logger
39
-
40
37
  class << self.class
41
- attr_accessor :event_store_mongodb, :projections_mongodb
38
+ attr_accessor :event_store_mongodb, :projections_mongodb, :mongodb_uri
42
39
  end
43
40
 
41
+ self.class.mongodb_uri = "mongodb://#{config[:host]}:#{config[:port]}/?#{config[:uri_options]}"
42
+
43
+ # logger arg will not work until jmongo forwards it correctly
44
+ connection = Mongo::Connection.from_uri self.class.mongodb_uri, :logger => @logger
45
+
44
46
  self.class.event_store_mongodb = Mongo::DB.new config[:event_store_database], connection
45
47
  self.class.projections_mongodb = Mongo::DB.new config[:projections_database], connection
46
48
  end
@@ -1,5 +1,5 @@
1
1
  module Euston
2
2
  module Daemons
3
- VERSION = "1.2.4"
3
+ VERSION = "1.2.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: euston-daemons
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.2.4
5
+ version: 1.2.5
6
6
  platform: java
7
7
  authors:
8
8
  - Lee Henson