public
Description: RESTful workflow / bpm engine based on Rack and OpenWFEru
Homepage: http://openwferu.rubyforge.org
Clone URL: git://github.com/jmettraux/ruote-rest.git
Search Repo:
reorganized tasks
jmettraux (author)
Tue May 06 17:34:43 -0700 2008
commit  e084be256959cba4ed235f11f5bcc9453b517010
tree    42504c35b510ae676d036f0ac6db4bc62d34781b
parent  f9d1dab47b17613a679f9c654b46a939b86bc3ef
...
8
9
10
11
12
13
14
15
...
30
31
32
33
34
 
 
 
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
 
95
96
97
 
 
 
 
 
 
 
 
98
99
100
101
102
103
 
 
 
 
 
 
...
8
9
10
 
 
11
12
13
...
28
29
30
 
 
31
32
33
34
35
36
37
38
39
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
41
42
43
 
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
0
@@ -8,8 +8,6 @@ require 'rake/clean'
0
 #require 'rake/rdoctask'
0
 require 'rake/testtask'
0
 
0
-load 'lib/tasks/install_workflow_engine.rake'
0
-
0
 
0
 RUOTE_LIB = "~/ruote/lib"
0
 #SINATRA_LIB = "~/sinatra/lib"
0
@@ -30,74 +28,40 @@ CLEAN.include 'work_test', 'work_development', 'log', 'tmp'
0
 #
0
 Rake::TestTask.new(:test) do |t|
0
 
0
- t.libs << "test"
0
- t.libs << "conf"
0
+ t.libs << 'test'
0
+ t.libs << 'conf'
0
+ t.libs << 'vendor'
0
     t.libs << RUOTE_LIB
0
     #t.libs << SINATRA_LIB
0
     t.test_files = FileList['test/test.rb']
0
     t.verbose = true
0
 end
0
 
0
-#
0
-# rake recreate_mysql_db
0
-#
0
-task :recreate_mysql_db do
0
-
0
- #
0
- # created on a Shinkansen train ride to Tokyo (Nozomi)
0
- # (just before Shinagawa)
0
- #
0
-
0
- stage = ENV['stage']
0
-
0
- stage = 'development' \
0
- unless [ 'test', 'development', 'production' ].include?(stage)
0
-
0
- db = "ruoterest_#{stage}"
0
- dbadmin = ENV['dbadmin'] || "root"
0
-
0
- # drop
0
-
0
- begin
0
- sh 'mysql -u '+dbadmin+' -p -e "drop database '+db+'"'
0
- rescue Exception => e
0
- end
0
-
0
- # create
0
-
0
- sh 'mysql -u '+dbadmin+' -p -e "create database '+db+' CHARACTER SET utf8 COLLATE utf8_general_ci"'
0
-
0
- # run the migrations
0
-
0
- gem 'activerecord'
0
- require 'active_record'
0
-
0
- ActiveRecord::Base.establish_connection(
0
- :adapter => "mysql",
0
- :database => db,
0
- #:username => 'toto',
0
- #:password => 'secret',
0
- :encoding => "utf8")
0
-
0
- $:.unshift RUOTE_LIB
0
-
0
- require 'openwfe/extras/participants/activeparticipants'
0
- OpenWFE::Extras::WorkitemTables.up
0
-
0
- #OpenWFE::Extras::ProcessErrorTables.up
0
- #OpenWFE::Extras::ExpressionTables.up
0
-end
0
 
0
 #
0
 # dumps an initial version of conf/participants_test.yaml
0
 #
0
-task :redo_participants do
0
+task :reset_participants do
0
 
0
     require 'yaml'
0
 
0
+ FileUtils.rm "conf/participants_test.yaml"
0
+
0
+ File.open "conf/participants_test.yaml", "w" do |f|
0
+ f.puts(YAML.dump([
0
+ [ "alpha", 'OpenWFE::Extras::ActiveParticipant', nil ],
0
+ [ "bravo", 'OpenWFE::Extras::ActiveParticipant', nil ]
0
+ ]))
0
+ end
0
 
0
     puts
0
     puts "file created ./conf/participants_test.yaml"
0
     puts
0
 end
0
 
0
+#
0
+# other tasks
0
+
0
+load 'tasks/install_workflow_engine.rake'
0
+load 'tasks/recreate_mysql_db.rake'
0
+
...
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
...
108
109
110
 
 
 
 
 
 
 
 
 
111
112
113
0
@@ -108,15 +108,6 @@ module Participants
0
     # As the name implies...
0
     #
0
     def self.reset_participants_test_yaml
0
-
0
- FileUtils.rm "conf/participants_test.yaml"
0
-
0
- File.open "conf/participants_test.yaml", "w" do |f|
0
- f.puts(YAML.dump([
0
- [ "alpha", 'OpenWFE::Extras::ActiveParticipant', nil ],
0
- [ "bravo", 'OpenWFE::Extras::ActiveParticipant', nil ]
0
- ]))
0
- end
0
     end
0
 
0
     protected
...
1
2
3
4
5
6
 
7
8
9
...
1
2
3
 
 
 
4
5
6
7
0
@@ -1,9 +1,7 @@
0
 
0
 <h4>GET /participants</h4>
0
 
0
-<div class="explanation">listing the participants registered in the engine.<br/>
0
-Various implementations are available.
0
-</div>
0
+<div class="explanation">listing the participants registered in the engine.</div>
0
 
0
 <% @participants.each do |part| %>
0
     <%= render_participant_html part, false %>

Comments

    No one has commented yet.