euston-daemons 1.2.9 → 1.2.10

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -73,7 +73,7 @@ end
73
73
 
74
74
  desc "Run all examples"
75
75
  RSpec::Core::RakeTask.new(:spec) do |t|
76
- t.rspec_opts = ['-r ./spec/spec_helper.rb', '--colour', '--format Fuubar']
76
+ t.rspec_opts = ['-r ./spec/spec_helper.rb', '-b', '--tty', '--colour', '--format Fuubar']
77
77
  t.pattern = 'spec/**/*_spec.rb'
78
78
  end
79
79
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'euston-daemons'
3
- s.version = '1.2.9'
3
+ s.version = '1.2.10'
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']
@@ -62,7 +62,7 @@ Gem::Specification.new do |s|
62
62
  s.add_dependency 'activemodel', '>= 3.0.10'
63
63
  s.add_dependency 'activesupport', '>= 3.0.10'
64
64
  s.add_dependency 'erb-yaml', '~> 1.0.0'
65
- s.add_dependency 'euston', '~> 1.2.4'
65
+ s.add_dependency 'euston', '~> 1.2.9'
66
66
  s.add_dependency 'euston-eventstore', '~> 1.2.3'
67
67
  s.add_dependency 'euston-rabbitmq', '~> 1.2.2'
68
68
  s.add_dependency 'hollywood', '~> 1.0.0'
@@ -75,10 +75,10 @@ Gem::Specification.new do |s|
75
75
  s.add_dependency 'jmongo', '~> 1.1.0'
76
76
  end
77
77
 
78
- s.add_development_dependency 'awesome_print', '~> 0.4.0'
78
+ s.add_development_dependency 'awesome_print', '~> 1.0.2'
79
79
  s.add_development_dependency 'cranky', '~> 0.2.0'
80
80
  s.add_development_dependency 'ffaker', '~> 1.8.0'
81
- s.add_development_dependency 'fuubar', '~> 0.0.0'
81
+ s.add_development_dependency 'fuubar', '~> 1.0.0'
82
82
  s.add_development_dependency 'rabbitmqadmin-cli', '~> 1.0.2'
83
83
  s.add_development_dependency 'rake', '~> 0.9.2'
84
84
  s.add_development_dependency 'rspec', '~> 2.6.0'
@@ -36,6 +36,7 @@ module Euston
36
36
  @commits.each do |commit|
37
37
  commit.events.each do |event|
38
38
  hash = event.to_hash
39
+ hash[:headers][commit.headers[:source_message_type]] = commit.headers[:source_message]
39
40
  @events_exchange.publish ActiveSupport::JSON.encode(hash), self.class.default_publish_options.merge(:routing_key => "events.#{hash[:headers][:type]}")
40
41
  end
41
42
 
@@ -35,6 +35,7 @@ module Euston
35
35
  snapshot = EventStore::Snapshot.new pair.stream.stream_id,
36
36
  pair.stream.stream_revision,
37
37
  snapshot[:payload],
38
+ :event_source_type => klass.to_s,
38
39
  :version => snapshot[:version]
39
40
 
40
41
  @log.debug "Writing snapshot: #{snapshot.inspect}"
@@ -1,5 +1,5 @@
1
1
  module Euston
2
2
  module Daemons
3
- VERSION = "1.2.9"
3
+ VERSION = "1.2.10"
4
4
  end
5
5
  end
@@ -45,7 +45,7 @@ describe 'snapshotter component', :jruby, :purge_event_store, :euston_event_stor
45
45
 
46
46
  describe 'snapshot' do
47
47
  subject { @event_store.get_snapshot counter_id }
48
- its(:headers) { should == { :version => 1 } }
48
+ its(:headers) { should == { :event_source_type=>"Euston::Daemons::SampleModel::Counter", :version => 1 } }
49
49
  its(:payload) { should == { :count => 3 } }
50
50
  end
51
51
 
@@ -79,19 +79,19 @@ describe 'snapshotter component', :jruby, :purge_event_store, :euston_event_stor
79
79
 
80
80
  describe 'first snapshot' do
81
81
  subject { @event_store.get_snapshot counter_id, 3 }
82
- its(:headers) { should == { :version => 1 } }
82
+ its(:headers) { should == { :event_source_type=>"Euston::Daemons::SampleModel::Counter", :version => 1 } }
83
83
  its(:payload) { should == { :count => 3 } }
84
84
  end
85
85
 
86
86
  describe 'second snapshot' do
87
87
  subject { @event_store.get_snapshot counter_id, 6 }
