weel 1.99.44 → 1.99.45

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/weel.rb +19 -27
  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: 826719e1e99b8e4f6b8d8aa2ffbdee4021c02d13
4
- data.tar.gz: '0288e824cdddd64005674955120d27cc9f541724'
3
+ metadata.gz: 06d57eac9eb689932f63b2593786953aa933e35e
4
+ data.tar.gz: cec4065be69a5ca463baad015f218f4d89f56b88
5
5
  SHA512:
6
- metadata.gz: 6836e552a5413c7a12c03cfc6f075456cfce8614716cf3b7adbd8f7c23830c2bc0afd7bd46bbfdb10a694e514658f5d0e8bd310c9580679a57c9c5ecdeefbcb3
7
- data.tar.gz: 21bae0f300c385f94635894c63e9b5f16ca96eb304172c0ded2ece153c4cd3d46c8202024a27b0d6b506dedf6b9108bebaf0f61ca4584cf94bcd26301b8974a8
6
+ metadata.gz: 9fb2c1c43348383e42f6f1fcc3beb72dd397a840a6c8f167e9d1cee902703a4f642b9c1c08bb77d08b9f20513ed1e788ce37a86532e95d898f1cf88ab3e59792
7
+ data.tar.gz: a74e8b19b3b337b6005170c85b35373d7236fb0bb630d1ababcae458e4ccb94d2e31529e41db052de2732cc08bf805502382c074f64beb387a03d2b9a607c472
data/lib/weel.rb CHANGED
@@ -183,6 +183,11 @@ class WEEL
183
183
  end # }}}
184
184
 
185
185
  class HandlerWrapperBase # {{{
186
+ def self::inform_state_change(arguments,newstate); end
187
+ def self::inform_syntax_error(arguments,err,code); end
188
+ def self::inform_handlerwrapper_error(arguments,err); end
189
+ def self::inform_position_change(arguments,ipc); end
190
+
186
191
  def initialize(arguments,endpoint=nil,position=nil,continue=nil); end
187
192
 
188
193
  def activity_handle(passthrough, parameters); end
@@ -198,11 +203,7 @@ class WEEL
198
203
  def inform_activity_done; end
199
204
  def inform_activity_manipulate; end
200
205
  def inform_activity_failed(err); end
201
-
202
- def inform_syntax_error(err,code); end
203
206
  def inform_manipulate_change(status,changed_data,changed_endpoints,data,endpoints); end
204
- def inform_position_change(ipc); end
205
- def inform_state_change(newstate); end
206
207
 
207
208
  def vote_sync_before(parameters=nil); true; end
208
209
  def vote_sync_after; true; end
@@ -403,8 +404,7 @@ class WEEL
403
404
  yield(*local)
404
405
  rescue => err
405
406
  self.__weel_state = :stopping
406
- handlerwrapper = @__weel_handlerwrapper.new @__weel_handlerwrapper_args
407
- handlerwrapper.inform_syntax_error(err,nil)
407
+ @__weel_handlerwrapper::inform_syntax_error(@__weel_handlerwrapper_args,err,nil)
408
408
  Thread.pass
409
409
  end
410
410
 
@@ -423,8 +423,7 @@ class WEEL
423
423
  begin
424
424
  ipc = {}
425
425
  ipc[:unmark] = [Thread.current[:branch_position].position]
426
- handlerwrapper = @__weel_handlerwrapper.new @__weel_handlerwrapper_args
427
- handlerwrapper.inform_position_change(ipc)
426
+ @__weel_handlerwrapper::inform_position_change(@__weel_handlerwrapper_args,ipc)
428
427
  end rescue nil
429
428
  Thread.current[:branch_position] = nil
430
429
  end
@@ -581,7 +580,7 @@ class WEEL
581
580
  @__weel_positions << wp
582
581
  Thread.current[:branch_position] = wp
583
582
 
584
- handlerwrapper.inform_position_change(ipc)
583
+ @__weel_handlerwrapper::inform_position_change @__weel_handlerwrapper_args, ipc
585
584
 
586
585
  # searchmode position is after, jump directly to vote_sync_after
587
586
  raise Signal::Proceed if searchmode == :after
@@ -609,7 +608,7 @@ class WEEL
609
608
  )
610
609
  handlerwrapper.inform_activity_done
611
610
  wp.detail = :after
612
- handlerwrapper.inform_position_change :after => [wp.position]
611
+ @__weel_handlerwrapper::inform_position_change @__weel_handlerwrapper_args, :after => [wp.position]
613
612
  end
614
613
  when :call
615
614
  params = { }
@@ -683,7 +682,7 @@ class WEEL
683
682
  if wp.passthrough.nil?
684
683
  handlerwrapper.inform_activity_done
685
684
  wp.detail = :after
