ruote 2.3.0 → 2.3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.txt +7 -0
- data/lib/ruote/exp/flow_expression.rb +26 -8
- data/lib/ruote/version.rb +1 -1
- data/ruote.gemspec +1 -1
- data/test/functional/eft_0_flow_expression.rb +35 -0
- metadata +168 -183
data/CHANGELOG.txt
CHANGED
@@ -2,6 +2,13 @@
|
|
2
2
|
= ruote - CHANGELOG.txt
|
3
3
|
|
4
4
|
|
5
|
+
== ruote - 2.3.0.1 released 2012/09/08
|
6
|
+
|
7
|
+
- pin ruote.gemspec to blankslate 2.1.2.4
|
8
|
+
(since blankslate 3.1 is out and Parslet wants ~> 2.1...)
|
9
|
+
- FlowExpression#root(stubborn=false)
|
10
|
+
|
11
|
+
|
5
12
|
== ruote - 2.3.0 released 2012/09/04
|
6
13
|
|
7
14
|
- Dashboard#wait_for('action' => 'apply', 'name' => 'wait')
|
@@ -184,29 +184,47 @@ module Ruote::Exp
|
|
184
184
|
nil
|
185
185
|
end
|
186
186
|
|
187
|
-
#
|
187
|
+
# An expensive method, looks up all the expressions with the same wfid
|
188
|
+
# in the storage (for some storages this is not expensive at all),
|
189
|
+
# and determine the root of this expression.
|
190
|
+
# It does this by recursively going from an expression to its parent,
|
191
|
+
# starting with this expression. The root is when the parent can't be
|
192
|
+
# reached.
|
188
193
|
#
|
189
|
-
#
|
190
|
-
#
|
194
|
+
# By default, this method will always return an expression, but if
|
195
|
+
# stubborn is set to true and the top expression points to a gone parent
|
196
|
+
# then nil will be returned.
|
197
|
+
# The default (stubborn=true) is probably what you want anyway.
|
191
198
|
#
|
192
|
-
def root
|
199
|
+
def root(stubborn=false)
|
193
200
|
|
201
|
+
previous = nil
|
194
202
|
current = @h
|
195
|
-
|
203
|
+
|
204
|
+
exps = @context.storage.find_expressions(
|
205
|
+
@h['fei']['wfid']
|
206
|
+
).each_with_object({}) { |exp, h|
|
207
|
+
h[exp['fei']] = exp
|
208
|
+
}
|
196
209
|
|
197
210
|
while current && current['parent_id']
|
198
|
-
|
211
|
+
previous = current
|
212
|
+
current = exps[current['parent_id']]
|
199
213
|
end
|
200
214
|
|
215
|
+
current ||= previous unless stubborn
|
216
|
+
|
201
217
|
current ? Ruote::Exp::FlowExpression.from_h(@context, current) : nil
|
202
218
|
end
|
203
219
|
|
204
220
|
# Returns the fei of the root expression of this expression.
|
205
221
|
# The result is an instance of Ruote::FlowExpressionId.
|
206
222
|
#
|
207
|
-
|
223
|
+
# Uses #root behind the scenes, hence the stubborn option.
|
224
|
+
#
|
225
|
+
def root_id(stubborn=false)
|
208
226
|
|
209
|
-
root.fei
|
227
|
+
root(stubborn).fei
|
210
228
|
end
|
211
229
|
|
212
230
|
# Turns this FlowExpression instance into a Hash (well, just hands back
|
data/lib/ruote/version.rb
CHANGED
data/ruote.gemspec
CHANGED
@@ -24,7 +24,7 @@ ruote is an open source Ruby workflow engine
|
|
24
24
|
'*.gemspec', '*.txt', '*.rdoc', '*.md'
|
25
25
|
]
|
26
26
|
|
27
|
-
s.add_runtime_dependency 'blankslate', '
|
27
|
+
s.add_runtime_dependency 'blankslate', '2.1.2.4'
|
28
28
|
s.add_runtime_dependency 'parslet', '>= 1.4.0'
|
29
29
|
# blankslate 2.1.2.3 is to avoid...
|
30
30
|
|
@@ -31,5 +31,40 @@ class EftFlowExpressionTest < Test::Unit::TestCase
|
|
31
31
|
|
32
32
|
assert_equal '0', fexp.root_id.expid
|
33
33
|
end
|
34
|
+
|
35
|
+
class MyParticipant < Ruote::Participant
|
36
|
+
def on_workitem
|
37
|
+
workitem.fields['roots'] = [
|
38
|
+
fexp.root.class.to_s, fexp.root(true).class.to_s
|
39
|
+
]
|
40
|
+
reply
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def test_root_stubborn
|
45
|
+
|
46
|
+
@dashboard.register :toto, MyParticipant
|
47
|
+
|
48
|
+
pdef = Ruote.define do
|
49
|
+
concurrence :remaining => 'forget', :wait_for => 1 do
|
50
|
+
sequence do
|
51
|
+
# exit immediately
|
52
|
+
end
|
53
|
+
sequence do
|
54
|
+
wait '1s'
|
55
|
+
toto
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
wfid = @dashboard.launch(pdef)
|
61
|
+
|
62
|
+
@dashboard.wait_for('terminated')
|
63
|
+
r = @dashboard.wait_for('ceased')
|
64
|
+
|
65
|
+
assert_equal(
|
66
|
+
%w[ Ruote::Exp::ConcurrenceExpression NilClass ],
|
67
|
+
r['workitem']['fields']['roots'])
|
68
|
+
end
|
34
69
|
end
|
35
70
|
|
metadata
CHANGED
@@ -1,222 +1,217 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruote
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.3.0.1
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 2
|
8
|
-
- 3
|
9
|
-
- 0
|
10
|
-
version: 2.3.0
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- John Mettraux
|
14
9
|
- Kenneth Kalmer
|
15
10
|
- Torsten Schoenebaum
|
16
11
|
autorequire:
|
17
12
|
bindir: bin
|
18
13
|
cert_chain: []
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
- !ruby/object:Gem::Dependency
|
14
|
+
date: 2012-09-08 00:00:00.000000000 Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
23
17
|
name: blankslate
|
24
|
-
|
25
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
26
19
|
none: false
|
27
|
-
requirements:
|
28
|
-
- -
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
hash: 103
|
31
|
-
segments:
|
32
|
-
- 2
|
33
|
-
- 1
|
34
|
-
- 2
|
35
|
-
- 4
|
20
|
+
requirements:
|
21
|
+
- - '='
|
22
|
+
- !ruby/object:Gem::Version
|
36
23
|
version: 2.1.2.4
|
37
24
|
type: :runtime
|
38
|
-
version_requirements: *id001
|
39
|
-
- !ruby/object:Gem::Dependency
|
40
|
-
name: parslet
|
41
25
|
prerelease: false
|
42
|
-
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
28
|
+
requirements:
|
29
|
+
- - '='
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: 2.1.2.4
|
32
|
+
- !ruby/object:Gem::Dependency
|
33
|
+
name: parslet
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
43
35
|
none: false
|
44
|
-
requirements:
|
45
|
-
- -
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
hash: 7
|
48
|
-
segments:
|
49
|
-
- 1
|
50
|
-
- 4
|
51
|
-
- 0
|
36
|
+
requirements:
|
37
|
+
- - ! '>='
|
38
|
+
- !ruby/object:Gem::Version
|
52
39
|
version: 1.4.0
|
53
40
|
type: :runtime
|
54
|
-
version_requirements: *id002
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: sourcify
|
57
41
|
prerelease: false
|
58
|
-
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
59
43
|
none: false
|
60
|
-
requirements:
|
61
|
-
- -
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.4.0
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: sourcify
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - '='
|
54
|
+
- !ruby/object:Gem::Version
|
68
55
|
version: 0.5.0
|
69
56
|
type: :runtime
|
70
|
-
version_requirements: *id003
|
71
|
-
- !ruby/object:Gem::Dependency
|
72
|
-
name: rufus-json
|
73
57
|
prerelease: false
|
74
|
-
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
75
59
|
none: false
|
76
|
-
requirements:
|
77
|
-
- -
|
78
|
-
- !ruby/object:Gem::Version
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
60
|
+
requirements:
|
61
|
+
- - '='
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: 0.5.0
|
64
|
+
- !ruby/object:Gem::Dependency
|
65
|
+
name: rufus-json
|
66
|
+
requirement: !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ! '>='
|
70
|
+
- !ruby/object:Gem::Version
|
84
71
|
version: 1.0.1
|
85
72
|
type: :runtime
|
86
|
-
version_requirements: *id004
|
87
|
-
- !ruby/object:Gem::Dependency
|
88
|
-
name: rufus-cloche
|
89
73
|
prerelease: false
|
90
|
-
|
74
|
+
version_requirements: !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - ! '>='
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: 1.0.1
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: rufus-cloche
|
82
|
+
requirement: !ruby/object:Gem::Requirement
|
91
83
|
none: false
|
92
|
-
requirements:
|
93
|
-
- -
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
hash: 19
|
96
|
-
segments:
|
97
|
-
- 1
|
98
|
-
- 0
|
99
|
-
- 2
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
100
87
|
version: 1.0.2
|
101
88
|
type: :runtime
|
102
|
-
version_requirements: *id005
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: rufus-dollar
|
105
89
|
prerelease: false
|
106
|
-
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
91
|
none: false
|
108
|
-
requirements:
|
109
|
-
- -
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
92
|
+
requirements:
|
93
|
+
- - ! '>='
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: 1.0.2
|
96
|
+
- !ruby/object:Gem::Dependency
|
97
|
+
name: rufus-dollar
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
99
|
+
none: false
|
100
|
+
requirements:
|
101
|
+
- - ! '>='
|
102
|
+
- !ruby/object:Gem::Version
|
116
103
|
version: 1.0.4
|
117
104
|
type: :runtime
|
118
|
-
version_requirements: *id006
|
119
|
-
- !ruby/object:Gem::Dependency
|
120
|
-
name: rufus-mnemo
|
121
105
|
prerelease: false
|
122
|
-
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
123
107
|
none: false
|
124
|
-
requirements:
|
125
|
-
- -
|
126
|
-
- !ruby/object:Gem::Version
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
108
|
+
requirements:
|
109
|
+
- - ! '>='
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: 1.0.4
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: rufus-mnemo
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
none: false
|
116
|
+
requirements:
|
117
|
+
- - ! '>='
|
118
|
+
- !ruby/object:Gem::Version
|
132
119
|
version: 1.2.2
|
133
120
|
type: :runtime
|
134
|
-
version_requirements: *id007
|
135
|
-
- !ruby/object:Gem::Dependency
|
136
|
-
name: rufus-scheduler
|
137
121
|
prerelease: false
|
138
|
-
|
122
|
+
version_requirements: !ruby/object:Gem::Requirement
|
123
|
+
none: false
|
124
|
+
requirements:
|
125
|
+
- - ! '>='
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: 1.2.2
|
128
|
+
- !ruby/object:Gem::Dependency
|
129
|
+
name: rufus-scheduler
|
130
|
+
requirement: !ruby/object:Gem::Requirement
|
139
131
|
none: false
|
140
|
-
requirements:
|
141
|
-
- -
|
142
|
-
- !ruby/object:Gem::Version
|
143
|
-
hash: 47
|
144
|
-
segments:
|
145
|
-
- 2
|
146
|
-
- 0
|
147
|
-
- 16
|
132
|
+
requirements:
|
133
|
+
- - ! '>='
|
134
|
+
- !ruby/object:Gem::Version
|
148
135
|
version: 2.0.16
|
149
136
|
type: :runtime
|
150
|
-
version_requirements: *id008
|
151
|
-
- !ruby/object:Gem::Dependency
|
152
|
-
name: rufus-treechecker
|
153
137
|
prerelease: false
|
154
|
-
|
138
|
+
version_requirements: !ruby/object:Gem::Requirement
|
155
139
|
none: false
|
156
|
-
requirements:
|
157
|
-
- -
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
140
|
+
requirements:
|
141
|
+
- - ! '>='
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: 2.0.16
|
144
|
+
- !ruby/object:Gem::Dependency
|
145
|
+
name: rufus-treechecker
|
146
|
+
requirement: !ruby/object:Gem::Requirement
|
147
|
+
none: false
|
148
|
+
requirements:
|
149
|
+
- - ! '>='
|
150
|
+
- !ruby/object:Gem::Version
|
164
151
|
version: 1.0.8
|
165
152
|
type: :runtime
|
166
|
-
version_requirements: *id009
|
167
|
-
- !ruby/object:Gem::Dependency
|
168
|
-
name: rake
|
169
153
|
prerelease: false
|
170
|
-
|
154
|
+
version_requirements: !ruby/object:Gem::Requirement
|
171
155
|
none: false
|
172
|
-
requirements:
|
173
|
-
- -
|
174
|
-
- !ruby/object:Gem::Version
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
156
|
+
requirements:
|
157
|
+
- - ! '>='
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 1.0.8
|
160
|
+
- !ruby/object:Gem::Dependency
|
161
|
+
name: rake
|
162
|
+
requirement: !ruby/object:Gem::Requirement
|
163
|
+
none: false
|
164
|
+
requirements:
|
165
|
+
- - ! '>='
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: '0'
|
179
168
|
type: :development
|
180
|
-
version_requirements: *id010
|
181
|
-
- !ruby/object:Gem::Dependency
|
182
|
-
name: json
|
183
169
|
prerelease: false
|
184
|
-
|
170
|
+
version_requirements: !ruby/object:Gem::Requirement
|
171
|
+
none: false
|
172
|
+
requirements:
|
173
|
+
- - ! '>='
|
174
|
+
- !ruby/object:Gem::Version
|
175
|
+
version: '0'
|
176
|
+
- !ruby/object:Gem::Dependency
|
177
|
+
name: json
|
178
|
+
requirement: !ruby/object:Gem::Requirement
|
185
179
|
none: false
|
186
|
-
requirements:
|
187
|
-
- -
|
188
|
-
- !ruby/object:Gem::Version
|
189
|
-
|
190
|
-
segments:
|
191
|
-
- 0
|
192
|
-
version: "0"
|
180
|
+
requirements:
|
181
|
+
- - ! '>='
|
182
|
+
- !ruby/object:Gem::Version
|
183
|
+
version: '0'
|
193
184
|
type: :development
|
194
|
-
version_requirements: *id011
|
195
|
-
- !ruby/object:Gem::Dependency
|
196
|
-
name: mailtrap
|
197
185
|
prerelease: false
|
198
|
-
|
186
|
+
version_requirements: !ruby/object:Gem::Requirement
|
187
|
+
none: false
|
188
|
+
requirements:
|
189
|
+
- - ! '>='
|
190
|
+
- !ruby/object:Gem::Version
|
191
|
+
version: '0'
|
192
|
+
- !ruby/object:Gem::Dependency
|
193
|
+
name: mailtrap
|
194
|
+
requirement: !ruby/object:Gem::Requirement
|
199
195
|
none: false
|
200
|
-
requirements:
|
201
|
-
- -
|
202
|
-
- !ruby/object:Gem::Version
|
203
|
-
|
204
|
-
segments:
|
205
|
-
- 0
|
206
|
-
version: "0"
|
196
|
+
requirements:
|
197
|
+
- - ! '>='
|
198
|
+
- !ruby/object:Gem::Version
|
199
|
+
version: '0'
|
207
200
|
type: :development
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
201
|
+
prerelease: false
|
202
|
+
version_requirements: !ruby/object:Gem::Requirement
|
203
|
+
none: false
|
204
|
+
requirements:
|
205
|
+
- - ! '>='
|
206
|
+
- !ruby/object:Gem::Version
|
207
|
+
version: '0'
|
208
|
+
description: ! "\nruote is an open source Ruby workflow engine\n "
|
209
|
+
email:
|
212
210
|
- jmettraux@gmail.com
|
213
211
|
executables: []
|
214
|
-
|
215
212
|
extensions: []
|
216
|
-
|
217
213
|
extra_rdoc_files: []
|
218
|
-
|
219
|
-
files:
|
214
|
+
files:
|
220
215
|
- Rakefile
|
221
216
|
- lib/ruote/context.rb
|
222
217
|
- lib/ruote/dashboard.rb
|
@@ -517,36 +512,26 @@ files:
|
|
517
512
|
- README.rdoc
|
518
513
|
homepage: http://ruote.rubyforge.org
|
519
514
|
licenses: []
|
520
|
-
|
521
515
|
post_install_message:
|
522
516
|
rdoc_options: []
|
523
|
-
|
524
|
-
require_paths:
|
517
|
+
require_paths:
|
525
518
|
- lib
|
526
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
519
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
527
520
|
none: false
|
528
|
-
requirements:
|
529
|
-
- -
|
530
|
-
- !ruby/object:Gem::Version
|
531
|
-
|
532
|
-
|
533
|
-
- 0
|
534
|
-
version: "0"
|
535
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
521
|
+
requirements:
|
522
|
+
- - ! '>='
|
523
|
+
- !ruby/object:Gem::Version
|
524
|
+
version: '0'
|
525
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
536
526
|
none: false
|
537
|
-
requirements:
|
538
|
-
- -
|
539
|
-
- !ruby/object:Gem::Version
|
540
|
-
|
541
|
-
segments:
|
542
|
-
- 0
|
543
|
-
version: "0"
|
527
|
+
requirements:
|
528
|
+
- - ! '>='
|
529
|
+
- !ruby/object:Gem::Version
|
530
|
+
version: '0'
|
544
531
|
requirements: []
|
545
|
-
|
546
532
|
rubyforge_project: ruote
|
547
|
-
rubygems_version: 1.8.
|
533
|
+
rubygems_version: 1.8.24
|
548
534
|
signing_key:
|
549
535
|
specification_version: 3
|
550
536
|
summary: an open source Ruby workflow engine
|
551
537
|
test_files: []
|
552
|
-
|