From 1874a88765f01fa8a67f8af2db6e8511541bc815 Mon Sep 17 00:00:00 2001
From: Jeremy Kemper <jeremy@bitsweat.net>
Date: Tue, 10 Nov 2009 11:57:56 -0800
Subject: Ruby 1.9: bump CI mysql from 2.7 -> 2.8.1

---
 ci/geminstaller.yml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'ci')

diff --git a/ci/geminstaller.yml b/ci/geminstaller.yml
index a38221884b..ed06cf4342 100644
--- a/ci/geminstaller.yml
+++ b/ci/geminstaller.yml
@@ -11,8 +11,7 @@ gems:
 - name: mocha
   version: >= 0.9.7
 - name: mysql
-  #version: >= 2.7
-  version: = 2.7
+  version: >= 2.8.1
 - name: nokogiri
   version: >= 1.3.3
 - name: pg
-- 
cgit v1.2.3


From 457940e68496ca203bcb3c9c5599e4cffef0282c Mon Sep 17 00:00:00 2001
From: Jeremy Kemper <jeremy@bitsweat.net>
Date: Tue, 10 Nov 2009 14:17:40 -0800
Subject: Bump CI mocha to 0.9.8 and rack to 1.0.1

---
 ci/geminstaller.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'ci')

diff --git a/ci/geminstaller.yml b/ci/geminstaller.yml
index ed06cf4342..be4acaef57 100644
--- a/ci/geminstaller.yml
+++ b/ci/geminstaller.yml
@@ -9,7 +9,7 @@ gems:
 - name: memcache-client
   version: >= 1.5.0
 - name: mocha
-  version: >= 0.9.7
+  version: >= 0.9.8
 - name: mysql
   version: >= 2.8.1
 - name: nokogiri
@@ -17,7 +17,7 @@ gems:
 - name: pg
   version: >= 0.8.0
 - name: rack
-  version: '~> 1.0.0'
+  version: '~> 1.0.1'
 - name: rack-test
   version: >= 0.5.0
 - name: rake
-- 
cgit v1.2.3


From 0247262833e8203351c59def564243ee26411b8b Mon Sep 17 00:00:00 2001
From: Jeremy Kemper <jeremy@bitsweat.net>
Date: Tue, 10 Nov 2009 14:59:46 -0800
Subject: Rely on bundler for gem deps instead of geminstaller

---
 ci/geminstaller.yml | 24 +-----------------------
 1 file changed, 1 insertion(+), 23 deletions(-)

(limited to 'ci')

diff --git a/ci/geminstaller.yml b/ci/geminstaller.yml
index be4acaef57..776ae8d98d 100644
--- a/ci/geminstaller.yml
+++ b/ci/geminstaller.yml
@@ -1,30 +1,8 @@
 ---
 gems:
-- name: erubis
-  version: >= 2.6.5
 - name: geminstaller
   version: >= 0.4.3
-- name: fcgi
-  version: >= 0.8.7
-- name: memcache-client
-  version: >= 1.5.0
-- name: mocha
-  version: >= 0.9.8
-- name: mysql
-  version: >= 2.8.1
-- name: nokogiri
-  version: >= 1.3.3
-- name: pg
-  version: >= 0.8.0
-- name: rack
-  version: '~> 1.0.1'
-- name: rack-test
-  version: >= 0.5.0
-- name: rake
-  version: >= 0.8.1
-- name: sqlite3-ruby
-  version: >= 1.2.2
 - name: rubygems-update
-  version: >= 1.3.3
+  version: >= 1.3.5
 - name: bundler
   version: >= 0.6.0
-- 
cgit v1.2.3


From 74306b952626b1e0198718274b861a64ad2b5eb8 Mon Sep 17 00:00:00 2001
From: Jeremy Kemper <jeremy@bitsweat.net>
Date: Tue, 10 Nov 2009 14:59:59 -0800
Subject: Use bundled bin/rake

