bumbleworks 0.0.48 → 0.0.50
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/.gitignore +4 -1
- data/lib/bumbleworks.rb +9 -8
- data/lib/bumbleworks/configuration.rb +8 -5
- data/lib/bumbleworks/entity.rb +88 -0
- data/lib/bumbleworks/participant.rb +6 -7
- data/lib/bumbleworks/participant/base.rb +11 -0
- data/lib/bumbleworks/participant/entity_interactor.rb +29 -0
- data/lib/bumbleworks/participant/error_handler.rb +14 -0
- data/lib/bumbleworks/participant/local_participant.rb +11 -0
- data/lib/bumbleworks/participant/storage_participant.rb +11 -0
- data/lib/bumbleworks/process.rb +64 -0
- data/lib/bumbleworks/ruote.rb +12 -4
- data/lib/bumbleworks/support.rb +3 -5
- data/lib/bumbleworks/task.rb +6 -4
- data/lib/bumbleworks/{tasks → task}/base.rb +1 -1
- data/lib/bumbleworks/task/finder.rb +39 -3
- data/lib/bumbleworks/version.rb +1 -1
- data/spec/fixtures/entities/furby.rb +30 -0
- data/spec/integration/entity_spec.rb +49 -0
- data/spec/integration/history_storage_spec.rb +4 -4
- data/spec/integration/sample_application_spec.rb +8 -2
- data/spec/lib/bumbleworks/entity_spec.rb +208 -0
- data/spec/lib/bumbleworks/{participant_spec.rb → participant/base_spec.rb} +3 -3
- data/spec/lib/bumbleworks/participant/entity_interactor_spec.rb +91 -0
- data/spec/lib/bumbleworks/{error_handler_participant_spec.rb → participant/error_handler_spec.rb} +1 -1
- data/spec/lib/bumbleworks/{local_participant_spec.rb → participant/local_participant_spec.rb} +1 -1
- data/spec/lib/bumbleworks/process_spec.rb +147 -0
- data/spec/lib/bumbleworks/ruote/exp/broadcast_event_expression_spec.rb +1 -1
- data/spec/lib/bumbleworks/ruote/exp/wait_for_event_expression_spec.rb +3 -3
- data/spec/lib/bumbleworks/ruote_spec.rb +28 -21
- data/spec/lib/bumbleworks/task/finder_spec.rb +9 -0
- data/spec/lib/bumbleworks/task_spec.rb +98 -3
- data/spec/lib/bumbleworks_spec.rb +14 -7
- data/spec/spec_helper.rb +0 -1
- data/spec/support/process_testing_helpers.rb +9 -0
- metadata +34 -13
- data/lib/bumbleworks/error_handler_participant.rb +0 -12
- data/lib/bumbleworks/local_participant.rb +0 -9
- data/lib/bumbleworks/storage_participant.rb +0 -9
@@ -179,6 +179,13 @@ describe Bumbleworks do
|
|
179
179
|
Bumbleworks.launch!(:amazing_process, :entity => entity)
|
180
180
|
end
|
181
181
|
|
182
|
+
it 'returns a Bumbleworks::Process instance with the wfid of the launched process' do
|
183
|
+
Bumbleworks::Ruote.stub(:launch).with(:amazing_process).and_return('18181818')
|
184
|
+
bp = Bumbleworks.launch!(:amazing_process)
|
185
|
+
bp.should be_a(Bumbleworks::Process)
|
186
|
+
bp.id.should == '18181818'
|
187
|
+
end
|
188
|
+
|
182
189
|
it 'throws exception if entity has nil id' do
|
183
190
|
expect {
|
184
191
|
Bumbleworks.launch!(:amazing_process, :entity => LovelyEntity.new(nil))
|
@@ -206,17 +213,17 @@ describe Bumbleworks do
|
|
206
213
|
end
|
207
214
|
end
|
208
215
|
|
209
|
-
describe '
|
216
|
+
describe '.store_history?' do
|
210
217
|
it 'returns true if store_history is true' do
|
211
|
-
|
212
|
-
|
218
|
+
described_class.store_history = true
|
219
|
+
described_class.store_history?.should be_true
|
213
220
|
end
|
214
221
|
|
215
222
|
it 'returns false if store_history is anything but true' do
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
223
|
+
described_class.store_history = false
|
224
|
+
described_class.store_history?.should be_false
|
225
|
+
described_class.store_history = 'penguins'
|
226
|
+
described_class.store_history?.should be_false
|
220
227
|
end
|
221
228
|
end
|
222
229
|
end
|
data/spec/spec_helper.rb
CHANGED
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.50
|
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-12-
|
15
|
+
date: 2013-12-21 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: ruote
|
@@ -167,13 +167,18 @@ files:
|
|
167
167
|
- doc/TERMS.md
|
168
168
|
- lib/bumbleworks.rb
|
169
169
|
- lib/bumbleworks/configuration.rb
|
170
|
+
- lib/bumbleworks/entity.rb
|
170
171
|
- lib/bumbleworks/error_handler.rb
|
171
|
-
- lib/bumbleworks/error_handler_participant.rb
|
172
172
|
- lib/bumbleworks/error_logger.rb
|
173
173
|
- lib/bumbleworks/hash_storage.rb
|
174
|
-
- lib/bumbleworks/local_participant.rb
|
175
174
|
- lib/bumbleworks/participant.rb
|
175
|
+
- lib/bumbleworks/participant/base.rb
|
176
|
+
- lib/bumbleworks/participant/entity_interactor.rb
|
177
|
+
- lib/bumbleworks/participant/error_handler.rb
|
178
|
+
- lib/bumbleworks/participant/local_participant.rb
|
179
|
+
- lib/bumbleworks/participant/storage_participant.rb
|
176
180
|
- lib/bumbleworks/participant_registration.rb
|
181
|
+
- lib/bumbleworks/process.rb
|
177
182
|
- lib/bumbleworks/process_definition.rb
|
178
183
|
- lib/bumbleworks/rake_tasks.rb
|
179
184
|
- lib/bumbleworks/ruote.rb
|
@@ -181,11 +186,10 @@ files:
|
|
181
186
|
- lib/bumbleworks/ruote/exp/wait_for_event_expression.rb
|
182
187
|
- lib/bumbleworks/simple_logger.rb
|
183
188
|
- lib/bumbleworks/storage_adapter.rb
|
184
|
-
- lib/bumbleworks/storage_participant.rb
|
185
189
|
- lib/bumbleworks/support.rb
|
186
190
|
- lib/bumbleworks/task.rb
|
191
|
+
- lib/bumbleworks/task/base.rb
|
187
192
|
- lib/bumbleworks/task/finder.rb
|
188
|
-
- lib/bumbleworks/tasks/base.rb
|
189
193
|
- lib/bumbleworks/tree_builder.rb
|
190
194
|
- lib/bumbleworks/version.rb
|
191
195
|
- lib/bumbleworks/workitem_entity_storage.rb
|
@@ -205,18 +209,23 @@ files:
|
|
205
209
|
- spec/fixtures/definitions/a_list_of_jams.rb
|
206
210
|
- spec/fixtures/definitions/nested_folder/test_nested_process.rb
|
207
211
|
- spec/fixtures/definitions/test_process.rb
|
212
|
+
- spec/fixtures/entities/furby.rb
|
213
|
+
- spec/integration/entity_spec.rb
|
208
214
|
- spec/integration/example_configurations_spec.rb
|
209
215
|
- spec/integration/history_storage_spec.rb
|
210
216
|
- spec/integration/sample_application_spec.rb
|
211
217
|
- spec/lib/bumbleworks/configuration_spec.rb
|
212
|
-
- spec/lib/bumbleworks/
|
218
|
+
- spec/lib/bumbleworks/entity_spec.rb
|
213
219
|
- spec/lib/bumbleworks/error_handler_spec.rb
|
214
220
|
- spec/lib/bumbleworks/error_logger_spec.rb
|
215
221
|
- spec/lib/bumbleworks/hash_storage_spec.rb
|
216
|
-
- spec/lib/bumbleworks/
|
222
|
+
- spec/lib/bumbleworks/participant/base_spec.rb
|
223
|
+
- spec/lib/bumbleworks/participant/entity_interactor_spec.rb
|
224
|
+
- spec/lib/bumbleworks/participant/error_handler_spec.rb
|
225
|
+
- spec/lib/bumbleworks/participant/local_participant_spec.rb
|
217
226
|
- spec/lib/bumbleworks/participant_registration_spec.rb
|
218
|
-
- spec/lib/bumbleworks/participant_spec.rb
|
219
227
|
- spec/lib/bumbleworks/process_definition_spec.rb
|
228
|
+
- spec/lib/bumbleworks/process_spec.rb
|
220
229
|
- spec/lib/bumbleworks/ruote/exp/broadcast_event_expression_spec.rb
|
221
230
|
- spec/lib/bumbleworks/ruote/exp/wait_for_event_expression_spec.rb
|
222
231
|
- spec/lib/bumbleworks/ruote_spec.rb
|
@@ -230,6 +239,7 @@ files:
|
|
230
239
|
- spec/lib/bumbleworks_spec.rb
|
231
240
|
- spec/spec_helper.rb
|
232
241
|
- spec/support/path_helpers.rb
|
242
|
+
- spec/support/process_testing_helpers.rb
|
233
243
|
- spec/support/tracer.rb
|
234
244
|
homepage: ''
|
235
245
|
licenses:
|
@@ -244,12 +254,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
244
254
|
- - ! '>='
|
245
255
|
- !ruby/object:Gem::Version
|
246
256
|
version: '0'
|
257
|
+
segments:
|
258
|
+
- 0
|
259
|
+
hash: 3856006689923069850
|
247
260
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
248
261
|
none: false
|
249
262
|
requirements:
|
250
263
|
- - ! '>='
|
251
264
|
- !ruby/object:Gem::Version
|
252
265
|
version: '0'
|
266
|
+
segments:
|
267
|
+
- 0
|
268
|
+
hash: 3856006689923069850
|
253
269
|
requirements: []
|
254
270
|
rubyforge_project:
|
255
271
|
rubygems_version: 1.8.23
|
@@ -272,18 +288,23 @@ test_files:
|
|
272
288
|
- spec/fixtures/definitions/a_list_of_jams.rb
|
273
289
|
- spec/fixtures/definitions/nested_folder/test_nested_process.rb
|
274
290
|
- spec/fixtures/definitions/test_process.rb
|
291
|
+
- spec/fixtures/entities/furby.rb
|
292
|
+
- spec/integration/entity_spec.rb
|
275
293
|
- spec/integration/example_configurations_spec.rb
|
276
294
|
- spec/integration/history_storage_spec.rb
|
277
295
|
- spec/integration/sample_application_spec.rb
|
278
296
|
- spec/lib/bumbleworks/configuration_spec.rb
|
279
|
-
- spec/lib/bumbleworks/
|
297
|
+
- spec/lib/bumbleworks/entity_spec.rb
|
280
298
|
- spec/lib/bumbleworks/error_handler_spec.rb
|
281
299
|
- spec/lib/bumbleworks/error_logger_spec.rb
|
282
300
|
- spec/lib/bumbleworks/hash_storage_spec.rb
|
283
|
-
- spec/lib/bumbleworks/
|
301
|
+
- spec/lib/bumbleworks/participant/base_spec.rb
|
302
|
+
- spec/lib/bumbleworks/participant/entity_interactor_spec.rb
|
303
|
+
- spec/lib/bumbleworks/participant/error_handler_spec.rb
|
304
|
+
- spec/lib/bumbleworks/participant/local_participant_spec.rb
|
284
305
|
- spec/lib/bumbleworks/participant_registration_spec.rb
|
285
|
-
- spec/lib/bumbleworks/participant_spec.rb
|
286
306
|
- spec/lib/bumbleworks/process_definition_spec.rb
|
307
|
+
- spec/lib/bumbleworks/process_spec.rb
|
287
308
|
- spec/lib/bumbleworks/ruote/exp/broadcast_event_expression_spec.rb
|
288
309
|
- spec/lib/bumbleworks/ruote/exp/wait_for_event_expression_spec.rb
|
289
310
|
- spec/lib/bumbleworks/ruote_spec.rb
|
@@ -297,5 +318,5 @@ test_files:
|
|
297
318
|
- spec/lib/bumbleworks_spec.rb
|
298
319
|
- spec/spec_helper.rb
|
299
320
|
- spec/support/path_helpers.rb
|
321
|
+
- spec/support/process_testing_helpers.rb
|
300
322
|
- spec/support/tracer.rb
|
301
|
-
has_rdoc:
|
@@ -1,12 +0,0 @@
|
|
1
|
-
module Bumbleworks
|
2
|
-
class ErrorHandlerParticipant < ::Ruote::Participant
|
3
|
-
def on_workitem
|
4
|
-
return if (error_handlers = Bumbleworks.error_handlers).empty?
|
5
|
-
|
6
|
-
error_handlers.each do |error_handler|
|
7
|
-
error_handler.new(workitem).on_error
|
8
|
-
end
|
9
|
-
reply
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|