bumbleworks 0.0.20 → 0.0.21

Sign up to get free protection for your applications and to get access to all the features.
@@ -75,6 +75,11 @@ module Bumbleworks
75
75
  extend_module
76
76
  end
77
77
 
78
+ def reload
79
+ @workitem = storage_participant[sid]
80
+ self
81
+ end
82
+
78
83
  def entity
79
84
  if has_entity_fields?
80
85
  klass = Bumbleworks::Support.constantize(fields['entity_type'])
@@ -1,3 +1,3 @@
1
1
  module Bumbleworks
2
- VERSION = "0.0.20"
2
+ VERSION = "0.0.21"
3
3
  end
@@ -50,6 +50,17 @@ describe Bumbleworks::Task do
50
50
  end
51
51
  end
52
52
 
53
+ describe '#reload' do
54
+ it 'reloads the workitem from the storage participant' do
55
+ task = described_class.new(workflow_item)
56
+ task.stub(:sid).and_return(:the_sid)
57
+ Bumbleworks.dashboard.storage_participant.should_receive(
58
+ :[]).with(:the_sid).and_return(:amazing_workitem)
59
+ task.reload
60
+ task.instance_variable_get(:@workitem).should == :amazing_workitem
61
+ end
62
+ end
63
+
53
64
  describe '#on_dispatch' do
54
65
  before :each do
55
66
  Bumbleworks.define_process 'planting_a_noodle' do
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.20
4
+ version: 0.0.21
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2013-07-10 00:00:00.000000000 Z
15
+ date: 2013-07-12 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: ruote