686
- handlerwrapper.inform_position_change :after => [wp.position]
685
+ @__weel_handlerwrapper::inform_position_change @__weel_handlerwrapper_args, :after => [wp.position]
687
686
  end
688
687
  end
689
688
  raise Signal::Proceed
@@ -696,7 +695,7 @@ class WEEL
696
695
  @__weel_positions.delete wp
697
696
  Thread.current[:branch_position] = nil
698
697
  wp.detail = :unmark
699
- handlerwrapper.inform_position_change :unmark => [wp.position]
698
+ @__weel_handlerwrapper::inform_position_change @__weel_handlerwrapper_args, :unmark => [wp.position]
700
699
  rescue Signal::StopSkipManipulate, Signal::Stop
701
700
  self.__weel_state = :stopping
702
701
  rescue Signal::Skip
@@ -750,8 +749,7 @@ class WEEL
750
749
  position
751
750
  else
752
751
  self.__weel_state = :stopping
753
- handlerwrapper = @__weel_handlerwrapper.new @__weel_handlerwrapper_args
754
- handlerwrapper.inform_syntax_error(Exception.new("position (#{position}) not valid"),nil)
752
+ @__weel_handlerwrapper::inform_syntax_error(@__weel_handlerwrapper_args,Exception.new("position (#{position}) not valid"),nil)
755
753
  end
756
754
  end # }}}
757
755
 
@@ -792,8 +790,7 @@ class WEEL
792
790
  def __weel_finalize
793
791
  __weel_recursive_join(@__weel_main)
794
792
  @__weel_state = :stopped
795
- handlerwrapper = @__weel_handlerwrapper.new @__weel_handlerwrapper_args
796
- handlerwrapper.inform_state_change @__weel_state
793
+ @__weel_handlerwrapper::inform_state_change @__weel_handlerwrapper_args, @__weel_state
797
794
  end
798
795
 
799
796
  def __weel_state=(newState)# {{{
@@ -802,12 +799,11 @@ class WEEL
802
799
  @__weel_positions = Array.new if newState == :running
803
800
  @__weel_state = newState
804
801
 
805
- handlerwrapper = @__weel_handlerwrapper.new @__weel_handlerwrapper_args
806
802
  if newState == :stopping
807
803
  __weel_recursive_continue(@__weel_main)
808
804
  end
809
805
 
810
- handlerwrapper.inform_state_change @__weel_state
806
+ @__weel_handlerwrapper::inform_state_change @__weel_handlerwrapper_args, @__weel_state
811
807
  end # }}}
812
808
 
813
809
  end # }}}
@@ -847,9 +843,9 @@ public
847
843
  @dslr.__weel_state
848
844
  end # }}}
849
845
  def state_signal # {{{
850
- handlerwrapper.new(handlerwrapper_args).inform_state_change(state)
846
+ handlerwrapper::inform_state_change handlerwrapper_args, state
851
847
  state
852
- end # }}}
848
+ end # }}}
853
849
 
854
850
  # Set search positions
855
851
  # set new_weel_search to a boolean (or anything else) to start the process from beginning (reset serach positions)
@@ -908,16 +904,14 @@ public
908
904
  end
909
905
  rescue Exception => err
910
906
  @dslr.__weel_state = :stopping
911
- handlerwrapper = @dslr.__weel_handlerwrapper.new @dslr.__weel_handlerwrapper_args
912
- handlerwrapper.inform_syntax_error(err,code)
907
+ @dslr.__weel_handlerwrapper::inform_syntax_error(@dslr.__weel_handlerwrapper_args,err,code)
913
908
  end
914
909
  if @dslr.__weel_state == :running
915
910
  @dslr.__weel_state = :finished
916
911
  ipc = { :unmark => [] }
917
912
  @dslr.__weel_positions.each{ |wp| ipc[:unmark] << wp.position }
918
913
  @dslr.__weel_positions.clear
919
- handlerwrapper = @dslr.__weel_handlerwrapper.new @dslr.__weel_handlerwrapper_args
920
- handlerwrapper.inform_position_change(ipc)
914
+ @dslr.__weel_handlerwrapper::inform_position_change(@dslr.__weel_handlerwrapper_args,ipc)
921
915
  end
922
916
  if @dslr.__weel_state == :simulating
923
917
  @dslr.__weel_state = final_state
@@ -943,9 +937,7 @@ public
943
937
  begin
944
938
  __weel_control_flow(:running)
945
939
  rescue => e
946
- @dslr.__weel_state = :stopping
947
- puts e.message
948
- puts e.backtrace
940
+ handlerwrapper::inform_handlerwrapper_error handlerwrapper_args, e
949
941
  end
950
942
  end
951
943
  end # }}}
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.44"
3
+ s.version = "1.99.45"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0"
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.44
4
+ version: 1.99.45
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: 2016-11-21 00:00:00.000000000 Z
12
+ date: 2016-11-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: test-unit