ruote 2.1.7 → 2.1.8

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.
Files changed (74) hide show
  1. data/CHANGELOG.txt +13 -0
  2. data/CREDITS.txt +2 -1
  3. data/Rakefile +4 -3
  4. data/TODO.txt +11 -1
  5. data/lib/ruote/exp/fe_concurrence.rb +26 -2
  6. data/lib/ruote/exp/fe_participant.rb +1 -1
  7. data/lib/ruote/exp/merge.rb +16 -9
  8. data/lib/ruote/fei.rb +1 -1
  9. data/lib/ruote/parser.rb +2 -1
  10. data/lib/ruote/part/smtp_participant.rb +22 -41
  11. data/lib/ruote/part/storage_participant.rb +20 -1
  12. data/lib/ruote/part/template.rb +34 -18
  13. data/lib/ruote/storage/base.rb +2 -20
  14. data/lib/ruote/storage/composite_storage.rb +134 -0
  15. data/lib/ruote/storage/fs_storage.rb +15 -1
  16. data/lib/ruote/util/dollar.rb +1 -0
  17. data/lib/ruote/util/misc.rb +5 -1
  18. data/lib/ruote/util/time.rb +13 -3
  19. data/lib/ruote/version.rb +1 -1
  20. data/lib/ruote/worker.rb +2 -2
  21. data/ruote.gemspec +18 -12
  22. data/test/bm/seq_thousand.rb +1 -1
  23. data/test/functional/base.rb +6 -8
  24. data/test/functional/crunner.rb +2 -0
  25. data/test/functional/eft_0_process_definition.rb +2 -2
  26. data/test/functional/eft_10_cancel_process.rb +2 -2
  27. data/test/functional/eft_11_wait.rb +3 -3
  28. data/test/functional/eft_12_listen.rb +1 -1
  29. data/test/functional/eft_13_iterator.rb +14 -14
  30. data/test/functional/eft_14_cursor.rb +12 -12
  31. data/test/functional/eft_15_loop.rb +2 -2
  32. data/test/functional/eft_16_if.rb +11 -15
  33. data/test/functional/eft_17_equals.rb +2 -2
  34. data/test/functional/eft_18_concurrent_iterator.rb +35 -8
  35. data/test/functional/eft_1_echo.rb +1 -1
  36. data/test/functional/eft_21_restore.rb +3 -3
  37. data/test/functional/eft_22_noop.rb +1 -1
  38. data/test/functional/eft_23_apply.rb +9 -9
  39. data/test/functional/eft_25_command.rb +1 -1
  40. data/test/functional/eft_27_inc.rb +12 -12
  41. data/test/functional/eft_28_when.rb +4 -4
  42. data/test/functional/eft_2_sequence.rb +3 -3
  43. data/test/functional/eft_3_participant.rb +5 -5
  44. data/test/functional/eft_4_set.rb +12 -12
  45. data/test/functional/eft_5_subprocess.rb +8 -8
  46. data/test/functional/eft_6_concurrence.rb +17 -4
  47. data/test/functional/eft_7_forget.rb +1 -1
  48. data/test/functional/eft_8_undo.rb +3 -3
  49. data/test/functional/ft_0_worker.rb +17 -1
  50. data/test/functional/ft_10_dollar.rb +9 -9
  51. data/test/functional/ft_11_recursion.rb +2 -2
  52. data/test/functional/ft_13_variables.rb +4 -4
  53. data/test/functional/ft_17_conditional.rb +5 -5
  54. data/test/functional/ft_19_alias.rb +1 -1
  55. data/test/functional/ft_1_process_status.rb +1 -1
  56. data/test/functional/ft_20_storage_participant.rb +2 -0
  57. data/test/functional/ft_22_process_definitions.rb +11 -4
  58. data/test/functional/ft_24_block_participants.rb +13 -4
  59. data/test/functional/ft_27_var_indirection.rb +5 -5
  60. data/test/functional/ft_28_null_noop_participants.rb +1 -1
  61. data/test/functional/ft_29_part_template.rb +4 -23
  62. data/test/functional/ft_30_smtp_participant.rb +50 -4
  63. data/test/functional/ft_32_fs_history.rb +4 -8
  64. data/test/functional/ft_33_participant_subprocess_priority.rb +1 -1
  65. data/test/functional/ft_36_storage_history.rb +2 -2
  66. data/test/functional/ft_5_on_error.rb +5 -5
  67. data/test/functional/ft_8_participant_consumption.rb +2 -2
  68. data/test/path_helper.rb +1 -1
  69. data/test/test_helper.rb +17 -0
  70. data/test/unit/storage.rb +2 -17
  71. data/test/unit/ut_19_part_template.rb +76 -0
  72. data/test/unit/ut_1_fei.rb +13 -0
  73. data/test/unit/ut_20_composite_storage.rb +34 -0
  74. metadata +111 -55