88
- its(:headers) { should == { :version => 1 } }
88
+ its(:headers) { should == { :event_source_type=>"Euston::Daemons::SampleModel::Counter", :version => 1 } }
89
89
  its(:payload) { should == { :count => 19 } }
90
90
  end
91
91
 
92
92
  describe 'third snapshot' do
93
93
  subject { @event_store.get_snapshot counter_id }
94
- its(:headers) { should == { :version => 1 } }
94
+ its(:headers) { should == { :event_source_type=>"Euston::Daemons::SampleModel::Counter", :version => 1 } }
95
95
  its(:payload) { should == { :count => 87 } }
96
96
  end
97
97
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: euston-daemons
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.9
4
+ version: 1.2.10
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: 2012-02-03 00:00:00.000000000 Z
13
+ date: 2012-02-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activemodel
17
- requirement: &70329377338380 !ruby/object:Gem::Requirement
17
+ requirement: &70331390109500 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 3.0.10
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70329377338380
25
+ version_requirements: *70331390109500
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: activesupport
28
- requirement: &70329377336840 !ruby/object:Gem::Requirement
28
+ requirement: &70331390108700 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 3.0.10
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *70329377336840
36
+ version_requirements: *70331390108700
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: erb-yaml
39
- requirement: &70329377353720 !ruby/object:Gem::Requirement
39
+ requirement: &70331390108200 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
@@ -44,21 +44,21 @@ dependencies:
44
44
  version: 1.0.0
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *70329377353720
47
+ version_requirements: *70331390108200
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: euston
50
- requirement: &70329377352080 !ruby/object:Gem::Requirement
50
+ requirement: &70331390107580 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
54
54
  - !ruby/object:Gem::Version
55
- version: 1.2.4
55
+ version: 1.2.9
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *70329377352080
58
+ version_requirements: *70331390107580
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: euston-eventstore
61
- requirement: &70329377351220 !ruby/object:Gem::Requirement
61
+ requirement: &70331390106960 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ~>
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: 1.2.3
67
67
  type: :runtime
68
68
  prerelease: false
69
- version_requirements: *70329377351220
69
+ version_requirements: *70331390106960
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: euston-rabbitmq
72
- requirement: &70329377349180 !ruby/object:Gem::Requirement
72
+ requirement: &70331390106280 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ~>
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: 1.2.2
78
78
  type: :runtime
79
79
  prerelease: false
80
- version_requirements: *70329377349180
80
+ version_requirements: *70331390106280
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: hollywood
83
- requirement: &70329377348500 !ruby/object:Gem::Requirement
83
+ requirement: &70331390105360 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ~>
@@ -88,10 +88,10 @@ dependencies:
88
88
  version: 1.0.0
89
89
  type: :runtime
90
90
  prerelease: false
91
- version_requirements: *70329377348500
91
+ version_requirements: *70331390105360
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: i18n
94
- requirement: &70329377346660 !ruby/object:Gem::Requirement
94
+ requirement: &70331390138560 !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
97
97
  - - ! '>='
@@ -99,10 +99,10 @@ dependencies:
99
99
  version: 0.5.0
100
100
  type: :runtime
101
101
  prerelease: false
102
- version_requirements: *70329377346660
102
+ version_requirements: *70331390138560
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: safely
105
- requirement: &70329377367840 !ruby/object:Gem::Requirement
105
+ requirement: &70331390137940 !ruby/object:Gem::Requirement
106
106
  none: false
107
107
  requirements:
108
108
  - - ~>
@@ -110,10 +110,10 @@ dependencies:
110
110
  version: 0.3.0
111
111
  type: :runtime
112
112
  prerelease: false
113
- version_requirements: *70329377367840
113
+ version_requirements: *70331390137940
114
114
  - !ruby/object:Gem::Dependency
115
115
  name: uuidtools
116
- requirement: &70329377366400 !ruby/object:Gem::Requirement
116
+ requirement: &70331390137480 !ruby/object:Gem::Requirement
117
117
  none: false
118
118
  requirements:
119
119
  - - ~>
@@ -121,21 +121,21 @@ dependencies:
121
121
  version: 2.1.2
122
122
  type: :runtime
123
123
  prerelease: false
124
- version_requirements: *70329377366400
124
+ version_requirements: *70331390137480
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: awesome_print
127
- requirement: &70329377365500 !ruby/object:Gem::Requirement
127
+ requirement: &70331390136860 !ruby/object:Gem::Requirement
128
128
  none: false
129
129
  requirements:
