weel 1.99.124 → 1.99.126
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 +16 -58
- 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: 60a41686ed63dd69b44c606cc695cfe066d47b7abc183cdd21404307b985895e
|
4
|
+
data.tar.gz: dbe0042ffcb494fbba0ec4a56b0a1c4e6943e97c99a954edea19d16be69a0589
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5147adca88e3b08f54d972d39a625b1e12f360be7475799324f84029492d8c1b4912e43a700ad142fe4e349f86507642cd55ed8e22aedb5e74733eb01a1b6678
|
7
|
+
data.tar.gz: 543e59f9b75781ac2d87930584fb84032a991e5157dd18a549946ac9c222046ba44c74bae8f76b21138bef46c4a795694cdb3617a47cbe69ce2d0cbf671df7eb
|
data/lib/weel.rb
CHANGED
@@ -290,42 +290,6 @@ class WEEL
|
|
290
290
|
end
|
291
291
|
end
|
292
292
|
end # }}}
|
293
|
-
class ReadOnlyHash # {{{
|
294
|
-
def initialize(values)
|
295
|
-
@__weel_values = values.transform_values do |v|
|
296
|
-
if Object.const_defined?(:XML) && XML.const_defined?(:Smart) && v.is_a?(XML::Smart::Dom)
|
297
|
-
v.root.to_doc
|
298
|
-
else
|
299
|
-
begin
|
300
|
-
Marshal.load(Marshal.dump(v))
|
301
|
-
rescue
|
302
|
-
v.to_s rescue nil
|
303
|
-
end
|
304
|
-
end
|
305
|
-
end
|
306
|
-
end
|
307
|
-
|
308
|
-
def to_json(*args)
|
309
|
-
@__weel_values.to_json(*args)
|
310
|
-
end
|
311
|
-
|
312
|
-
def method_missing(name,*args)
|
313
|
-
if args.empty? && @__weel_values.key?(name)
|
314
|
-
@__weel_values[name]
|
315
|
-
elsif args.empty? && @__weel_values.key?(name.to_s)
|
316
|
-
@__weel_values[name.to_s]
|
317
|
-
elsif name.to_s[-1..-1] == "=" && args.length == 1
|
318
|
-
temp = name.to_s[0..-2]
|
319
|
-
@__weel_values[temp.to_sym] = args[0]
|
320
|
-
elsif name.to_s == "[]=" && args.length == 2
|
321
|
-
@__weel_values[args[0]] = args[1]
|
322
|
-
elsif name.to_s == "[]" && args.length == 1
|
323
|
-
@__weel_values[args[0]]
|
324
|
-
else
|
325
|
-
nil
|
326
|
-
end
|
327
|
-
end
|
328
|
-
end # }}}
|
329
293
|
|
330
294
|
class ProcString #{{{
|
331
295
|
attr_reader :code
|
@@ -563,11 +527,11 @@ class WEEL
|
|
563
527
|
end # }}}
|
564
528
|
|
565
529
|
# Defines a branch of a parallel-Construct
|
566
|
-
def parallel_branch(
|
530
|
+
def parallel_branch(data=@__weel_data,&block)# {{{
|
567
531
|
return if self.__weel_state == :stopping || self.__weel_state == :finishing || self.__weel_state == :stopped || Thread.current[:nolongernecessary]
|
568
532
|
branch_parent = Thread.current
|
569
533
|
|
570
|
-
branch_parent[:branches] << Thread.new(
|
534
|
+
branch_parent[:branches] << Thread.new(data) do |*local|
|
571
535
|
Thread.current.abort_on_exception = true
|
572
536
|
Thread.current[:branch_search] = @__weel_search_positions.any?
|
573
537
|
Thread.current[:branch_parent] = branch_parent
|
@@ -754,16 +718,6 @@ class WEEL
|
|
754
718
|
self.__weel_state = :stopping
|
755
719
|
end #}}}
|
756
720
|
|
757
|
-
def status # {{{
|
758
|
-
@__weel_status
|
759
|
-
end # }}}
|
760
|
-
def data # {{{
|
761
|
-
ReadOnlyHash.new(@__weel_data)
|
762
|
-
end # }}}
|
763
|
-
def endpoints # {{{
|
764
|
-
ReadHash.new(@__weel_endpoints)
|
765
|
-
end # }}}
|
766
|
-
|
767
721
|
private
|
768
722
|
def __weel_protect_yield(*local) #{{{
|
769
723
|
begin
|
@@ -772,9 +726,13 @@ class WEEL
|
|
772
726
|
self.__weel_state = :stopping
|
773
727
|
@__weel_connectionwrapper::inform_syntax_error(@__weel_connectionwrapper_args,Exception.new("protect_yield: `#{err.name}` is not a thing that can be used. Maybe it is meant to be a string and you forgot quotes?"),nil)
|
774
728
|
nil
|
729
|
+
rescue WEEL::Signal::Error => err
|
730
|
+
self.__weel_state = :stopping
|
731
|
+
@__weel_connectionwrapper::inform_syntax_error(@__weel_connectionwrapper_args,err,nil)
|
732
|
+
nil
|
775
733
|
rescue => err
|
776
734
|
self.__weel_state = :stopping
|
777
|
-
@__weel_connectionwrapper::inform_syntax_error(@__weel_connectionwrapper_args,
|
735
|
+
@__weel_connectionwrapper::inform_syntax_error(@__weel_connectionwrapper_args,err,nil)
|
778
736
|
nil
|
779
737
|
end
|
780
738
|
end #}}}
|
@@ -786,11 +744,11 @@ class WEEL
|
|
786
744
|
rescue NameError => err # don't look into it, or it will explode
|
787
745
|
# if you access $! here, BOOOM
|
788
746
|
self.__weel_state = :stopping
|
789
|
-
@__weel_connectionwrapper::inform_syntax_error(@__weel_connectionwrapper_args,Exception.new("
|
747
|
+
@__weel_connectionwrapper::inform_syntax_error(@__weel_connectionwrapper_args,Exception.new("protect_yield: `#{err.name}` is not a thing that can be used. Maybe it is meant to be a string and you forgot quotes?"),nil)
|
790
748
|
nil
|
791
749
|
rescue => err
|
792
750
|
self.__weel_state = :stopping
|
793
|
-
@__weel_connectionwrapper::inform_syntax_error(@__weel_connectionwrapper_args,
|
751
|
+
@__weel_connectionwrapper::inform_syntax_error(@__weel_connectionwrapper_args,err,nil)
|
794
752
|
nil
|
795
753
|
end
|
796
754
|
end #}}}
|
@@ -904,12 +862,12 @@ class WEEL
|
|
904
862
|
|
905
863
|
next if waitingresult == WEEL::Signal::UpdateAgain && connectionwrapper.activity_result_value&.length == 0
|
906
864
|
|
907
|
-
code = if waitingresult == WEEL::Signal::UpdateAgain
|
908
|
-
update
|
865
|
+
code, cmess = if waitingresult == WEEL::Signal::UpdateAgain
|
866
|
+
[update, 'update']
|
909
867
|
elsif waitingresult == WEEL::Signal::Salvage
|
910
|
-
salvage || raise('HTTP Error. The service return status was not between 200 and 300.')
|
868
|
+
[salvage, 'salvage'] || raise('HTTP Error. The service return status was not between 200 and 300.')
|
911
869
|
else
|
912
|
-
finalize
|
870
|
+
[finalize, 'finalize']
|
913
871
|
end
|
914
872
|
if code.is_a?(String)
|
915
873
|
connectionwrapper.inform_activity_manipulate
|
@@ -917,7 +875,7 @@ class WEEL
|
|
917
875
|
|
918
876
|
# when you throw without parameters, ma contains nil, so we return Signal::Proceed to give ma a meaningful value in other cases
|
919
877
|
ma = catch Signal::Again do
|
920
|
-
struct = connectionwrapper.manipulate(false,@__weel_lock,@__weel_data,@__weel_endpoints,@__weel_status,Thread.current[:local],connectionwrapper.additional,code,'Activity ' + position.to_s,connectionwrapper.activity_result_value,connectionwrapper.activity_result_options)
|
878
|
+
struct = connectionwrapper.manipulate(false,@__weel_lock,@__weel_data,@__weel_endpoints,@__weel_status,Thread.current[:local],connectionwrapper.additional,code,'Activity ' + position.to_s + ' ' + cmess,connectionwrapper.activity_result_value,connectionwrapper.activity_result_options)
|
921
879
|
Signal::Proceed
|
922
880
|
end
|
923
881
|
connectionwrapper.inform_manipulate_change(
|
@@ -1131,13 +1089,13 @@ public
|
|
1131
1089
|
end
|
1132
1090
|
rescue SyntaxError => se
|
1133
1091
|
@dslr.__weel_state = :stopping
|
1134
|
-
@dslr.__weel_connectionwrapper::inform_syntax_error(@dslr.__weel_connectionwrapper_args,
|
1092
|
+
@dslr.__weel_connectionwrapper::inform_syntax_error(@dslr.__weel_connectionwrapper_args,se,code)
|
1135
1093
|
rescue NameError => err # don't look into it, or it will explode
|
1136
1094
|
@dslr.__weel_state = :stopping
|
1137
1095
|
@dslr.__weel_connectionwrapper::inform_syntax_error(@dslr.__weel_connectionwrapper_args,Exception.new("main: `#{err.name}` is not a thing that can be used. Maybe it is meant to be a string and you forgot quotes?"),code)
|
1138
1096
|
rescue => err
|
1139
1097
|
@dslr.__weel_state = :stopping
|
1140
|
-
@dslr.__weel_connectionwrapper::inform_syntax_error(@dslr.__weel_connectionwrapper_args,
|
1098
|
+
@dslr.__weel_connectionwrapper::inform_syntax_error(@dslr.__weel_connectionwrapper_args,err,code)
|
1141
1099
|
end
|
1142
1100
|
if @dslr.__weel_state == :running || @dslr.__weel_state == :finishing
|
1143
1101
|
ipc = { :unmark => [] }
|
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.126
|
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-
|
12
|
+
date: 2024-09-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: test-unit
|