@@ -26,7 +26,7 @@ class EftRestoreTest < Test::Unit::TestCase
26
26
 
27
27
  #noisy
28
28
 
29
- assert_trace pdef, %w[ -- -surf- ]
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 pdef, '-A-'
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 pdef, '-B-'
58
+ assert_trace '-B-', pdef
59
59
  end
60
60
  end
61
61
 
@@ -22,7 +22,7 @@ class EftNoOpTest < Test::Unit::TestCase
22
22
 
23
23
  #noisy
24
24
 
25
- assert_trace(pdef, 'done.')
25
+ assert_trace('done.', pdef)
26
26
  end
27
27
  end
28
28
 
@@ -23,7 +23,7 @@ class EftApplyTest < Test::Unit::TestCase
23
23
 
24
24
  #noisy
25
25
 
26
- assert_trace(pdef, %w[ in out. ])
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(pdef, 'nada')
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(pdef, 'nada')
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(pdef, 'nada')
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(pdef, 'nada')
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(pdef, 'a:surf')
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(pdef, %w[ a: a:surf ])
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(pdef, %w[ nada ] * 3)
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(pdef, 'nada')
142
+ assert_trace('nada', pdef)
143
143
  end
144
144
  end
145
145
 
@@ -22,7 +22,7 @@ class EftCommandTest < Test::Unit::TestCase
22
22
 
23
23
  #noisy
24
24
 
25
- assert_trace pdef, 'done.'
25
+ assert_trace 'done.', pdef
26
26
  end
27
27
  end
28
28
 
@@ -30,7 +30,7 @@ class EftIncTest < Test::Unit::TestCase
30
30
 
31
31
  #noisy
32
32
 
33
- assert_trace pdef, '2|2'
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 pdef, '2|2'
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 pdef, '6|8|3.0'
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 pdef, '4'
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 pdef, %w[ alpha bravo charly ]
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 pdef, %w[ charly alpha bravo ]
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 pdef, %w[ charly charly ]
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 pdef, '3|3|-1'
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 pdef, %w[ a.b b.c a ]
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 pdef, %w[ a.b c ]
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 pdef, %w[ a.c b ]
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 pdef, %w[ a b c d ]
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 pdef, %w[ in over done. ]
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 => '1'
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 pdef, %w[ in over done. ]
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 pdef, %w[ in over done. ]
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(pdef, '')
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(pdef, "a\nb")
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(pdef, "alice\nbob")
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 pdef, 'alpha'
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 pdef, 'alpha'
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 pdef, 'alpha'
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 pdef, %w[ alpha charly ]
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 pdef, 'done.'
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 pdef, '-0-'
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 pdef, '--'
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 pdef, %w[ a b0 c0 d1 e0 ]
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 pdef, %w[ -0- -- ]
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 pdef, '-0-'
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 pdef, '-b-'
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 pdef, '-aBc-'
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 pdef, "{\"f\"=>nil}"
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 pdef, 'toto:toto'
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 pdef, %w[ nada:${nada} nada:${nada} ]
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 pdef, %w[ 0/1/2 // ]
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 pdef, '0/1'
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 pdef, 'a'
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 pdef, 'a'
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 pdef, 'a'
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 pdef, %w[ a a ]
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 pdef, 'A:B'
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 pdef, ''
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 pdef, %w[ in a b out. ]
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 pdef, "in sub0\ndone."
161
+ assert_trace "in sub0\ndone.", pdef
162
162
  end
163
163
  end
164
164