bumbleworks 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
@@ -189,6 +189,7 @@ module Bumbleworks
189
189
  end
190
190
 
191
191
  params['claimant'] = token
192
+ params['claimed_at'] = token ? Time.now : nil
192
193
  update_workitem
193
194
  end
194
195
  end
@@ -1,3 +1,3 @@
1
1
  module Bumbleworks
2
- VERSION = "0.0.16"
2
+ VERSION = "0.0.17"
3
3
  end
@@ -279,6 +279,10 @@ describe Bumbleworks::Task do
279
279
  @task.params['claimant'].should == 'boss'
280
280
  end
281
281
 
282
+ it 'sets claimed_at param' do
283
+ @task.params['claimed_at'].should_not be_nil
284
+ end
285
+
282
286
  it 'raises an error if already claimed by someone else' do
283
287
  expect{@task.claim('peon')}.to raise_error described_class::AlreadyClaimed
284
288
  end
@@ -318,6 +322,11 @@ describe Bumbleworks::Task do
318
322
  @task.should_not be_claimed
319
323
  end
320
324
 
325
+ it 'clears claimed_at param' do
326
+ @task.release
327
+ @task.params['claimed_at'].should be_nil
328
+ end
329
+
321
330
  it 'logs event' do
322
331
  @task.release
323
332
  log_entry = Bumbleworks.logger.entries.last[:entry]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bumbleworks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: