weel 1.99.122 → 1.99.123

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 +14 -21
  3. data/weel.gemspec +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a667f015c959147b33b0acab3119502d4f62b1b5785836f236819324e9fa2bd
4
- data.tar.gz: a68fc1c9c3a04525b18faca8cd0b9de14c2863746a8b5a010933108a13e9e675
3
+ metadata.gz: f3b3b0d940b57bff46c012f46466be8cbd1188de768e10cc8815f597d0ec2045
4
+ data.tar.gz: 7cceda505453b4610f79c01d3b38a55d99cf861119d00059b744f2e53ce6be6b
5
5
  SHA512:
6
- metadata.gz: '09dd1a1407dd46e8361b6d80266c81298503eb67369462db4120405b8a3497fd658a0bd4cf9f5002690b595494ef23597a84090cd7dcfb03b80e106af7444e90'
7
- data.tar.gz: 6fd1dac78629fe28677b0d5fd35ae0d1d802787a1113c6cc765fd8b9d5814c61c6bdf53bf69a188dd9331ed7b2efeb625866c1f49a65ada4579b23bc6fae0731
6
+ metadata.gz: d9691c2f36e38b8552f6c22cd774c7d7920adb9511f5fd9e9838ba9b5f03f00624dfc461d97a2551a76ea3f5c4732e7d70ae6c7ef84a8b9c0ce95992c617f153
7
+ data.tar.gz: 0565f1fd91b28309fe38343332a423aff7d6f123387f671616fc320cb6dae9edd91051a43bbaf0241e791ef3efd6ae2377c254d2fa1ff40069327bd3f517ec4c
data/lib/weel.rb CHANGED
@@ -105,8 +105,9 @@ class WEEL
105
105
  ReadHash.new(@__weel_endpoints)
106
106
  end
107
107
  def local
108
- @__weel_local.first
108
+ @__weel_local&.first
109
109
  end
110
+ attr_reader :additional
110
111
  end # }}}
111
112
  class ManipulateStructure # {{{
112
113
  def initialize(data,endpoints,status,local,additional)
@@ -195,11 +196,12 @@ class WEEL
195
196
  ManipulateHash.new(@__weel_endpoints,@touched_endpoints,@changed_endpoints)
196
197
  end
197
198
  def local
198
- @__weel_local.first
199
+ @__weel_local&.first
199
200
  end
200
201
  def status
201
202
  @__weel_status
202
203
  end
204
+ attr_reader :additional
203
205
  end # }}}
204
206
  class ManipulateHash # {{{
205
207
  attr_reader :__weel_touched, :__weel_changed
@@ -333,6 +335,13 @@ class WEEL
333
335
  end
334
336
  end # }}}
335
337
 
338
+ class ProcString #{{{
339
+ attr_reader :code
340
+ def initialize(code)
341
+ @code = code
342
+ end
343
+ end #}}}
344
+
336
345
  class ConnectionWrapperBase # {{{
337
346
  def self::loop_guard(arguments,lid,count); false; end
338
347
  def self::inform_state_change(arguments,newstate); end
@@ -342,7 +351,6 @@ class WEEL
342
351
 
343
352
  def initialize(arguments,position=nil,continue=nil); end
344
353
 
345
- def prepare(readonly, endpoints, parameters); parameters; end
346
354
  def additional; {}; end
347
355
 
348
356
  def activity_handle(passthrough, parameters); end
@@ -368,8 +376,8 @@ class WEEL
368
376
  def callback(result=nil,options={}); end
369
377
  def mem_guard; end
370
378
 
379
+ def prepare(readonly, endpoints, parameters); parameters; end
371
380
  def test_condition(dataelements,endpoints,local,additional,code,args={}); ReadStructure.new(dataelements,endpoints,local,additional).instance_eval(code); end
372
- def eval_expression(dataelements,endpoints,local,additional,code); ReadStructure.new(dataelements,endpoints,local,additional).instance_eval(code); end
373
381
  def manipulate(readonly,lock,dataelements,endpoints,status,local,additional,code,where,result=nil,options=nil)
374
382
  lock.synchronize do
375
383
  if readonly
@@ -492,7 +500,7 @@ class WEEL
492
500
  attr_reader :__weel_state, :__weel_status, :__weel_status
493
501
 
494
502
  # DSL-Construct for translating expressions into static parameters
495
- def 🠊(code); __weel_eval_expression(code); end
503
+ def 🠊(code); ProcString.new(code); end
496
504
 
497
505
  # DSL-Constructs for atomic calls to external services (calls) and pure context manipulations (manipulate).
498
506
  # Calls can also manipulate context (after the invoking the external services)
@@ -795,22 +803,6 @@ class WEEL
795
803
  end
796
804
  end #}}}
797
805
 
798
- def __weel_eval_expression(expression) #{{{
799
- begin
800
- connectionwrapper = @__weel_connectionwrapper.new @__weel_connectionwrapper_args
801
- connectionwrapper.eval_expression(@__weel_data,@__weel_endpoints,Thread.current[:local],connectionwrapper.additional,expression)
802
- rescue NameError => err # don't look into it, or it will explode
803
- # if you access $! here, BOOOM
804
- self.__weel_state = :stopping
805
- @__weel_connectionwrapper::inform_syntax_error(@__weel_connectionwrapper_args,Exception.new("eval_expression: `#{err.name}` is not a thing that can be used. Maybe it is meant to be a string and you forgot quotes?"),nil)
806
- nil
807
- rescue => err
808
- self.__weel_state = :stopping
809
- @__weel_connectionwrapper::inform_syntax_error(@__weel_connectionwrapper_args,Exception.new(err.message),nil)
810
- nil
811
- end
812
- end #}}}
813
-
814
806
  def __weel_progress(position, uuid, skip=false) #{{{
815
807
  ipc = {}
816
808
  branch = Thread.current
@@ -896,6 +888,7 @@ class WEEL
896
888
  ReadStructure.new(@__weel_data,@__weel_endpoints,Thread.current[:local],connectionwrapper.additional)
897
889
  end
898
890
  params = connectionwrapper.prepare(struct,endpoint,parameters)
891
+
899
892
  raise Signal::Stop unless connectionwrapper.vote_sync_before(params)
900
893
  raise Signal::Skip if self.__weel_state == :stopping || self.__weel_state == :finishing
901
894
 
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.122"
3
+ s.version = "1.99.123"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0-or-later"
6
6
  s.summary = "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.122
4
+ version: 1.99.123
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: 2024-09-17 00:00:00.000000000 Z
12
+ date: 2024-09-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: test-unit