---
 ci/ci_build.rb | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

(limited to 'ci')

diff --git a/ci/ci_build.rb b/ci/ci_build.rb
index 0ee952c00b..cb3be9265b 100755
--- a/ci/ci_build.rb
+++ b/ci/ci_build.rb
@@ -16,6 +16,10 @@ root_dir = File.expand_path('../..', __FILE__)
 # 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"
@@ -27,8 +31,8 @@ cd "#{root_dir}/activesupport" do
   puts
   puts "[CruiseControl] Building ActiveSupport"
   puts
-  build_results[:activesupport] = system 'rake'
-  build_results[:activesupport_isolated] = system 'rake test:isolated'
+  build_results[:activesupport] = rake
+  build_results[:activesupport_isolated] = rake 'test:isolated'
 end
 
 rm_f "#{root_dir}/activerecord/debug.log"
@@ -36,28 +40,28 @@ cd "#{root_dir}/activerecord" do
   puts
   puts "[CruiseControl] Building ActiveRecord with MySQL"
   puts
-  build_results[:activerecord_mysql] = system 'rake mysql:rebuild_databases && rake test_mysql'
+  build_results[:activerecord_mysql] = rake 'mysql:rebuild_databases', 'test_mysql'
 end
 
 cd "#{root_dir}/activerecord" do
   puts
   puts "[CruiseControl] Building ActiveRecord with PostgreSQL"
   puts
-  build_results[:activerecord_postgresql8] = system 'rake postgresql:rebuild_databases && rake test_postgresql'
+  build_results[:activerecord_postgresql8] = rake 'postgresql:rebuild_databases', 'test_postgresql'
 end
 
 cd "#{root_dir}/activerecord" do
   puts
   puts "[CruiseControl] Building ActiveRecord with SQLite 3"
   puts
-  build_results[:activerecord_sqlite3] = system 'rake test_sqlite3'
+  build_results[:activerecord_sqlite3] = rake 'test_sqlite3'
 end
 
 cd "#{root_dir}/activemodel" do
   puts
   puts "[CruiseControl] Building ActiveModel"
   puts
-  build_results[:activemodel] = system 'rake'
+  build_results[:activemodel] = rake
 end
 
 rm_f "#{root_dir}/activeresource/debug.log"
@@ -65,29 +69,29 @@ cd "#{root_dir}/activeresource" do
   puts
   puts "[CruiseControl] Building ActiveResource"
   puts
-  build_results[:activeresource] = system 'rake'
+  build_results[:activeresource] = rake
 end
 
 cd "#{root_dir}/actionpack" do
   puts
   puts "[CruiseControl] Building ActionPack"
   puts
-  build_results[:actionpack] = system 'rake'
-  build_results[:actionpack_isolated] = system 'rake test:isolated'
+  build_results[:actionpack] = rake
+  build_results[:actionpack_isolated] = rake 'test:isolated'
 end
 
 cd "#{root_dir}/actionmailer" do
   puts
   puts "[CruiseControl] Building ActionMailer"
   puts
-  build_results[:actionmailer] = system 'rake'
+  build_results[:actionmailer] = rake
 end
 
 cd "#{root_dir}/railties" do
   puts
   puts "[CruiseControl] Building RailTies"
   puts
-  build_results[:railties] = system 'rake'
+  build_results[:railties] = rake
 end
 
 
-- 
cgit v1.2.3


From ec2b2654e5dfc6cf6ec7255083561f1304e234d3 Mon Sep 17 00:00:00 2001
From: Jeremy Kemper <jeremy@bitsweat.net>
Date: Tue, 10 Nov 2009 15:18:21 -0800
Subject: Make root_dir a method so rails can call it

---
 ci/ci_build.rb | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

(limited to 'ci')

diff --git a/ci/ci_build.rb b/ci/ci_build.rb
index cb3be9265b..b62cca09a5 100755
--- a/ci/ci_build.rb
+++ b/ci/ci_build.rb
@@ -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 @@ root_dir = File.expand_path('../..', __FILE__)
 # 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"