130
130
  - - ~>
131
131
  - !ruby/object:Gem::Version
132
- version: 0.4.0
132
+ version: 1.0.2
133
133
  type: :development
134
134
  prerelease: false
135
- version_requirements: *70329377365500
135
+ version_requirements: *70331390136860
136
136
  - !ruby/object:Gem::Dependency
137
137
  name: cranky
138
- requirement: &70329377363940 !ruby/object:Gem::Requirement
138
+ requirement: &70331390136360 !ruby/object:Gem::Requirement
139
139
  none: false
140
140
  requirements:
141
141
  - - ~>
@@ -143,10 +143,10 @@ dependencies:
143
143
  version: 0.2.0
144
144
  type: :development
145
145
  prerelease: false
146
- version_requirements: *70329377363940
146
+ version_requirements: *70331390136360
147
147
  - !ruby/object:Gem::Dependency
148
148
  name: ffaker
149
- requirement: &70329377363160 !ruby/object:Gem::Requirement
149
+ requirement: &70331390135880 !ruby/object:Gem::Requirement
150
150
  none: false
151
151
  requirements:
152
152
  - - ~>
@@ -154,21 +154,21 @@ dependencies:
154
154
  version: 1.8.0
155
155
  type: :development
156
156
  prerelease: false
157
- version_requirements: *70329377363160
157
+ version_requirements: *70331390135880
158
158
  - !ruby/object:Gem::Dependency
159
159
  name: fuubar
160
- requirement: &70329377361980 !ruby/object:Gem::Requirement
160
+ requirement: &70331390135120 !ruby/object:Gem::Requirement
161
161
  none: false
162
162
  requirements:
163
163
  - - ~>
164
164
  - !ruby/object:Gem::Version
165
- version: 0.0.0
165
+ version: 1.0.0
166
166
  type: :development
167
167
  prerelease: false
168
- version_requirements: *70329377361980
168
+ version_requirements: *70331390135120
169
169
  - !ruby/object:Gem::Dependency
170
170
  name: rabbitmqadmin-cli
171
- requirement: &70329377360440 !ruby/object:Gem::Requirement
171
+ requirement: &70331390134540 !ruby/object:Gem::Requirement
172
172
  none: false
173
173
  requirements:
174
174
  - - ~>
@@ -176,10 +176,10 @@ dependencies:
176
176
  version: 1.0.2
177
177
  type: :development
178
178
  prerelease: false
179
- version_requirements: *70329377360440
179
+ version_requirements: *70331390134540
180
180
  - !ruby/object:Gem::Dependency
181
181
  name: rake
182
- requirement: &70329377378140 !ruby/object:Gem::Requirement
182
+ requirement: &70331390133640 !ruby/object:Gem::Requirement
183
183
  none: false
184
184
  requirements:
185
185
  - - ~>
@@ -187,10 +187,10 @@ dependencies:
187
187
  version: 0.9.2
188
188
  type: :development
189
189
  prerelease: false
190
- version_requirements: *70329377378140
190
+ version_requirements: *70331390133640
191
191
  - !ruby/object:Gem::Dependency
192
192
  name: rspec
193
- requirement: &70329377376300 !ruby/object:Gem::Requirement
193
+ requirement: &70331390132920 !ruby/object:Gem::Requirement
194
194
  none: false
195
195
  requirements:
196
196
  - - ~>
@@ -198,7 +198,7 @@ dependencies:
198
198
  version: 2.6.0
199
199
  type: :development
200
200
  prerelease: false
201
- version_requirements: *70329377376300
201
+ version_requirements: *70331390132920
202
202
  description: ''
203
203
  email:
204
204
  - lee.m.henson@gmail.com
@@ -262,15 +262,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
262
262
  - - ! '>='
263
263
  - !ruby/object:Gem::Version
264
264
  version: '0'
265
+ segments:
266
+ - 0
267
+ hash: -3532033148527607877
265
268
  required_rubygems_version: !ruby/object:Gem::Requirement
266
269
  none: false
267
270
  requirements:
268
271
  - - ! '>='
269
272
  - !ruby/object:Gem::Version
270
273
  version: '0'
274
+ segments:
275
+ - 0
276
+ hash: -3532033148527607877
271
277
  requirements: []
272
278
  rubyforge_project:
273
- rubygems_version: 1.8.10
279
+ rubygems_version: 1.8.17
274
280
  signing_key:
275
281
  specification_version: 3
276
282
  summary: Message buffer, command processor and event processor daemons for Euston-RabbitMq