public
Description: A sample application for playing around with some ESI ideas I had.
Clone URL: git://github.com/codahale/esi-blog.git
Small cleanup in ESI rake tasks.
codahale (author)
Tue May 06 21:46:24 -0700 2008
commit  ded6060a9ccb651f70586d581e81ef1cd1e7e26d
tree    b510eaad2f3f96b27f8d9bd04d8a4f7c02ca1314
parent  544f755b0b901516c203361ef1f2fe94cf2b4271
...
6
7
8
9
10
11
 
12
13
14
15
16
 
17
 
 
 
 
 
 
18
19
...
6
7
8
 
 
 
9
10
11
12
13
 
14
15
16
17
18
19
20
21
22
23
0
@@ -6,14 +6,18 @@ namespace :esi do
0
   
0
   desc "Start mongrel_esi with this app's configuration."
0
   task :start => :environment do
0
- cmd = "mongrel_esi start --port 3001 --routes default:localhost:3000 --pid #{@pid_file} --log #{@log_file} --enable-for-surrogate-only --allowed-content-types text/html,application/xml,application/json,text/javascript -d"
0
- puts cmd
0
- system(cmd)
0
+ run("mongrel_esi start --port 3001 --routes default:localhost:3000 --pid #{@pid_file} --log #{@log_file} --enable-for-surrogate-only --allowed-content-types text/html,application/xml,application/json,text/javascript -d")
0
   end
0
   
0
   desc "Stop mongrel_esi"
0
   task :stop => :environment do
0
- system("mongrel_esi stop -P #{@pid_file}")
0
+ run("mongrel_esi stop -P #{@pid_file}")
0
   end
0
+
0
+ def run(cmd)
0
+ puts cmd
0
+ system(cmd)
0
+ end
0
+
0
 end
0
 

Comments

    No one has commented yet.