Permalink
Browse files

Make root_dir a method so rails can call it

  • Loading branch information...
1 parent a4aa95b commit ec2b2654e5dfc6cf6ec7255083561f1304e234d3 @jeremy jeremy committed Nov 10, 2009
Showing with 8 additions and 7 deletions.
  1. +8 −7 ci/ci_build.rb
View
@@ -1,12 +1,17 @@
#!/usr/bin/env ruby
require 'fileutils'
-
include FileUtils
-puts "[CruiseControl] Rails build"
+def root_dir
+ @root_dir ||= File.expand_path('../..', __FILE__)
+end
+
+def rake(*tasks)
+ tasks.map { |task| system "#{root_dir}/bin/rake", task }.join("\n")
+end
+puts "[CruiseControl] Rails build"
build_results = {}
-root_dir = File.expand_path('../..', __FILE__)
# Requires gem home and path to be writeable and/or overridden to be ~/.gem,
# Will enable when RubyGems supports this properly (in a coming release)
@@ -16,10 +21,6 @@
# A security hole, but there is nothing valuable on rails CI box anyway.
build_results[:geminstaller] = system "sudo geminstaller --config=#{root_dir}/ci/geminstaller.yml --exceptions"
-def rake(*tasks)
- tasks.map { |task| system "#{root_dir}/bin/rake", task }.join("\n")
-end
-
cd root_dir do
puts
puts "[CruiseControl] Bundling RubyGems"

0 comments on commit ec2b265

Please sign in to comment.