weel 1.99.41 → 1.99.42
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3f458fa318005e31affc6486e1daa58ab000c9d
|
4
|
+
data.tar.gz: '08562dee7a782c19f24d6c46302dcfccfded4a1e'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94a4cf7c0fee9997184a5c38758a4189015ef36dfba7ba2fe465eda16184342b493c4f78943f570ecc191e137715c282955ba3481efa77b8bdeddedf496fc030
|
7
|
+
data.tar.gz: 9cc0f7f57da39de710bd5b0c9449dab5e08e5b23991ed02ba37b93248f3054e3dfbbd451926d6c7e76cfd1b5f2eae7da2e0b614afcf91639c79b4c667dc2be60
|
data/lib/weel.rb
CHANGED
@@ -16,15 +16,8 @@
|
|
16
16
|
|
17
17
|
require 'thread'
|
18
18
|
|
19
|
-
# OMG!111! strings have to be emptied
|
20
|
-
class String # {{{
|
21
|
-
def clear
|
22
|
-
self.slice!(0..-1)
|
23
|
-
end
|
24
|
-
end # }}}
|
25
|
-
|
26
19
|
# OMG!111! deep cloning for ReadHashes
|
27
|
-
class Object #{{{
|
20
|
+
class Object # {{{
|
28
21
|
def deep_clone
|
29
22
|
return @deep_cloning_obj if @deep_cloning
|
30
23
|
@deep_cloning_obj = clone
|
@@ -125,7 +118,7 @@ class WEEL
|
|
125
118
|
end
|
126
119
|
|
127
120
|
def delete(value)
|
128
|
-
if @__weel_values.
|
121
|
+
if @__weel_values.key?(value)
|
129
122
|
@__weel_what << value
|
130
123
|
@__weel_values.delete(value)
|
131
124
|
end
|
@@ -137,7 +130,7 @@ class WEEL
|
|
137
130
|
end
|
138
131
|
|
139
132
|
def method_missing(name,*args)
|
140
|
-
if args.empty? && @__weel_values.
|
133
|
+
if args.empty? && @__weel_values.key?(name)
|
141
134
|
@__weel_values[name]
|
142
135
|
elsif name.to_s[-1..-1] == "=" && args.length == 1
|
143
136
|
temp = name.to_s[0..-2]
|
@@ -153,7 +146,7 @@ class WEEL
|
|
153
146
|
end
|
154
147
|
end # }}}
|
155
148
|
|
156
|
-
class Status #{{{
|
149
|
+
class Status # {{{
|
157
150
|
def initialize(id,message)
|
158
151
|
@id = id
|
159
152
|
@message = message
|
@@ -176,7 +169,7 @@ class WEEL
|
|
176
169
|
end
|
177
170
|
|
178
171
|
def method_missing(name,*args)
|
179
|
-
if args.empty? && @__weel_values.
|
172
|
+
if args.empty? && @__weel_values.key?(name)
|
180
173
|
if @__weel_sim
|
181
174
|
"➤#{name}"
|
182
175
|
else
|
@@ -236,7 +229,7 @@ class WEEL
|
|
236
229
|
end
|
237
230
|
end # }}}
|
238
231
|
|
239
|
-
class Continue #{{{
|
232
|
+
class Continue # {{{
|
240
233
|
def initialize
|
241
234
|
@q = Queue.new
|
242
235
|
@m = Mutex.new
|
@@ -265,6 +258,7 @@ class WEEL
|
|
265
258
|
def self::endpoint(new_endpoints)# {{{
|
266
259
|
@@__weel_new_endpoints ||= {}
|
267
260
|
@@__weel_new_endpoints.merge! new_endpoints
|
261
|
+
remove_method :initialize_endpoints if method_defined? :initialize_endpoints
|
268
262
|
define_method :initialize_endpoints do
|
269
263
|
@@__weel_new_endpoints.each do |name,value|
|
270
264
|
@dslr.__weel_endpoints[name.to_s.to_sym] = value
|
@@ -292,7 +286,7 @@ class WEEL
|
|
292
286
|
self.description = @@__weel_control_block
|
293
287
|
end
|
294
288
|
end # }}}
|
295
|
-
def self::flow #{{{
|
289
|
+
def self::flow # {{{
|
296
290
|
end #}}}
|
297
291
|
|
298
292
|
class DSLRealization # {{{
|
@@ -558,7 +552,7 @@ class WEEL
|
|
558
552
|
return if self.__weel_state == :stopping || self.__weel_state == :stopped || Thread.current[:nolongernecessary]
|
559
553
|
|
560
554
|
Thread.current[:continue] = Continue.new
|
561
|
-
handlerwrapper = @__weel_handlerwrapper.new @__weel_handlerwrapper_args, endpoints.is_a?(Array) ? endpoints.map{|ep| @__weel_endpoints[ep] }.compact : @__weel_endpoints[endpoints], position, Thread.current[:continue]
|
555
|
+
handlerwrapper = @__weel_handlerwrapper.new @__weel_handlerwrapper_args, endpoints.is_a?(Array) ? endpoints.map{ |ep| @__weel_endpoints[ep] }.compact : @__weel_endpoints[endpoints], position, Thread.current[:continue]
|
562
556
|
|
563
557
|
if __weel_sim
|
564
558
|
handlerwrapper.simulate(:activity,:none,@__weel_sim += 1,Thread.current[:branch_sim_pos],:position => position,:parameters => parameters,:endpoints => endpoints,:type => type,:finalize => finalize.is_a?(String) ? finalize : nil)
|
@@ -876,19 +870,19 @@ public
|
|
876
870
|
|
877
871
|
def data(new_data=nil) # {{{
|
878
872
|
unless new_data.nil? || !new_data.is_a?(Hash)
|
879
|
-
new_data.each{|k,v
|
873
|
+
new_data.each{ |k,v| @dslr.__weel_data[k] = v }
|
880
874
|
end
|
881
875
|
@dslr.__weel_data
|
882
876
|
end # }}}
|
883
877
|
def endpoints(new_endpoints=nil) # {{{
|
884
878
|
unless new_endpoints.nil? || !new_endpoints.is_a?(Hash)
|
885
|
-
new_endpoints.each{|k,v
|
879
|
+
new_endpoints.each{ |k,v| @dslr.__weel_endpoints[k] = v }
|
886
880
|
end
|
887
881
|
@dslr.__weel_endpoints
|
888
882
|
end # }}}
|
889
883
|
def endpoint(new_endpoints) # {{{
|
890
884
|
unless new_endpoints.nil? || !new_endpoints.is_a?(Hash) || !new_endpoints.length == 1
|
891
|
-
new_endpoints.each{|k,v
|
885
|
+
new_endpoints.each{ |k,v| @dslr.__weel_endpoints[k] = v }
|
892
886
|
end
|
893
887
|
nil
|
894
888
|
end # }}}
|
@@ -900,8 +894,9 @@ public
|
|
900
894
|
def description(&blk)
|
901
895
|
self.description=(blk)
|
902
896
|
end
|
903
|
-
def description=(code)
|
897
|
+
def description=(code) # {{{
|
904
898
|
(class << self; self; end).class_eval do
|
899
|
+
remove_method :__weel_control_flow if method_defined? :__weel_control_flow
|
905
900
|
define_method :__weel_control_flow do |state,final_state=:finished|
|
906
901
|
@dslr.__weel_positions.clear
|
907
902
|
@dslr.__weel_state = state
|
@@ -919,7 +914,7 @@ public
|
|
919
914
|
if @dslr.__weel_state == :running
|
920
915
|
@dslr.__weel_state = :finished
|
921
916
|
ipc = { :unmark => [] }
|
922
|
-
@dslr.__weel_positions.each{|wp| ipc[:unmark] << wp.position}
|
917
|
+
@dslr.__weel_positions.each{ |wp| ipc[:unmark] << wp.position }
|
923
918
|
@dslr.__weel_positions.clear
|
924
919
|
handlerwrapper = @dslr.__weel_handlerwrapper.new @dslr.__weel_handlerwrapper_args
|
925
920
|
handlerwrapper.inform_position_change(ipc)
|
@@ -18,7 +18,7 @@ class TestCodeReplace < Test::Unit::TestCase
|
|
18
18
|
wf_sassert("|running|Ca_test_1_1Da_test_1_1Ca_test_1_2Da_test_1_2Ca_test_1_3Da_test_1_3|finished|")
|
19
19
|
end
|
20
20
|
def test_wfdescription_string
|
21
|
-
|
21
|
+
@wf.description = "call :b_test_1_1, :endpoint1"
|
22
22
|
@wf.search WEEL::Position.new(:b_test_1_1, :at)
|
23
23
|
@wf.start.join
|
24
24
|
wf_assert("DONE b_test_1_1")
|
@@ -26,7 +26,7 @@ class TestWFPCancellingStructuredPartialJoin < Test::Unit::TestCase
|
|
26
26
|
end
|
27
27
|
call :a_6, :endpoint1, parameters: { :call => Proc.new{sleep 0.2} }
|
28
28
|
end
|
29
|
-
|
29
|
+
@wf.start.join
|
30
30
|
wf_assert("CALL a_1:")
|
31
31
|
wf_assert("CALL a_2:")
|
32
32
|
wf_assert("CALL a_3:")
|
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.42
|
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: 2016-05
|
12
|
+
date: 2016-08-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: test-unit
|
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
version: '0'
|
102
102
|
requirements: []
|
103
103
|
rubyforge_project:
|
104
|
-
rubygems_version: 2.
|
104
|
+
rubygems_version: 2.5.1
|
105
105
|
signing_key:
|
106
106
|
specification_version: 4
|
107
107
|
summary: Preliminary release of the Workflow Execution Engine Library (WEEL)
|