bumbleworks 0.0.17 → 0.0.18
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/lib/bumbleworks/task.rb +5 -0
- data/lib/bumbleworks/version.rb +1 -1
- data/spec/lib/bumbleworks/task_spec.rb +6 -0
- metadata +1 -1
data/lib/bumbleworks/task.rb
CHANGED
@@ -142,6 +142,11 @@ module Bumbleworks
|
|
142
142
|
params['claimant']
|
143
143
|
end
|
144
144
|
|
145
|
+
# Timestamp of last claim, nil if not currently claimed
|
146
|
+
def claimed_at
|
147
|
+
params['claimed_at']
|
148
|
+
end
|
149
|
+
|
145
150
|
# Claim task and assign token to claimant
|
146
151
|
def claim(token)
|
147
152
|
set_claimant(token)
|
data/lib/bumbleworks/version.rb
CHANGED
@@ -304,6 +304,12 @@ describe Bumbleworks::Task do
|
|
304
304
|
end
|
305
305
|
end
|
306
306
|
|
307
|
+
describe '#claimed_at' do
|
308
|
+
it 'returns claimed_at param' do
|
309
|
+
@task.claimed_at.should == @task.params['claimed_at']
|
310
|
+
end
|
311
|
+
end
|
312
|
+
|
307
313
|
describe '#claimed?' do
|
308
314
|
it 'returns true if claimed' do
|
309
315
|
@task.claimed?.should be_true
|