ruote 2.1.7 → 2.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.txt +13 -0
- data/CREDITS.txt +2 -1
- data/Rakefile +4 -3
- data/TODO.txt +11 -1
- data/lib/ruote/exp/fe_concurrence.rb +26 -2
- data/lib/ruote/exp/fe_participant.rb +1 -1
- data/lib/ruote/exp/merge.rb +16 -9
- data/lib/ruote/fei.rb +1 -1
- data/lib/ruote/parser.rb +2 -1
- data/lib/ruote/part/smtp_participant.rb +22 -41
- data/lib/ruote/part/storage_participant.rb +20 -1
- data/lib/ruote/part/template.rb +34 -18
- data/lib/ruote/storage/base.rb +2 -20
- data/lib/ruote/storage/composite_storage.rb +134 -0
- data/lib/ruote/storage/fs_storage.rb +15 -1
- data/lib/ruote/util/dollar.rb +1 -0
- data/lib/ruote/util/misc.rb +5 -1
- data/lib/ruote/util/time.rb +13 -3
- data/lib/ruote/version.rb +1 -1
- data/lib/ruote/worker.rb +2 -2
- data/ruote.gemspec +18 -12
- data/test/bm/seq_thousand.rb +1 -1
- data/test/functional/base.rb +6 -8
- data/test/functional/crunner.rb +2 -0
- data/test/functional/eft_0_process_definition.rb +2 -2
- data/test/functional/eft_10_cancel_process.rb +2 -2
- data/test/functional/eft_11_wait.rb +3 -3
- data/test/functional/eft_12_listen.rb +1 -1
- data/test/functional/eft_13_iterator.rb +14 -14
- data/test/functional/eft_14_cursor.rb +12 -12
- data/test/functional/eft_15_loop.rb +2 -2
- data/test/functional/eft_16_if.rb +11 -15
- data/test/functional/eft_17_equals.rb +2 -2
- data/test/functional/eft_18_concurrent_iterator.rb +35 -8
- data/test/functional/eft_1_echo.rb +1 -1
- data/test/functional/eft_21_restore.rb +3 -3
- data/test/functional/eft_22_noop.rb +1 -1
- data/test/functional/eft_23_apply.rb +9 -9
- data/test/functional/eft_25_command.rb +1 -1
- data/test/functional/eft_27_inc.rb +12 -12
- data/test/functional/eft_28_when.rb +4 -4
- data/test/functional/eft_2_sequence.rb +3 -3
- data/test/functional/eft_3_participant.rb +5 -5
- data/test/functional/eft_4_set.rb +12 -12
- data/test/functional/eft_5_subprocess.rb +8 -8
- data/test/functional/eft_6_concurrence.rb +17 -4
- data/test/functional/eft_7_forget.rb +1 -1
- data/test/functional/eft_8_undo.rb +3 -3
- data/test/functional/ft_0_worker.rb +17 -1
- data/test/functional/ft_10_dollar.rb +9 -9
- data/test/functional/ft_11_recursion.rb +2 -2
- data/test/functional/ft_13_variables.rb +4 -4
- data/test/functional/ft_17_conditional.rb +5 -5
- data/test/functional/ft_19_alias.rb +1 -1
- data/test/functional/ft_1_process_status.rb +1 -1
- data/test/functional/ft_20_storage_participant.rb +2 -0
- data/test/functional/ft_22_process_definitions.rb +11 -4
- data/test/functional/ft_24_block_participants.rb +13 -4
- data/test/functional/ft_27_var_indirection.rb +5 -5
- data/test/functional/ft_28_null_noop_participants.rb +1 -1
- data/test/functional/ft_29_part_template.rb +4 -23
- data/test/functional/ft_30_smtp_participant.rb +50 -4
- data/test/functional/ft_32_fs_history.rb +4 -8
- data/test/functional/ft_33_participant_subprocess_priority.rb +1 -1
- data/test/functional/ft_36_storage_history.rb +2 -2
- data/test/functional/ft_5_on_error.rb +5 -5
- data/test/functional/ft_8_participant_consumption.rb +2 -2
- data/test/path_helper.rb +1 -1
- data/test/test_helper.rb +17 -0
- data/test/unit/storage.rb +2 -17
- data/test/unit/ut_19_part_template.rb +76 -0
- data/test/unit/ut_1_fei.rb +13 -0
- data/test/unit/ut_20_composite_storage.rb +34 -0
- metadata +111 -55
@@ -26,7 +26,7 @@ class EftRestoreTest < Test::Unit::TestCase
|
|
26
26
|
|
27
27
|
#noisy
|
28
28
|
|
29
|
-
assert_trace
|
29
|
+
assert_trace %w[ -- -surf- ], pdef
|
30
30
|
end
|
31
31
|
|
32
32
|
def test_set_fields
|
@@ -40,7 +40,7 @@ class EftRestoreTest < Test::Unit::TestCase
|
|
40
40
|
|
41
41
|
#noisy
|
42
42
|
|
43
|
-
assert_trace
|
43
|
+
assert_trace '-A-', pdef
|
44
44
|
end
|
45
45
|
|
46
46
|
def test_set_fields_deep
|
@@ -55,7 +55,7 @@ class EftRestoreTest < Test::Unit::TestCase
|
|
55
55
|
|
56
56
|
#noisy
|
57
57
|
|
58
|
-
assert_trace
|
58
|
+
assert_trace '-B-', pdef
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
@@ -23,7 +23,7 @@ class EftApplyTest < Test::Unit::TestCase
|
|
23
23
|
|
24
24
|
#noisy
|
25
25
|
|
26
|
-
assert_trace(
|
26
|
+
assert_trace(%w[ in out. ], pdef)
|
27
27
|
end
|
28
28
|
|
29
29
|
def test_apply_tree
|
@@ -34,7 +34,7 @@ class EftApplyTest < Test::Unit::TestCase
|
|
34
34
|
|
35
35
|
#noisy
|
36
36
|
|
37
|
-
assert_trace(
|
37
|
+
assert_trace('nada', pdef)
|
38
38
|
end
|
39
39
|
|
40
40
|
def test_apply_default_tree_variable
|
@@ -48,7 +48,7 @@ class EftApplyTest < Test::Unit::TestCase
|
|
48
48
|
|
49
49
|
#noisy
|
50
50
|
|
51
|
-
assert_trace(
|
51
|
+
assert_trace('nada', pdef)
|
52
52
|
end
|
53
53
|
|
54
54
|
def test_apply_tree_variable
|
@@ -62,7 +62,7 @@ class EftApplyTest < Test::Unit::TestCase
|
|
62
62
|
|
63
63
|
#noisy
|
64
64
|
|
65
|
-
assert_trace(
|
65
|
+
assert_trace('nada', pdef)
|
66
66
|
end
|
67
67
|
|
68
68
|
def test_apply_tree_field
|
@@ -77,7 +77,7 @@ class EftApplyTest < Test::Unit::TestCase
|
|
77
77
|
|
78
78
|
#noisy
|
79
79
|
|
80
|
-
assert_trace(
|
80
|
+
assert_trace('nada', pdef)
|
81
81
|
end
|
82
82
|
|
83
83
|
def test_apply_attributes_as_variables
|
@@ -88,7 +88,7 @@ class EftApplyTest < Test::Unit::TestCase
|
|
88
88
|
|
89
89
|
#noisy
|
90
90
|
|
91
|
-
assert_trace(
|
91
|
+
assert_trace('a:surf', pdef)
|
92
92
|
end
|
93
93
|
|
94
94
|
def test_apply_default_with_attributes_as_variables
|
@@ -103,7 +103,7 @@ class EftApplyTest < Test::Unit::TestCase
|
|
103
103
|
|
104
104
|
#noisy
|
105
105
|
|
106
|
-
assert_trace(
|
106
|
+
assert_trace(%w[ a: a:surf ], pdef)
|
107
107
|
end
|
108
108
|
|
109
109
|
def test_apply_within_subprocess
|
@@ -123,7 +123,7 @@ class EftApplyTest < Test::Unit::TestCase
|
|
123
123
|
|
124
124
|
#noisy
|
125
125
|
|
126
|
-
assert_trace(
|
126
|
+
assert_trace(%w[ nada ] * 3, pdef)
|
127
127
|
end
|
128
128
|
|
129
129
|
def test_apply_within_subprocess_2
|
@@ -139,7 +139,7 @@ class EftApplyTest < Test::Unit::TestCase
|
|
139
139
|
|
140
140
|
#noisy
|
141
141
|
|
142
|
-
assert_trace(
|
142
|
+
assert_trace('nada', pdef)
|
143
143
|
end
|
144
144
|
end
|
145
145
|
|
@@ -30,7 +30,7 @@ class EftIncTest < Test::Unit::TestCase
|
|
30
30
|
|
31
31
|
#noisy
|
32
32
|
|
33
|
-
assert_trace
|
33
|
+
assert_trace '2|2', pdef
|
34
34
|
end
|
35
35
|
|
36
36
|
def test_inc_missing
|
@@ -49,7 +49,7 @@ class EftIncTest < Test::Unit::TestCase
|
|
49
49
|
|
50
50
|
#noisy
|
51
51
|
|
52
|
-
assert_trace
|
52
|
+
assert_trace '2|2', pdef
|
53
53
|
end
|
54
54
|
|
55
55
|
def test_inc_delta
|
@@ -70,7 +70,7 @@ class EftIncTest < Test::Unit::TestCase
|
|
70
70
|
|
71
71
|
#noisy
|
72
72
|
|
73
|
-
assert_trace
|
73
|
+
assert_trace '6|8|3.0', pdef
|
74
74
|
end
|
75
75
|
|
76
76
|
def test_inc_v_val
|
@@ -88,7 +88,7 @@ class EftIncTest < Test::Unit::TestCase
|
|
88
88
|
|
89
89
|
#noisy
|
90
90
|
|
91
|
-
assert_trace
|
91
|
+
assert_trace '4', pdef
|
92
92
|
end
|
93
93
|
|
94
94
|
def test_inc_array
|
@@ -108,7 +108,7 @@ class EftIncTest < Test::Unit::TestCase
|
|
108
108
|
|
109
109
|
#noisy
|
110
110
|
|
111
|
-
assert_trace
|
111
|
+
assert_trace %w[ alpha bravo charly ], pdef
|
112
112
|
end
|
113
113
|
|
114
114
|
def test_inc_array_head
|
@@ -129,7 +129,7 @@ class EftIncTest < Test::Unit::TestCase
|
|
129
129
|
|
130
130
|
#noisy
|
131
131
|
|
132
|
-
assert_trace
|
132
|
+
assert_trace %w[ charly alpha bravo ], pdef
|
133
133
|
end
|
134
134
|
|
135
135
|
def test_inc_array_missing
|
@@ -149,7 +149,7 @@ class EftIncTest < Test::Unit::TestCase
|
|
149
149
|
|
150
150
|
#noisy
|
151
151
|
|
152
|
-
assert_trace
|
152
|
+
assert_trace %w[ charly charly ], pdef
|
153
153
|
end
|
154
154
|
|
155
155
|
def test_dec
|
@@ -170,7 +170,7 @@ class EftIncTest < Test::Unit::TestCase
|
|
170
170
|
|
171
171
|
#noisy
|
172
172
|
|
173
|
-
assert_trace
|
173
|
+
assert_trace '3|3|-1', pdef
|
174
174
|
end
|
175
175
|
|
176
176
|
def test_dec_array
|
@@ -194,7 +194,7 @@ class EftIncTest < Test::Unit::TestCase
|
|
194
194
|
|
195
195
|
#noisy
|
196
196
|
|
197
|
-
assert_trace
|
197
|
+
assert_trace %w[ a.b b.c a ], pdef
|
198
198
|
end
|
199
199
|
|
200
200
|
def test_dec_to
|
@@ -215,7 +215,7 @@ class EftIncTest < Test::Unit::TestCase
|
|
215
215
|
|
216
216
|
#noisy
|
217
217
|
|
218
|
-
assert_trace
|
218
|
+
assert_trace %w[ a.b c ], pdef
|
219
219
|
end
|
220
220
|
|
221
221
|
def test_dec_val
|
@@ -236,7 +236,7 @@ class EftIncTest < Test::Unit::TestCase
|
|
236
236
|
|
237
237
|
#noisy
|
238
238
|
|
239
|
-
assert_trace
|
239
|
+
assert_trace %w[ a.c b ], pdef
|
240
240
|
end
|
241
241
|
|
242
242
|
def test_cursor
|
@@ -254,7 +254,7 @@ class EftIncTest < Test::Unit::TestCase
|
|
254
254
|
|
255
255
|
#noisy
|
256
256
|
|
257
|
-
assert_trace
|
257
|
+
assert_trace %w[ a b c d ], pdef
|
258
258
|
end
|
259
259
|
|
260
260
|
def test_bare_inc
|
@@ -31,7 +31,7 @@ class EftWhenTest < Test::Unit::TestCase
|
|
31
31
|
|
32
32
|
#noisy
|
33
33
|
|
34
|
-
assert_trace
|
34
|
+
assert_trace %w[ in over done. ], pdef
|
35
35
|
|
36
36
|
assert_equal 0, @engine.storage.get_many('schedules').size
|
37
37
|
end
|
@@ -42,7 +42,7 @@ class EftWhenTest < Test::Unit::TestCase
|
|
42
42
|
echo 'in'
|
43
43
|
concurrence do
|
44
44
|
sequence do
|
45
|
-
_when '${v:ok}', :freq => '
|
45
|
+
_when '${v:ok}', :freq => '1s'
|
46
46
|
echo 'done.'
|
47
47
|
end
|
48
48
|
sequence do
|
@@ -55,7 +55,7 @@ class EftWhenTest < Test::Unit::TestCase
|
|
55
55
|
|
56
56
|
#noisy
|
57
57
|
|
58
|
-
assert_trace
|
58
|
+
assert_trace %w[ in over done. ], pdef
|
59
59
|
|
60
60
|
assert_equal 0, @engine.storage.get_many('schedules').size
|
61
61
|
end
|
@@ -101,7 +101,7 @@ class EftWhenTest < Test::Unit::TestCase
|
|
101
101
|
|
102
102
|
#noisy
|
103
103
|
|
104
|
-
assert_trace
|
104
|
+
assert_trace %w[ in over done. ], pdef
|
105
105
|
|
106
106
|
assert_equal 0, @engine.storage.get_many('schedules').size
|
107
107
|
end
|
@@ -20,7 +20,7 @@ class EftSequenceTest < Test::Unit::TestCase
|
|
20
20
|
|
21
21
|
#noisy
|
22
22
|
|
23
|
-
assert_trace(
|
23
|
+
assert_trace('', pdef)
|
24
24
|
end
|
25
25
|
|
26
26
|
def test_a_b_sequence
|
@@ -34,7 +34,7 @@ class EftSequenceTest < Test::Unit::TestCase
|
|
34
34
|
|
35
35
|
#noisy
|
36
36
|
|
37
|
-
assert_trace(
|
37
|
+
assert_trace("a\nb", pdef)
|
38
38
|
end
|
39
39
|
|
40
40
|
def test_alice_bob_sequence
|
@@ -52,7 +52,7 @@ class EftSequenceTest < Test::Unit::TestCase
|
|
52
52
|
|
53
53
|
#noisy
|
54
54
|
|
55
|
-
assert_trace(
|
55
|
+
assert_trace("alice\nbob", pdef)
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
@@ -25,7 +25,7 @@ class EftParticipantTest < Test::Unit::TestCase
|
|
25
25
|
|
26
26
|
#noisy
|
27
27
|
|
28
|
-
assert_trace
|
28
|
+
assert_trace 'alpha', pdef
|
29
29
|
|
30
30
|
assert_log_count(1) { |e| e['action'] == 'dispatch' }
|
31
31
|
assert_log_count(1) { |e| e['action'] == 'receive' }
|
@@ -43,7 +43,7 @@ class EftParticipantTest < Test::Unit::TestCase
|
|
43
43
|
|
44
44
|
#noisy
|
45
45
|
|
46
|
-
assert_trace
|
46
|
+
assert_trace 'alpha', pdef
|
47
47
|
end
|
48
48
|
|
49
49
|
def test_participant_exp_name
|
@@ -58,7 +58,7 @@ class EftParticipantTest < Test::Unit::TestCase
|
|
58
58
|
|
59
59
|
#noisy
|
60
60
|
|
61
|
-
assert_trace
|
61
|
+
assert_trace 'alpha', pdef
|
62
62
|
end
|
63
63
|
|
64
64
|
def test_participant_exp_name_tree_rewriting
|
@@ -93,7 +93,7 @@ class EftParticipantTest < Test::Unit::TestCase
|
|
93
93
|
|
94
94
|
#noisy
|
95
95
|
|
96
|
-
assert_trace
|
96
|
+
assert_trace %w[ alpha charly ], pdef
|
97
97
|
end
|
98
98
|
|
99
99
|
def test_participant_and_att_text
|
@@ -112,7 +112,7 @@ class EftParticipantTest < Test::Unit::TestCase
|
|
112
112
|
|
113
113
|
#noisy
|
114
114
|
|
115
|
-
assert_trace
|
115
|
+
assert_trace 'done.', pdef
|
116
116
|
|
117
117
|
assert_equal(
|
118
118
|
{ "commander of the left guard"=>nil, "if"=>"true", "ref"=>"notify" },
|
@@ -22,7 +22,7 @@ class EftSetTest < Test::Unit::TestCase
|
|
22
22
|
|
23
23
|
#noisy
|
24
24
|
|
25
|
-
assert_trace
|
25
|
+
assert_trace '-0-', pdef
|
26
26
|
end
|
27
27
|
|
28
28
|
def test_set_to_nil
|
@@ -36,7 +36,7 @@ class EftSetTest < Test::Unit::TestCase
|
|
36
36
|
|
37
37
|
#noisy
|
38
38
|
|
39
|
-
assert_trace
|
39
|
+
assert_trace '--', pdef
|
40
40
|
end
|
41
41
|
|
42
42
|
def test_set_var_in_subprocess
|
@@ -60,7 +60,7 @@ class EftSetTest < Test::Unit::TestCase
|
|
60
60
|
|
61
61
|
#noisy
|
62
62
|
|
63
|
-
assert_trace
|
63
|
+
assert_trace %w[ a b0 c0 d1 e0 ], pdef
|
64
64
|
end
|
65
65
|
|
66
66
|
def test_unset_var
|
@@ -76,7 +76,7 @@ class EftSetTest < Test::Unit::TestCase
|
|
76
76
|
|
77
77
|
#noisy
|
78
78
|
|
79
|
-
assert_trace
|
79
|
+
assert_trace %w[ -0- -- ], pdef
|
80
80
|
end
|
81
81
|
|
82
82
|
def test_set_field
|
@@ -90,7 +90,7 @@ class EftSetTest < Test::Unit::TestCase
|
|
90
90
|
|
91
91
|
#noisy
|
92
92
|
|
93
|
-
assert_trace
|
93
|
+
assert_trace '-0-', pdef
|
94
94
|
end
|
95
95
|
|
96
96
|
def test_set_field_to_array
|
@@ -104,7 +104,7 @@ class EftSetTest < Test::Unit::TestCase
|
|
104
104
|
|
105
105
|
#noisy
|
106
106
|
|
107
|
-
assert_trace
|
107
|
+
assert_trace '-b-', pdef
|
108
108
|
end
|
109
109
|
|
110
110
|
def test_set_field_deep
|
@@ -119,7 +119,7 @@ class EftSetTest < Test::Unit::TestCase
|
|
119
119
|
|
120
120
|
#noisy
|
121
121
|
|
122
|
-
assert_trace
|
122
|
+
assert_trace '-aBc-', pdef
|
123
123
|
end
|
124
124
|
|
125
125
|
def test_missing_value
|
@@ -134,7 +134,7 @@ class EftSetTest < Test::Unit::TestCase
|
|
134
134
|
@tracer << workitem.fields.inspect
|
135
135
|
end
|
136
136
|
|
137
|
-
assert_trace
|
137
|
+
assert_trace '{"f"=>nil}', pdef
|
138
138
|
end
|
139
139
|
|
140
140
|
def test_field_value
|
@@ -149,7 +149,7 @@ class EftSetTest < Test::Unit::TestCase
|
|
149
149
|
|
150
150
|
#noisy
|
151
151
|
|
152
|
-
assert_trace
|
152
|
+
assert_trace 'toto:toto', pdef
|
153
153
|
end
|
154
154
|
|
155
155
|
def test_escape
|
@@ -170,7 +170,7 @@ class EftSetTest < Test::Unit::TestCase
|
|
170
170
|
|
171
171
|
#noisy
|
172
172
|
|
173
|
-
assert_trace
|
173
|
+
assert_trace %w[ nada:${nada} nada:${nada} ], pdef
|
174
174
|
end
|
175
175
|
|
176
176
|
def test_simpler_set
|
@@ -192,7 +192,7 @@ class EftSetTest < Test::Unit::TestCase
|
|
192
192
|
|
193
193
|
#noisy
|
194
194
|
|
195
|
-
assert_trace
|
195
|
+
assert_trace %w[ 0/1/2 // ], pdef
|
196
196
|
end
|
197
197
|
|
198
198
|
def test_simpler_and_nested
|
@@ -207,7 +207,7 @@ class EftSetTest < Test::Unit::TestCase
|
|
207
207
|
|
208
208
|
#noisy
|
209
209
|
|
210
|
-
assert_trace
|
210
|
+
assert_trace '0/1', pdef
|
211
211
|
end
|
212
212
|
|
213
213
|
def test_set_at_engine_level_is_forbidden
|
@@ -22,7 +22,7 @@ class EftSubprocessTest < Test::Unit::TestCase
|
|
22
22
|
|
23
23
|
#noisy
|
24
24
|
|
25
|
-
assert_trace
|
25
|
+
assert_trace 'a', pdef
|
26
26
|
end
|
27
27
|
|
28
28
|
def test_subprocess_att_text
|
@@ -36,7 +36,7 @@ class EftSubprocessTest < Test::Unit::TestCase
|
|
36
36
|
|
37
37
|
#noisy
|
38
38
|
|
39
|
-
assert_trace
|
39
|
+
assert_trace 'a', pdef
|
40
40
|
end
|
41
41
|
|
42
42
|
def test_subprocess_exp_name
|
@@ -50,7 +50,7 @@ class EftSubprocessTest < Test::Unit::TestCase
|
|
50
50
|
|
51
51
|
#noisy
|
52
52
|
|
53
|
-
assert_trace
|
53
|
+
assert_trace 'a', pdef
|
54
54
|
end
|
55
55
|
|
56
56
|
def test_subprocess_if
|
@@ -68,7 +68,7 @@ class EftSubprocessTest < Test::Unit::TestCase
|
|
68
68
|
|
69
69
|
#noisy
|
70
70
|
|
71
|
-
assert_trace
|
71
|
+
assert_trace %w[ a a ], pdef
|
72
72
|
end
|
73
73
|
|
74
74
|
def test_subprocess_atts_to_vars
|
@@ -82,7 +82,7 @@ class EftSubprocessTest < Test::Unit::TestCase
|
|
82
82
|
|
83
83
|
#noisy
|
84
84
|
|
85
|
-
assert_trace
|
85
|
+
assert_trace 'A:B', pdef
|
86
86
|
end
|
87
87
|
|
88
88
|
def test_subprocess_passing_tree
|
@@ -104,7 +104,7 @@ class EftSubprocessTest < Test::Unit::TestCase
|
|
104
104
|
|
105
105
|
#noisy
|
106
106
|
|
107
|
-
assert_trace
|
107
|
+
assert_trace '', pdef
|
108
108
|
|
109
109
|
assert_equal ["noop", {}, []], tree
|
110
110
|
end
|
@@ -121,7 +121,7 @@ class EftSubprocessTest < Test::Unit::TestCase
|
|
121
121
|
|
122
122
|
#noisy
|
123
123
|
|
124
|
-
assert_trace
|
124
|
+
assert_trace %w[ in a b out. ], pdef
|
125
125
|
end
|
126
126
|
|
127
127
|
def test_missing_uri
|
@@ -158,7 +158,7 @@ class EftSubprocessTest < Test::Unit::TestCase
|
|
158
158
|
echo 'in sub0'
|
159
159
|
end
|
160
160
|
|
161
|
-
assert_trace
|
161
|
+
assert_trace "in sub0\ndone.", pdef
|
162
162
|
end
|
163
163
|
end
|
164
164
|
|