ruote 2.1.11 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (217) hide show
  1. data/CHANGELOG.txt +60 -0
  2. data/CREDITS.txt +22 -4
  3. data/LICENSE.txt +1 -1
  4. data/README.rdoc +6 -7
  5. data/Rakefile +58 -59
  6. data/TODO.txt +137 -65
  7. data/couch_url.txt +1 -0
  8. data/jruby_issue.txt +32 -0
  9. data/lib/ruote.rb +1 -1
  10. data/lib/ruote/context.rb +12 -10
  11. data/lib/ruote/engine.rb +280 -145
  12. data/lib/ruote/engine/process_error.rb +5 -5
  13. data/lib/ruote/engine/process_status.rb +47 -28
  14. data/lib/ruote/exp/command.rb +7 -10
  15. data/lib/ruote/exp/commanded.rb +2 -2
  16. data/lib/ruote/exp/condition.rb +130 -43
  17. data/lib/ruote/exp/fe_add_branches.rb +2 -2
  18. data/lib/ruote/exp/fe_apply.rb +1 -1
  19. data/lib/ruote/exp/fe_cancel_process.rb +3 -3
  20. data/lib/ruote/exp/fe_command.rb +3 -3
  21. data/lib/ruote/exp/fe_concurrence.rb +4 -4
  22. data/lib/ruote/exp/fe_concurrent_iterator.rb +17 -5
  23. data/lib/ruote/exp/fe_cron.rb +3 -3
  24. data/lib/ruote/exp/fe_cursor.rb +5 -5
  25. data/lib/ruote/exp/fe_define.rb +3 -3
  26. data/lib/ruote/exp/fe_echo.rb +3 -3
  27. data/lib/ruote/exp/fe_equals.rb +2 -2
  28. data/lib/ruote/exp/fe_error.rb +2 -2
  29. data/lib/ruote/exp/fe_filter.rb +519 -0
  30. data/lib/ruote/exp/fe_forget.rb +9 -2
  31. data/lib/ruote/exp/fe_given.rb +154 -0
  32. data/lib/ruote/exp/fe_if.rb +16 -13
  33. data/lib/ruote/exp/fe_inc.rb +3 -3
  34. data/lib/ruote/exp/fe_iterator.rb +4 -4
  35. data/lib/ruote/exp/fe_let.rb +75 -0
  36. data/lib/ruote/exp/fe_listen.rb +68 -12
  37. data/lib/ruote/exp/fe_lose.rb +110 -0
  38. data/lib/ruote/exp/fe_noop.rb +1 -1
  39. data/lib/ruote/exp/{fe_when.rb → fe_once.rb} +25 -21
  40. data/lib/ruote/exp/fe_participant.rb +14 -17
  41. data/lib/ruote/exp/fe_redo.rb +10 -6
  42. data/lib/ruote/exp/fe_ref.rb +1 -1
  43. data/lib/ruote/exp/fe_registerp.rb +112 -0
  44. data/lib/ruote/exp/fe_reserve.rb +3 -3
  45. data/lib/ruote/exp/fe_restore.rb +2 -2
  46. data/lib/ruote/exp/fe_save.rb +2 -2
  47. data/lib/ruote/exp/fe_sequence.rb +3 -4
  48. data/lib/ruote/exp/fe_set.rb +16 -7
  49. data/lib/ruote/exp/fe_subprocess.rb +23 -1
  50. data/lib/ruote/exp/fe_that.rb +92 -0
  51. data/lib/ruote/exp/fe_undo.rb +3 -3
  52. data/lib/ruote/exp/fe_unregisterp.rb +71 -0
  53. data/lib/ruote/exp/fe_wait.rb +2 -2
  54. data/lib/ruote/exp/flowexpression.rb +153 -78
  55. data/lib/ruote/exp/iterator.rb +2 -2
  56. data/lib/ruote/exp/merge.rb +2 -2
  57. data/lib/ruote/exp/ro_attributes.rb +14 -12
  58. data/lib/ruote/exp/ro_filters.rb +136 -0
  59. data/lib/ruote/exp/ro_persist.rb +51 -35
  60. data/lib/ruote/exp/ro_variables.rb +18 -27
  61. data/lib/ruote/fei.rb +73 -33
  62. data/lib/ruote/id/mnemo_wfid_generator.rb +1 -1
  63. data/lib/ruote/id/wfid_generator.rb +11 -4
  64. data/lib/ruote/log/default_history.rb +122 -0
  65. data/lib/ruote/log/pretty.rb +36 -8
  66. data/lib/ruote/log/storage_history.rb +37 -5
  67. data/lib/ruote/log/test_logger.rb +26 -24
  68. data/lib/ruote/log/wait_logger.rb +5 -3
  69. data/lib/ruote/part/block_participant.rb +22 -11
  70. data/lib/ruote/part/engine_participant.rb +6 -7
  71. data/lib/ruote/part/local_participant.rb +6 -12
  72. data/lib/ruote/part/no_op_participant.rb +4 -4
  73. data/lib/ruote/part/null_participant.rb +4 -4
  74. data/lib/ruote/part/smtp_participant.rb +4 -4
  75. data/lib/ruote/part/storage_participant.rb +40 -20
  76. data/lib/ruote/part/template.rb +4 -4
  77. data/lib/ruote/participant.rb +0 -1
  78. data/lib/ruote/{parser.rb → reader.rb} +30 -25
  79. data/lib/ruote/{parser → reader}/ruby_dsl.rb +28 -11
  80. data/lib/ruote/{parser → reader}/xml.rb +6 -5
  81. data/lib/ruote/receiver/base.rb +35 -13
  82. data/lib/ruote/storage/base.rb +20 -18
  83. data/lib/ruote/storage/composite_storage.rb +10 -10
  84. data/lib/ruote/storage/fs_storage.rb +17 -10
  85. data/lib/ruote/storage/hash_storage.rb +29 -18
  86. data/lib/ruote/svc/dispatch_pool.rb +41 -14
  87. data/lib/ruote/svc/dollar_sub.rb +50 -17
  88. data/lib/ruote/svc/error_handler.rb +19 -11
  89. data/lib/ruote/svc/expression_map.rb +4 -4
  90. data/lib/ruote/svc/participant_list.rb +105 -100
  91. data/lib/ruote/svc/tracker.rb +58 -18
  92. data/lib/ruote/svc/treechecker.rb +51 -24
  93. data/lib/ruote/tree_dot.rb +4 -4
  94. data/lib/ruote/util/filter.rb +440 -0
  95. data/lib/ruote/util/hashdot.rb +4 -4
  96. data/lib/ruote/util/look.rb +2 -6
  97. data/lib/ruote/util/lookup.rb +9 -7
  98. data/lib/ruote/util/misc.rb +40 -8
  99. data/lib/ruote/util/ometa.rb +1 -1
  100. data/lib/ruote/util/serializer.rb +4 -4
  101. data/lib/ruote/util/subprocess.rb +29 -9
  102. data/lib/ruote/util/time.rb +4 -4
  103. data/lib/ruote/util/tree.rb +3 -3
  104. data/lib/ruote/version.rb +2 -2
  105. data/lib/ruote/worker.rb +55 -32
  106. data/lib/ruote/workitem.rb +64 -11
  107. data/ruote.gemspec +31 -302
  108. data/test/bm/launch_bench.rb +37 -0
  109. data/test/functional/base.rb +60 -18
  110. data/test/functional/concurrent_base.rb +2 -2
  111. data/test/functional/ct_0_concurrence.rb +1 -1
  112. data/test/functional/ct_1_iterator.rb +1 -1
  113. data/test/functional/ct_2_cancel.rb +1 -1
  114. data/test/functional/eft_0_process_definition.rb +2 -2
  115. data/test/functional/eft_10_cancel_process.rb +1 -1
  116. data/test/functional/eft_11_wait.rb +19 -11
  117. data/test/functional/eft_12_listen.rb +79 -13
  118. data/test/functional/eft_13_iterator.rb +13 -10
  119. data/test/functional/eft_14_cursor.rb +98 -9
  120. data/test/functional/eft_15_loop.rb +6 -4
  121. data/test/functional/eft_16_if.rb +12 -0
  122. data/test/functional/eft_18_concurrent_iterator.rb +31 -32
  123. data/test/functional/eft_19_reserve.rb +4 -4
  124. data/test/functional/eft_1_echo.rb +9 -0
  125. data/test/functional/eft_20_save.rb +4 -4
  126. data/test/functional/{eft_28_when.rb → eft_28_once.rb} +33 -7
  127. data/test/functional/eft_30_ref.rb +17 -2
  128. data/test/functional/eft_31_registerp.rb +130 -0
  129. data/test/functional/eft_32_lose.rb +93 -0
  130. data/test/functional/eft_33_let.rb +31 -0
  131. data/test/functional/eft_34_given.rb +123 -0
  132. data/test/functional/eft_35_filter.rb +269 -0
  133. data/test/functional/eft_3_participant.rb +4 -6
  134. data/test/functional/eft_4_set.rb +16 -2
  135. data/test/functional/eft_5_subprocess.rb +2 -4
  136. data/test/functional/eft_6_concurrence.rb +29 -29
  137. data/test/functional/eft_8_undo.rb +39 -3
  138. data/test/functional/eft_9_redo.rb +94 -2
  139. data/test/functional/ft_10_dollar.rb +81 -2
  140. data/test/functional/ft_11_recursion.rb +13 -17
  141. data/test/functional/ft_12_launchitem.rb +9 -5
  142. data/test/functional/ft_13_variables.rb +7 -9
  143. data/test/functional/ft_14_re_apply.rb +6 -9
  144. data/test/functional/ft_15_timeout.rb +18 -18
  145. data/test/functional/ft_16_participant_params.rb +1 -3
  146. data/test/functional/ft_17_conditional.rb +25 -2
  147. data/test/functional/ft_18_kill.rb +65 -12
  148. data/test/functional/ft_1_process_status.rb +147 -71
  149. data/test/functional/ft_20_storage_participant.rb +0 -1
  150. data/test/functional/ft_21_forget.rb +82 -1
  151. data/test/functional/{ft_24_block_participants.rb → ft_24_block_participant.rb} +42 -11
  152. data/test/functional/ft_25_receiver.rb +47 -17
  153. data/test/functional/{ft_26_participant_timeout.rb → ft_26_participant_rtimeout.rb} +56 -19
  154. data/test/functional/ft_29_part_template.rb +6 -5
  155. data/test/functional/ft_2_errors.rb +21 -37
  156. data/test/functional/ft_30_smtp_participant.rb +1 -1
  157. data/test/functional/ft_31_part_blocking.rb +8 -6
  158. data/test/functional/ft_34_cursor_rewind.rb +13 -10
  159. data/test/functional/ft_35_add_service.rb +1 -1
  160. data/test/functional/ft_36_storage_history.rb +24 -1
  161. data/test/functional/ft_37_default_history.rb +109 -0
  162. data/test/functional/ft_38_participant_more.rb +10 -10
  163. data/test/functional/ft_39_wait_for.rb +12 -9
  164. data/test/functional/ft_3_participant_registration.rb +111 -32
  165. data/test/functional/ft_40_wait_logger.rb +2 -1
  166. data/test/functional/ft_41_participants.rb +30 -4
  167. data/test/functional/ft_43_participant_on_reply.rb +6 -23
  168. data/test/functional/ft_45_participant_accept.rb +4 -4
  169. data/test/functional/ft_46_launch_single.rb +36 -2
  170. data/test/functional/ft_47_wfid_generator.rb +54 -0
  171. data/test/functional/ft_48_lose.rb +112 -0
  172. data/test/functional/ft_49_engine_on_error.rb +201 -0
  173. data/test/functional/ft_4_cancel.rb +66 -6
  174. data/test/functional/ft_50_engine_config.rb +22 -0
  175. data/test/functional/ft_51_misc.rb +67 -0
  176. data/test/functional/ft_52_case.rb +134 -0
  177. data/test/functional/ft_53_engine_on_terminate.rb +95 -0
  178. data/test/functional/ft_54_patterns.rb +104 -0
  179. data/test/functional/{ft_37_engine_participant.rb → ft_55_engine_participant.rb} +4 -5
  180. data/test/functional/ft_56_filter_attribute.rb +259 -0
  181. data/test/functional/ft_5_on_error.rb +77 -30
  182. data/test/functional/ft_6_on_cancel.rb +66 -11
  183. data/test/functional/ft_7_tags.rb +94 -5
  184. data/test/functional/ft_8_participant_consumption.rb +36 -5
  185. data/test/functional/ft_9_subprocesses.rb +10 -10
  186. data/test/functional/rt_1_listen.rb +3 -3
  187. data/test/functional/{rt_3_when.rb → rt_3_once.rb} +4 -4
  188. data/test/functional/storage_helper.rb +15 -13
  189. data/test/functional/test.rb +1 -3
  190. data/test/test_helper.rb +0 -8
  191. data/test/unit/storage.rb +154 -10
  192. data/test/unit/{ut_0_ruby_parser.rb → ut_0_ruby_reader.rb} +61 -11
  193. data/test/unit/ut_11_lookup.rb +7 -0
  194. data/test/unit/ut_13_serializer.rb +1 -1
  195. data/test/unit/ut_15_util.rb +23 -0
  196. data/test/unit/{ut_16_parser.rb → ut_16_reader.rb} +11 -13
  197. data/test/unit/ut_1_fei.rb +57 -10
  198. data/test/unit/ut_20_composite_storage.rb +25 -11
  199. data/test/unit/ut_21_participant_list.rb +47 -0
  200. data/test/unit/ut_22_filter.rb +903 -0
  201. data/test/unit/ut_3_wait_logger.rb +2 -6
  202. data/test/unit/ut_6_condition.rb +164 -17
  203. data/test/unit/ut_7_workitem.rb +28 -0
  204. data/test/unit/ut_8_tree_to_dot.rb +1 -1
  205. data/test/unit/{ut_9_xml_parser.rb → ut_9_xml_reader.rb} +5 -5
  206. metadata +108 -84
  207. data/.gitignore +0 -4
  208. data/examples/barley.rb +0 -391
  209. data/examples/flickr_report.rb +0 -107
  210. data/examples/pong.rb +0 -37
  211. data/examples/ruote_quickstart.rb +0 -43
  212. data/examples/web_first_page.rb +0 -68
  213. data/lib/ruote/part/hash_participant.rb +0 -91
  214. data/test/README.rdoc +0 -15
  215. data/test/functional/crunner.sh +0 -19
  216. data/test/pdef.xml +0 -7
  217. data/test/unit/ut_2_wfidgen.rb +0 -21
