euston-daemons 1.2.7-java → 1.2.8-java
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 +0 -1
- data/euston-daemons.gemspec +2 -2
- data/lib/euston-daemons/version.rb +1 -1
- data/spec/daemons/command_processor_spec.rb +3 -3
- data/spec/daemons/event_processor_spec.rb +4 -4
- data/spec/daemons/message_buffer_spec.rb +4 -4
- data/spec/daemons/snapshotter_spec.rb +6 -4
- data/spec/spec_helper.rb +2 -1
- metadata +3 -3
data/Gemfile
CHANGED
@@ -9,4 +9,3 @@ gemspec
|
|
9
9
|
gem 'cranky', :git => 'https://github.com/leemhenson/cranky.git', :branch => 'hashes'
|
10
10
|
gem 'ffaker', :git => 'https://github.com/leemhenson/ffaker.git', :branch => 'countries'
|
11
11
|
gem 'safely', :git => 'https://github.com/leemhenson/safely.git', :branch => 'override_strategies'
|
12
|
-
gem 'hot_bunnies', :git => 'https://github.com/ruby-amqp/hot_bunnies.git'
|
data/euston-daemons.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'euston-daemons'
|
3
|
-
s.version = '1.2.
|
3
|
+
s.version = '1.2.8'
|
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']
|
@@ -71,7 +71,7 @@ Gem::Specification.new do |s|
|
|
71
71
|
s.add_dependency 'uuidtools', '~> 2.1.2'
|
72
72
|
|
73
73
|
if RUBY_PLATFORM.to_s == 'java'
|
74
|
-
s.add_dependency 'hot_bunnies', '~> 1.3.0
|
74
|
+
s.add_dependency 'hot_bunnies', '~> 1.3.0'
|
75
75
|
s.add_dependency 'jmongo', '~> 1.1.0'
|
76
76
|
end
|
77
77
|
|
@@ -1,6 +1,4 @@
|
|
1
|
-
describe 'command handler component', :purge_event_store, :purge_rabbitmq do
|
2
|
-
require 'euston-daemons/pipeline/lib/command_processor/component'
|
3
|
-
|
1
|
+
describe 'command handler component', :jruby, :purge_event_store, :purge_rabbitmq do
|
4
2
|
let(:logger) { Euston::NullLogger.instance }
|
5
3
|
let(:handlers) { [] }
|
6
4
|
let(:subscription) { StubRetryingSubscription.new }
|
@@ -9,6 +7,8 @@ describe 'command handler component', :purge_event_store, :purge_rabbitmq do
|
|
9
7
|
let(:saved_aggregates) { [] }
|
10
8
|
|
11
9
|
before do
|
10
|
+
require 'euston-daemons/pipeline/lib/command_processor/component'
|
11
|
+
|
12
12
|
Euston::RabbitMq::RetryingSubscription.stub(:new) { subscription }
|
13
13
|
Euston::Repository.stub(:find) { aggregate }
|
14
14
|
Euston::Repository.stub(:save) { |aggregate| saved_aggregates << aggregate }
|
@@ -1,6 +1,4 @@
|
|
1
|
-
describe 'event handler client', :purge_event_store, :purge_rabbitmq do
|
2
|
-
require 'euston-daemons/pipeline/lib/event_processor/component'
|
3
|
-
|
1
|
+
describe 'event handler client', :jruby, :purge_event_store, :purge_rabbitmq do
|
4
2
|
let(:logger) { Euston::NullLogger.instance }
|
5
3
|
let(:subscription) { StubRetryingSubscription.new }
|
6
4
|
let(:client) { Euston::Daemons::Pipeline::EventProcessor::Component.new @channel, [reference], 1, logger }
|
@@ -8,6 +6,8 @@ describe 'event handler client', :purge_event_store, :purge_rabbitmq do
|
|
8
6
|
let(:saved_aggregates) { [] }
|
9
7
|
|
10
8
|
before do
|
9
|
+
require 'euston-daemons/pipeline/lib/event_processor/component'
|
10
|
+
|
11
11
|
Euston::RabbitMq::RetryingSubscription.stub(:new) { subscription }
|
12
12
|
Euston::Repository.stub(:find) { aggregate }
|
13
13
|
Euston::Repository.stub(:save) { |aggregate| saved_aggregates << aggregate }
|
@@ -41,7 +41,7 @@ describe 'event handler client', :purge_event_store, :purge_rabbitmq do
|
|
41
41
|
attr_accessor :was_called
|
42
42
|
end
|
43
43
|
|
44
|
-
subscribes :external_thing_happened
|
44
|
+
subscribes :external_thing_happened do |headers, command|
|
45
45
|
self.class.was_called = true
|
46
46
|
end
|
47
47
|
end
|
@@ -1,7 +1,4 @@
|
|
1
|
-
describe 'message buffer component', :purge_event_store do
|
2
|
-
require 'euston-daemons/pipeline/lib/message_buffer/buffer'
|
3
|
-
require 'euston-daemons/pipeline/lib/message_buffer/component'
|
4
|
-
|
1
|
+
describe 'message buffer component', :jruby, :purge_event_store do
|
5
2
|
let(:logger) { Euston::NullLogger.instance }
|
6
3
|
let(:channel) { double('channel').as_null_object }
|
7
4
|
let(:command) { Factory.build(:create_counter_command, :id => Uuid.generate).to_hash }
|
@@ -20,6 +17,9 @@ describe 'message buffer component', :purge_event_store do
|
|
20
17
|
end
|
21
18
|
|
22
19
|
before do
|
20
|
+
require 'euston-daemons/pipeline/lib/message_buffer/buffer'
|
21
|
+
require 'euston-daemons/pipeline/lib/message_buffer/component'
|
22
|
+
|
23
23
|
Euston::DaemonEnvironment.event_store_mongodb = @event_store_database
|
24
24
|
channel.stub(:exchange) { exchange }
|
25
25
|
exchange.stub(:name) { 'commands' }
|
@@ -1,6 +1,4 @@
|
|
1
|
-
describe 'snapshotter component', :purge_event_store, :euston_event_store do
|
2
|
-
require 'euston-daemons/pipeline/lib/snapshotter/component'
|
3
|
-
|
1
|
+
describe 'snapshotter component', :jruby, :purge_event_store, :euston_event_store do
|
4
2
|
let(:logger) { Euston::NullLogger.instance }
|
5
3
|
let(:threshold) { 2 }
|
6
4
|
let(:snapshotter) { Euston::Daemons::Pipeline::Snapshotter::Component.new @event_store, threshold, logger }
|
@@ -13,7 +11,11 @@ describe 'snapshotter component', :purge_event_store, :euston_event_store do
|
|
13
11
|
snapshotter.run
|
14
12
|
end
|
15
13
|
|
16
|
-
before
|
14
|
+
before do
|
15
|
+
require 'euston-daemons/pipeline/lib/snapshotter/component'
|
16
|
+
|
17
|
+
publish_commands_then_take_snapshot commands
|
18
|
+
end
|
17
19
|
|
18
20
|
context 'there are no streams' do
|
19
21
|
describe 'snapshots collection size' do
|
data/spec/spec_helper.rb
CHANGED
@@ -32,12 +32,13 @@ amqp_config = { :host => 'localhost',
|
|
32
32
|
:username => 'euston-daemons-test-user',
|
33
33
|
:password => 'password' }
|
34
34
|
|
35
|
-
mongo_connection = Mongo::Connection.from_uri 'mongodb://0.0.0.0:27017/?safe=true;fsync=true;
|
35
|
+
mongo_connection = Mongo::Connection.from_uri 'mongodb://0.0.0.0:27017/?safe=true;fsync=true;w=1;'
|
36
36
|
event_store_database = Mongo::DB.new 'euston-daemons-test-event-store', mongo_connection
|
37
37
|
projections_database = Mongo::DB.new 'euston-daemons-test-projections', mongo_connection
|
38
38
|
|
39
39
|
RSpec.configure do |config|
|
40
40
|
config.treat_symbols_as_metadata_keys_with_true_values = true
|
41
|
+
config.filter_run_excluding :jruby unless jruby
|
41
42
|
|
42
43
|
config.before(:each) do
|
43
44
|
@event_store_database = event_store_database
|
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.
|
5
|
+
version: 1.2.8
|
6
6
|
platform: java
|
7
7
|
authors:
|
8
8
|
- Lee Henson
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2011-12-
|
13
|
+
date: 2011-12-13 00:00:00.000000000Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activemodel
|
@@ -128,7 +128,7 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - ~>
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 1.3.0
|
131
|
+
version: 1.3.0
|
132
132
|
none: false
|
133
133
|
requirement: *2220
|
134
134
|
prerelease: false
|