Skip to content
This repository
Browse code

update rabbitmq.rake to use rabbitmq 1.5.1 and if you have erlang ins…

…talled

just run rake rabbitmq:start  to download and start the broker
  • Loading branch information...
commit dd96e31b3f3bd282290aea8e0a0c68b4f601ec32 1 parent 4b5b05f
authored February 15, 2009

Showing 1 changed file with 10 additions and 11 deletions. Show diff stats Hide diff stats

  1. 21  tasks/rabbitmq.rake
21  tasks/rabbitmq.rake
@@ -8,7 +8,7 @@ class RabbitMQ
8 8
   end
9 9
   
10 10
   def self.rabbitdir
11  
-    "#{basedir}/vendor/rabbitmq-server-1.5.0"
  11
+    "#{basedir}/vendor/rabbitmq-server-1.5.1"
12 12
   end
13 13
 
14 14
   def self.dtach_socket
@@ -51,10 +51,11 @@ namespace :rabbitmq do
51 51
   task :ensure_directories do
52 52
     FileUtils.mkdir_p("tmp")
53 53
     FileUtils.mkdir_p("log")
  54
+    FileUtils.mkdir_p("vendor")
54 55
   end  
55 56
 
56 57
   desc "Start RabbitMQ"
57  
-  task :start => :ensure_directories do
  58
+  task :start => [:ensure_directories, :download] do
58 59
     RabbitMQ.start
59 60
   end
60 61
 
@@ -68,19 +69,17 @@ namespace :rabbitmq do
68 69
     RabbitMQ.attach
69 70
   end
70 71
 
71  
-  namespace :package do
72  
-
73  
-    desc "Download package"
74  
-    task :download do
  72
+  desc "Download package"
  73
+  task :download do
  74
+    unless File.exists?(RabbitMQ.rabbitdir)
75 75
       FileUtils.mkdir_p("vendor")
76 76
       Dir.chdir("vendor") do
77  
-        system "curl http://www.rabbitmq.com/releases/rabbitmq-server/v1.5.0/rabbitmq-server-1.5.0.tar.gz -O &&
78  
-                tar xvzf rabbitmq-server-1.5.0.tar.gz"
  77
+        system "curl http://www.rabbitmq.com/releases/rabbitmq-server/v1.5.1/rabbitmq-server-1.5.1.tar.gz -O &&
  78
+                tar xvzf rabbitmq-server-1.5.1.tar.gz"
79 79
       end
80  
-    end
81  
-    
  80
+    end  
82 81
   end
83  
-
  82
+    
84 83
 
85 84
 end
86 85
   

0 notes on commit dd96e31

Please sign in to comment.
Something went wrong with that request. Please try again.