@@ -7,11 +7,7 @@
7
7
 
8
8
  require File.join(File.dirname(__FILE__), '..', 'test_helper.rb')
9
9
 
10
- require 'ruote/parser/ruby_dsl'
11
- require 'ruote/engine'
12
- require 'ruote/worker'
13
- require 'ruote/storage/hash_storage'
14
- require 'ruote/part/hash_participant'
10
+ require 'ruote'
15
11
 
16
12
 
17
13
  class UtWaitLoggerTest < Test::Unit::TestCase
@@ -29,7 +25,7 @@ class UtWaitLoggerTest < Test::Unit::TestCase
29
25
 
30
26
  #engine.context.logger.noisy = true
31
27
 
32
- alpha = engine.register_participant :alpha, Ruote::HashParticipant.new
28
+ alpha = engine.register_participant :alpha, Ruote::StorageParticipant
33
29
 
34
30
  engine.launch(pdef)
35
31
  msg = engine.wait_for(:alpha)
@@ -13,27 +13,17 @@ require 'ruote/svc/expression_map'
13
13
 
14
14
  class ConditionTest < Test::Unit::TestCase
15
15
 
16
- class Conditional
16
+ class FakeExpression
17
17
 
18
- def treechecker
19
- return @tc if @tc
20
- @tc = Ruote::TreeChecker.new
21
- @tc.context = {}
22
- @tc
23
- end
24
- end
25
-
26
- class FakeExpression < Conditional
27
-
28
- def initialize (h)
18
+ def initialize(h)
29
19
  @h = h
