Permalink
Browse files

factoring out rake installation utility methods for use by other rake…

… tasks
  • Loading branch information...
1 parent d1684ff commit d071cb7458b98753548ed6716d37bf95be08f832 @rick committed Nov 25, 2008
Showing with 26 additions and 27 deletions.
  1. +1 −27 tasks/dependencies.rake
  2. +25 −0 tasks/rake_install.rb
View
@@ -1,30 +1,4 @@
-require 'fileutils'
-
-class RakeInstall
- class << self
- def is_installed?(path)
- File.exists?(File.expand_path(File.dirname(__FILE__) + '/../' + path))
- end
-
- def unpack_tarball(path)
- Dir.chdir(run)
- system("tar xvfz #{vendor}/#{path}")
- end
-
- def rename_server_path(source, target)
- Dir.chdir(run)
- system("mv #{source} #{target}")
- end
-
- def vendor
- File.expand_path(File.dirname(__FILE__) + '/../vendor/')
- end
-
- def run
- File.expand_path(File.dirname(__FILE__) + '/../run/')
- end
- end
-end
+require File.expand_path(File.dirname(__FILE__)) + '/rake_install'
desc 'install dependencies'
task :install_dependencies => [ :install_rabbit_mq ] do
View
@@ -0,0 +1,25 @@
+class RakeInstall
+ class << self
+ def is_installed?(path)
+ File.exists?(File.expand_path(File.dirname(__FILE__) + '/../' + path))
+ end
+
+ def unpack_tarball(path)
+ Dir.chdir(run)
+ system("tar xvfz #{vendor}/#{path}")
+ end
+
+ def rename_server_path(source, target)
+ Dir.chdir(run)
+ system("mv #{source} #{target}")
+ end
+
+ def vendor
+ File.expand_path(File.dirname(__FILE__) + '/../vendor/')
+ end
+
+ def run
+ File.expand_path(File.dirname(__FILE__) + '/../run/')
+ end
+ end
+end

0 comments on commit d071cb7

Please sign in to comment.