-- 
cgit v1.2.3


From aef7e214bd2484cd879d67bb92dda6314e0d6435 Mon Sep 17 00:00:00 2001
From: Jeremy Kemper <jeremy@bitsweat.net>
Date: Tue, 10 Nov 2009 15:28:25 -0800
Subject: Use an env var to expand the CI bundle. Using bundler's 'only'
 includes this stuff for everybody, oops.

---
 ci/ci_build.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'ci')

diff --git a/ci/ci_build.rb b/ci/ci_build.rb
index b62cca09a5..453479d605 100755
--- a/ci/ci_build.rb
+++ b/ci/ci_build.rb
@@ -25,7 +25,7 @@ cd root_dir do
   puts
   puts "[CruiseControl] Bundling RubyGems"
   puts
-  build_results[:bundle] = system 'rm -rf vendor && gem bundle --update'
+  build_results[:bundle] = system 'rm -rf vendor && env CI=1 gem bundle --update'
 end
 
 cd "#{root_dir}/activesupport" do
-- 
cgit v1.2.3


From 907858c1fe24ea6e3a48cbc0d6e61ea07c0a0624 Mon Sep 17 00:00:00 2001
From: Jeremy Kemper <jeremy@bitsweat.net>
Date: Tue, 10 Nov 2009 15:32:09 -0800
Subject: CI: shush complaints about 777 perms

---
 ci/ci_build.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'ci')

diff --git a/ci/ci_build.rb b/ci/ci_build.rb
index 453479d605..9af407bc2e 100755
--- a/ci/ci_build.rb
+++ b/ci/ci_build.rb
@@ -25,7 +25,7 @@ cd root_dir do
   puts
   puts "[CruiseControl] Bundling RubyGems"
   puts
-  build_results[:bundle] = system 'rm -rf vendor && env CI=1 gem bundle --update'
+  build_results[:bundle] = system 'rm -rf vendor && env CI=1 gem bundle --update && chmod 755 bin'
 end
 
 cd "#{root_dir}/activesupport" do
-- 
cgit v1.2.3


From e889f315c8af6d67bf605069a0ffb8848aea145d Mon Sep 17 00:00:00 2001
From: Jeremy Kemper <jeremy@bitsweat.net>
Date: Tue, 10 Nov 2009 15:40:54 -0800
Subject: CI: return result of last rake task

---
 ci/ci_build.rb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'ci')

diff --git a/ci/ci_build.rb b/ci/ci_build.rb
index 9af407bc2e..bece33e736 100755
--- a/ci/ci_build.rb
+++ b/ci/ci_build.rb
@@ -7,7 +7,9 @@ def root_dir
 end
 
 def rake(*tasks)
-  tasks.map { |task| system "#{root_dir}/bin/rake", task }.join("\n")
+  result = nil
+  tasks.each { |task| result = system("#{root_dir}/bin/rake", task) }
+  result
 end
 
 puts "[CruiseControl] Rails build"
-- 
cgit v1.2.3


From c626be796ce2fd716d72f8d38784eabe7267625e Mon Sep 17 00:00:00 2001
From: Jeremy Kemper <jeremy@bitsweat.net>
Date: Tue, 10 Nov 2009 16:08:02 -0800
Subject: CI: rearrange build order, AR last

---
 ci/ci_build.rb | 40 ++++++++++++++++++++--------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

(limited to 'ci')

diff --git a/ci/ci_build.rb b/ci/ci_build.rb
index bece33e736..3a4515054a 100755
--- a/ci/ci_build.rb
+++ b/ci/ci_build.rb
@@ -38,26 +38,26 @@ cd "#{root_dir}/activesupport" do
   build_results[:activesupport_isolated] = rake 'test:isolated'
 end
 
-rm_f "#{root_dir}/activerecord/debug.log"
-cd "#{root_dir}/activerecord" do
+cd "#{root_dir}/railties" do
   puts
