aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml8
-rw-r--r--actionpack/lib/action_dispatch/testing/assertions/response.rb10
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb2
-rw-r--r--actionpack/test/template/form_helper_test.rb17
-rw-r--r--actionpack/test/template/sprockets_helper_test.rb52
-rw-r--r--activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb2
-rw-r--r--activerecord/lib/active_record/relation/query_methods.rb9
-rw-r--r--activerecord/test/cases/base_test.rb7
-rw-r--r--activesupport/test/safe_buffer_test.rb2
-rw-r--r--activesupport/test/xml_mini_test.rb20
-rwxr-xr-xci/ci_build.rb181
-rw-r--r--ci/ci_setup_notes.txt140
-rw-r--r--ci/cruise_config.rb9
-rw-r--r--ci/site.css13
-rw-r--r--ci/site_config.rb72
15 files changed, 68 insertions, 476 deletions
diff --git a/.travis.yml b/.travis.yml
index d33c6a3c86..596611ecf4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,4 @@
script: 'ci/travis.rb'
-notifications:
- disabled: true
rvm:
- 1.8.7
- 1.9.2
@@ -9,4 +7,8 @@ env:
- "GEM=ap,am,amo,ares,as"
- "GEM=ar:mysql"
- "GEM=ar:mysql2"
- - "GEM=ar:sqlite3" \ No newline at end of file
+ - "GEM=ar:sqlite3"
+notifications:
+ email: false
+ irc:
+ - "irc.freenode.org#rails-contrib" \ No newline at end of file
diff --git a/actionpack/lib/action_dispatch/testing/assertions/response.rb b/actionpack/lib/action_dispatch/testing/assertions/response.rb
index a2d639cd56..7381617dd7 100644
--- a/actionpack/lib/action_dispatch/testing/assertions/response.rb
+++ b/actionpack/lib/action_dispatch/testing/assertions/response.rb
@@ -55,16 +55,14 @@ module ActionDispatch
# assert_redirected_to @customer
#
def assert_redirected_to(options = {}, message=nil)
- validate_request!
-
assert_response(:redirect, message)
return true if options == @response.location
- redirected_to_after_normalization = normalize_argument_to_redirection(@response.location)
- options_after_normalization = normalize_argument_to_redirection(options)
+ redirect_is = normalize_argument_to_redirection(@response.location)
+ redirect_expected = normalize_argument_to_redirection(options)
- if redirected_to_after_normalization != options_after_normalization
- flunk "Expected response to be a redirect to <#{options_after_normalization}> but was a redirect to <#{redirected_to_after_normalization}>"
+ if redirect_is != redirect_expected
+ flunk "Expected response to be a redirect to <#{redirect_expected}> but was a redirect to <#{redirect_is}>"
end
end
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index 974c963d44..52a640abf3 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -365,7 +365,7 @@ module ActionView
apply_form_for_options!(record, options)
end
- options[:html][:remote] = options.delete(:remote)
+ options[:html][:remote] = options.delete(:remote) if options.has_key?(:remote)
options[:html][:method] = options.delete(:method) if options.has_key?(:method)
options[:html][:authenticity_token] = options.delete(:authenticity_token)
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb
index cc3d2cddf7..aca2dc9e4d 100644
--- a/actionpack/test/template/form_helper_test.rb
+++ b/actionpack/test/template/form_helper_test.rb
@@ -791,6 +791,23 @@ class FormHelperTest < ActionView::TestCase
assert_dom_equal expected, output_buffer
end
+ def test_form_for_with_remote_in_html
+ form_for(@post, :url => '/', :html => { :remote => true, :id => 'create-post', :method => :put }) do |f|
+ concat f.text_field(:title)
+ concat f.text_area(:body)
+ concat f.check_box(:secret)
+ end
+
+ expected = whole_form("/", "create-post", "edit_post", :method => "put", :remote => true) do
+ "<input name='post[title]' size='30' type='text' id='post_title' value='Hello World' />" +
+ "<textarea name='post[body]' id='post_body' rows='20' cols='40'>Back to the hill and over it again!</textarea>" +
+ "<input name='post[secret]' type='hidden' value='0' />" +
+ "<input name='post[secret]' checked='checked' type='checkbox' id='post_secret' value='1' />"
+ end
+
+ assert_dom_equal expected, output_buffer
+ end
+
def test_form_for_with_remote_without_html
@post.persisted = false
form_for(@post, :remote => true) do |f|
diff --git a/actionpack/test/template/sprockets_helper_test.rb b/actionpack/test/template/sprockets_helper_test.rb
index 3d7abc7e2a..b9161b62c5 100644
--- a/actionpack/test/template/sprockets_helper_test.rb
+++ b/actionpack/test/template/sprockets_helper_test.rb
@@ -21,9 +21,9 @@ class SprocketsHelperTest < ActionView::TestCase
@controller.request = MockRequest.new
@assets = Sprockets::Environment.new
- @assets.paths << FIXTURES.join("sprockets/app/javascripts")
- @assets.paths << FIXTURES.join("sprockets/app/stylesheets")
- @assets.paths << FIXTURES.join("sprockets/app/images")
+ @assets.append_path(FIXTURES.join("sprockets/app/javascripts"))
+ @assets.append_path(FIXTURES.join("sprockets/app/stylesheets"))
+ @assets.append_path(FIXTURES.join("sprockets/app/images"))
application = Struct.new(:config, :assets).new(config, @assets)
Rails.stubs(:application).returns(application)
@@ -37,7 +37,7 @@ class SprocketsHelperTest < ActionView::TestCase
end
test "asset_path" do
- assert_equal "/assets/logo-9c0a079bdd7701d7e729bd956823d153.png",
+ assert_match %r{/assets/logo-[0-9a-f]+.png},
asset_path("logo.png")
end
@@ -112,7 +112,7 @@ class SprocketsHelperTest < ActionView::TestCase
@config.action_controller.default_asset_host_protocol = :request
@config.action_controller.perform_caching = true
- assert_equal "/assets/logo-9c0a079bdd7701d7e729bd956823d153.png",
+ assert_match %r{/assets/logo-[0-9a-f]+.png},
asset_path("logo.png")
end
@@ -123,12 +123,12 @@ class SprocketsHelperTest < ActionView::TestCase
end
test "javascript path" do
- assert_equal "/assets/application-d41d8cd98f00b204e9800998ecf8427e.js",
+ assert_match %r{/assets/application-[0-9a-f]+.js},
asset_path(:application, "js")
- assert_equal "/assets/xmlhr-d41d8cd98f00b204e9800998ecf8427e.js",
+ assert_match %r{/assets/xmlhr-[0-9a-f]+.js},
asset_path("xmlhr", "js")
- assert_equal "/assets/dir/xmlhr-d41d8cd98f00b204e9800998ecf8427e.js",
+ assert_match %r{/assets/dir/xmlhr-[0-9a-f]+.js},
asset_path("dir/xmlhr.js", "js")
assert_equal "/dir/xmlhr.js",
@@ -141,28 +141,28 @@ class SprocketsHelperTest < ActionView::TestCase
end
test "javascript include tag" do
- assert_equal '<script src="/assets/application-d41d8cd98f00b204e9800998ecf8427e.js" type="text/javascript"></script>',
+ assert_match %r{<script src="/assets/application-[0-9a-f]+.js" type="text/javascript"></script>},
javascript_include_tag(:application)
- assert_equal '<script src="/assets/xmlhr-d41d8cd98f00b204e9800998ecf8427e.js" type="text/javascript"></script>',
+ assert_match %r{<script src="/assets/xmlhr-[0-9a-f]+.js" type="text/javascript"></script>},
javascript_include_tag("xmlhr")
- assert_equal '<script src="/assets/xmlhr-d41d8cd98f00b204e9800998ecf8427e.js" type="text/javascript"></script>',
+ assert_match %r{<script src="/assets/xmlhr-[0-9a-f]+.js" type="text/javascript"></script>},
javascript_include_tag("xmlhr.js")
assert_equal '<script src="http://www.example.com/xmlhr" type="text/javascript"></script>',
javascript_include_tag("http://www.example.com/xmlhr")
- assert_equal "<script src=\"/assets/xmlhr-d41d8cd98f00b204e9800998ecf8427e.js?body=1\" type=\"text/javascript\"></script>\n<script src=\"/assets/application-d41d8cd98f00b204e9800998ecf8427e.js?body=1\" type=\"text/javascript\"></script>",
+ assert_match %r{<script src="/assets/xmlhr-[0-9a-f]+.js\?body=1" type="text/javascript"></script>\n<script src="/assets/application-[0-9a-f]+.js\?body=1" type="text/javascript"></script>},
javascript_include_tag(:application, :debug => true)
- assert_equal "<script src=\"/assets/xmlhr-d41d8cd98f00b204e9800998ecf8427e.js\" type=\"text/javascript\"></script>\n<script src=\"/assets/extra-d41d8cd98f00b204e9800998ecf8427e.js\" type=\"text/javascript\"></script>",
+ assert_match %r{<script src=\"/assets/xmlhr-[0-9a-f]+.js\" type=\"text/javascript\"></script>\n<script src=\"/assets/extra-[0-9a-f]+.js\" type=\"text/javascript\"></script>},
javascript_include_tag("xmlhr", "extra")
end
test "stylesheet path" do
- assert_equal "/assets/application-68b329da9893e34099c7d8ad5cb9c940.css", asset_path(:application, "css")
+ assert_match %r{/assets/application-[0-9a-f]+.css}, asset_path(:application, "css")
- assert_equal "/assets/style-d41d8cd98f00b204e9800998ecf8427e.css", asset_path("style", "css")
- assert_equal "/assets/dir/style-d41d8cd98f00b204e9800998ecf8427e.css", asset_path("dir/style.css", "css")
+ assert_match %r{/assets/style-[0-9a-f]+.css}, asset_path("style", "css")
+ assert_match %r{/assets/dir/style-[0-9a-f]+.css}, asset_path("dir/style.css", "css")
assert_equal "/dir/style.css", asset_path("/dir/style.css", "css")
assert_equal "http://www.example.com/css/style",
@@ -172,37 +172,37 @@ class SprocketsHelperTest < ActionView::TestCase
end
test "stylesheet link tag" do
- assert_equal '<link href="/assets/application-68b329da9893e34099c7d8ad5cb9c940.css" media="screen" rel="stylesheet" type="text/css" />',
+ assert_match %r{<link href="/assets/application-[0-9a-f]+.css" media="screen" rel="stylesheet" type="text/css" />},
stylesheet_link_tag(:application)
- assert_equal '<link href="/assets/style-d41d8cd98f00b204e9800998ecf8427e.css" media="screen" rel="stylesheet" type="text/css" />',
+ assert_match %r{<link href="/assets/style-[0-9a-f]+.css" media="screen" rel="stylesheet" type="text/css" />},
stylesheet_link_tag("style")
- assert_equal '<link href="/assets/style-d41d8cd98f00b204e9800998ecf8427e.css" media="screen" rel="stylesheet" type="text/css" />',
+ assert_match %r{<link href="/assets/style-[0-9a-f]+.css" media="screen" rel="stylesheet" type="text/css" />},
stylesheet_link_tag("style.css")
assert_equal '<link href="http://www.example.com/style.css" media="screen" rel="stylesheet" type="text/css" />',
stylesheet_link_tag("http://www.example.com/style.css")
- assert_equal '<link href="/assets/style-d41d8cd98f00b204e9800998ecf8427e.css" media="all" rel="stylesheet" type="text/css" />',
+ assert_match %r{<link href="/assets/style-[0-9a-f]+.css" media="all" rel="stylesheet" type="text/css" />},
stylesheet_link_tag("style", :media => "all")
- assert_equal '<link href="/assets/style-d41d8cd98f00b204e9800998ecf8427e.css" media="print" rel="stylesheet" type="text/css" />',
+ assert_match %r{<link href="/assets/style-[0-9a-f]+.css" media="print" rel="stylesheet" type="text/css" />},
stylesheet_link_tag("style", :media => "print")
- assert_equal "<link href=\"/assets/style-d41d8cd98f00b204e9800998ecf8427e.css?body=1\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"/assets/application-68b329da9893e34099c7d8ad5cb9c940.css?body=1\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />",
+ assert_match %r{<link href="/assets/style-[0-9a-f]+.css\?body=1" media="screen" rel="stylesheet" type="text/css" />\n<link href="/assets/application-[0-9a-f]+.css\?body=1" media="screen" rel="stylesheet" type="text/css" />},
stylesheet_link_tag(:application, :debug => true)
- assert_equal "<link href=\"/assets/style-d41d8cd98f00b204e9800998ecf8427e.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"/assets/extra-d41d8cd98f00b204e9800998ecf8427e.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />",
+ assert_match %r{<link href="/assets/style-[0-9a-f]+.css" media="screen" rel="stylesheet" type="text/css" />\n<link href="/assets/extra-[0-9a-f]+.css" media="screen" rel="stylesheet" type="text/css" />},
stylesheet_link_tag("style", "extra")
end
test "alternate asset prefix" do
stubs(:asset_prefix).returns("/themes/test")
- assert_equal "/themes/test/style-d41d8cd98f00b204e9800998ecf8427e.css", asset_path("style", "css")
+ assert_match %r{/themes/test/style-[0-9a-f]+.css}, asset_path("style", "css")
end
test "alternate asset environment" do
assets = Sprockets::Environment.new
- assets.paths << FIXTURES.join("sprockets/alternate/stylesheets")
+ assets.append_path(FIXTURES.join("sprockets/alternate/stylesheets"))
stubs(:asset_environment).returns(assets)
- assert_equal "/assets/style-df0b97ad35a8e1f7f61097461f77c19a.css", asset_path("style", "css")
+ assert_match %r{/assets/style-[0-9a-f]+.css}, asset_path("style", "css")
end
end
diff --git a/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb
index d6c167ad36..f9602bbe77 100644
--- a/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb
@@ -577,7 +577,7 @@ module ActiveRecord
def quoted_columns_for_index(column_names, options = {})
length = options[:length] if options.is_a?(Hash)
- quoted_column_names = case length
+ case length
when Hash
column_names.map {|name| length[name] ? "#{quote_column_name(name)}(#{length[name]})" : quote_column_name(name) }
when Fixnum
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb
index 792ffe1c5d..1654ae1eac 100644
--- a/activerecord/lib/active_record/relation/query_methods.rb
+++ b/activerecord/lib/active_record/relation/query_methods.rb
@@ -37,15 +37,12 @@ module ActiveRecord
relation
end
- def select(*args, &blk)
- if !block_given? && args.blank?
- raise ArgumentError
- end
+ def select(value = Proc.new)
if block_given?
- to_a.select {|*block_args| blk.call(*block_args) }
+ to_a.select {|*block_args| value.call(*block_args) }
else
relation = clone
- relation.select_values += args
+ relation.select_values += Array.wrap(value)
relation
end
end
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb
index 84b66fdf49..12101c1683 100644
--- a/activerecord/test/cases/base_test.rb
+++ b/activerecord/test/cases/base_test.rb
@@ -123,11 +123,6 @@ class BasicsTest < ActiveRecord::TestCase
assert_equal Topic.all.map(&:id).sort, topic_ids
end
- def test_select_symbol_for_many_arguments
- topics = Topic.select(:id, :author_name).map{|topic| [topic.id, topic.author_name]}.sort
- assert_equal Topic.all.map{|topic| [topic.id,topic.author_name]}.sort, topics
- end
-
def test_table_exists
assert !NonExistentTable.table_exists?
assert Topic.table_exists?
@@ -1872,6 +1867,6 @@ class BasicsTest < ActiveRecord::TestCase
def test_cache_key_format_for_existing_record_with_nil_updated_at
dev = Developer.first
dev.update_attribute(:updated_at, nil)
- assert_match /\/#{dev.id}$/, dev.cache_key
+ assert_match(/\/#{dev.id}$/, dev.cache_key)
end
end
diff --git a/activesupport/test/safe_buffer_test.rb b/activesupport/test/safe_buffer_test.rb
index 46bc0d7a34..7662e9b765 100644
--- a/activesupport/test/safe_buffer_test.rb
+++ b/activesupport/test/safe_buffer_test.rb
@@ -80,14 +80,12 @@ class SafeBufferTest < ActiveSupport::TestCase
end
test "Should escape dirty buffers on add" do
- dirty = @buffer
clean = "hello".html_safe
@buffer.gsub!('', '<>')
assert_equal "hello&lt;&gt;", clean + @buffer
end
test "Should concat as a normal string when dirty" do
- dirty = @buffer
clean = "hello".html_safe
@buffer.gsub!('', '<>')
assert_equal "<>hello", @buffer + clean
diff --git a/activesupport/test/xml_mini_test.rb b/activesupport/test/xml_mini_test.rb
index e2b90ae16e..dde17ea403 100644
--- a/activesupport/test/xml_mini_test.rb
+++ b/activesupport/test/xml_mini_test.rb
@@ -50,49 +50,49 @@ module XmlMiniTest
def test_rename_key_does_not_dasherize_multiple_trailing_underscores
assert_equal "id__", ActiveSupport::XmlMini.rename_key("id__")
- end
+ end
end
class ToTagTest < ActiveSupport::TestCase
def assert_xml(xml)
assert_equal xml, @options[:builder].target!
end
-
- setup do
+
+ def setup
@xml = ActiveSupport::XmlMini
@options = {:skip_instruct => true, :builder => Builder::XmlMarkup.new}
end
-
+
test "#to_tag accepts a callable object and passes options with the builder" do
@xml.to_tag(:some_tag, lambda {|o| o[:builder].br }, @options)
assert_xml "<br/>"
end
-
+
test "#to_tag accepts a callable object and passes options and tag name" do
@xml.to_tag(:tag, lambda {|o, t| o[:builder].b(t) }, @options)
assert_xml "<b>tag</b>"
end
-
+
test "#to_tag accepts an object responding to #to_xml and passes the options, where :root is key" do
obj = Object.new
obj.instance_eval do
def to_xml(options) options[:builder].yo(options[:root].to_s) end
end
-
+
@xml.to_tag(:tag, obj, @options)
assert_xml "<yo>tag</yo>"
end
-
+
test "#to_tag accepts arbitrary objects responding to #to_str" do
@xml.to_tag(:b, "Howdy", @options)
assert_xml "<b>Howdy</b>"
end
-
+
test "#to_tag should dasherize the space when passed a string with spaces as a key" do
@xml.to_tag("New York", 33, @options)
assert_xml "<New---York type=\"integer\">33</New---York>"
end
-
+
test "#to_tag should dasherize the space when passed a symbol with spaces as a key" do
@xml.to_tag(:"New York", 33, @options)
assert_xml "<New---York type=\"integer\">33</New---York>"
diff --git a/ci/ci_build.rb b/ci/ci_build.rb
deleted file mode 100755
index 50f7f410fa..0000000000
--- a/ci/ci_build.rb
+++ /dev/null
@@ -1,181 +0,0 @@
-#!/usr/bin/env ruby
-require 'fileutils'
-include FileUtils
-
-def root_dir
- @root_dir ||= File.expand_path('../..', __FILE__)
-end
-
-def rake(*tasks)
- tasks.each do |task|
- cmd = "bundle exec rake #{task}"
- puts "Running command: #{cmd}"
- return false unless system(cmd)
- end
- true
-end
-
-puts "[CruiseControl] Rails build"
-build_results = {}
-
-# Install required version of bundler.
-bundler_install_cmd = "sudo gem install bundler --no-ri --no-rdoc"
-puts "Running command: #{bundler_install_cmd}"
-build_results[:install_bundler] = system bundler_install_cmd
-
-cd root_dir do
- puts
- puts "[CruiseControl] Bundling gems"
- puts
- build_results[:bundle] = system 'bundle update'
-end
-
-cd "#{root_dir}/activesupport" do
- puts
- puts "[CruiseControl] Building Active Support"
- puts
- build_results[:activesupport] = rake 'test'
- build_results[:activesupport_isolated] = rake 'test:isolated'
-end
-
-system "sudo rm -R #{root_dir}/railties/tmp"
-cd "#{root_dir}/railties" do
- puts
- puts "[CruiseControl] Building Railties"
- puts
- build_results[:railties] = rake 'test'
-end
-
-cd "#{root_dir}/actionpack" do
- puts
- puts "[CruiseControl] Building Action Pack"
- puts
- build_results[:actionpack] = rake 'test'
- build_results[:actionpack_isolated] = rake 'test:isolated'
-end
-
-cd "#{root_dir}/actionmailer" do
- puts
- puts "[CruiseControl] Building Action Mailer"
- puts
- build_results[:actionmailer] = rake 'test'
- build_results[:actionmailer_isolated] = rake 'test:isolated'
-end
-
-cd "#{root_dir}/activemodel" do
- puts
- puts "[CruiseControl] Building Active Model"
- puts
- build_results[:activemodel] = rake 'test'
- build_results[:activemodel_isolated] = rake 'test:isolated'
-end
-
-rm_f "#{root_dir}/activeresource/debug.log"
-cd "#{root_dir}/activeresource" do
- puts
- puts "[CruiseControl] Building Active Resource"
- puts
- build_results[:activeresource] = rake 'test'
- build_results[:activeresource_isolated] = rake 'test:isolated'
-end
-
-rm_f "#{root_dir}/activerecord/debug.log"
-cd "#{root_dir}/activerecord" do
- puts
- puts "[CruiseControl] Building Active Record with MySQL IM enabled"
- puts
- ENV['IM'] = 'true'
- build_results[:activerecord_mysql_IM] = rake 'mysql:rebuild_databases', 'mysql:test'
- build_results[:activerecord_mysql_isolated_IM] = rake 'mysql:rebuild_databases', 'mysql:isolated_test'
-end
-
-cd "#{root_dir}/activerecord" do
- puts
- puts "[CruiseControl] Building Active Record with MySQL IM disabled"
- puts
- ENV['IM'] = 'false'
- build_results[:activerecord_mysql] = rake 'mysql:rebuild_databases', 'mysql:test'
- build_results[:activerecord_mysql_isolated] = rake 'mysql:rebuild_databases', 'mysql:isolated_test'
-end
-
-cd "#{root_dir}/activerecord" do
- puts
- puts "[CruiseControl] Building Active Record with MySQL2 IM enabled"
- puts
- ENV['IM'] = 'true'
- build_results[:activerecord_mysql2_IM] = rake 'mysql:rebuild_databases', 'mysql2:test'
- build_results[:activerecord_mysql2_isolated_IM] = rake 'mysql:rebuild_databases', 'mysql2:isolated_test'
-end
-
-cd "#{root_dir}/activerecord" do
- puts
- puts "[CruiseControl] Building Active Record with MySQL2 IM disabled"
- puts
- ENV['IM'] = 'false'
- build_results[:activerecord_mysql2] = rake 'mysql:rebuild_databases', 'mysql2:test'
- build_results[:activerecord_mysql2_isolated] = rake 'mysql:rebuild_databases', 'mysql2:isolated_test'
-end
-
-cd "#{root_dir}/activerecord" do
- puts
- puts "[CruiseControl] Building Active Record with PostgreSQL IM enabled"
- puts
- ENV['IM'] = 'true'
- build_results[:activerecord_postgresql8_IM] = rake 'postgresql:rebuild_databases', 'postgresql:test'
- build_results[:activerecord_postgresql8_isolated_IM] = rake 'postgresql:rebuild_databases', 'postgresql:isolated_test'
-end
-
-cd "#{root_dir}/activerecord" do
- puts
- puts "[CruiseControl] Building Active Record with PostgreSQL IM disabled"
- puts
- ENV['IM'] = 'false'
- build_results[:activerecord_postgresql8] = rake 'postgresql:rebuild_databases', 'postgresql:test'
- build_results[:activerecord_postgresql8_isolated] = rake 'postgresql:rebuild_databases', 'postgresql:isolated_test'
-end
-
-cd "#{root_dir}/activerecord" do
- puts
- puts "[CruiseControl] Building Active Record with SQLite 3 IM enabled"
- puts
- ENV['IM'] = 'true'
- build_results[:activerecord_sqlite3_IM] = rake 'sqlite3:test'
- build_results[:activerecord_sqlite3_isolated_IM] = rake 'sqlite3:isolated_test'
-end
-
-cd "#{root_dir}/activerecord" do
- puts
- puts "[CruiseControl] Building Active Record with SQLite 3 IM disabled"
- puts
- ENV['IM'] = 'false'
- build_results[:activerecord_sqlite3] = rake 'sqlite3:test'
- build_results[:activerecord_sqlite3_isolated] = rake 'sqlite3:isolated_test'
-end
-
-
-puts
-puts "[CruiseControl] Build environment:"
-puts "[CruiseControl] #{`cat /etc/issue`}"
-puts "[CruiseControl] #{`uname -a`}"
-puts "[CruiseControl] #{`ruby -v`}"
-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:"
-`bundle show`.each_line {|line| print "[CruiseControl] #{line}"}
-puts "[CruiseControl] Local gems:"
-`gem list`.each_line {|line| print "[CruiseControl] #{line}"}
-
-failures = build_results.select { |key, value| value == false }
-
-if failures.empty?
- puts
- puts "[CruiseControl] Rails build finished sucessfully"
- exit(0)
-else
- puts
- puts "[CruiseControl] Rails build FAILED"
- puts "[CruiseControl] Failed components: #{failures.map { |component| component.first }.join(', ')}"
- exit(-1)
-end
diff --git a/ci/ci_setup_notes.txt b/ci/ci_setup_notes.txt
deleted file mode 100644
index 890f9e8ef6..0000000000
--- a/ci/ci_setup_notes.txt
+++ /dev/null
@@ -1,140 +0,0 @@
-# Rails Continuous Integration Server Setup Notes
-# This procedure was used to set up http://ci.rubyonrails.org on Ubuntu 8.04
-# It can be used as a guideline for setting up your own CI server against your local rails branches
-
-* Set up ci user:
-# log in as root
-$ adduser ci
-enter user info and password
-$ visudo
-# give ci user same sudo rights as root
-
-* Disable root login:
-# log in as ci
-$ sudo vi /etc/shadow
-# overwrite and disable encrypted root password to disable root login:
-root:*:14001:0:99999:7:::
-
-* Change Hostname:
-$ sudo vi /etc/hostname
-change to correct hostname
-$ sudo vi /etc/hosts
-replace old hostname with the correct hostname
-# reboot to use new hostname (and test reboot)
-$ sudo shutdown -r now
-
-* Update aptitude:
-$ sudo aptitude update
-
-* Use cinabox to perform rest of ruby/ccrb setup:
-* https://github.com/thewoolleyman/cinabox/tree/master/README.txt
-
-# This is not yet properly supported by RubyGems...
-# * Configure RubyGems to not require root access for gem installation
-# $ vi ~/.profile
-# # add this line at bottom:
-# PATH="$HOME/.gem/ruby/1.8/bin:$PATH"
-# $ sudo vi /etc/init.d/cruise
-# # edit the start_cruise line to source CRUISE_USER/.profile:
-# start_cruise "cd #{CRUISE_HOME} && source /home/#{CRUISE_USER}/.profile && ./cruise start -d"
-# $ vi ~/.gemrc
-# # add these lines:
-# ---
-# gemhome: /home/ci/.gem/ruby/1.8
-# gempath:
-# - /home/ci/.gem/ruby/1.8
-
-* If you did not configure no-root-gem installation via ~/.gemrc as shown above, then allow no-password sudo for gem installation:
-$ sudo visudo
-# add this line to bottom:
-ci ALL=(ALL) NOPASSWD: ALL
-
-* Start ccrb via init script and check for default homepage at port 3333
-
-* Install/setup nginx:
-$ sudo aptitude install nginx
-$ sudo vi /etc/nginx/sites-available/default
-# Add the following entry at the top of the file above the 'server {' line:
-upstream mongrel {
- server 127.0.0.1:3333;
-}
-
-# Change server_name entry to match server name
-
-# replace the contents of the root 'location / {}' block with the following entries:
- proxy_pass http://mongrel;
- proxy_redirect off;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Client-Verify SUCCESS;
- proxy_read_timeout 65;
-
-# also comment default locations for /doc and /images
-$ sudo /etc/init.d/nginx start
-
-* Add project to cruise (It will still fail until everything is set up):
-$ cd ~/ccrb
-$ ./cruise add rails -s git -r git://github.com/rails/rails.git # or the URI of your branch
-
-* Copy and configure cruise site config file:
-$ cp ~/.cruise/projects/rails/work/ci/site_config.rb ~/.cruise/site_config.rb
-# Edit ~/.cruise/site_config.rb as desired, for example:
-ActionMailer::Base.smtp_settings = {
- :address => "localhost",
- :domain => "ci.yourdomain.com",
-}
-Configuration.dashboard_refresh_interval = 60.seconds
-Configuration.dashboard_url = 'http://ci.yourdomain.com/'
-Configuration.serialize_builds = true
-Configuration.serialized_build_timeout = 1.hours
-BuildReaper.number_of_builds_to_keep = 100
-
-* Copy and configure cruise project config file
-$ cp ~/.cruise/projects/rails/work/ci/cruise_config.rb ~/.cruise/projects/rails
-$ vi ~/.cruise/projects/rails/cruise_config.rb:
-# Edit ~/.cruise/projects/rails/cruise_config.rb as desired, for example:
-Project.configure do |project|
- project.build_command = 'ruby ci/ci_build.rb'
- project.email_notifier.emails = ['recipient@yourdomain.com']
- project.email_notifier.from = 'sender@yourdomain.com'
-end
-
-* Set up mysql
-$ sudo aptitude install mysql-server-5.0 libmysqlclient-dev
-# no password for mysql root user
-
-* setup sqlite 3
-$ sudo aptitude install sqlite3 libsqlite3-dev
-# Note: there's some installation bugs with sqlite3-ruby 1.2.2 gem file permissions:
-# http://www.icoretech.org/2008/07/06/no-such-file-to-load-sqlite3-database
-# cd /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2 && sudo find . -perm 0662 -exec chmod 664 {} \;
-
-* setup postgres
-$ sudo aptitude install postgresql postgresql-server-dev-8.3
-$ sudo su - postgres -c 'createuser -s ci'
-
-* Install fcgi libraries
-$ sudo apt-get install libfcgi-dev
-
-* Install memcached and start for first time (should start on reboot automatically)
-$ sudo aptitude install memcached
-$ sudo /etc/init.d/memcached start
-
-* Install and run GemInstaller to get all dependency gems
-$ sudo gem install geminstaller
-$ cd ~/.cruise/projects/rails/work
-$ sudo geminstaller --config=ci/geminstaller.yml # turn up debugging with these options: --geminstaller-output=all --rubygems-output=all
-
-* Create ActiveRecord test databases for mysql
-$ mysql -uroot -e 'grant all on *.* to rails@localhost;'
-$ mysql -urails -e 'create database activerecord_unittest;'
-$ mysql -urails -e 'create database activerecord_unittest2;'
-
-* Create ActiveRecord test databases for postgres
-# cd to rails activerecord dir
-$ rake postgresql:build_databases
-
-* Reboot and make sure everything is working
-$ sudo shutdown -r now
-$ http://ci.yourdomain.com
diff --git a/ci/cruise_config.rb b/ci/cruise_config.rb
deleted file mode 100644
index b64cd8aaea..0000000000
--- a/ci/cruise_config.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-Project.configure do |project|
- project.build_command = 'sudo gem update --system && ruby ci/ci_build.rb'
- project.email_notifier.from = 'rails-ci@wyeworks.com'
-
- # project.campfire_notifier.account = 'rails'
- # project.campfire_notifier.token = ''
- # project.campfire_notifier.room = 'Rails 3'
- # project.campfire_notifier.ssl = true
-end
diff --git a/ci/site.css b/ci/site.css
deleted file mode 100644
index e771c5d1fd..0000000000
--- a/ci/site.css
+++ /dev/null
@@ -1,13 +0,0 @@
-/* this is a copy of /home/ci/.cruise/site.css, please make any changes to it there */
-
-/* this is a copy of /home/ci/.cruise/site.css, please make any changes to it there */
-
-/* if you'd like to add custom styles to cruise, add them here */
-/* the following will make successful builds green */
-a.success, a.success:visited {
- color: #0A0;
-}
-
-.build_success {
- background-image: url(/images/green_gradient.png);
-}
diff --git a/ci/site_config.rb b/ci/site_config.rb
deleted file mode 100644
index f9db39ed57..0000000000
--- a/ci/site_config.rb
+++ /dev/null
@@ -1,72 +0,0 @@
-# site_config.rb contains examples of various configuration options for the local installation
-# of CruiseControl.rb.
-
-# YOU MUST RESTART YOUR CRUISE CONTROL SERVER FOR ANY CHANGES MADE HERE TO TAKE EFFECT!!!
-
-# EMAIL NOTIFICATION
-# ------------------
-
-# CruiseControl.rb can notify you about build status via email. It uses the Action Mailer component of Ruby on Rails
-# framework. Obviously, Action Mailer needs to know how to send out email messages.
-# If you have an SMTP server on your network, and it needs no authentication, write this in your site_config.rb:
-#
-ActionMailer::Base.smtp_settings = {
- :address => "localhost",
- :domain => "ci.rubyonrails.org",
-}
-#
-# If you have no SMTP server at hand, you can configure email notification to use GMail SMTP server, as follows
-# (of course, you'll need to create a GMail account):
-#
-# ActionMailer::Base.smtp_settings = {
-# :address => "smtp.gmail.com",
-# :port => 587,
-# :domain => "yourdomain.com",
-# :authentication => :plain,
-# :user_name => "yourgmailaccount",
-# :password => "yourgmailpassword"
-# }
-#
-# The same approach works for other SMTP servers thet require authentication. Note that GMail's SMTP server runs on a
-# non-standard port 587 (standard port for SMTP is 25).
-#
-# For further details about configuration of outgoing email, see Ruby On Rails documentation for ActionMailer::Base.
-
-# Other site-wide options are available through Configuration class:
-
-# Change how often CC.rb pings Subversion for new requests. Default is 10.seconds, which should be OK for a local
-# SVN repository, but probably isn't very polite for a public repository, such as RubyForge. This can also be set for
-# each project individually, through project.scheduler.polling_interval option:
-# Configuration.default_polling_interval = 1.minute
-
-# How often the dashboard page refreshes itself. If you have more than 10-20 dashboards open,
-# it is advisable to set it to something higher than the default 5 seconds:
-Configuration.dashboard_refresh_interval = 60.seconds
-
-# Site-wide setting for the email "from" field. This can also be set on per-project basis,
-# through project.email.notifier.from attribute
-Configuration.email_from = 'rails-ci@wyeworks.com'
-
-# Root URL of the dashboard application. Setting this attribute allows various notifiers to include a link to the
-# build page in the notification message.
-Configuration.dashboard_url = 'http://rails-ci.wyeworks.com/'
-
-# If you don't want to allow triggering builds through dashboard Build Now button. Useful when you host CC.rb as a
-# public web site (such as http://cruisecontrolrb.thoughtworks.com/projects - try clicking on Build Now button there
-# and see what happens):
-Configuration.disable_build_now = true
-
-# If you want to only allow one project to build at a time, uncomment this line
-# by default, cruise allows multiple projects to build at a time
-Configuration.serialize_builds = true
-
-# Amount of time a project will wait to build before failing when build serialization is on
-Configuration.serialized_build_timeout = 3.hours
-
-# To delete build when there are more than a certain number present, uncomment this line - it will make the dashboard
-# perform better
-BuildReaper.number_of_builds_to_keep = 100
-
-# any files that you'd like to override in cruise, keep in ~/.cruise, and copy over when this file is loaded like this
-site_css = CRUISE_DATA_ROOT + "/site.css"
-FileUtils.cp site_css, Rails.root + "/public/stylesheets/site.css" if File.exists? site_css