weel 1.99.105 → 1.99.108
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/weel.rb +27 -16
- data/weel.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 511cda1fdaa0d79582c2a839872cbbadf5770d196cb447ef986b4c1700ca656b
|
4
|
+
data.tar.gz: 71e38ec4147d9407a93f2b36dfcd2963164f3f6dbc67a1686fbd10d4c5db30f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a925eb9537591d6e2f736fb240541106cc709e886058269d3b5037c95deb37b956dd0481b54d5a1940775791d932eab4c4ddd794118b913cae6782df8e681f4f
|
7
|
+
data.tar.gz: 0ed0009b0a88731e993afe4201e8a7460c529e9abc029548d72acb1f96a891d50dd00d2fba3944cabdf469f64746d47498a9fc15f038622bc1f7608915785a26
|
data/lib/weel.rb
CHANGED
@@ -43,7 +43,7 @@ class WEEL
|
|
43
43
|
end # }}}
|
44
44
|
|
45
45
|
class ReadStructure # {{{
|
46
|
-
def initialize(data,endpoints,additional)
|
46
|
+
def initialize(data,endpoints,local,additional)
|
47
47
|
@__weel_data = data.transform_values do |v|
|
48
48
|
if Object.const_defined?(:XML) && XML.const_defined?(:Smart) && v.is_a?(XML::Smart::Dom)
|
49
49
|
v.root.to_doc
|
@@ -56,6 +56,7 @@ class WEEL
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
@__weel_endpoints = endpoints.transform_values{ |v| v.dup }
|
59
|
+
@__weel_local = local
|
59
60
|
@additional = additional
|
60
61
|
end
|
61
62
|
|
@@ -91,14 +92,18 @@ class WEEL
|
|
91
92
|
def endpoints
|
92
93
|
ReadHash.new(@__weel_endpoints)
|
93
94
|
end
|
95
|
+
def local
|
96
|
+
@__weel_local.first
|
97
|
+
end
|
94
98
|
end # }}}
|
95
99
|
class ManipulateStructure # {{{
|
96
|
-
def initialize(data,endpoints,status,additional)
|
100
|
+
def initialize(data,endpoints,status,local,additional)
|
97
101
|
@__weel_data = data
|
98
102
|
@__weel_data_orig = @__weel_data.transform_values{|val| Marshal.dump(val) } rescue nil
|
99
103
|
@__weel_endpoints = endpoints
|
100
104
|
@__weel_endpoints_orig = @__weel_endpoints.transform_values{|val| Marshal.dump(val) }
|
101
105
|
@__weel_status = status
|
106
|
+
@__weel_local = local
|
102
107
|
@changed_status = "#{status.id}-#{status.message}"
|
103
108
|
@changed_data = []
|
104
109
|
@touched_data = []
|
@@ -165,6 +170,9 @@ class WEEL
|
|
165
170
|
def endpoints
|
166
171
|
ManipulateHash.new(@__weel_endpoints,@touched_endpoints,@changed_endpoints)
|
167
172
|
end
|
173
|
+
def local
|
174
|
+
@__weel_local.first
|
175
|
+
end
|
168
176
|
def status
|
169
177
|
@__weel_status
|
170
178
|
end
|
@@ -325,6 +333,7 @@ class WEEL
|
|
325
333
|
|
326
334
|
def activity_stop; end
|
327
335
|
def activity_passthrough_value; end
|
336
|
+
def activity_uuid; '42424242-cpee-cpee-cpee-424242424242'; end
|
328
337
|
|
329
338
|
def activity_no_longer_necessary; end
|
330
339
|
|
@@ -351,15 +360,16 @@ class WEEL
|
|
351
360
|
end # }}}
|
352
361
|
|
353
362
|
class Position # {{{
|
354
|
-
attr_reader :position
|
363
|
+
attr_reader :position, :uuid
|
355
364
|
attr_accessor :detail, :passthrough
|
356
|
-
def initialize(position, detail=:at, passthrough=nil) # :at or :after or :unmark
|
365
|
+
def initialize(position, uuid, detail=:at, passthrough=nil) # :at or :after or :unmark
|
357
366
|
@position = position
|
358
367
|
@detail = detail
|
368
|
+
@uuid = uuid
|
359
369
|
@passthrough = passthrough
|
360
370
|
end
|
361
371
|
def as_json(*)
|
362
|
-
jsn = { 'position' => @position }
|
372
|
+
jsn = { 'position' => @position, 'uuid' => @uuid }
|
363
373
|
jsn['passthrough'] = @passthrough if @passthrough
|
364
374
|
jsn
|
365
375
|
end
|
@@ -543,6 +553,7 @@ class WEEL
|
|
543
553
|
Thread.current[:branch_status] = false
|
544
554
|
Thread.current[:branch_parent] = branch_parent
|
545
555
|
Thread.current[:start_event] = Continue.new
|
556
|
+
Thread.current[:local] = local
|
546
557
|
Thread.current[:branch_wait_count_cancel_active] = false
|
547
558
|
branch_parent[:mutex].synchronize do
|
548
559
|
Thread.current[:branch_traces_id] = branch_parent[:branch_traces_ids]
|
@@ -727,7 +738,7 @@ class WEEL
|
|
727
738
|
Thread.current[:branch_parent][:branch_traces][Thread.current[:branch_traces_id]] << position
|
728
739
|
end
|
729
740
|
|
730
|
-
__weel_progress position, true
|
741
|
+
__weel_progress position, 0, true
|
731
742
|
self.__weel_state = :stopping
|
732
743
|
end #}}}
|
733
744
|
|
@@ -759,7 +770,7 @@ class WEEL
|
|
759
770
|
def __weel_eval_condition(condition) #{{{
|
760
771
|
begin
|
761
772
|
connectionwrapper = @__weel_connectionwrapper.new @__weel_connectionwrapper_args unless condition.is_a?(Proc)
|
762
|
-
condition.is_a?(Proc) ? condition.call : connectionwrapper.test_condition(ReadStructure.new(@__weel_data,@__weel_endpoints,connectionwrapper.additional),condition)
|
773
|
+
condition.is_a?(Proc) ? condition.call : connectionwrapper.test_condition(ReadStructure.new(@__weel_data,@__weel_endpoints,Thread.current[:local],connectionwrapper.additional),condition)
|
763
774
|
rescue NameError => err # don't look into it, or it will explode
|
764
775
|
# if you access $! here, BOOOM
|
765
776
|
self.__weel_state = :stopping
|
@@ -772,7 +783,7 @@ class WEEL
|
|
772
783
|
end
|
773
784
|
end #}}}
|
774
785
|
|
775
|
-
def __weel_progress(position, skip=false) #{{{
|
786
|
+
def __weel_progress(position, uuid, skip=false) #{{{
|
776
787
|
ipc = {}
|
777
788
|
branch = Thread.current
|
778
789
|
if Thread.current[:branch_parent] && Thread.current[:branch_parent][:branch_position]
|
@@ -788,9 +799,9 @@ class WEEL
|
|
788
799
|
end
|
789
800
|
wp = if branch[:branch_search_now] == true
|
790
801
|
branch[:branch_search_now] = false
|
791
|
-
WEEL::Position.new(position, skip ? :after : :at, @__weel_search_positions[position]&.passthrough)
|
802
|
+
WEEL::Position.new(position, uuid, skip ? :after : :at, @__weel_search_positions[position]&.passthrough)
|
792
803
|
else
|
793
|
-
WEEL::Position.new(position, skip ? :after : :at)
|
804
|
+
WEEL::Position.new(position, uuid, skip ? :after : :at)
|
794
805
|
end
|
795
806
|
ipc[skip ? :after : :at] = [wp]
|
796
807
|
|
@@ -830,7 +841,7 @@ class WEEL
|
|
830
841
|
Thread.current[:branch_parent][:branch_traces][Thread.current[:branch_traces_id]] << position
|
831
842
|
end
|
832
843
|
|
833
|
-
wp = __weel_progress position
|
844
|
+
wp = __weel_progress position, connectionwrapper.activity_uuid
|
834
845
|
|
835
846
|
# searchmode position is after, jump directly to vote_sync_after
|
836
847
|
raise Signal::Proceed if searchmode == :after
|
@@ -844,10 +855,10 @@ class WEEL
|
|
844
855
|
connectionwrapper.activity_manipulate_handle(parameters)
|
845
856
|
connectionwrapper.inform_activity_manipulate
|
846
857
|
if finalize.is_a?(Proc)
|
847
|
-
mr = ManipulateStructure.new(@__weel_data,@__weel_endpoints,@__weel_status,connectionwrapper.additional)
|
858
|
+
mr = ManipulateStructure.new(@__weel_data,@__weel_endpoints,@__weel_status,Thread.current[:local],connectionwrapper.additional)
|
848
859
|
mr.instance_eval(&finalize)
|
849
860
|
elsif finalize.is_a?(String)
|
850
|
-
mr = ManipulateStructure.new(@__weel_data,@__weel_endpoints,@__weel_status,connectionwrapper.additional)
|
861
|
+
mr = ManipulateStructure.new(@__weel_data,@__weel_endpoints,@__weel_status,Thread.current[:local],connectionwrapper.additional)
|
851
862
|
connectionwrapper.manipulate(mr,finalize,'Activity ' + position.to_s)
|
852
863
|
end
|
853
864
|
connectionwrapper.inform_manipulate_change(
|
@@ -865,7 +876,7 @@ class WEEL
|
|
865
876
|
begin
|
866
877
|
again = catch Signal::Again do
|
867
878
|
connectionwrapper.mem_guard
|
868
|
-
rs = ReadStructure.new(@__weel_data,@__weel_endpoints,connectionwrapper.additional)
|
879
|
+
rs = ReadStructure.new(@__weel_data,@__weel_endpoints,Thread.current[:local],connectionwrapper.additional)
|
869
880
|
if prepare
|
870
881
|
if prepare.is_a?(Proc)
|
871
882
|
rs.instance_exec(&prepare)
|
@@ -909,7 +920,7 @@ class WEEL
|
|
909
920
|
if code.is_a?(Proc) || code.is_a?(String)
|
910
921
|
connectionwrapper.inform_activity_manipulate
|
911
922
|
if code.is_a?(Proc)
|
912
|
-
mr = ManipulateStructure.new(@__weel_data,@__weel_endpoints,@__weel_status,connectionwrapper.additional)
|
923
|
+
mr = ManipulateStructure.new(@__weel_data,@__weel_endpoints,@__weel_status,Thread.current[:local],connectionwrapper.additional)
|
913
924
|
ma = catch Signal::Again do
|
914
925
|
case code.arity
|
915
926
|
when 1; mr.instance_exec(connectionwrapper.activity_result_value,&code)
|
@@ -920,7 +931,7 @@ class WEEL
|
|
920
931
|
'yes' # ma sadly will have nil when i just throw
|
921
932
|
end
|
922
933
|
elsif code.is_a?(String)
|
923
|
-
mr = ManipulateStructure.new(@__weel_data,@__weel_endpoints,@__weel_status,connectionwrapper.additional)
|
934
|
+
mr = ManipulateStructure.new(@__weel_data,@__weel_endpoints,@__weel_status,Thread.current[:local],connectionwrapper.additional)
|
924
935
|
ma = catch Signal::Again do
|
925
936
|
connectionwrapper.manipulate(mr,code,'Activity ' + position.to_s,connectionwrapper.activity_result_value,connectionwrapper.activity_result_options)
|
926
937
|
'yes' # ma sadly will have nil when i just throw
|
data/weel.gemspec
CHANGED
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.
|
4
|
+
version: 1.99.108
|
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: 2023-
|
12
|
+
date: 2023-03-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: test-unit
|