30
20
  end
31
- def attribute (k)
21
+ def attribute(k)
32
22
  @h[k]
33
23
  end
34
24
  end
35
25
 
36
- def assert_not_skip (result, h)
26
+ def assert_not_skip(result, h)
37
27
 
38
28
  fe = FakeExpression.new(h)
39
29
 
@@ -43,7 +33,12 @@ class ConditionTest < Test::Unit::TestCase
43
33
  assert_equal result, Ruote::Exp::Condition.apply?(sif, sunless)
44
34
  end
45
35
 
46
- def assert_b (b, conditional)
36
+ def assert_b(b, conditional=nil)
37
+
38
+ if conditional == nil
39
+ conditional = b
40
+ b = true
41
+ end
47
42
 
48
43
  assert_equal(
49
44
  b,
@@ -59,6 +54,8 @@ class ConditionTest < Test::Unit::TestCase
59
54
 
60
55
  assert_not_skip true, :if => 'a == a'
61
56
  assert_not_skip true, :if => '"a" == "a"'
57
+
58
+ assert_not_skip true, :if => 'blah blah blah'
62
59
  end
63
60
 
64
61
  def test_unless
@@ -109,7 +106,7 @@ class ConditionTest < Test::Unit::TestCase
109
106
  assert_b true, 'alpha =~ al'
110
107
  end
111
108
 
112
- def test_number_comparision
109
+ def test_number_comparison
113
110
 
114
111
  assert_b true, 'b > a'
115
112
  assert_b false, 'a > b'
@@ -120,9 +117,11 @@ class ConditionTest < Test::Unit::TestCase
120
117
 
121
118
  def test_emptiness
122
119
 
123
- assert_b true, ' == '
120
+ assert_b false, ' == '
124
121
  assert_b false, " == ''"
125
122
  assert_b false, ' == ""'
123
+ assert_b false, ' == a'
124
+ assert_b false, 'a == '
126
125
  end
127
126
 
128
127
  def test_strip
@@ -134,5 +133,153 @@ class ConditionTest < Test::Unit::TestCase
134
133
  assert_not_skip true, :if => 'a == a'
135
134
  assert_not_skip true, :if => 'a==a'
136
135
  end
136
+
137
+ def test_boolean_literals
138
+
139
+ assert_b true, true
140
+ assert_b false, false
141
+ end
142
+
143
+ def test_complex_strings
144
+
145
+ assert_b true, "'some dude' == 'some dude'"
146
+ assert_b true, "some dude == \"some dude\""
147
+ assert_b true, "some dude == 'some dude'"
148
+ end
149
+
150
+ def test_and_or
151
+
152
+ assert_b "1 and 2 and 3"
153
+ assert_b "1 && 2 && 3"
154
+
155
+ assert_b "1 or 2 or 3"
156
+ assert_b "1 || 2 || 3"
157
+
158
+ assert_b true, "true or false"
159
+
160
+ assert_b true, "true and (true or false)"
161
+ assert_b false, "true and (true and false)"
162
+
163
+ assert_b true, "'a' and ('b' and 'c')"
164
+ end
165
+
166
+ def test_not
167
+
168
+ assert_b true, "not false"
169
+ assert_b false, "not true"
170
+ assert_b true, "! false"
171
+ assert_b false, " ! true"
172
+ end
173
+
174
+ def assert_e(target, code)
175
+
176
+ assert_equal(
177
+ target,
178
+ Ruote::Exp::Condition.eval(code),
179
+ ">#{code}< was expected to eval to #{target.inspect}")
180
+ end
181
+
182
+ def test_eval
183
+
184
+ assert_e nil, "nil"
185
+
186
+ assert_e true, "true"
187
+ assert_e false, "false"
188
+ assert_e 'alice', '"alice"'
189
+ assert_e 1, '1'
190
+
191
+ assert_e([ 1, 2, 3 ], "[ 1, 2, 3 ]")
192
+ assert_e({ 'a' => 2, 'b' => 2.0 }, "{ 'a' => 2, 'b' => 2.0 }")
193
+
194
+ assert_e /^a/, "/^a/"
195
+
196
+ assert_e 'Loan', 'Loan'
197
+ assert_e 'Loan/Grant', 'Loan/Grant'
198
+ assert_e 'Loan/Grant', 'Loan / Grant'
199
+ end
200
+
201
+ def test_is_empty
202
+
203
+ assert_b "'' empty"
204
+ assert_b "'' is empty"
205
+ assert_b '"" empty'
206
+ assert_b '"" is empty'
207
+
208
+ assert_b "[] empty"
209
+ assert_b "[] is empty"
210
+
211
+ assert_b "{} empty"
212
+ assert_b "{} is empty"
213
+
214
+ assert_b false, "[1] is empty"
215
+ assert_b false, "{1=>2} is empty"
216
+ end
217
+
218
+ def test_is_not_empty
219
+
220
+ assert_b false, "'' not empty"
221
+ assert_b false, "'' is not empty"
222
+ assert_b false, '"" not empty'
223
+ assert_b false, '"" is not empty'
224
+
225
+ assert_b false, "[] not empty"
226
+ assert_b false, "[] is not empty"
227
+
228
+ assert_b false, "{} not empty"
229
+ assert_b false, "{} is not empty"
230
+
231
+ assert_b true, "[1] is not empty"
232
+ assert_b true, "{1=>2} is not empty"
233
+ end
234
+
235
+ def test_null
236
+
237
+ assert_b "nil == nil"
238
+ assert_b "1 != nil"
239
+ assert_b false, "1 == nil"
240
+ assert_b false, "nil != nil"
241
+
242
+ assert_b "nil null"
243
+ assert_b "nil is null"
244
+
245
+ assert_b false, "nil not null"
246
+ assert_b false, "nil is not null"
247
+
248
+ assert_b false, "1 null"
249
+ assert_b false, "1 is null"
250
+
251
+ assert_b true, "1 not null"
252
+ assert_b true, "1 is not null"
253
+ end
254
+
255
+ def test_in
256
+
257
+ assert_b "1 in [1, 2]"
258
+ assert_b "1 in {1 => 2}"
259
+
260
+ assert_b false, "3 in [1, 2]"
261
+ assert_b false, "2 in {1 => 2}"
262
+ end
263
+
264
+ def test_not_in
265
+
266
+ assert_b "7 not in [1, 2]"
267
+ assert_b "2 not in {1 => 2}"
268
+
269
+ assert_b false, "1 not in [1, 2]"
270
+ assert_b false, "1 not in {1 => 2}"
271
+ end
272
+
273
+ def test_in_gone_bad
274
+
275
+ assert_b false, "1 in [1 2]"
276
+ assert_b false, "1 in {x}"
277
+ end
278
+
279
+ def test_comparators
280
+
281
+ assert_b "alpha =~ /^a/"
282
+ assert_b false, "alpha =~ /^b/"
283
+ end
137
284
  end
138
285
 
@@ -10,6 +10,9 @@ require File.join(File.dirname(__FILE__), '..', 'test_helper.rb')
10
10
  require 'ruote/fei'
11
11
  require 'ruote/workitem'
12
12
 
13
+ require_json
14
+ require 'rufus/json'
15
+
13
16
 
14
17
  class UtWorkitemTest < Test::Unit::TestCase
15
18
 
@@ -67,5 +70,30 @@ class UtWorkitemTest < Test::Unit::TestCase
67
70
 
68
71
  assert_equal '20101224-baba', w0.wfid
69
72
  end
73
+
74
+ WI = {
75
+ 'fei' => {
76
+ 'expid' => '0',
77
+ 'wfid' => '20101224-baba',
78
+ 'engine_id' => 'engine',
79
+ 'subid' => '123423fde6' },
80
+ 'participant_name' => 'john',
81
+ 'fields' => {
82
+ 'customer' => 'swissre'
83
+ }
84
+ }
85
+ WI_JSON = ::Rufus::Json.encode(WI)
86
+ WI_PRETTY_JSON = ::Rufus::Json.pretty_encode(WI)
87
+
88
+ def test_from_json
89
+
90
+ assert_equal WI, Ruote::Workitem.from_json(WI_JSON).h
91
+ assert_equal WI, Ruote::Workitem.from_json(WI_PRETTY_JSON).h
92
+ end
93
+
94
+ def test_as_json
95
+
96
+ assert_equal WI, Rufus::Json.decode(Ruote::Workitem.new(WI).as_json)
97
+ end
70
98
  end
71
99
 
@@ -7,7 +7,7 @@
7
7
 
8
8
  require File.join(File.dirname(__FILE__), '..', 'test_helper.rb')
9
9
 
10
- require 'ruote/parser/ruby_dsl'
10
+ require 'ruote/reader/ruby_dsl'
11
11
  require 'ruote/tree_dot'
12
12
 
13
13
 
@@ -7,14 +7,14 @@
7
7
 
8
8
  require File.join(File.dirname(__FILE__), '..', 'test_helper.rb')
9
9
 
10
- require 'ruote/parser/xml'
10
+ require 'ruote/reader/xml'
11
11
 
12
12
 
13
- class RubyParserTest < Test::Unit::TestCase
13
+ class XmlReaderTest < Test::Unit::TestCase
14
14
 
15
15
  def test_sequence
16
16
 
17
- tree = Ruote::XmlParser.parse(%{
17
+ tree = Ruote::XmlReader.read(%{
18
18
  <define name="nada">
19
19
  <sequence>
20
20
  <alpha/>
@@ -32,7 +32,7 @@ class RubyParserTest < Test::Unit::TestCase
32
32
 
33
33
  def test_echo
34
34
 
35
- tree = Ruote::XmlParser.parse(%{
35
+ tree = Ruote::XmlReader.read(%{
36
36
  <process-definition name="nada">
37
37
  <echo>la vida loca</echo>
38
38
  </process-definition>
@@ -45,7 +45,7 @@ class RubyParserTest < Test::Unit::TestCase
45
45
 
46
46
  def test_concurrent_iterator
47
47
 
48
- tree = Ruote::XmlParser.parse(%{
48
+ tree = Ruote::XmlReader.read(%{
49
49
  <process-definition name="nada">
50
50
  <concurrent-iterator on-field="toti" to-field="toto">
51
51
  </concurrent-iterator>
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 2
7
- - 1
8
- - 11
9
- version: 2.1.11
7
+ - 2
8
+ - 0
9
+ version: 2.2.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - John Mettraux
@@ -16,107 +16,119 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-10-01 00:00:00 +09:00
19
+ date: 2011-03-01 00:00:00 +09:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
- name: rufus-json
23
+ name: sourcify
24
24
  prerelease: false
25
25
  requirement: &id001 !ruby/object:Gem::Requirement
26
+ none: false
26
27
  requirements:
27
- - - ">="
28
+ - - "="
28
29
  - !ruby/object:Gem::Version
29
30
  segments:
30
31
  - 0
32
+ - 4
31
33
  - 2
32
- - 5
33
- version: 0.2.5
34
+ version: 0.4.2
34
35
  type: :runtime
35
36
  version_requirements: *id001
36
37
  - !ruby/object:Gem::Dependency
37
- name: rufus-cloche
38
+ name: rufus-json
38
39
  prerelease: false
39
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
40
42
  requirements:
41
43
  - - ">="
42
44
  - !ruby/object:Gem::Version
43
45
  segments:
44
46
  - 0
45
- - 1
46
- - 20
47
- version: 0.1.20
47
+ - 2
48
+ - 5
49
+ version: 0.2.5
48
50
  type: :runtime
49
51
  version_requirements: *id002
50
52
  - !ruby/object:Gem::Dependency
51
- name: rufus-dollar
53
+ name: rufus-cloche
52
54
  prerelease: false
53
55
  requirement: &id003 !ruby/object:Gem::Requirement
56
+ none: false
54
57
  requirements:
55
58
  - - ">="
56
59
  - !ruby/object:Gem::Version
57
60
  segments:
58
61
  - 0
59
- version: "0"
62
+ - 1
63
+ - 20
64
+ version: 0.1.20
60
65
  type: :runtime
61
66
  version_requirements: *id003
62
67
  - !ruby/object:Gem::Dependency
63
- name: rufus-mnemo
68
+ name: rufus-dollar
64
69
  prerelease: false
65
70
  requirement: &id004 !ruby/object:Gem::Requirement
71
+ none: false
66
72
  requirements:
67
73
  - - ">="
68
74
  - !ruby/object:Gem::Version
69
75
  segments:
70
76
  - 1
71
- - 1
72
77
  - 0
73
- version: 1.1.0
78
+ - 4
79
+ version: 1.0.4
74
80
  type: :runtime
75
81
  version_requirements: *id004
76
82
  - !ruby/object:Gem::Dependency
77
- name: rufus-scheduler
83
+ name: rufus-mnemo
78
84
  prerelease: false
79
85
  requirement: &id005 !ruby/object:Gem::Requirement
86
+ none: false
80
87
  requirements:
81
88
  - - ">="
82
89
  - !ruby/object:Gem::Version
83
90
  segments:
84
- - 2
91
+ - 1
92
+ - 1
85
93
  - 0
86
- - 5
87
- version: 2.0.5
94
+ version: 1.1.0
88
95
  type: :runtime
89
96
  version_requirements: *id005
90
97
  - !ruby/object:Gem::Dependency
91
- name: rufus-treechecker
98
+ name: rufus-scheduler
92
99
  prerelease: false
93
100
  requirement: &id006 !ruby/object:Gem::Requirement
101
+ none: false
94
102
  requirements:
95
103
  - - ">="
96
104
  - !ruby/object:Gem::Version
97
105
  segments:
98
- - 1
106
+ - 2
99
107
  - 0
100
- - 3
101
- version: 1.0.3
108
+ - 8
109
+ version: 2.0.8
102
110
  type: :runtime
103
111
  version_requirements: *id006
104
112
  - !ruby/object:Gem::Dependency
105
- name: rake
113
+ name: rufus-treechecker
106
114
  prerelease: false
107
115
  requirement: &id007 !ruby/object:Gem::Requirement
116
+ none: false
108
117
  requirements:
109
118
  - - ">="
110
119
  - !ruby/object:Gem::Version
111
120
  segments:
121
+ - 1
112
122
  - 0
113
- version: "0"
114
- type: :development
123
+ - 4
124
+ version: 1.0.4
125
+ type: :runtime
115
126
  version_requirements: *id007
116
127
  - !ruby/object:Gem::Dependency
117
- name: yard
128
+ name: rake
118
129
  prerelease: false
119
130
  requirement: &id008 !ruby/object:Gem::Requirement
131
+ none: false
120
132
  requirements:
121
133
  - - ">="
122
134
  - !ruby/object:Gem::Version
@@ -129,6 +141,7 @@ dependencies:
129
141
  name: json
130
142
  prerelease: false
131
143
  requirement: &id009 !ruby/object:Gem::Requirement
144
+ none: false
132
145
  requirements:
133
146
  - - ">="
134
147
  - !ruby/object:Gem::Version
@@ -141,6 +154,7 @@ dependencies:
141
154
  name: builder
142
155
  prerelease: false
143
156
  requirement: &id010 !ruby/object:Gem::Requirement
157
+ none: false
144
158
  requirements:
145
159
  - - ">="
146
160
  - !ruby/object:Gem::Version
@@ -153,6 +167,7 @@ dependencies:
153
167
  name: mailtrap
154
168
  prerelease: false
155
169
  requirement: &id011 !ruby/object:Gem::Requirement
170
+ none: false
156
171
  requirements:
157
172
  - - ">="
158
173
  - !ruby/object:Gem::Version
@@ -161,46 +176,22 @@ dependencies:
161
176
  version: "0"
162
177
  type: :development
163
178
  version_requirements: *id011
164
- - !ruby/object:Gem::Dependency
165
- name: jeweler
166
- prerelease: false
167
- requirement: &id012 !ruby/object:Gem::Requirement
168
- requirements:
169
- - - ">="
170
- - !ruby/object:Gem::Version
171
- segments:
172
- - 0
173
- version: "0"
174
- type: :development
175
- version_requirements: *id012
176
179
  description: "\n\
177
- ruote is an open source ruby workflow engine.\n "
178
- email: jmettraux@gmail.com
180
+ ruote is an open source Ruby workflow engine\n "
181
+ email:
182
+ - jmettraux@gmail.com
179
183
  executables: []
180
184
 
181
185
  extensions: []
182
186
 
183
- extra_rdoc_files:
184
- - LICENSE.txt
185
- - README.rdoc
187
+ extra_rdoc_files: []
188
+
186
189
  files:
187
- - .gitignore
188
- - CHANGELOG.txt
189
- - CREDITS.txt
190
- - LICENSE.txt
191
- - README.rdoc
192
190
  - Rakefile
193
- - TODO.txt
194
- - examples/barley.rb
195
- - examples/flickr_report.rb
196
- - examples/pong.rb
197
- - examples/ruote_quickstart.rb
198
- - examples/web_first_page.rb
199
- - lib/ruote.rb
200
191
  - lib/ruote/context.rb
201
- - lib/ruote/engine.rb
202
192
  - lib/ruote/engine/process_error.rb
203
193
  - lib/ruote/engine/process_status.rb
194
+ - lib/ruote/engine.rb
204
195
  - lib/ruote/exp/command.rb
205
196
  - lib/ruote/exp/commanded.rb
206
197
  - lib/ruote/exp/condition.rb
@@ -216,43 +207,48 @@ files:
216
207
  - lib/ruote/exp/fe_echo.rb
217
208
  - lib/ruote/exp/fe_equals.rb
218
209
  - lib/ruote/exp/fe_error.rb
210
+ - lib/ruote/exp/fe_filter.rb
219
211
  - lib/ruote/exp/fe_forget.rb
212
+ - lib/ruote/exp/fe_given.rb
220
213
  - lib/ruote/exp/fe_if.rb
221
214
  - lib/ruote/exp/fe_inc.rb
222
215
  - lib/ruote/exp/fe_iterator.rb
216
+ - lib/ruote/exp/fe_let.rb
223
217
  - lib/ruote/exp/fe_listen.rb
218
+ - lib/ruote/exp/fe_lose.rb
224
219
  - lib/ruote/exp/fe_noop.rb
220
+ - lib/ruote/exp/fe_once.rb
225
221
  - lib/ruote/exp/fe_participant.rb
226
222
  - lib/ruote/exp/fe_redo.rb
227
223
  - lib/ruote/exp/fe_ref.rb
224
+ - lib/ruote/exp/fe_registerp.rb
228
225
  - lib/ruote/exp/fe_reserve.rb
229
226
  - lib/ruote/exp/fe_restore.rb
230
227
  - lib/ruote/exp/fe_save.rb
231
228
  - lib/ruote/exp/fe_sequence.rb
232
229
  - lib/ruote/exp/fe_set.rb
233
230
  - lib/ruote/exp/fe_subprocess.rb
231
+ - lib/ruote/exp/fe_that.rb
234
232
  - lib/ruote/exp/fe_undo.rb
233
+ - lib/ruote/exp/fe_unregisterp.rb
235
234
  - lib/ruote/exp/fe_wait.rb
236
- - lib/ruote/exp/fe_when.rb
237
235
  - lib/ruote/exp/flowexpression.rb
238
236
  - lib/ruote/exp/iterator.rb
239
237
  - lib/ruote/exp/merge.rb
240
238
  - lib/ruote/exp/ro_attributes.rb
239
+ - lib/ruote/exp/ro_filters.rb
241
240
  - lib/ruote/exp/ro_persist.rb
242
241
  - lib/ruote/exp/ro_variables.rb
243
242
  - lib/ruote/fei.rb
244
243
  - lib/ruote/id/mnemo_wfid_generator.rb
245
244
  - lib/ruote/id/wfid_generator.rb
245
+ - lib/ruote/log/default_history.rb
246
246
  - lib/ruote/log/pretty.rb
247
247
  - lib/ruote/log/storage_history.rb
248
248
  - lib/ruote/log/test_logger.rb
249
249
  - lib/ruote/log/wait_logger.rb
250
- - lib/ruote/parser.rb
251
- - lib/ruote/parser/ruby_dsl.rb
252
- - lib/ruote/parser/xml.rb
253
250
  - lib/ruote/part/block_participant.rb
254
251
  - lib/ruote/part/engine_participant.rb
255
- - lib/ruote/part/hash_participant.rb
256
252
  - lib/ruote/part/local_participant.rb
257
253
  - lib/ruote/part/no_op_participant.rb
258
254
  - lib/ruote/part/null_participant.rb
@@ -260,6 +256,9 @@ files:
260
256
  - lib/ruote/part/storage_participant.rb
261
257
  - lib/ruote/part/template.rb
262
258
  - lib/ruote/participant.rb
259
+ - lib/ruote/reader/ruby_dsl.rb
260
+ - lib/ruote/reader/xml.rb
261
+ - lib/ruote/reader.rb
263
262
  - lib/ruote/receiver/base.rb
264
263
  - lib/ruote/storage/base.rb
265
264
  - lib/ruote/storage/composite_storage.rb
@@ -273,6 +272,7 @@ files:
273
272
  - lib/ruote/svc/tracker.rb
274
273
  - lib/ruote/svc/treechecker.rb
275
274
  - lib/ruote/tree_dot.rb
275
+ - lib/ruote/util/filter.rb
276
276
  - lib/ruote/util/hashdot.rb
277
277
  - lib/ruote/util/look.rb
278
278
  - lib/ruote/util/lookup.rb
@@ -285,12 +285,11 @@ files:
285
285
  - lib/ruote/version.rb
286
286
  - lib/ruote/worker.rb
287
287
  - lib/ruote/workitem.rb
288
- - phil.txt
289
- - ruote.gemspec
290
- - test/README.rdoc
288
+ - lib/ruote.rb
291
289
  - test/bm/ci.rb
292
290
  - test/bm/ici.rb
293
291
  - test/bm/juuman.rb
292
+ - test/bm/launch_bench.rb
294
293
  - test/bm/load_26c.rb
295
294
  - test/bm/mega.rb
296
295
  - test/bm/seq_thousand.rb
@@ -298,7 +297,6 @@ files:
298
297
  - test/functional/base.rb
299
298
  - test/functional/concurrent_base.rb
300
299
  - test/functional/crunner.rb
301
- - test/functional/crunner.sh
302
300
  - test/functional/ct_0_concurrence.rb
303
301
  - test/functional/ct_1_iterator.rb
304
302
  - test/functional/ct_2_cancel.rb
@@ -322,10 +320,15 @@ files:
322
320
  - test/functional/eft_25_command.rb
323
321
  - test/functional/eft_26_error.rb
324
322
  - test/functional/eft_27_inc.rb
325
- - test/functional/eft_28_when.rb
323
+ - test/functional/eft_28_once.rb
326
324
  - test/functional/eft_29_cron.rb
327
325
  - test/functional/eft_2_sequence.rb
328
326
  - test/functional/eft_30_ref.rb
327
+ - test/functional/eft_31_registerp.rb
328
+ - test/functional/eft_32_lose.rb
329
+ - test/functional/eft_33_let.rb
330
+ - test/functional/eft_34_given.rb
331
+ - test/functional/eft_35_filter.rb
329
332
  - test/functional/eft_3_participant.rb
330
333
  - test/functional/eft_4_set.rb
331
334
  - test/functional/eft_5_subprocess.rb
@@ -349,9 +352,9 @@ files:
349
352
  - test/functional/ft_21_forget.rb
350
353
  - test/functional/ft_22_process_definitions.rb
351
354
  - test/functional/ft_23_load_defs.rb
352
- - test/functional/ft_24_block_participants.rb
355
+ - test/functional/ft_24_block_participant.rb
353
356
  - test/functional/ft_25_receiver.rb
354
- - test/functional/ft_26_participant_timeout.rb
357
+ - test/functional/ft_26_participant_rtimeout.rb
355
358
  - test/functional/ft_27_var_indirection.rb
356
359
  - test/functional/ft_28_null_noop_participants.rb
357
360
  - test/functional/ft_29_part_template.rb
@@ -362,7 +365,7 @@ files:
362
365
  - test/functional/ft_34_cursor_rewind.rb
363
366
  - test/functional/ft_35_add_service.rb
364
367
  - test/functional/ft_36_storage_history.rb
365
- - test/functional/ft_37_engine_participant.rb
368
+ - test/functional/ft_37_default_history.rb
366
369
  - test/functional/ft_38_participant_more.rb
367
370
  - test/functional/ft_39_wait_for.rb
368
371
  - test/functional/ft_3_participant_registration.rb
@@ -373,7 +376,17 @@ files:
373
376
  - test/functional/ft_44_var_participant.rb
374
377
  - test/functional/ft_45_participant_accept.rb
375
378
  - test/functional/ft_46_launch_single.rb
379
+ - test/functional/ft_47_wfid_generator.rb
380
+ - test/functional/ft_48_lose.rb
381
+ - test/functional/ft_49_engine_on_error.rb
376
382
  - test/functional/ft_4_cancel.rb
383
+ - test/functional/ft_50_engine_config.rb
384
+ - test/functional/ft_51_misc.rb
385
+ - test/functional/ft_52_case.rb
386
+ - test/functional/ft_53_engine_on_terminate.rb
387
+ - test/functional/ft_54_patterns.rb
388
+ - test/functional/ft_55_engine_participant.rb
389
+ - test/functional/ft_56_filter_attribute.rb
377
390
  - test/functional/ft_5_on_error.rb
378
391
  - test/functional/ft_6_on_cancel.rb
379
392
  - test/functional/ft_7_tags.rb
@@ -383,7 +396,7 @@ files:
383
396
  - test/functional/rt_0_wait.rb
384
397
  - test/functional/rt_1_listen.rb
385
398
  - test/functional/rt_2_errors.rb
386
- - test/functional/rt_3_when.rb
399
+ - test/functional/rt_3_once.rb
387
400
  - test/functional/rt_4_cron.rb
388
401
  - test/functional/rt_5_timeout.rb
389
402
  - test/functional/rtest.rb
@@ -391,40 +404,50 @@ files:
391
404
  - test/functional/test.rb
392
405
  - test/functional/vertical.rb
393
406
  - test/path_helper.rb
394
- - test/pdef.xml
395
407
  - test/test.rb
396
408
  - test/test_helper.rb
397
409
  - test/unit/storage.rb
398
410
  - test/unit/storages.rb
399
411
  - test/unit/test.rb
400
- - test/unit/ut_0_ruby_parser.rb
412
+ - test/unit/ut_0_ruby_reader.rb
401
413
  - test/unit/ut_11_lookup.rb
402
414
  - test/unit/ut_13_serializer.rb
403
415
  - test/unit/ut_14_is_uri.rb
404
416
  - test/unit/ut_15_util.rb
405
- - test/unit/ut_16_parser.rb
417
+ - test/unit/ut_16_reader.rb
406
418
  - test/unit/ut_18_engine.rb
407
419
  - test/unit/ut_19_part_template.rb
408
420
  - test/unit/ut_1_fei.rb
409
421
  - test/unit/ut_20_composite_storage.rb
410
- - test/unit/ut_2_wfidgen.rb
422
+ - test/unit/ut_21_participant_list.rb
423
+ - test/unit/ut_22_filter.rb
411
424
  - test/unit/ut_3_wait_logger.rb
412
425
  - test/unit/ut_4_expmap.rb
413
426
  - test/unit/ut_5_tree.rb
414
427
  - test/unit/ut_6_condition.rb
415
428
  - test/unit/ut_7_workitem.rb
416
429
  - test/unit/ut_8_tree_to_dot.rb
417
- - test/unit/ut_9_xml_parser.rb
430
+ - test/unit/ut_9_xml_reader.rb
431
+ - ruote.gemspec
432
+ - CHANGELOG.txt
433
+ - CREDITS.txt
434
+ - LICENSE.txt
435
+ - TODO.txt
436
+ - couch_url.txt
437
+ - jruby_issue.txt
438
+ - phil.txt
439
+ - README.rdoc
418
440
  has_rdoc: true
419
441
  homepage: http://ruote.rubyforge.org
420
442
  licenses: []
421
443
 
422
444
  post_install_message:
423
- rdoc_options:
424
- - --charset=UTF-8
445
+ rdoc_options: []
446
+
425
447
  require_paths:
426
448
  - lib
427
449
  required_ruby_version: !ruby/object:Gem::Requirement
450
+ none: false
428
451
  requirements:
429
452
  - - ">="
430
453
  - !ruby/object:Gem::Version
@@ -432,6 +455,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
432
455
  - 0
433
456
  version: "0"
434
457
  required_rubygems_version: !ruby/object:Gem::Requirement
458
+ none: false
435
459
  requirements:
436
460
  - - ">="
437
461
  - !ruby/object:Gem::Version
@@ -441,9 +465,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
441
465
  requirements: []
442
466
 
443
467
  rubyforge_project: ruote
444
- rubygems_version: 1.3.6
468
+ rubygems_version: 1.3.7
445
469
  signing_key:
446
470
  specification_version: 3
447
- summary: an open source ruby workflow engine
448
- test_files:
449
- - test/test.rb
471
+ summary: an open source Ruby workflow engine
472
+ test_files: []
473
+