-  puts "[CruiseControl] Building ActiveRecord with MySQL"
+  puts "[CruiseControl] Building RailTies"
   puts
-  build_results[:activerecord_mysql] = rake 'mysql:rebuild_databases', 'test_mysql'
+  build_results[:railties] = rake
 end
 
-cd "#{root_dir}/activerecord" do
+cd "#{root_dir}/actionpack" do
   puts
-  puts "[CruiseControl] Building ActiveRecord with PostgreSQL"
+  puts "[CruiseControl] Building ActionPack"
   puts
-  build_results[:activerecord_postgresql8] = rake 'postgresql:rebuild_databases', 'test_postgresql'
+  build_results[:actionpack] = rake
+  build_results[:actionpack_isolated] = rake 'test:isolated'
 end
 
-cd "#{root_dir}/activerecord" do
+cd "#{root_dir}/actionmailer" do
   puts
-  puts "[CruiseControl] Building ActiveRecord with SQLite 3"
+  puts "[CruiseControl] Building ActionMailer"
   puts
-  build_results[:activerecord_sqlite3] = rake 'test_sqlite3'
+  build_results[:actionmailer] = rake
 end
 
 cd "#{root_dir}/activemodel" do
@@ -75,26 +75,26 @@ cd "#{root_dir}/activeresource" do
   build_results[:activeresource] = rake
 end
 
-cd "#{root_dir}/actionpack" do
+rm_f "#{root_dir}/activerecord/debug.log"
+cd "#{root_dir}/activerecord" do
   puts
-  puts "[CruiseControl] Building ActionPack"
+  puts "[CruiseControl] Building ActiveRecord with MySQL"
   puts
-  build_results[:actionpack] = rake
-  build_results[:actionpack_isolated] = rake 'test:isolated'
+  build_results[:activerecord_mysql] = rake 'mysql:rebuild_databases', 'test_mysql'
 end
 
-cd "#{root_dir}/actionmailer" do
+cd "#{root_dir}/activerecord" do
   puts
-  puts "[CruiseControl] Building ActionMailer"
+  puts "[CruiseControl] Building ActiveRecord with PostgreSQL"
   puts
-  build_results[:actionmailer] = rake
+  build_results[:activerecord_postgresql8] = rake 'postgresql:rebuild_databases', 'test_postgresql'
 end
 
-cd "#{root_dir}/railties" do
+cd "#{root_dir}/activerecord" do
   puts
-  puts "[CruiseControl] Building RailTies"
+  puts "[CruiseControl] Building ActiveRecord with SQLite 3"
   puts
-  build_results[:railties] = rake
+  build_results[:activerecord_sqlite3] = rake 'test_sqlite3'
 end
 
 
-- 
cgit v1.2.3


From 215fa167342067675b6a6968b11111be25425a38 Mon Sep 17 00:00:00 2001
From: Jeremy Kemper <jeremy@bitsweat.net>
Date: Tue, 10 Nov 2009 16:54:15 -0800
Subject: CI: list bundled gems in build environment

---
 ci/ci_build.rb | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'ci')

diff --git a/ci/ci_build.rb b/ci/ci_build.rb
index 3a4515054a..12b1f6b955 100755
--- a/ci/ci_build.rb
+++ b/ci/ci_build.rb
@@ -107,6 +107,8 @@ puts "[CruiseControl]   #{`mysql --version`}"
 puts "[CruiseControl]   #{`pg_config --version`}"
 puts "[CruiseControl]   SQLite3: #{`sqlite3 -version`}"
 `gem env`.each_line {|line| print "[CruiseControl]   #{line}"}
+puts "[CruiseControl]   Bundled gems:"
+`gem bundle --list`.each_line {|line| print "[CruiseControl]     #{line}"}
 puts "[CruiseControl]   Local gems:"
 `gem list`.each_line {|line| print "[CruiseControl]     #{line}"}
 
