infopark-politics 0.2.14 → 0.2.15

Sign up to get free protection for your applications and to get access to all the features.
@@ -147,9 +147,13 @@ module Politics
147
147
  update_buckets
148
148
  end
149
149
  end
150
+ handle_leadership_over
150
151
  relax until_next_iteration
151
152
  end
152
153
 
154
+ def handle_leadership_over
155
+ end
156
+
153
157
  def bucket_request(requestor_uri)
154
158
  if leader?
155
159
  log.debug "delivering bucket request"
@@ -207,6 +207,12 @@ describe Worker do
207
207
  @worker.should_receive(:relax).with(6).once
208
208
  @worker.perform_leader_duties
209
209
  end
210
+
211
+ it "should call leadership over hook before relaxing" do
212
+ @worker.should_receive(:handle_leadership_over).ordered
213
+ @worker.should_receive(:relax).ordered
214
+ @worker.perform_leader_duties
215
+ end
210
216
  end
211
217
  end
212
218
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infopark-politics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.14
4
+ version: 0.2.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Perham
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2010-01-05 00:00:00 +01:00
13
+ date: 2010-01-07 00:00:00 +01:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency