bumbleworks 0.0.76 → 0.0.77

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a72f385d9eb663aa79fbdfac3f6d685ef5252a09
4
- data.tar.gz: 9f52631aee6181e1cb998878660d1d4a9a14bffd
3
+ metadata.gz: 254297411d25a5989d7d68c88ed379d00c9681e0
4
+ data.tar.gz: 66da97a771e31fd0331a57700ef6e6f7a355cb5a
5
5
  SHA512:
6
- metadata.gz: 2d830cfb32aaf2c7a3e80356ee9d589b0e31f282dd4ce913f0f765b9d348b1fb2ea50fa608c9b23d751d5c439d5434f7bf15139ce1a34c28aa3d8328315a4fbe
7
- data.tar.gz: 704f70271d7235a25911a3bc4fdb6c90a191b2e5fcbb0f80b0dca478d8aef8dad7332f7b87eaf6e9e6cd76c9f6ffd81a771059d23fe0bab20bc785b1953948b5
6
+ metadata.gz: 24bdafeabc61fc526a082431d7bb270df5de0cbadee269e3893013eac6153361b66cfe1bb4c76f1399815c7437392df704c4c5d20e048ba1a0358a6e50ec3dd8
7
+ data.tar.gz: c4dd85254421cfb102ac276882afd8a8dfd100e9240452f6b3f85458f85c991c5a7c99c787ca4c3afec75944d45f96377ddaf6a9abeceb4adea4632fb0d45b30
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Bumbleworks
2
- VERSION = "0.0.76"
2
+ VERSION = "0.0.77"
3
3
  end
@@ -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.76
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-11 00:00:00.000000000 Z
14
+ date: 2014-07-24 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: ruote