-- 
cgit v1.2.3


From 486a63c258c7eff44ece0dbfbca4e6a08eeb01a0 Mon Sep 17 00:00:00 2001
From: Jeremy Kemper <jeremy@bitsweat.net>
Date: Tue, 10 Nov 2009 17:13:43 -0800
Subject: CI: short-circuit at first failing task. Chmod 755 bin, vendor,
 vendor/gems

---
 ci/ci_build.rb | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

(limited to 'ci')

diff --git a/ci/ci_build.rb b/ci/ci_build.rb
index 12b1f6b955..1b8a880a2f 100755
--- a/ci/ci_build.rb
+++ b/ci/ci_build.rb
@@ -7,9 +7,8 @@ def root_dir
 end
 
 def rake(*tasks)
-  result = nil
-  tasks.each { |task| result = system("#{root_dir}/bin/rake", task) }
-  result
+  tasks.each { |task| return false unless system("#{root_dir}/bin/rake", task) }
+  true
 end
 
 puts "[CruiseControl] Rails build"
@@ -27,7 +26,7 @@ cd root_dir do
   puts
   puts "[CruiseControl] Bundling RubyGems"
   puts
-  build_results[:bundle] = system 'rm -rf vendor && env CI=1 gem bundle --update && chmod 755 bin'
+  build_results[:bundle] = system 'rm -rf vendor && env CI=1 gem bundle --update && chmod 755 bin vendor vendor/gems'
 end
 
 cd "#{root_dir}/activesupport" do
-- 
cgit v1.2.3


From 0df1dc5a7274b28ed9474e871e6af1ca9b9a2fe9 Mon Sep 17 00:00:00 2001
From: Jeremy Kemper <jeremy@bitsweat.net>
Date: Tue, 10 Nov 2009 17:19:39 -0800
Subject: CI: yeah, run those tests

---
 ci/ci_build.rb | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

(limited to 'ci')

diff --git a/ci/ci_build.rb b/ci/ci_build.rb
index 1b8a880a2f..7ae660fb7d 100755
--- a/ci/ci_build.rb
+++ b/ci/ci_build.rb
@@ -33,7 +33,7 @@ cd "#{root_dir}/activesupport" do
   puts
   puts "[CruiseControl] Building ActiveSupport"
   puts
-  build_results[:activesupport] = rake
+  build_results[:activesupport] = rake 'test'
   build_results[:activesupport_isolated] = rake 'test:isolated'
 end
 
@@ -41,14 +41,14 @@ cd "#{root_dir}/railties" do
   puts
   puts "[CruiseControl] Building RailTies"
   puts
-  build_results[:railties] = rake
+  build_results[:railties] = rake 'test'
 end
 
 cd "#{root_dir}/actionpack" do
   puts
   puts "[CruiseControl] Building ActionPack"
   puts
-  build_results[:actionpack] = rake
+  build_results[:actionpack] = rake 'test'
   build_results[:actionpack_isolated] = rake 'test:isolated'
 end
 
@@ -56,14 +56,14 @@ cd "#{root_dir}/actionmailer" do
   puts
   puts "[CruiseControl] Building ActionMailer"
   puts
-  build_results[:actionmailer] = rake
+  build_results[:actionmailer] = rake 'test'
 end
 
 cd "#{root_dir}/activemodel" do
   puts
   puts "[CruiseControl] Building ActiveModel"
   puts
-  build_results[:activemodel] = rake
+  build_results[:activemodel] = rake 'test'
 end
 
 rm_f "#{root_dir}/activeresource/debug.log"
@@ -71,7 +71,7 @@ cd "#{root_dir}/activeresource" do
   puts
   puts "[CruiseControl] Building ActiveResource"
   puts
-  build_results[:activeresource] = rake
+  build_results[:activeresource] = rake 'test'
 end
 
 rm_f "#{root_dir}/activerecord/debug.log"
-- 
cgit v1.2.3