weel 1.99.123 → 1.99.125
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 +11 -67
- 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: 6838b35c90188d87942d5f17b1d7c37a833a6918cbd6b3701094b4c7c5197213
|
4
|
+
data.tar.gz: '08e6930846e12ead9eb55fd3de58a6bce02aa6105f92b768a9b24421c1067b4f'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3e4470dd2868f1f7a5ab2d2ded5339d42330c1cd2ec239a63c9be589d6c64faf284ddaf3d891abac67669c637702041ee600685e21f3461680a2c9fb3dbe554
|
7
|
+
data.tar.gz: d7ee1c97b9e3169fb1acf19dc1ca84abdd5fc5de35f4ded4f9ccdfbb959c3747a9e6697ca9071c79000a3a6520a8d3df4f9bf1316735469751c59fbc62d9e915
|
data/lib/weel.rb
CHANGED
@@ -66,10 +66,6 @@ class WEEL
|
|
66
66
|
'data' => @__weel_data,
|
67
67
|
'endpoints' => @__weel_endpoints,
|
68
68
|
'additional' => @additional,
|
69
|
-
'status' => {
|
70
|
-
'id' => @__weel_status.id,
|
71
|
-
'message' => @__weel_status.message
|
72
|
-
}
|
73
69
|
}.to_json(*a)
|
74
70
|
end
|
75
71
|
|
@@ -94,9 +90,6 @@ class WEEL
|
|
94
90
|
e.each do |k,v|
|
95
91
|
endpoints.send(k+'=',v)
|
96
92
|
end if e
|
97
|
-
if s
|
98
|
-
status.update(s['id'],s['message'])
|
99
|
-
end
|
100
93
|
end
|
101
94
|
def data
|
102
95
|
ReadHash.new(@__weel_data)
|
@@ -298,43 +291,6 @@ class WEEL
|
|
298
291
|
end
|
299
292
|
end # }}}
|
300
293
|
|
301
|
-
class ReadOnlyHash # {{{
|
302
|
-
def initialize(values)
|
303
|
-
@__weel_values = values.transform_values do |v|
|
304
|
-
if Object.const_defined?(:XML) && XML.const_defined?(:Smart) && v.is_a?(XML::Smart::Dom)
|
305
|
-
v.root.to_doc
|
306
|
-
else
|
307
|
-
begin
|
308
|
-
Marshal.load(Marshal.dump(v))
|
309
|
-
rescue
|
310
|
-
v.to_s rescue nil
|
311
|
-
end
|
312
|
-
end
|
313
|
-
end
|
314
|
-
end
|
315
|
-
|
316
|
-
def to_json(*args)
|
317
|
-
@__weel_values.to_json(*args)
|
318
|
-
end
|
319
|
-
|
320
|
-
def method_missing(name,*args)
|
321
|
-
if args.empty? && @__weel_values.key?(name)
|
322
|
-
@__weel_values[name]
|
323
|
-
elsif args.empty? && @__weel_values.key?(name.to_s)
|
324
|
-
@__weel_values[name.to_s]
|
325
|
-
elsif name.to_s[-1..-1] == "=" && args.length == 1
|
326
|
-
temp = name.to_s[0..-2]
|
327
|
-
@__weel_values[temp.to_sym] = args[0]
|
328
|
-
elsif name.to_s == "[]=" && args.length == 2
|
329
|
-
@__weel_values[args[0]] = args[1]
|
330
|
-
elsif name.to_s == "[]" && args.length == 1
|
331
|
-
@__weel_values[args[0]]
|
332
|
-
else
|
333
|
-
nil
|
334
|
-
end
|
335
|
-
end
|
336
|
-
end # }}}
|
337
|
-
|
338
294
|
class ProcString #{{{
|
339
295
|
attr_reader :code
|
340
296
|
def initialize(code)
|
@@ -376,7 +332,7 @@ class WEEL
|
|
376
332
|
def callback(result=nil,options={}); end
|
377
333
|
def mem_guard; end
|
378
334
|
|
379
|
-
def prepare(
|
335
|
+
def prepare(lock,dataelements,endpoints,status,local,additional,code,exec_endpoints,exec_parameters); end
|
380
336
|
def test_condition(dataelements,endpoints,local,additional,code,args={}); ReadStructure.new(dataelements,endpoints,local,additional).instance_eval(code); end
|
381
337
|
def manipulate(readonly,lock,dataelements,endpoints,status,local,additional,code,where,result=nil,options=nil)
|
382
338
|
lock.synchronize do
|
@@ -762,16 +718,6 @@ class WEEL
|
|
762
718
|
self.__weel_state = :stopping
|
763
719
|
end #}}}
|
764
720
|
|
765
|
-
def status # {{{
|
766
|
-
@__weel_status
|
767
|
-
end # }}}
|
768
|
-
def data # {{{
|
769
|
-
ReadOnlyHash.new(@__weel_data)
|
770
|
-
end # }}}
|
771
|
-
def endpoints # {{{
|
772
|
-
ReadHash.new(@__weel_endpoints)
|
773
|
-
end # }}}
|
774
|
-
|
775
721
|
private
|
776
722
|
def __weel_protect_yield(*local) #{{{
|
777
723
|
begin
|
@@ -780,6 +726,10 @@ class WEEL
|
|
780
726
|
self.__weel_state = :stopping
|
781
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)
|
782
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
|
783
733
|
rescue => err
|
784
734
|
self.__weel_state = :stopping
|
785
735
|
@__weel_connectionwrapper::inform_syntax_error(@__weel_connectionwrapper_args,Exception.new(err.message),nil)
|
@@ -881,13 +831,7 @@ class WEEL
|
|
881
831
|
when :call
|
882
832
|
again = catch Signal::Again do
|
883
833
|
connectionwrapper.mem_guard
|
884
|
-
|
885
|
-
connectionwrapper.manipulate(true,@__weel_lock,@__weel_data,@__weel_endpoints,@__weel_status,Thread.current[:local],connectionwrapper.additional,prepare,'Activity ' + position.to_s)
|
886
|
-
else
|
887
|
-
# just the read structure, no code exec necessary
|
888
|
-
ReadStructure.new(@__weel_data,@__weel_endpoints,Thread.current[:local],connectionwrapper.additional)
|
889
|
-
end
|
890
|
-
params = connectionwrapper.prepare(struct,endpoint,parameters)
|
834
|
+
params = connectionwrapper.prepare(@__weel_lock,@__weel_data,@__weel_endpoints,@__weel_status,Thread.current[:local],connectionwrapper.additional,prepare,endpoint,parameters)
|
891
835
|
|
892
836
|
raise Signal::Stop unless connectionwrapper.vote_sync_before(params)
|
893
837
|
raise Signal::Skip if self.__weel_state == :stopping || self.__weel_state == :finishing
|
@@ -918,12 +862,12 @@ class WEEL
|
|
918
862
|
|
919
863
|
next if waitingresult == WEEL::Signal::UpdateAgain && connectionwrapper.activity_result_value&.length == 0
|
920
864
|
|
921
|
-
code = if waitingresult == WEEL::Signal::UpdateAgain
|
922
|
-
update
|
865
|
+
code, cmess = if waitingresult == WEEL::Signal::UpdateAgain
|
866
|
+
[update, 'update']
|
923
867
|
elsif waitingresult == WEEL::Signal::Salvage
|
924
|
-
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.')
|
925
869
|
else
|
926
|
-
finalize
|
870
|
+
[finalize, 'finalize']
|
927
871
|
end
|
928
872
|
if code.is_a?(String)
|
929
873
|
connectionwrapper.inform_activity_manipulate
|
@@ -931,7 +875,7 @@ class WEEL
|
|
931
875
|
|
932
876
|
# when you throw without parameters, ma contains nil, so we return Signal::Proceed to give ma a meaningful value in other cases
|
933
877
|
ma = catch Signal::Again do
|
934
|
-
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)
|
935
879
|
Signal::Proceed
|
936
880
|
end
|
937
881
|
connectionwrapper.inform_manipulate_change(
|
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.125
|
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
|