weel 1.99.25 → 1.99.26

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/weel.rb +10 -10
  3. data/weel.gemspec +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 964418576857800c8bfc5a43f96f024443d63c43
4
- data.tar.gz: 0aaf05e10645392981fadfa8d25608bd57775c38
3
+ metadata.gz: c9bd94ef3f1ec50791e2a643602536a1d8ac0583
4
+ data.tar.gz: 3f789f0ee61ac31d1fbba6cff4ec466c3696c2a6
5
5
  SHA512:
6
- metadata.gz: 6b6be6896d75a628beac4fe26a644d7da4338f1b1a48e6f7b349aeef5be6c352973dc4e94720fb6285b25b250f6f39450b1d352d5e8391f1b26f37a54dbd1de5
7
- data.tar.gz: 3397d7c467519dc4cbd8021aa73ee89a55a3e3e9c08a1a95876c35558cd82809394c90efe3aa5c1a7ae80b4b12ee24442fd297825c818cde3b312ba860d2a3f2
6
+ metadata.gz: 8fb935824d9f81f0fd355bcf58d82bc5104c09a05f4964387d83cacbbac174fb18f54c8da578da1f960d224be947eb65ae742b4bdeb32d5f9d2ed3c7f8ba7656
7
+ data.tar.gz: 33133bcf1dc767f26a2ee6348371a38fc816857391bfeda1be4310faa9be7aee03f820e29b80e24ca410b3ec962a3a24d9da0ffaea74570030633e46bfb9a3c4
data/lib/weel.rb CHANGED
@@ -452,9 +452,9 @@ class WEEL
452
452
  # Defines a possible choice of a choose-Construct
453
453
  # Block is executed if condition == true or
454
454
  # searchmode is active (to find the starting position)
455
- def alternative(condition)# {{{
455
+ def alternative(condition,args={})# {{{
456
456
  return if self.__weel_state == :stopping || self.__weel_state == :stopped || Thread.current[:nolongernecessary]
457
- hw, pos = __weel_sim_start(:alternative,:mode => Thread.current[:alternative_mode]) if __weel_sim
457
+ hw, pos = __weel_sim_start(:alternative,args.merge(:mode => Thread.current[:alternative_mode])) if __weel_sim
458
458
  Thread.current[:mutex] ||= Mutex.new
459
459
  Thread.current[:mutex].synchronize do
460
460
  return if Thread.current[:alternative_mode] == :exclusive && Thread.current[:alternative_executed][-1] = true
@@ -465,13 +465,13 @@ class WEEL
465
465
  Thread.current[:alternative_executed][-1] = true if condition
466
466
  end
467
467
  yield if __weel_is_in_search_mode || __weel_sim || condition
468
- __weel_sim_stop(:alternative,hw,pos,:mode => Thread.current[:alternative_mode]) if __weel_sim
468
+ __weel_sim_stop(:alternative,hw,pos,args.merge(:mode => Thread.current[:alternative_mode])) if __weel_sim
469
469
  end # }}}
470
- def otherwise # {{{
470
+ def otherwise(args={}) # {{{
471
471
  return if self.__weel_state == :stopping || self.__weel_state == :stopped || Thread.current[:nolongernecessary]
472
- hw, pos = __weel_sim_start(:otherwise,:mode => Thread.current[:alternative_mode]) if __weel_sim
472
+ hw, pos = __weel_sim_start(:otherwise,args.merge(:mode => Thread.current[:alternative_mode])) if __weel_sim
473
473
  yield if __weel_is_in_search_mode || __weel_sim || !Thread.current[:alternative_executed].last
474
- __weel_sim_stop(:otherwise,hw,pos,:mode => Thread.current[:alternative_mode]) if __weel_sim
474
+ __weel_sim_stop(:otherwise,hw,pos,args.merge(:mode => Thread.current[:alternative_mode])) if __weel_sim
475
475
  end # }}}
476
476
 
477
477
  # Defines a critical block (=Mutex)
@@ -489,8 +489,8 @@ class WEEL
489
489
  end # }}}
490
490
 
491
491
  # Defines a Cycle (loop/iteration)
492
- def loop(condition)# {{{
493
- unless condition.is_a?(Array) && (condition[0].is_a?(Proc) || condition[0].is_a?(String)) && [:pre_test,:post_test].include?(condition[1])
492
+ def loop(condition,args={})# {{{
493
+ unless condition.is_a?(Array) && (condition[0].is_a?(Proc) || condition[0].is_a?(String)) && [:pre_test,:post_test].include?(condition[1]) && args.is_a?(Hash)
494
494
  raise "condition must be called pre_test{} or post_test{}"
495
495
  end
496
496
  return if self.__weel_state == :stopping || self.__weel_state == :stopped || Thread.current[:nolongernecessary]
@@ -499,9 +499,9 @@ class WEEL
499
499
  return if __weel_is_in_search_mode
500
500
  end
501
501
  if __weel_sim
502
- hw, pos = __weel_sim_start(:loop,:testing=>condition[1])
502
+ hw, pos = __weel_sim_start(:loop,args.merge(:testing=>condition[1]))
503
503
  yield
504
- __weel_sim_stop(:loop,hw,pos,:testing=>condition[1])
504
+ __weel_sim_stop(:loop,hw,pos,args.merge(:testing=>condition[1]))
505
505
  return
506
506
  end
507
507
  handlerwrapper = @__weel_handlerwrapper.new @__weel_handlerwrapper_args unless condition[0].is_a?(Proc)
data/weel.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "weel"
3
- s.version = "1.99.25"
3
+ s.version = "1.99.26"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3"
6
6
  s.summary = "Preliminary release of the Workflow Execution Engine Library (WEEL)"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.99.25
4
+ version: 1.99.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-08-23 00:00:00.000000000 Z
12
+ date: 2014-08-24 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: see http://cpee.org
15
15
  email: juergen.mangler@gmail.com