Permalink
Browse files

slight refactoring/cleanup

  • Loading branch information...
rick committed Nov 25, 2008
1 parent b6fd68a commit d1684ff015e15ec004621d5d843848e9a9ec1df9
Showing with 8 additions and 4 deletions.
  1. +8 −4 tasks/dependencies.rake
View
@@ -7,17 +7,21 @@ class RakeInstall
end
def unpack_tarball(path)
- Dir.chdir(File.expand_path(File.dirname(__FILE__) + '/../run/'))
+ Dir.chdir(run)
system("tar xvfz #{vendor}/#{path}")
end
def rename_server_path(source, target)
- Dir.chdir(File.expand_path(File.dirname(__FILE__) + '/../run/'))
+ Dir.chdir(run)
system("mv #{source} #{target}")
end
def vendor
- File.expand_path(File.expand_path(File.dirname(__FILE__) + '/../vendor/'))
+ File.expand_path(File.dirname(__FILE__) + '/../vendor/')
+ end
+
+ def run
+ File.expand_path(File.dirname(__FILE__) + '/../run/')
end
end
end
@@ -30,7 +34,7 @@ end
desc 'install the RabbitMQ message server'
task :install_rabbit_mq do
target = 'run/rabbitmq'
- if RakeInstall.is_installed?('run/rabbitmq')
+ if RakeInstall.is_installed?(target)
puts "RabbitMQ already installed in [#{target}]."
else
puts "installing RabbitMQ in [#{target}]..."

0 comments on commit d1684ff

Please sign in to comment.