ruote-kit 2.1.10 → 2.1.11
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/CHANGELOG.txt +10 -0
- data/Gemfile +21 -5
- data/LICENSE.txt +20 -0
- data/README.rdoc +132 -80
- data/Rakefile +4 -15
- data/TODO.txt +12 -0
- data/config.ru +22 -14
- data/lib/ruote-kit/application.rb +46 -22
- data/lib/ruote-kit/helpers/json_helpers.rb +280 -0
- data/lib/ruote-kit/helpers/link_helpers.rb +117 -0
- data/lib/ruote-kit/helpers/misc_helpers.rb +35 -0
- data/lib/ruote-kit/helpers/pagination_helpers.rb +30 -0
- data/lib/ruote-kit/helpers/render_helpers.rb +39 -92
- data/lib/ruote-kit/public/_ruote/images/favicon.ico +0 -0
- data/lib/ruote-kit/public/_ruote/images/ruote.png +0 -0
- data/lib/ruote-kit/public/_ruote/images/ruote_buttons.png +0 -0
- data/lib/ruote-kit/public/_ruote/javascripts/jquery-1.4.2.min.js +154 -0
- data/lib/ruote-kit/public/_ruote/javascripts/rk.js +40 -0
- data/lib/ruote-kit/public/_ruote/javascripts/ruote-fluo-editor.js +548 -0
- data/lib/ruote-kit/public/_ruote/javascripts/ruote-fluo.js +32 -1
- data/lib/ruote-kit/public/_ruote/stylesheets/reset.css +53 -0
- data/lib/ruote-kit/public/_ruote/stylesheets/rk.css +355 -16
- data/lib/ruote-kit/public/_ruote/stylesheets/ruote-fluo-editor.css +108 -0
- data/lib/ruote-kit/resources/errors.rb +46 -43
- data/lib/ruote-kit/resources/expressions.rb +92 -35
- data/lib/ruote-kit/resources/participants.rb +53 -0
- data/lib/ruote-kit/resources/processes.rb +68 -36
- data/lib/ruote-kit/resources/schedules.rb +27 -0
- data/lib/ruote-kit/resources/workitems.rb +93 -31
- data/lib/ruote-kit/spec/ruote_helpers.rb +25 -16
- data/lib/ruote-kit/version.rb +3 -1
- data/lib/ruote-kit/views/_pagination.html.haml +38 -0
- data/lib/ruote-kit/views/_tree_editor.html.haml +52 -0
- data/lib/ruote-kit/views/error.html.haml +69 -0
- data/lib/ruote-kit/views/errors.html.haml +28 -12
- data/lib/ruote-kit/views/expression.html.haml +161 -30
- data/lib/ruote-kit/views/expressions.html.haml +26 -21
- data/lib/ruote-kit/views/http_error.html.haml +11 -0
- data/lib/ruote-kit/views/index.html.haml +4 -0
- data/lib/ruote-kit/views/layout.html.haml +52 -32
- data/lib/ruote-kit/views/participants.html.haml +79 -0
- data/lib/ruote-kit/views/process.html.haml +109 -42
- data/lib/ruote-kit/views/process_launched.html.haml +6 -2
- data/lib/ruote-kit/views/processes.html.haml +55 -24
- data/lib/ruote-kit/views/processes_new.html.haml +36 -0
- data/lib/ruote-kit/views/schedules.html.haml +42 -0
- data/lib/ruote-kit/views/workitem.html.haml +83 -29
- data/lib/ruote-kit/views/workitems.html.haml +42 -19
- data/lib/ruote-kit.rb +17 -88
- data/ruote-kit.gemspec +68 -80
- data/spec/it_has_an_engine.rb +69 -0
- data/spec/resources/errors_spec.rb +198 -270
- data/spec/resources/expressions_spec.rb +308 -52
- data/spec/resources/index_spec.rb +28 -16
- data/spec/resources/participants_spec.rb +102 -0
- data/spec/resources/processes_spec.rb +218 -104
- data/spec/resources/schedules_spec.rb +97 -0
- data/spec/resources/workitems_spec.rb +195 -100
- data/spec/ruote-kit_configure_spec.rb +32 -75
- data/spec/spec.opts +0 -1
- data/spec/spec_helper.rb +31 -92
- data/spec/webapp_helpers_spec.rb +309 -0
- metadata +87 -152
- data/lib/ruote-kit/configuration.rb +0 -83
- data/lib/ruote-kit/helpers/engine_helpers.rb +0 -24
- data/lib/ruote-kit/helpers/form_helpers.rb +0 -11
- data/lib/ruote-kit/helpers/launch_item_parser.rb +0 -59
- data/lib/ruote-kit/helpers/navigation_helpers.rb +0 -54
- data/lib/ruote-kit/helpers.rb +0 -9
- data/lib/ruote-kit/public/_ruote/images/bg.gif +0 -0
- data/lib/ruote-kit/public/_ruote/images/bg_button_left.gif +0 -0
- data/lib/ruote-kit/public/_ruote/images/bg_button_left_cancel.gif +0 -0
- data/lib/ruote-kit/public/_ruote/images/bg_button_left_submit.gif +0 -0
- data/lib/ruote-kit/public/_ruote/images/bg_button_right.gif +0 -0
- data/lib/ruote-kit/public/_ruote/javascripts/SimplyButtons.js +0 -191
- data/lib/ruote-kit/public/_ruote/javascripts/fluo-dial.js +0 -149
- data/lib/ruote-kit/public/_ruote/stylesheets/SimplyButtons.css +0 -226
- data/lib/ruote-kit/public/_ruote/stylesheets/base.css +0 -336
- data/lib/ruote-kit/public/_ruote/stylesheets/style.css +0 -393
- data/lib/ruote-kit/views/launch_process.html.haml +0 -19
- data/lib/ruote-kit/views/process_failed_to_launch.html.haml +0 -7
- data/lib/ruote-kit/views/resource_not_found.html.haml +0 -7
- data/spec/helpers/render_helpers_spec.rb +0 -214
- data/spec/ruote-kit_spec.rb +0 -4
- data/spec/views/expressions.html.haml_spec.rb +0 -31
- data/spec/views/launch_process.html.haml_spec.rb +0 -22
- data/spec/views/process.html.haml_spec.rb +0 -17
- data/spec/views/process_launched.html.haml_spec.rb +0 -16
- data/spec/views/processes.html.haml_spec.rb +0 -31
- data/spec/views/workitems.html.haml_spec.rb +0 -69
data/ruote-kit.gemspec
CHANGED
@@ -5,102 +5,102 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ruote-kit}
|
8
|
-
s.version = "2.1.
|
8
|
+
s.version = "2.1.11"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["kenneth.kalmer@gmail.com", "John Mettraux"]
|
12
|
-
s.date = %q{2010-
|
11
|
+
s.authors = ["kenneth.kalmer@gmail.com", "Torsten Schoenebaum", "John Mettraux"]
|
12
|
+
s.date = %q{2010-10-01}
|
13
13
|
s.description = %q{ruote-kit is a RESTful Rack app for the ruote workflow engine}
|
14
14
|
s.email = %q{kenneth.kalmer@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
|
-
"
|
16
|
+
"CHANGELOG.txt",
|
17
|
+
"LICENSE.txt",
|
18
|
+
"README.rdoc",
|
19
|
+
"TODO.txt"
|
17
20
|
]
|
18
21
|
s.files = [
|
19
22
|
".document",
|
20
23
|
".gitignore",
|
24
|
+
"CHANGELOG.txt",
|
21
25
|
"Gemfile",
|
26
|
+
"LICENSE.txt",
|
22
27
|
"README.rdoc",
|
23
28
|
"Rakefile",
|
29
|
+
"TODO.txt",
|
24
30
|
"config.ru",
|
25
31
|
"lib/ruote-kit.rb",
|
26
32
|
"lib/ruote-kit/application.rb",
|
27
|
-
"lib/ruote-kit/
|
28
|
-
"lib/ruote-kit/helpers.rb",
|
29
|
-
"lib/ruote-kit/helpers/
|
30
|
-
"lib/ruote-kit/helpers/
|
31
|
-
"lib/ruote-kit/helpers/launch_item_parser.rb",
|
32
|
-
"lib/ruote-kit/helpers/navigation_helpers.rb",
|
33
|
+
"lib/ruote-kit/helpers/json_helpers.rb",
|
34
|
+
"lib/ruote-kit/helpers/link_helpers.rb",
|
35
|
+
"lib/ruote-kit/helpers/misc_helpers.rb",
|
36
|
+
"lib/ruote-kit/helpers/pagination_helpers.rb",
|
33
37
|
"lib/ruote-kit/helpers/render_helpers.rb",
|
34
|
-
"lib/ruote-kit/public/_ruote/images/
|
35
|
-
"lib/ruote-kit/public/_ruote/images/
|
36
|
-
"lib/ruote-kit/public/_ruote/images/
|
37
|
-
"lib/ruote-kit/public/_ruote/
|
38
|
-
"lib/ruote-kit/public/_ruote/
|
39
|
-
"lib/ruote-kit/public/_ruote/javascripts/
|
40
|
-
"lib/ruote-kit/public/_ruote/javascripts/fluo-dial.js",
|
38
|
+
"lib/ruote-kit/public/_ruote/images/favicon.ico",
|
39
|
+
"lib/ruote-kit/public/_ruote/images/ruote.png",
|
40
|
+
"lib/ruote-kit/public/_ruote/images/ruote_buttons.png",
|
41
|
+
"lib/ruote-kit/public/_ruote/javascripts/jquery-1.4.2.min.js",
|
42
|
+
"lib/ruote-kit/public/_ruote/javascripts/rk.js",
|
43
|
+
"lib/ruote-kit/public/_ruote/javascripts/ruote-fluo-editor.js",
|
41
44
|
"lib/ruote-kit/public/_ruote/javascripts/ruote-fluo.js",
|
42
|
-
"lib/ruote-kit/public/_ruote/stylesheets/
|
43
|
-
"lib/ruote-kit/public/_ruote/stylesheets/base.css",
|
45
|
+
"lib/ruote-kit/public/_ruote/stylesheets/reset.css",
|
44
46
|
"lib/ruote-kit/public/_ruote/stylesheets/rk.css",
|
45
|
-
"lib/ruote-kit/public/_ruote/stylesheets/
|
47
|
+
"lib/ruote-kit/public/_ruote/stylesheets/ruote-fluo-editor.css",
|
46
48
|
"lib/ruote-kit/resources/errors.rb",
|
47
49
|
"lib/ruote-kit/resources/expressions.rb",
|
50
|
+
"lib/ruote-kit/resources/participants.rb",
|
48
51
|
"lib/ruote-kit/resources/processes.rb",
|
52
|
+
"lib/ruote-kit/resources/schedules.rb",
|
49
53
|
"lib/ruote-kit/resources/workitems.rb",
|
50
54
|
"lib/ruote-kit/spec/ruote_helpers.rb",
|
51
55
|
"lib/ruote-kit/version.rb",
|
56
|
+
"lib/ruote-kit/views/_pagination.html.haml",
|
57
|
+
"lib/ruote-kit/views/_tree_editor.html.haml",
|
58
|
+
"lib/ruote-kit/views/error.html.haml",
|
52
59
|
"lib/ruote-kit/views/errors.html.haml",
|
53
60
|
"lib/ruote-kit/views/expression.html.haml",
|
54
61
|
"lib/ruote-kit/views/expressions.html.haml",
|
62
|
+
"lib/ruote-kit/views/http_error.html.haml",
|
55
63
|
"lib/ruote-kit/views/index.html.haml",
|
56
|
-
"lib/ruote-kit/views/launch_process.html.haml",
|
57
64
|
"lib/ruote-kit/views/layout.html.haml",
|
65
|
+
"lib/ruote-kit/views/participants.html.haml",
|
58
66
|
"lib/ruote-kit/views/process.html.haml",
|
59
|
-
"lib/ruote-kit/views/process_failed_to_launch.html.haml",
|
60
67
|
"lib/ruote-kit/views/process_launched.html.haml",
|
61
68
|
"lib/ruote-kit/views/processes.html.haml",
|
62
|
-
"lib/ruote-kit/views/
|
69
|
+
"lib/ruote-kit/views/processes_new.html.haml",
|
70
|
+
"lib/ruote-kit/views/schedules.html.haml",
|
63
71
|
"lib/ruote-kit/views/workitem.html.haml",
|
64
72
|
"lib/ruote-kit/views/workitems.html.haml",
|
65
73
|
"ruote-kit.gemspec",
|
66
|
-
"spec/
|
74
|
+
"spec/it_has_an_engine.rb",
|
67
75
|
"spec/resources/errors_spec.rb",
|
68
76
|
"spec/resources/expressions_spec.rb",
|
69
77
|
"spec/resources/index_spec.rb",
|
78
|
+
"spec/resources/participants_spec.rb",
|
70
79
|
"spec/resources/processes_spec.rb",
|
80
|
+
"spec/resources/schedules_spec.rb",
|
71
81
|
"spec/resources/workitems_spec.rb",
|
72
82
|
"spec/ruote-kit_configure_spec.rb",
|
73
|
-
"spec/ruote-kit_spec.rb",
|
74
83
|
"spec/spec.opts",
|
75
84
|
"spec/spec_helper.rb",
|
76
|
-
"spec/
|
77
|
-
"spec/views/launch_process.html.haml_spec.rb",
|
78
|
-
"spec/views/process.html.haml_spec.rb",
|
79
|
-
"spec/views/process_launched.html.haml_spec.rb",
|
80
|
-
"spec/views/processes.html.haml_spec.rb",
|
81
|
-
"spec/views/workitems.html.haml_spec.rb"
|
85
|
+
"spec/webapp_helpers_spec.rb"
|
82
86
|
]
|
83
|
-
s.homepage = %q{http://github.com/
|
87
|
+
s.homepage = %q{http://github.com/tosch/ruote-kit}
|
84
88
|
s.rdoc_options = ["--charset=UTF-8"]
|
85
89
|
s.require_paths = ["lib"]
|
86
90
|
s.rubygems_version = %q{1.3.7}
|
87
91
|
s.summary = %q{ruote workflow engine, wrapped in a loving rack embrace}
|
88
92
|
s.test_files = [
|
89
|
-
"spec/
|
90
|
-
"spec/resources/
|
93
|
+
"spec/webapp_helpers_spec.rb",
|
94
|
+
"spec/resources/participants_spec.rb",
|
91
95
|
"spec/resources/index_spec.rb",
|
92
96
|
"spec/resources/errors_spec.rb",
|
93
97
|
"spec/resources/processes_spec.rb",
|
94
|
-
"spec/
|
95
|
-
"spec/
|
96
|
-
"spec/
|
97
|
-
"spec/
|
98
|
-
"spec/
|
99
|
-
"spec/
|
100
|
-
"spec/views/expressions.html.haml_spec.rb",
|
101
|
-
"spec/views/processes.html.haml_spec.rb",
|
102
|
-
"spec/views/process.html.haml_spec.rb",
|
103
|
-
"spec/spec_helper.rb"
|
98
|
+
"spec/resources/workitems_spec.rb",
|
99
|
+
"spec/resources/schedules_spec.rb",
|
100
|
+
"spec/resources/expressions_spec.rb",
|
101
|
+
"spec/it_has_an_engine.rb",
|
102
|
+
"spec/spec_helper.rb",
|
103
|
+
"spec/ruote-kit_configure_spec.rb"
|
104
104
|
]
|
105
105
|
|
106
106
|
if s.respond_to? :specification_version then
|
@@ -108,45 +108,33 @@ Gem::Specification.new do |s|
|
|
108
108
|
s.specification_version = 3
|
109
109
|
|
110
110
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
111
|
-
s.add_runtime_dependency(%q<bundler>, [">= 0
|
112
|
-
s.add_runtime_dependency(%q<sinatra>, [">= 0
|
113
|
-
s.add_runtime_dependency(%q<sinatra-respond_to>, [">= 0
|
114
|
-
s.add_runtime_dependency(%q<haml>, [">=
|
115
|
-
s.add_runtime_dependency(%q<
|
116
|
-
s.add_runtime_dependency(%q<
|
117
|
-
s.
|
118
|
-
s.
|
119
|
-
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
120
|
-
s.add_development_dependency(%q<webrat>, [">= 0"])
|
121
|
-
s.add_development_dependency(%q<test-unit>, ["~> 1.2.3"])
|
122
|
-
s.add_development_dependency(%q<rack-test>, [">= 0"])
|
111
|
+
s.add_runtime_dependency(%q<bundler>, [">= 0"])
|
112
|
+
s.add_runtime_dependency(%q<sinatra>, [">= 0"])
|
113
|
+
s.add_runtime_dependency(%q<sinatra-respond_to>, [">= 0"])
|
114
|
+
s.add_runtime_dependency(%q<haml>, [">= 0"])
|
115
|
+
s.add_runtime_dependency(%q<thin>, [">= 0"])
|
116
|
+
s.add_runtime_dependency(%q<yajl-ruby>, [">= 0"])
|
117
|
+
s.add_runtime_dependency(%q<rufus-json>, [">= 0.2.5"])
|
118
|
+
s.add_runtime_dependency(%q<ruote>, ["~> 2.1.11"])
|
123
119
|
else
|
124
|
-
s.add_dependency(%q<bundler>, [">= 0
|
125
|
-
s.add_dependency(%q<sinatra>, [">= 0
|
126
|
-
s.add_dependency(%q<sinatra-respond_to>, [">= 0
|
127
|
-
s.add_dependency(%q<haml>, [">=
|
128
|
-
s.add_dependency(%q<
|
129
|
-
s.add_dependency(%q<
|
130
|
-
s.add_dependency(%q<
|
131
|
-
s.add_dependency(%q<
|
132
|
-
s.add_dependency(%q<jeweler>, [">= 0"])
|
133
|
-
s.add_dependency(%q<webrat>, [">= 0"])
|
134
|
-
s.add_dependency(%q<test-unit>, ["~> 1.2.3"])
|
135
|
-
s.add_dependency(%q<rack-test>, [">= 0"])
|
120
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
121
|
+
s.add_dependency(%q<sinatra>, [">= 0"])
|
122
|
+
s.add_dependency(%q<sinatra-respond_to>, [">= 0"])
|
123
|
+
s.add_dependency(%q<haml>, [">= 0"])
|
124
|
+
s.add_dependency(%q<thin>, [">= 0"])
|
125
|
+
s.add_dependency(%q<yajl-ruby>, [">= 0"])
|
126
|
+
s.add_dependency(%q<rufus-json>, [">= 0.2.5"])
|
127
|
+
s.add_dependency(%q<ruote>, ["~> 2.1.11"])
|
136
128
|
end
|
137
129
|
else
|
138
|
-
s.add_dependency(%q<bundler>, [">= 0
|
139
|
-
s.add_dependency(%q<sinatra>, [">= 0
|
140
|
-
s.add_dependency(%q<sinatra-respond_to>, [">= 0
|
141
|
-
s.add_dependency(%q<haml>, [">=
|
142
|
-
s.add_dependency(%q<
|
143
|
-
s.add_dependency(%q<
|
144
|
-
s.add_dependency(%q<
|
145
|
-
s.add_dependency(%q<
|
146
|
-
s.add_dependency(%q<jeweler>, [">= 0"])
|
147
|
-
s.add_dependency(%q<webrat>, [">= 0"])
|
148
|
-
s.add_dependency(%q<test-unit>, ["~> 1.2.3"])
|
149
|
-
s.add_dependency(%q<rack-test>, [">= 0"])
|
130
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
131
|
+
s.add_dependency(%q<sinatra>, [">= 0"])
|
132
|
+
s.add_dependency(%q<sinatra-respond_to>, [">= 0"])
|
133
|
+
s.add_dependency(%q<haml>, [">= 0"])
|
134
|
+
s.add_dependency(%q<thin>, [">= 0"])
|
135
|
+
s.add_dependency(%q<yajl-ruby>, [">= 0"])
|
136
|
+
s.add_dependency(%q<rufus-json>, [">= 0.2.5"])
|
137
|
+
s.add_dependency(%q<ruote>, ["~> 2.1.11"])
|
150
138
|
end
|
151
139
|
end
|
152
140
|
|
@@ -0,0 +1,69 @@
|
|
1
|
+
|
2
|
+
class Tracer
|
3
|
+
def initialize
|
4
|
+
@trace = ''
|
5
|
+
end
|
6
|
+
def to_s
|
7
|
+
@trace.to_s.strip
|
8
|
+
end
|
9
|
+
def << s
|
10
|
+
@trace << s
|
11
|
+
end
|
12
|
+
def clear
|
13
|
+
@trace = ''
|
14
|
+
end
|
15
|
+
def puts s
|
16
|
+
@trace << "#{s}\n"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
shared_examples_for 'it has an engine' do
|
21
|
+
|
22
|
+
before(:each) do
|
23
|
+
|
24
|
+
RuoteKit.engine =
|
25
|
+
Ruote::Engine.new(
|
26
|
+
Ruote::Worker.new(
|
27
|
+
Ruote::HashStorage.new))
|
28
|
+
|
29
|
+
@tracer = Tracer.new
|
30
|
+
RuoteKit.engine.add_service('tracer', @tracer)
|
31
|
+
|
32
|
+
RuoteKit.engine.register do
|
33
|
+
catchall Ruote::StorageParticipant
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
after (:each) do
|
38
|
+
|
39
|
+
if RuoteKit.engine
|
40
|
+
RuoteKit.engine.shutdown
|
41
|
+
RuoteKit.engine.storage.purge!
|
42
|
+
RuoteKit.engine = nil
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
shared_examples_for 'it has an engine with no participants' do
|
48
|
+
|
49
|
+
before(:each) do
|
50
|
+
|
51
|
+
RuoteKit.engine =
|
52
|
+
Ruote::Engine.new(
|
53
|
+
Ruote::Worker.new(
|
54
|
+
Ruote::HashStorage.new))
|
55
|
+
|
56
|
+
@tracer = Tracer.new
|
57
|
+
RuoteKit.engine.add_service('tracer', @tracer)
|
58
|
+
end
|
59
|
+
|
60
|
+
after (:each) do
|
61
|
+
|
62
|
+
if RuoteKit.engine
|
63
|
+
RuoteKit.engine.shutdown
|
64
|
+
RuoteKit.engine.storage.purge!
|
65
|
+
RuoteKit.engine = nil
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|