bumbleworks 0.0.79 → 0.0.80

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: 4318f91e073ccdd49dc2cd628c7f93991e2214da
4
- data.tar.gz: 529b85a2177008687c9bfb0bba2abbb0b00be213
3
+ metadata.gz: e27f853f94df55278dbd7ab57a0b1e1262da1832
4
+ data.tar.gz: 0a7955815956096b8913b885394d4af19788e9b1
5
5
  SHA512:
6
- metadata.gz: b47f0e5543948f413dc6b83bd368db1685ddc5d1fbc6a399e2f2ff0d5d40a92bbb7c92ba9b32d3ccace51915251369ba9fa4095c2af5826711d8a5100e8c5751
7
- data.tar.gz: c9b44b6f6dd055b8f0afa70f2d7d8161b6b6654cfae1cb335a865ed170f6d0ed2dd8b9f2d4674eb40402677d19ec2395af56eeb941c361163ca8c1558bd1d0ad
6
+ metadata.gz: ea67332cfec383527cc707c6d555bb5b1d9ce8f0668f3edf56c0df3fbae3250d9aa7f13025fd32d0c29132028d247e9dc73e355dd365fad21c60420d5a1623b4
7
+ data.tar.gz: 61f87c4a8453dc3c9379cae0e9a8542cb02f3689e3d9ead1ed90bbcd40a9c353b05970b3deda913541098d4323b8450398ac1fa0d4e6bd6e90df71cafc7d9c94
@@ -1,7 +1,9 @@
1
1
  module Bumbleworks
2
2
  module Entity
3
3
  def self.included(klass)
4
- Bumbleworks.entity_classes << klass
4
+ unless Bumbleworks.entity_classes.include? klass
5
+ Bumbleworks.entity_classes << klass
6
+ end
5
7
  klass.extend ClassMethods
6
8
  end
7
9
 
@@ -43,7 +43,8 @@ module Bumbleworks
43
43
 
44
44
  def launch(name, *args)
45
45
  set_catchall_if_needed
46
- dashboard.launch(dashboard.variables[name], *args)
46
+ definition = Bumbleworks::ProcessDefinition.find_by_name(name)
47
+ dashboard.launch(definition.tree, *args)
47
48
  end
48
49
 
49
50
  def cancel_process!(wfid, options = {})
@@ -1,3 +1,3 @@
1
1
  module Bumbleworks
2
- VERSION = "0.0.79"
2
+ VERSION = "0.0.80"
3
3
  end
@@ -16,6 +16,13 @@ describe 'Entity Module' do
16
16
  SecondNewClass = Class.new { include Bumbleworks::Entity }
17
17
  expect(Bumbleworks.entity_classes).to eq([:geese, FirstNewClass, SecondNewClass])
18
18
  end
19
+
20
+ it 'does not duplicate registered entities' do
21
+ Bumbleworks.entity_classes = [:geese]
22
+ class NewClass; include Bumbleworks::Entity; end
23
+ class NewClass; include Bumbleworks::Entity; end
24
+ expect(Bumbleworks.entity_classes).to eq([:geese, NewClass])
25
+ end
19
26
  end
20
27
 
21
28
  describe 'process control' do
@@ -391,6 +391,12 @@ describe Bumbleworks::Ruote do
391
391
  expect(described_class.dashboard.participant_list.size).to eq(1)
392
392
  expect(described_class.dashboard.participant_list.first.classname).to eq('Bumbleworks::StorageParticipant')
393
393
  end
394
+
395
+ it 'raises ProcessDefinition::NotFound if given process name does not exist' do
396
+ expect {
397
+ described_class.launch('gevalstumerfkabambph')
398
+ }.to raise_error(Bumbleworks::ProcessDefinition::NotFound)
399
+ end
394
400
  end
395
401
 
396
402
  describe '.reset!' 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.79
4
+ version: 0.0.80
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maher Hawash