weel 1.99.77 → 1.99.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/weel.rb +80 -90
- 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: 7ba66fd2448bc777292487140faac23d6f0fd00a264953dff4b16e302a6a9344
|
4
|
+
data.tar.gz: 93a76802212618b1e5fb20dd29475ee671a2d5d53bc7595655b9a8d751332765
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a8773185c37a30e34a6f8712cd9c7ad41bd44f6a76bb99e7ab41839448846c1b8a3a4a1285700c913b6a5a2b169b4fe3e38be2e688fc3e42cd08e3dea9b41c6
|
7
|
+
data.tar.gz: 243c9322426d3db3ee97d9e78cf9dd5f9221dab1c7206ce49a983406acf59bcc3f6275a4d95177d4ea9aa70d440a841ad1d8ff1d052fc52849daa65ec9431a75
|
data/lib/weel.rb
CHANGED
@@ -243,7 +243,7 @@ end # }}}
|
|
243
243
|
def callback(result=nil,options={}); end
|
244
244
|
|
245
245
|
def test_condition(mr,code); mr.instance_eval(code); end
|
246
|
-
def manipulate(mr,code,result=nil); mr.instance_eval(code); end
|
246
|
+
def manipulate(mr,code,result=nil,options=nil); mr.instance_eval(code); end
|
247
247
|
end # }}}
|
248
248
|
|
249
249
|
class Position # {{{
|
@@ -706,104 +706,94 @@ end # }}}
|
|
706
706
|
@__weel_handlerwrapper::inform_position_change @__weel_handlerwrapper_args, :after => [wp]
|
707
707
|
end
|
708
708
|
when :call
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
if
|
714
|
-
|
715
|
-
|
716
|
-
|
709
|
+
begin
|
710
|
+
again = catch Signal::Again do
|
711
|
+
rs = ReadStructure.new(@__weel_data,@__weel_endpoints)
|
712
|
+
if prepare
|
713
|
+
if prepare.is_a?(Proc)
|
714
|
+
rs.instance_exec &prepare
|
715
|
+
elsif prepare.is_a?(String)
|
716
|
+
rs.instance_eval prepare
|
717
717
|
end
|
718
718
|
end
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
719
|
+
params = handlerwrapper.prepare(rs,endpoint,parameters)
|
720
|
+
raise Signal::Stop unless handlerwrapper.vote_sync_before(params)
|
721
|
+
raise Signal::Skip if self.__weel_state == :stopping || self.__weel_state == :finishing
|
722
|
+
|
723
|
+
if @__weel_search_positions[position]
|
724
|
+
passthrough = @__weel_search_positions[position].passthrough
|
725
|
+
@__weel_search_positions[position].passthrough = nil
|
726
|
+
else
|
727
|
+
passthrough = nil
|
726
728
|
end
|
727
|
-
else
|
728
|
-
raise("invalid parameters")
|
729
|
-
end
|
730
|
-
rs = ReadStructure.new(@__weel_data,@__weel_endpoints)
|
731
|
-
if prepare
|
732
|
-
if prepare.is_a?(Proc)
|
733
|
-
rs.instance_exec &prepare
|
734
|
-
elsif prepare.is_a?(String)
|
735
|
-
rs.instance_eval prepare
|
736
|
-
end
|
737
|
-
end
|
738
|
-
params = handlerwrapper.prepare(rs,endpoint,params)
|
739
|
-
raise Signal::Stop unless handlerwrapper.vote_sync_before(params)
|
740
|
-
raise Signal::Skip if self.__weel_state == :stopping || self.__weel_state == :finishing
|
741
|
-
|
742
|
-
if @__weel_search_positions[position]
|
743
|
-
passthrough = @__weel_search_positions[position].passthrough
|
744
|
-
@__weel_search_positions[position].passthrough = nil
|
745
|
-
else
|
746
|
-
passthrough = nil
|
747
|
-
end
|
748
729
|
|
749
|
-
|
750
|
-
wp.passthrough = handlerwrapper.activity_passthrough_value
|
751
|
-
unless wp.passthrough.nil?
|
752
|
-
@__weel_handlerwrapper::inform_position_change @__weel_handlerwrapper_args, :wait => [wp]
|
753
|
-
end
|
754
|
-
begin
|
755
|
-
# with loop if catching Signal::Again
|
756
|
-
# handshake call and wait until it finished
|
757
|
-
waitingresult = nil
|
758
|
-
waitingresult = Thread.current[:continue].wait unless Thread.current[:nolongernecessary] || self.__weel_state == :stopping || self.__weel_state == :finishing || self.__weel_state == :stopped
|
759
|
-
raise waitingresult[1] if !waitingresult.nil? && waitingresult.is_a?(Array) && waitingresult.length == 2 && waitingresult[0] == WEEL::Signal::Error
|
760
|
-
|
761
|
-
if Thread.current[:nolongernecessary]
|
762
|
-
handlerwrapper.activity_no_longer_necessary
|
763
|
-
raise Signal::NoLongerNecessary
|
764
|
-
end
|
765
|
-
if self.__weel_state == :stopping || self.__weel_state == :finishing
|
766
|
-
handlerwrapper.activity_stop
|
730
|
+
handlerwrapper.activity_handle passthrough, params
|
767
731
|
wp.passthrough = handlerwrapper.activity_passthrough_value
|
768
|
-
|
769
|
-
|
732
|
+
unless wp.passthrough.nil?
|
733
|
+
@__weel_handlerwrapper::inform_position_change @__weel_handlerwrapper_args, :wait => [wp]
|
734
|
+
end
|
735
|
+
begin
|
736
|
+
# with loop if catching Signal::Again
|
737
|
+
# handshake call and wait until it finished
|
738
|
+
waitingresult = nil
|
739
|
+
waitingresult = Thread.current[:continue].wait unless Thread.current[:nolongernecessary] || self.__weel_state == :stopping || self.__weel_state == :finishing || self.__weel_state == :stopped
|
740
|
+
raise waitingresult[1] if !waitingresult.nil? && waitingresult.is_a?(Array) && waitingresult.length == 2 && waitingresult[0] == WEEL::Signal::Error
|
741
|
+
|
742
|
+
if Thread.current[:nolongernecessary]
|
743
|
+
handlerwrapper.activity_no_longer_necessary
|
744
|
+
raise Signal::NoLongerNecessary
|
745
|
+
end
|
746
|
+
if self.__weel_state == :stopping || self.__weel_state == :finishing
|
747
|
+
handlerwrapper.activity_stop
|
748
|
+
wp.passthrough = handlerwrapper.activity_passthrough_value
|
749
|
+
raise Signal::Proceed
|
750
|
+
end
|
770
751
|
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
752
|
+
code = if waitingresult == WEEL::Signal::Again
|
753
|
+
update
|
754
|
+
elsif waitingresult == WEEL::Signal::Salvage
|
755
|
+
salvage || raise('HTTP Error. The service return status was not between 200 and 300.')
|
756
|
+
else
|
757
|
+
finalize
|
758
|
+
end
|
759
|
+
if code.is_a?(Proc) || code.is_a?(String)
|
760
|
+
handlerwrapper.inform_activity_manipulate
|
761
|
+
if code.is_a?(Proc)
|
762
|
+
mr = ManipulateStructure.new(@__weel_data,@__weel_endpoints,@__weel_status)
|
763
|
+
case code.arity
|
764
|
+
when 1; mr.instance_exec(handlerwrapper.activity_result_value,&code)
|
765
|
+
when 2; mr.instance_exec(handlerwrapper.activity_result_value,&code)
|
766
|
+
else
|
767
|
+
ma = catch Signal::Again do
|
768
|
+
mr.instance_exec(&code)
|
769
|
+
'yes' # ma sadly will have nil when i just throw
|
770
|
+
end
|
771
|
+
end
|
772
|
+
elsif code.is_a?(String)
|
773
|
+
mr = ManipulateStructure.new(@__weel_data,@__weel_endpoints,@__weel_status)
|
774
|
+
ma = catch Signal::Again do
|
775
|
+
handlerwrapper.manipulate(mr,code,handlerwrapper.activity_result_value,handlerwrapper.activity_result_options)
|
776
|
+
'yes' # ma sadly will have nil when i just throw
|
777
|
+
end
|
778
|
+
end
|
779
|
+
handlerwrapper.inform_manipulate_change(
|
780
|
+
(mr.changed_status ? @__weel_status : nil),
|
781
|
+
(mr.changed_data.any? ? mr.changed_data.uniq : nil),
|
782
|
+
(mr.changed_endpoints.any? ? mr.changed_endpoints.uniq : nil),
|
783
|
+
@__weel_data,
|
784
|
+
@__weel_endpoints
|
785
|
+
)
|
786
|
+
throw(Signal::Again, Signal::Again) if ma.nil?
|
787
787
|
end
|
788
|
-
|
789
|
-
|
790
|
-
handlerwrapper.
|
788
|
+
end while waitingresult == Signal::Again
|
789
|
+
if handlerwrapper.activity_passthrough_value.nil?
|
790
|
+
handlerwrapper.inform_activity_done
|
791
|
+
wp.passthrough = nil
|
792
|
+
wp.detail = :after
|
793
|
+
@__weel_handlerwrapper::inform_position_change @__weel_handlerwrapper_args, :after => [wp]
|
791
794
|
end
|
792
|
-
handlerwrapper.inform_manipulate_change(
|
793
|
-
(mr.changed_status ? @__weel_status : nil),
|
794
|
-
(mr.changed_data.any? ? mr.changed_data.uniq : nil),
|
795
|
-
(mr.changed_endpoints.any? ? mr.changed_endpoints.uniq : nil),
|
796
|
-
@__weel_data,
|
797
|
-
@__weel_endpoints
|
798
|
-
)
|
799
795
|
end
|
800
|
-
end while
|
801
|
-
if handlerwrapper.activity_passthrough_value.nil?
|
802
|
-
handlerwrapper.inform_activity_done
|
803
|
-
wp.passthrough = nil
|
804
|
-
wp.detail = :after
|
805
|
-
@__weel_handlerwrapper::inform_position_change @__weel_handlerwrapper_args, :after => [wp]
|
806
|
-
end
|
796
|
+
end while again == Signal::Again
|
807
797
|
end
|
808
798
|
raise Signal::Proceed
|
809
799
|
rescue Signal::SkipManipulate, Signal::Proceed
|
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.78
|
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: 2019-10-
|
12
|
+
date: 2019-10-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: test-unit
|