bumbleworks 0.0.76 → 0.0.77
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.
- checksums.yaml +4 -4
- data/lib/bumbleworks/task.rb +5 -0
- data/lib/bumbleworks/version.rb +1 -1
- data/spec/lib/bumbleworks/task_spec.rb +17 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 254297411d25a5989d7d68c88ed379d00c9681e0
|
4
|
+
data.tar.gz: 66da97a771e31fd0331a57700ef6e6f7a355cb5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24bdafeabc61fc526a082431d7bb270df5de0cbadee269e3893013eac6153361b66cfe1bb4c76f1399815c7437392df704c4c5d20e048ba1a0358a6e50ec3dd8
|
7
|
+
data.tar.gz: c4dd85254421cfb102ac276882afd8a8dfd100e9240452f6b3f85458f85c991c5a7c99c787ca4c3afec75944d45f96377ddaf6a9abeceb4adea4632fb0d45b30
|
data/lib/bumbleworks/task.rb
CHANGED
@@ -10,12 +10,17 @@ module Bumbleworks
|
|
10
10
|
class MissingWorkitem < StandardError; end
|
11
11
|
class NotCompletable < StandardError; end
|
12
12
|
class AvailabilityTimeout < StandardError; end
|
13
|
+
class CompletionFailed < StandardError; end
|
13
14
|
|
14
15
|
extend Forwardable
|
15
16
|
delegate [:sid, :fei, :fields, :dispatched_at, :params, :participant_name, :wfid, :wf_name] => :@workitem
|
16
17
|
attr_reader :nickname, :workitem
|
17
18
|
alias_method :id, :sid
|
18
19
|
|
20
|
+
def temporary_storage
|
21
|
+
@temporary_storage ||= {}
|
22
|
+
end
|
23
|
+
|
19
24
|
class << self
|
20
25
|
# @public
|
21
26
|
# Autoload all task modules defined in files in the
|
data/lib/bumbleworks/version.rb
CHANGED
@@ -1127,4 +1127,21 @@ describe Bumbleworks::Task do
|
|
1127
1127
|
expect(task.titleize(:entity => false)).to eq('Go To Work')
|
1128
1128
|
end
|
1129
1129
|
end
|
1130
|
+
|
1131
|
+
describe '#temporary_storage' do
|
1132
|
+
it 'returns an empty hash by default' do
|
1133
|
+
task = described_class.new(workflow_item)
|
1134
|
+
expect(task.temporary_storage).to eq({})
|
1135
|
+
end
|
1136
|
+
|
1137
|
+
it 'persists stored values' do
|
1138
|
+
task = described_class.new(workflow_item)
|
1139
|
+
task.temporary_storage[:foo] = :bar
|
1140
|
+
expect(task.temporary_storage[:foo]).to eq(:bar)
|
1141
|
+
end
|
1142
|
+
end
|
1143
|
+
|
1144
|
+
it 'has a CompletionFailed error class' do
|
1145
|
+
expect(described_class::CompletionFailed.new).to be_a(StandardError)
|
1146
|
+
end
|
1130
1147
|
end
|
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.
|
4
|
+
version: 0.0.77
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maher Hawash
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-07-
|
14
|
+
date: 2014-07-24 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: ruote
|