Permalink
Browse files

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...
1 parent e3aed7a commit 81813054b476cd3046328c3149bcac4881303dab Ezra Zygmuntowicz committed Feb 16, 2009
Showing with 10 additions and 11 deletions.
  1. +10 −11 tasks/rabbitmq.rake
View
@@ -8,7 +8,7 @@ class RabbitMQ
end
def self.rabbitdir
- "#{basedir}/vendor/rabbitmq-server-1.5.0"
+ "#{basedir}/vendor/rabbitmq-server-1.5.1"
end
def self.dtach_socket
@@ -51,10 +51,11 @@ namespace :rabbitmq do
task :ensure_directories do
FileUtils.mkdir_p("tmp")
FileUtils.mkdir_p("log")
+ FileUtils.mkdir_p("vendor")
end
desc "Start RabbitMQ"
- task :start => :ensure_directories do
+ task :start => [:ensure_directories, :download] do
RabbitMQ.start
end
@@ -68,19 +69,17 @@ namespace :rabbitmq do
RabbitMQ.attach
end
- namespace :package do
-
- desc "Download package"
- task :download do
+ desc "Download package"
+ task :download do
+ unless File.exists?(RabbitMQ.rabbitdir)
FileUtils.mkdir_p("vendor")
Dir.chdir("vendor") do
- system "curl http://www.rabbitmq.com/releases/rabbitmq-server/v1.5.0/rabbitmq-server-1.5.0.tar.gz -O &&
- tar xvzf rabbitmq-server-1.5.0.tar.gz"
+ system "curl http://www.rabbitmq.com/releases/rabbitmq-server/v1.5.1/rabbitmq-server-1.5.1.tar.gz -O &&
+ tar xvzf rabbitmq-server-1.5.1.tar.gz"
end
- end
-
+ end
end
-
+
end

0 comments on commit 8181305

Please sign in to comment.