remove Rails-oriented integration testspu
authorEric Wong <normalperson@yhbt.net>
Thu, 26 Jul 2012 23:44:04 +0000 (26 23:44 +0000)
committerEric Wong <normalperson@yhbt.net>
Sat, 28 Jul 2012 02:17:20 +0000 (28 02:17 +0000)
It's too much overhead to keep Rails-specific tests working,
especially when it's hauling in an ancient version of SQLite3.
Since Rails 3 has settled down with Rack and unicorn_rails is
unlikely to need changing in the future, we can drop these
tests.

100 files changed:
GNUmakefile
script/isolate_for_tests
t/rails3-app/.gitignore [deleted file]
t/rails3-app/Gemfile [deleted file]
t/rails3-app/Rakefile [deleted file]
t/rails3-app/app/controllers/application_controller.rb [deleted file]
t/rails3-app/app/helpers/application_helper.rb [deleted file]
t/rails3-app/app/views/layouts/application.html.erb [deleted file]
t/rails3-app/config.ru [deleted file]
t/rails3-app/config/application.rb [deleted file]
t/rails3-app/config/boot.rb [deleted file]
t/rails3-app/config/database.yml [deleted file]
t/rails3-app/config/environment.rb [deleted file]
t/rails3-app/config/environments/development.rb [deleted file]
t/rails3-app/config/environments/production.rb [deleted file]
t/rails3-app/config/environments/test.rb [deleted file]
t/rails3-app/config/initializers/backtrace_silencers.rb [deleted file]
t/rails3-app/config/initializers/inflections.rb [deleted file]
t/rails3-app/config/initializers/mime_types.rb [deleted file]
t/rails3-app/config/initializers/secret_token.rb [deleted file]
t/rails3-app/config/initializers/session_store.rb [deleted file]
t/rails3-app/config/locales/en.yml [deleted file]
t/rails3-app/config/routes.rb [deleted file]
t/rails3-app/db/seeds.rb [deleted file]
t/rails3-app/doc/README_FOR_APP [deleted file]
t/rails3-app/lib/tasks/.gitkeep [deleted file]
t/rails3-app/public/404.html [deleted file]
t/rails3-app/public/500.html [deleted file]
t/rails3-app/public/x.txt [deleted file]
t/rails3-app/script/rails [deleted file]
t/rails3-app/test/performance/browsing_test.rb [deleted file]
t/rails3-app/test/test_helper.rb [deleted file]
t/rails3-app/vendor/plugins/.gitkeep [deleted file]
t/t0300-rails3-basic.sh [deleted file]
t/t0301-rails3-missing-config-ru.sh [deleted file]
t/t0302-rails3-alt-working_directory.sh [deleted file]
t/t0303-rails3-alt-working_directory_config.ru.sh [deleted file]
t/t0304-rails3-alt-working_directory_no_embed_cli.sh [deleted file]
t/test-rails3.sh [deleted file]
test/rails/app-1.2.3/.gitignore [deleted file]
test/rails/app-1.2.3/Rakefile [deleted file]
test/rails/app-1.2.3/app/controllers/application.rb [deleted file]
test/rails/app-1.2.3/app/controllers/foo_controller.rb [deleted file]
test/rails/app-1.2.3/app/helpers/application_helper.rb [deleted file]
test/rails/app-1.2.3/config/boot.rb [deleted file]
test/rails/app-1.2.3/config/database.yml [deleted file]
test/rails/app-1.2.3/config/environment.rb [deleted file]
test/rails/app-1.2.3/config/environments/development.rb [deleted file]
test/rails/app-1.2.3/config/environments/production.rb [deleted file]
test/rails/app-1.2.3/config/routes.rb [deleted file]
test/rails/app-1.2.3/db/.gitignore [deleted file]
test/rails/app-1.2.3/log/.gitignore [deleted file]
test/rails/app-1.2.3/public/404.html [deleted file]
test/rails/app-1.2.3/public/500.html [deleted file]
test/rails/app-2.0.2/.gitignore [deleted file]
test/rails/app-2.0.2/Rakefile [deleted file]
test/rails/app-2.0.2/app/controllers/application.rb [deleted file]
test/rails/app-2.0.2/app/controllers/foo_controller.rb [deleted file]
test/rails/app-2.0.2/app/helpers/application_helper.rb [deleted file]
test/rails/app-2.0.2/config/boot.rb [deleted file]
test/rails/app-2.0.2/config/database.yml [deleted file]
test/rails/app-2.0.2/config/environment.rb [deleted file]
test/rails/app-2.0.2/config/environments/development.rb [deleted file]
test/rails/app-2.0.2/config/environments/production.rb [deleted file]
test/rails/app-2.0.2/config/routes.rb [deleted file]
test/rails/app-2.0.2/db/.gitignore [deleted file]
test/rails/app-2.0.2/log/.gitignore [deleted file]
test/rails/app-2.0.2/public/404.html [deleted file]
test/rails/app-2.0.2/public/500.html [deleted file]
test/rails/app-2.1.2/.gitignore [deleted file]
test/rails/app-2.1.2/Rakefile [deleted file]
test/rails/app-2.1.2/app/controllers/application.rb [deleted file]
test/rails/app-2.1.2/app/controllers/foo_controller.rb [deleted file]
test/rails/app-2.1.2/app/helpers/application_helper.rb [deleted file]
test/rails/app-2.1.2/config/boot.rb [deleted file]
test/rails/app-2.1.2/config/database.yml [deleted file]
test/rails/app-2.1.2/config/environment.rb [deleted file]
test/rails/app-2.1.2/config/environments/development.rb [deleted file]
test/rails/app-2.1.2/config/environments/production.rb [deleted file]
test/rails/app-2.1.2/config/routes.rb [deleted file]
test/rails/app-2.1.2/db/.gitignore [deleted file]
test/rails/app-2.1.2/log/.gitignore [deleted file]
test/rails/app-2.1.2/public/404.html [deleted file]
test/rails/app-2.1.2/public/500.html [deleted file]
test/rails/app-2.2.2/.gitignore [deleted file]
test/rails/app-2.2.2/Rakefile [deleted file]
test/rails/app-2.2.2/app/controllers/application.rb [deleted file]
test/rails/app-2.2.2/app/controllers/foo_controller.rb [deleted file]
test/rails/app-2.2.2/app/helpers/application_helper.rb [deleted file]
test/rails/app-2.2.2/config/boot.rb [deleted file]
test/rails/app-2.2.2/config/database.yml [deleted file]
test/rails/app-2.2.2/config/environment.rb [deleted file]
test/rails/app-2.2.2/config/environments/development.rb [deleted file]
test/rails/app-2.2.2/config/environments/production.rb [deleted file]
test/rails/app-2.2.2/config/routes.rb [deleted file]
test/rails/app-2.2.2/db/.gitignore [deleted file]
test/rails/app-2.2.2/log/.gitignore [deleted file]
test/rails/app-2.2.2/public/404.html [deleted file]
test/rails/app-2.2.2/public/500.html [deleted file]
test/rails/test_rails.rb [deleted file]

index 61fb739..ea13486 100644 (file)
@@ -32,16 +32,13 @@ MYLIBS = $(RUBYLIB):$(ISOLATE_LIBS)
 # dunno how to implement this as concisely in Ruby, and hell, I love awk
 awk_slow := awk '/def test_/{print FILENAME"--"$$2".n"}' 2>/dev/null
 
-rails_vers := $(subst test/rails/app-,,$(wildcard test/rails/app-*))
 slow_tests := test/unit/test_server.rb test/exec/test_exec.rb \
   test/unit/test_signals.rb test/unit/test_upload.rb
 log_suffix = .$(RUBY_ENGINE).$(RUBY_VERSION).log
-T_r := $(wildcard test/rails/test*.rb)
-T := $(filter-out $(slow_tests) $(T_r), $(wildcard test/*/test*.rb))
+T := $(filter-out $(slow_tests), $(wildcard test/*/test*.rb))
 T_n := $(shell $(awk_slow) $(slow_tests))
 T_log := $(subst .rb,$(log_suffix),$(T))
 T_n_log := $(subst .n,$(log_suffix),$(T_n))
-T_r_log := $(subst .r,$(log_suffix),$(T_r))
 test_prefix = $(CURDIR)/test/$(RUBY_ENGINE)-$(RUBY_VERSION)
 
 ext := ext/unicorn_http
@@ -93,7 +90,7 @@ $(slow_tests): $(test_prefix)/.stamp
 test-integration: $(test_prefix)/.stamp
        $(MAKE) -C t
 
-test-all: test test-rails test-integration
+test-all: test test-integration
 
 TEST_OPTS = -v
 check_test = grep '0 failures, 0 errors' $(t) >/dev/null
@@ -199,30 +196,6 @@ doc_gz:
        for i in $(docs); do \
          gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done
 
-rails_git_url = git://github.com/rails/rails.git
-rails_git := vendor/rails.git
-$(rails_git)/info/cloned-stamp:
-       git clone --mirror -q $(rails_git_url) $(rails_git)
-       > $@
-
-$(rails_git)/info/v2.2.3-stamp: $(rails_git)/info/cloned-stamp
-       cd $(rails_git) && git fetch
-       cd $(rails_git) && git rev-parse --verify refs/tags/v2.2.3
-       > $@
-
-rails_tests := $(addsuffix .r,$(addprefix $(T_r).,$(rails_vers)))
-test-rails: $(rails_tests)
-$(T_r).%.r: t = $(addsuffix $(log_suffix),$@)
-$(T_r).%.r: rv = $(subst .r,,$(subst $(T_r).,,$@))
-$(T_r).%.r: extra = ' 'v$(rv)
-$(T_r).%.r: arg = $(T_r)
-$(T_r).%.r: export PATH := $(test_prefix)/bin:$(PATH)
-$(T_r).%.r: export RUBYLIB := $(test_prefix):$(test_prefix)/lib:$(MYLIBS)
-$(T_r).%.r: export UNICORN_RAILS_TEST_VERSION = $(rv)
-$(T_r).%.r: export RAILS_GIT_REPO = $(CURDIR)/$(rails_git)
-$(T_r).%.r: $(test_prefix)/.stamp $(rails_git)/info/v2.2.3-stamp
-       $(run_test)
-
 ifneq ($(VERSION),)
 rfproject := mongrel
 rfpackage := unicorn
index 5e6139c..00a3f2b 100755 (executable)
@@ -16,9 +16,6 @@ opts = {
 
 pid = fork do
   Isolate.now!(opts) do
-    if RUBY_VERSION.to_f < 2.0
-      gem 'sqlite3-ruby', '1.2.5'
-    end
     gem 'raindrops', '0.8.0'
     gem 'kgio-monkey', '0.4.0'
     gem 'kgio', '2.7.4'
@@ -33,18 +30,3 @@ File.open("#{dst}.#$$", "w") do |fp|
   fp.puts "ISOLATE_LIBS=#{lib_paths.join(':')}"
 end
 File.rename("#{dst}.#$$", dst)
-
-# pure Ruby gems can be shared across all Rubies
-%w(3.0.0).each do |rails_ver|
-  opts[:path] = "tmp/isolate/rails-#{rails_ver}"
-  pid = fork do
-    Isolate.now!(opts) do
-      gem 'rake', '0.8.7'
-      gem 'rails', rails_ver
-    end
-  end
-  _, status = Process.waitpid2(pid)
-  status.success? or abort status.inspect
-  more = Dir["#{opts[:path]}/gems/*-*/lib"].map { |x| File.expand_path(x) }
-  lib_paths.concat(more)
-end
diff --git a/t/rails3-app/.gitignore b/t/rails3-app/.gitignore
deleted file mode 100644 (file)
index af64fae..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-.bundle
-db/*.sqlite3
-log/*.log
-tmp/**/*
diff --git a/t/rails3-app/Gemfile b/t/rails3-app/Gemfile
deleted file mode 100644 (file)
index d996f34..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-source 'http://rubygems.org'
-
-# gem 'rails', '3.0.0'
-
-# Bundle edge Rails instead:
-# gem 'rails', :git => 'git://github.com/rails/rails.git'
-
-# gem 'sqlite3-ruby', :require => 'sqlite3'
-
-# Use unicorn as the web server
-# gem 'unicorn'
-
-# Deploy with Capistrano
-# gem 'capistrano'
-
-# Bundle the extra gems:
-# gem 'bj'
-# gem 'nokogiri', '1.4.1'
-# gem 'sqlite3-ruby', :require => 'sqlite3'
-# gem 'aws-s3', :require => 'aws/s3'
-
-# Bundle gems for certain environments:
-# gem 'rspec', :group => :test
-# group :test do
-#   gem 'webrat'
-# end
diff --git a/t/rails3-app/Rakefile b/t/rails3-app/Rakefile
deleted file mode 100644 (file)
index 9cb2046..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-# Add your own tasks in files placed in lib/tasks ending in .rake,
-# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
-
-require File.expand_path('../config/application', __FILE__)
-
-require 'rake'
-require 'rake/testtask'
-require 'rake/rdoctask'
-
-Rails::Application.load_tasks
diff --git a/t/rails3-app/app/controllers/application_controller.rb b/t/rails3-app/app/controllers/application_controller.rb
deleted file mode 100644 (file)
index f2569b3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-class ApplicationController < ActionController::Base
-  protect_from_forgery
-  layout 'application'
-end
diff --git a/t/rails3-app/app/helpers/application_helper.rb b/t/rails3-app/app/helpers/application_helper.rb
deleted file mode 100644 (file)
index de6be79..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-module ApplicationHelper
-end
diff --git a/t/rails3-app/app/views/layouts/application.html.erb b/t/rails3-app/app/views/layouts/application.html.erb
deleted file mode 100644 (file)
index 89179cb..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <title>App</title>
-  <%= stylesheet_link_tag :all %>
-  <%= javascript_include_tag :defaults %>
-  <%= csrf_meta_tag %>
-</head>
-<body>
-
-<%= yield %>
-
-</body>
-</html>
diff --git a/t/rails3-app/config.ru b/t/rails3-app/config.ru
deleted file mode 100644 (file)
index 48c8ee3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# This file is used by Rack-based servers to start the application.
-
-require ::File.expand_path('../config/environment',  __FILE__)
-run App::Application
diff --git a/t/rails3-app/config/application.rb b/t/rails3-app/config/application.rb
deleted file mode 100644 (file)
index f970176..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-require File.expand_path('../boot', __FILE__)
-
-require 'rails/all'
-
-# If you have a Gemfile, require the gems listed there, including any gems
-# you've limited to :test, :development, or :production.
-Bundler.require(:default, Rails.env) if defined?(Bundler)
-
-module App
-  class Application < Rails::Application
-    # Settings in config/environments/* take precedence over those specified here.
-    # Application configuration should go into files in config/initializers
-    # -- all .rb files in that directory are automatically loaded.
-
-    # Add additional load paths for your own custom dirs
-    # config.load_paths += %W( #{config.root}/extras )
-
-    # Only load the plugins named here, in the order given (default is alphabetical).
-    # :all can be used as a placeholder for all plugins not explicitly named
-    # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
-
-    # Activate observers that should always be running
-    # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
-
-    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
-    # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
-    # config.time_zone = 'Central Time (US & Canada)'
-
-    # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
-    # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
-    # config.i18n.default_locale = :de
-
-    # Configure generators values. Many other options are available, be sure to check the documentation.
-    # config.generators do |g|
-    #   g.orm             :active_record
-    #   g.template_engine :erb
-    #   g.test_framework  :test_unit, :fixture => true
-    # end
-
-    # Configure the default encoding used in templates for Ruby 1.9.
-    config.encoding = "utf-8"
-
-    # Configure sensitive parameters which will be filtered from the log file.
-    config.filter_parameters += [:password]
-  end
-end
diff --git a/t/rails3-app/config/boot.rb b/t/rails3-app/config/boot.rb
deleted file mode 100644 (file)
index 712b098..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-require 'rubygems'
-# Set up gems listed in the Gemfile.
-if File.exist?(File.expand_path('../../Gemfile', __FILE__))
-  require 'bundler'
-  Bundler.setup
-end
diff --git a/t/rails3-app/config/database.yml b/t/rails3-app/config/database.yml
deleted file mode 100644 (file)
index 025d62a..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-# SQLite version 3.x
-#   gem install sqlite3-ruby (not necessary on OS X Leopard)
-development:
-  adapter: sqlite3
-  database: db/development.sqlite3
-  pool: 5
-  timeout: 5000
-
-# Warning: The database defined as "test" will be erased and
-# re-generated from your development database when you run "rake".
-# Do not set this db to the same as development or production.
-test:
-  adapter: sqlite3
-  database: db/test.sqlite3
-  pool: 5
-  timeout: 5000
-
-production:
-  adapter: sqlite3
-  database: db/production.sqlite3
-  pool: 5
-  timeout: 5000
diff --git a/t/rails3-app/config/environment.rb b/t/rails3-app/config/environment.rb
deleted file mode 100644 (file)
index df5d4fb..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# Load the rails application
-require File.expand_path('../application', __FILE__)
-
-# Initialize the rails application
-App::Application.initialize!
diff --git a/t/rails3-app/config/environments/development.rb b/t/rails3-app/config/environments/development.rb
deleted file mode 100644 (file)
index c00c9a5..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-App::Application.configure do
-  # Settings specified here will take precedence over those in config/environment.rb
-
-  # In the development environment your application's code is reloaded on
-  # every request.  This slows down response time but is perfect for development
-  # since you don't have to restart the webserver when you make code changes.
-  config.cache_classes = false
-
-  # Log error messages when you accidentally call methods on nil.
-  config.whiny_nils = true
-
-  # Show full error reports and disable caching
-  config.consider_all_requests_local       = true
-  config.action_view.debug_rjs             = true
-  config.action_controller.perform_caching = false
-
-  # Don't care if the mailer can't send
-  config.action_mailer.raise_delivery_errors = false
-end
diff --git a/t/rails3-app/config/environments/production.rb b/t/rails3-app/config/environments/production.rb
deleted file mode 100644 (file)
index 8ee2d35..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-App::Application.configure do
-  # Settings specified here will take precedence over those in config/environment.rb
-
-  # The production environment is meant for finished, "live" apps.
-  # Code is not reloaded between requests
-  config.cache_classes = true
-
-  # Full error reports are disabled and caching is turned on
-  config.consider_all_requests_local       = false
-  config.action_controller.perform_caching = true
-
-  # Specifies the header that your server uses for sending files
-  config.action_dispatch.x_sendfile_header = "X-Sendfile"
-
-  # For nginx:
-  # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
-
-  # If you have no front-end server that supports something like X-Sendfile,
-  # just comment this out and Rails will serve the files
-
-  # See everything in the log (default is :info)
-  # config.log_level = :debug
-
-  # Use a different logger for distributed setups
-  # config.logger = SyslogLogger.new
-
-  # Use a different cache store in production
-  # config.cache_store = :mem_cache_store
-
-  # Disable Rails's static asset server
-  # In production, Apache or nginx will already do this
-  config.serve_static_assets = false
-
-  # Enable serving of images, stylesheets, and javascripts from an asset server
-  # config.action_controller.asset_host = "http://assets.example.com"
-
-  # Disable delivery errors, bad email addresses will be ignored
-  # config.action_mailer.raise_delivery_errors = false
-
-  # Enable threaded mode
-  # config.threadsafe!
-end
diff --git a/t/rails3-app/config/environments/test.rb b/t/rails3-app/config/environments/test.rb
deleted file mode 100644 (file)
index 06816bc..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-App::Application.configure do
-  # Settings specified here will take precedence over those in config/environment.rb
-
-  # The test environment is used exclusively to run your application's
-  # test suite.  You never need to work with it otherwise.  Remember that
-  # your test database is "scratch space" for the test suite and is wiped
-  # and recreated between test runs.  Don't rely on the data there!
-  config.cache_classes = true
-
-  # Log error messages when you accidentally call methods on nil.
-  config.whiny_nils = true
-
-  # Show full error reports and disable caching
-  config.consider_all_requests_local       = true
-  config.action_controller.perform_caching = false
-
-  # Raise exceptions instead of rendering exception templates
-  config.action_dispatch.show_exceptions = false
-
-  # Disable request forgery protection in test environment
-  config.action_controller.allow_forgery_protection    = false
-
-  # Tell Action Mailer not to deliver emails to the real world.
-  # The :test delivery method accumulates sent emails in the
-  # ActionMailer::Base.deliveries array.
-  config.action_mailer.delivery_method = :test
-
-  # Use SQL instead of Active Record's schema dumper when creating the test database.
-  # This is necessary if your schema can't be completely dumped by the schema dumper,
-  # like if you have constraints or database-specific column types
-  # config.active_record.schema_format = :sql
-end
diff --git a/t/rails3-app/config/initializers/backtrace_silencers.rb b/t/rails3-app/config/initializers/backtrace_silencers.rb
deleted file mode 100644 (file)
index 59385cd..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# Be sure to restart your server when you modify this file.
-
-# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
-# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
-
-# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
-# Rails.backtrace_cleaner.remove_silencers!
diff --git a/t/rails3-app/config/initializers/inflections.rb b/t/rails3-app/config/initializers/inflections.rb
deleted file mode 100644 (file)
index 9e8b013..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-# Be sure to restart your server when you modify this file.
-
-# Add new inflection rules using the following format
-# (all these examples are active by default):
-# ActiveSupport::Inflector.inflections do |inflect|
-#   inflect.plural /^(ox)$/i, '\1en'
-#   inflect.singular /^(ox)en/i, '\1'
-#   inflect.irregular 'person', 'people'
-#   inflect.uncountable %w( fish sheep )
-# end
diff --git a/t/rails3-app/config/initializers/mime_types.rb b/t/rails3-app/config/initializers/mime_types.rb
deleted file mode 100644 (file)
index 72aca7e..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# Be sure to restart your server when you modify this file.
-
-# Add new mime types for use in respond_to blocks:
-# Mime::Type.register "text/richtext", :rtf
-# Mime::Type.register_alias "text/html", :iphone
diff --git a/t/rails3-app/config/initializers/secret_token.rb b/t/rails3-app/config/initializers/secret_token.rb
deleted file mode 100644 (file)
index 2d38cf9..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# Be sure to restart your server when you modify this file.
-
-# Your secret key for verifying the integrity of signed cookies.
-# If you change this key, all old signed cookies will become invalid!
-# Make sure the secret is at least 30 characters and all random,
-# no regular words or you'll be exposed to dictionary attacks.
-Rails.application.config.secret_token = '71ca844cc99ed2057a65cc6bd66b57fbbf69e8d4aef00072e41c3e896635e99ea485a6ed45f6e846d5547d614235df146a9756920b8b4a1726a53e75cda45bd1'
diff --git a/t/rails3-app/config/initializers/session_store.rb b/t/rails3-app/config/initializers/session_store.rb
deleted file mode 100644 (file)
index 845cb69..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-# Be sure to restart your server when you modify this file.
-
-Rails.application.config.session_store :cookie_store, :key => '_app_session'
-
-# Use the database for sessions instead of the cookie-based default,
-# which shouldn't be used to store highly confidential information
-# (create the session table with "rake db:sessions:create")
-# Rails.application.config.session_store :active_record_store
diff --git a/t/rails3-app/config/locales/en.yml b/t/rails3-app/config/locales/en.yml
deleted file mode 100644 (file)
index a747bfa..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# Sample localization file for English. Add more files in this directory for other locales.
-# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
-
-en:
-  hello: "Hello world"
diff --git a/t/rails3-app/config/routes.rb b/t/rails3-app/config/routes.rb
deleted file mode 100644 (file)
index 03e3c23..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-App::Application.routes.draw do |map|
-  # The priority is based upon order of creation:
-  # first created -> highest priority.
-
-  # Sample of regular route:
-  #   match 'products/:id' => 'catalog#view'
-  # Keep in mind you can assign values other than :controller and :action
-
-  # Sample of named route:
-  #   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
-  # This route can be invoked with purchase_url(:id => product.id)
-
-  # Sample resource route (maps HTTP verbs to controller actions automatically):
-  #   resources :products
-
-  # Sample resource route with options:
-  #   resources :products do
-  #     member do
-  #       get :short
-  #       post :toggle
-  #     end
-  #
-  #     collection do
-  #       get :sold
-  #     end
-  #   end
-
-  # Sample resource route with sub-resources:
-  #   resources :products do
-  #     resources :comments, :sales
-  #     resource :seller
-  #   end
-
-  # Sample resource route with more complex sub-resources
-  #   resources :products do
-  #     resources :comments
-  #     resources :sales do
-  #       get :recent, :on => :collection
-  #     end
-  #   end
-
-  # Sample resource route within a namespace:
-  #   namespace :admin do
-  #     # Directs /admin/products/* to Admin::ProductsController
-  #     # (app/controllers/admin/products_controller.rb)
-  #     resources :products
-  #   end
-
-  # You can have the root of your site routed with "root"
-  # just remember to delete public/index.html.
-  # root :to => "welcome#index"
-
-  # See how all your routes lay out with "rake routes"
-
-  # This is a legacy wild controller route that's not recommended for RESTful applications.
-  # Note: This route will make all actions in every controller accessible via GET requests.
-  # match ':controller(/:action(/:id(.:format)))'
-end
diff --git a/t/rails3-app/db/seeds.rb b/t/rails3-app/db/seeds.rb
deleted file mode 100644 (file)
index 664d8c7..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# This file should contain all the record creation needed to seed the database with its default values.
-# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
-#
-# Examples:
-#
-#   cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
-#   Mayor.create(:name => 'Daley', :city => cities.first)
diff --git a/t/rails3-app/doc/README_FOR_APP b/t/rails3-app/doc/README_FOR_APP
deleted file mode 100644 (file)
index fe41f5c..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Use this README file to introduce your application and point to useful places in the API for learning more.
-Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
diff --git a/t/rails3-app/lib/tasks/.gitkeep b/t/rails3-app/lib/tasks/.gitkeep
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/t/rails3-app/public/404.html b/t/rails3-app/public/404.html
deleted file mode 100644 (file)
index 44d986c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-404 Not Found
diff --git a/t/rails3-app/public/500.html b/t/rails3-app/public/500.html
deleted file mode 100644 (file)
index e534a49..0000000
+++ /dev/null
@@ -1 +0,0 @@
-500 Internal Server Error
diff --git a/t/rails3-app/public/x.txt b/t/rails3-app/public/x.txt
deleted file mode 100644 (file)
index e427984..0000000
+++ /dev/null
@@ -1 +0,0 @@
-HELLO
diff --git a/t/rails3-app/script/rails b/t/rails3-app/script/rails
deleted file mode 100755 (executable)
index febedce..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env ruby
-# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
-
-ENV_PATH  = File.expand_path('../../config/environment',  __FILE__)
-BOOT_PATH = File.expand_path('../../config/boot',  __FILE__)
-APP_PATH  = File.expand_path('../../config/application',  __FILE__)
-
-require BOOT_PATH
-require 'rails/commands'
diff --git a/t/rails3-app/test/performance/browsing_test.rb b/t/rails3-app/test/performance/browsing_test.rb
deleted file mode 100644 (file)
index 867fc8c..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-require 'test_helper'
-require 'rails/performance_test_help'
-
-# Profiling results for each test method are written to tmp/performance.
-class BrowsingTest < ActionDispatch::PerformanceTest
-  def test_homepage
-    get '/'
-  end
-end
diff --git a/t/rails3-app/test/test_helper.rb b/t/rails3-app/test/test_helper.rb
deleted file mode 100644 (file)
index 8bf1192..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-ENV["RAILS_ENV"] = "test"
-require File.expand_path('../../config/environment', __FILE__)
-require 'rails/test_help'
-
-class ActiveSupport::TestCase
-  # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
-  #
-  # Note: You'll currently still have to declare fixtures explicitly in integration tests
-  # -- they do not yet inherit this setting
-  fixtures :all
-
-  # Add more helper methods to be used by all tests here...
-end
diff --git a/t/rails3-app/vendor/plugins/.gitkeep b/t/rails3-app/vendor/plugins/.gitkeep
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/t/t0300-rails3-basic.sh b/t/t0300-rails3-basic.sh
deleted file mode 100755 (executable)
index 8bf4066..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-. ./test-rails3.sh
-
-t_plan 3 "Rails 3 (beta) tests"
-
-t_begin "setup and start" && {
-       rails3_app=$(cd rails3-app && pwd)
-       rm -rf $t_pfx.app
-       mkdir $t_pfx.app
-       cd $t_pfx.app
-       ( cd $rails3_app && tar cf - . ) | tar xf -
-       $RAKE db:sessions:create
-       $RAKE db:migrate
-       unicorn_setup
-       unicorn_rails -D -c $unicorn_config
-       unicorn_wait_start
-}
-
-# add more tests here
-t_begin "hit with curl" && {
-       test xHELLO = x"$(curl -sSf http://$listen/x.txt)"
-}
-
-t_begin "killing succeeds" && {
-       kill $unicorn_pid
-}
-
-t_done
diff --git a/t/t0301-rails3-missing-config-ru.sh b/t/t0301-rails3-missing-config-ru.sh
deleted file mode 100755 (executable)
index 355ae44..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-. ./test-rails3.sh
-
-t_plan 4 "Rails 3 (beta) tests for config.ru haters"
-
-t_begin "setup and start" && {
-       rails3_app=$(cd rails3-app && pwd)
-       rm -rf $t_pfx.app
-       mkdir $t_pfx.app
-       cd $t_pfx.app
-       ( cd $rails3_app && tar cf - . ) | tar xf -
-       rm config.ru
-       $RAKE db:sessions:create
-       $RAKE db:migrate
-       unicorn_setup
-       unicorn_rails -D -c $unicorn_config
-       unicorn_wait_start
-}
-
-t_begin "static file serving works" && {
-       test x"$(curl -sSf http://$listen/x.txt)" = xHELLO
-}
-
-# add more tests here
-t_begin "hit with curl" && {
-       curl -v http://$listen/ || :
-}
-
-t_begin "killing succeeds" && {
-       kill $unicorn_pid
-}
-
-t_done
diff --git a/t/t0302-rails3-alt-working_directory.sh b/t/t0302-rails3-alt-working_directory.sh
deleted file mode 100755 (executable)
index 0a8894e..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-. ./test-rails3.sh
-
-t_plan 3 "Rails 3 (beta) inside alt working_directory (no config.ru)"
-
-t_begin "setup and start" && {
-       unicorn_setup
-       rails3_app=$(cd rails3-app && pwd)
-       rm -rf $t_pfx.app
-       mkdir $t_pfx.app
-       cd $t_pfx.app
-       ( cd $rails3_app && tar cf - . ) | tar xf -
-       rm config.ru
-       $RAKE db:sessions:create
-       $RAKE db:migrate
-       unicorn_setup
-       rm $pid
-       echo "working_directory '$t_pfx.app'" >> $unicorn_config
-       cd /
-       unicorn_rails -D -c $unicorn_config
-       unicorn_wait_start
-}
-
-t_begin "static file serving works" && {
-       test x"$(curl -sSf http://$listen/x.txt)" = xHELLO
-}
-
-t_begin "killing succeeds" && {
-       kill $unicorn_pid
-}
-
-t_done
diff --git a/t/t0303-rails3-alt-working_directory_config.ru.sh b/t/t0303-rails3-alt-working_directory_config.ru.sh
deleted file mode 100755 (executable)
index 1433f94..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/sh
-. ./test-rails3.sh
-
-t_plan 5 "Rails 3 (beta) inside alt working_directory (w/ config.ru)"
-
-t_begin "setup and start" && {
-       unicorn_setup
-       rtmpfiles unicorn_config_tmp usocket
-       if test -e $usocket
-       then
-               die "unexpected $usocket"
-       fi
-       rails3_app=$(cd rails3-app && pwd)
-       rm -rf $t_pfx.app
-       mkdir $t_pfx.app
-       cd $t_pfx.app
-       ( cd $rails3_app && tar cf - . ) | tar xf -
-       $RAKE db:sessions:create
-       $RAKE db:migrate
-       unicorn_setup
-       rm $pid
-
-       echo "#\\--daemonize --host $host --port $port -l $usocket" \
-            >> $t_pfx.app/config.ru
-
-       # we have --host/--port in config.ru instead
-       grep -v ^listen $unicorn_config |
-         grep -v ^pid > $unicorn_config_tmp
-       echo "working_directory '$t_pfx.app'" >> $unicorn_config_tmp
-       cd /
-       unicorn_rails -c $unicorn_config_tmp
-}
-
-t_begin "pids in the right place" && {
-       if test -e $pid
-       then
-               die "pid=$pid not expected"
-       fi
-
-       unicorn_rails_pid="$t_pfx.app/tmp/pids/unicorn.pid"
-       unicorn_pid=$(cat $unicorn_rails_pid)
-}
-
-t_begin "static file serving works" && {
-       test x"$(curl -sSf http://$listen/x.txt)" = xHELLO
-}
-
-t_begin "socket created" && {
-       test -S $usocket
-}
-
-t_begin "killing succeeds" && {
-       kill $unicorn_pid
-}
-
-t_done
diff --git a/t/t0304-rails3-alt-working_directory_no_embed_cli.sh b/t/t0304-rails3-alt-working_directory_no_embed_cli.sh
deleted file mode 100755 (executable)
index c93f248..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/bin/sh
-. ./test-rails3.sh
-
-t_plan 5 "Rails 3 (beta) inside alt working_directory (no embedded switches)"
-
-t_begin "setup and start" && {
-       unicorn_setup
-       rtmpfiles unicorn_config_tmp usocket
-       if test -e $usocket
-       then
-               die "unexpected $usocket"
-       fi
-       rails3_app=$(cd rails3-app && pwd)
-       rm -rf $t_pfx.app
-       mkdir $t_pfx.app
-       cd $t_pfx.app
-       ( cd $rails3_app && tar cf - . ) | tar xf -
-       $RAKE db:sessions:create
-       $RAKE db:migrate
-       unicorn_setup
-       rm $pid
-
-       grep -v ^pid $unicorn_config > $unicorn_config_tmp
-       echo "working_directory '$t_pfx.app'" >> $unicorn_config_tmp
-       cd /
-       unicorn_rails -c $unicorn_config_tmp \
-         --daemonize --host $host --port $port -l $usocket
-}
-
-t_begin "pids in the right place" && {
-       if test -e $pid
-       then
-               die "pid=$pid not expected"
-       fi
-
-       unicorn_rails_pid="$t_pfx.app/tmp/pids/unicorn.pid"
-       unicorn_pid=$(cat $unicorn_rails_pid)
-}
-
-t_begin "static file serving works" && {
-       test x"$(curl -sSf http://$listen/x.txt)" = xHELLO
-}
-
-t_begin "socket created" && {
-       test -S $usocket
-}
-
-t_begin "killing succeeds" && {
-       kill $unicorn_pid
-}
-
-t_done
diff --git a/t/test-rails3.sh b/t/test-rails3.sh
deleted file mode 100644 (file)
index 907ef0d..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-. ./test-lib.sh
-RAILS_VERSION=${RAILS_VERSION-3.0.0}
-case $RUBY_VERSION in
-1.8.7|1.9.2) ;;
-*)
-       t_info "RUBY_VERSION=$RUBY_VERSION unsupported for Rails 3"
-       exit 0
-       ;;
-esac
-
-arch_gems=../tmp/isolate/ruby-$RUBY_VERSION/gems
-rails_gems=../tmp/isolate/rails-$RAILS_VERSION/gems
-rails_bin="$rails_gems/rails-$RAILS_VERSION/bin/rails"
-if ! test -d "$arch_gems" || ! test -d "$rails_gems" || ! test -x "$rails_bin"
-then
-       ( cd ../ && ./script/isolate_for_tests )
-fi
-
-for i in $arch_gems/*-* $rails_gems/*-*
-do
-       if test -d $i/lib
-       then
-               RUBYLIB=$(cd $i/lib && pwd):$RUBYLIB
-       fi
-done
-
-export RUBYLIB
diff --git a/test/rails/app-1.2.3/.gitignore b/test/rails/app-1.2.3/.gitignore
deleted file mode 100644 (file)
index f451f91..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/tmp
-/vendor
diff --git a/test/rails/app-1.2.3/Rakefile b/test/rails/app-1.2.3/Rakefile
deleted file mode 100644 (file)
index fbebfca..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-require(File.join(File.dirname(__FILE__), 'config', 'boot'))
-
-require 'rake'
-require 'rake/testtask'
-require 'rake/rdoctask'
-
-require 'tasks/rails'
diff --git a/test/rails/app-1.2.3/app/controllers/application.rb b/test/rails/app-1.2.3/app/controllers/application.rb
deleted file mode 100644 (file)
index e72474f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# -*- encoding: binary -*-
-
-class ApplicationController < ActionController::Base
-  # Pick a unique cookie name to distinguish our session data from others'
-  session :session_key => "_unicorn_rails_test.#{rand}"
-end
diff --git a/test/rails/app-1.2.3/app/controllers/foo_controller.rb b/test/rails/app-1.2.3/app/controllers/foo_controller.rb
deleted file mode 100644 (file)
index 52b7947..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# -*- encoding: binary -*-
-
-require 'digest/sha1'
-class FooController < ApplicationController
-  def index
-    render :text => "FOO\n"
-  end
-
-  def xcookie
-    cookies["foo"] = "cookie #$$"
-    render :text => ""
-  end
-
-  def xnotice
-    flash[:notice] = "session #$$"
-    render :text => ""
-  end
-
-  def xpost
-    if request.post?
-      digest = Digest::SHA1.new
-      out = "params: #{params.inspect}\n"
-      if file = params[:file]
-        loop do
-          buf = file.read(4096) or break
-          digest.update(buf)
-        end
-        out << "sha1: #{digest.to_s}\n"
-      end
-      headers['content-type'] = 'text/plain'
-      render :text => out
-    else
-      render :status => 403, :text => "need post\n"
-    end
-  end
-end
diff --git a/test/rails/app-1.2.3/app/helpers/application_helper.rb b/test/rails/app-1.2.3/app/helpers/application_helper.rb
deleted file mode 100644 (file)
index d9889b3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# -*- encoding: binary -*-
-
-module ApplicationHelper
-end
diff --git a/test/rails/app-1.2.3/config/boot.rb b/test/rails/app-1.2.3/config/boot.rb
deleted file mode 100644 (file)
index 84a5c18..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-# -*- encoding: binary -*-
-
-unless defined?(RAILS_ROOT)
-  root_path = File.join(File.dirname(__FILE__), '..')
-  RAILS_ROOT = root_path
-end
-
-unless defined?(Rails::Initializer)
-  require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
-  Rails::Initializer.run(:set_load_path)
-end
diff --git a/test/rails/app-1.2.3/config/database.yml b/test/rails/app-1.2.3/config/database.yml
deleted file mode 100644 (file)
index 9f77843..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-development:
-  adapter: sqlite3
-  database: db/development.sqlite3
-  timeout: 5000
-test:
-  adapter: sqlite3
-  database: db/test.sqlite3
-  timeout: 5000
-production:
-  adapter: sqlite3
-  database: db/production.sqlite3
-  timeout: 5000
diff --git a/test/rails/app-1.2.3/config/environment.rb b/test/rails/app-1.2.3/config/environment.rb
deleted file mode 100644 (file)
index e230a66..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# -*- encoding: binary -*-
-
-unless defined? RAILS_GEM_VERSION
-  RAILS_GEM_VERSION = ENV['UNICORN_RAILS_VERSION'] # || '1.2.3'
-end
-
-# Bootstrap the Rails environment, frameworks, and default configuration
-require File.join(File.dirname(__FILE__), 'boot')
-
-Rails::Initializer.run do |config|
-  config.frameworks -= [ :action_web_service, :action_mailer ]
-  config.action_controller.session_store = :active_record_store
-end
diff --git a/test/rails/app-1.2.3/config/environments/development.rb b/test/rails/app-1.2.3/config/environments/development.rb
deleted file mode 100644 (file)
index 9d78f5e..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-# -*- encoding: binary -*-
-
-config.cache_classes = false
-config.whiny_nils = true
-config.breakpoint_server = true
-config.action_controller.consider_all_requests_local = true
-config.action_controller.perform_caching = false
-config.action_view.cache_template_extensions = false
-config.action_view.debug_rjs = true
diff --git a/test/rails/app-1.2.3/config/environments/production.rb b/test/rails/app-1.2.3/config/environments/production.rb
deleted file mode 100644 (file)
index 1e049b2..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- encoding: binary -*-
-
-config.cache_classes = true
-config.action_controller.consider_all_requests_local = false
-config.action_controller.perform_caching             = true
diff --git a/test/rails/app-1.2.3/config/routes.rb b/test/rails/app-1.2.3/config/routes.rb
deleted file mode 100644 (file)
index 70816dc..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# -*- encoding: binary -*-
-
-ActionController::Routing::Routes.draw do |map|
-  map.connect ':controller/:action/:id.:format'
-  map.connect ':controller/:action/:id'
-end
diff --git a/test/rails/app-1.2.3/db/.gitignore b/test/rails/app-1.2.3/db/.gitignore
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/test/rails/app-1.2.3/log/.gitignore b/test/rails/app-1.2.3/log/.gitignore
deleted file mode 100644 (file)
index 397b4a7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-*.log
diff --git a/test/rails/app-1.2.3/public/404.html b/test/rails/app-1.2.3/public/404.html
deleted file mode 100644 (file)
index 44d986c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-404 Not Found
diff --git a/test/rails/app-1.2.3/public/500.html b/test/rails/app-1.2.3/public/500.html
deleted file mode 100644 (file)
index e534a49..0000000
+++ /dev/null
@@ -1 +0,0 @@
-500 Internal Server Error
diff --git a/test/rails/app-2.0.2/.gitignore b/test/rails/app-2.0.2/.gitignore
deleted file mode 100644 (file)
index f451f91..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/tmp
-/vendor
diff --git a/test/rails/app-2.0.2/Rakefile b/test/rails/app-2.0.2/Rakefile
deleted file mode 100644 (file)
index fbebfca..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-require(File.join(File.dirname(__FILE__), 'config', 'boot'))
-
-require 'rake'
-require 'rake/testtask'
-require 'rake/rdoctask'
-
-require 'tasks/rails'
diff --git a/test/rails/app-2.0.2/app/controllers/application.rb b/test/rails/app-2.0.2/app/controllers/application.rb
deleted file mode 100644 (file)
index e7bb740..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# -*- encoding: binary -*-
-
-class ApplicationController < ActionController::Base
-end
diff --git a/test/rails/app-2.0.2/app/controllers/foo_controller.rb b/test/rails/app-2.0.2/app/controllers/foo_controller.rb
deleted file mode 100644 (file)
index 52b7947..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# -*- encoding: binary -*-
-
-require 'digest/sha1'
-class FooController < ApplicationController
-  def index
-    render :text => "FOO\n"
-  end
-
-  def xcookie
-    cookies["foo"] = "cookie #$$"
-    render :text => ""
-  end
-
-  def xnotice
-    flash[:notice] = "session #$$"
-    render :text => ""
-  end
-
-  def xpost
-    if request.post?
-      digest = Digest::SHA1.new
-      out = "params: #{params.inspect}\n"
-      if file = params[:file]
-        loop do
-          buf = file.read(4096) or break
-          digest.update(buf)
-        end
-        out << "sha1: #{digest.to_s}\n"
-      end
-      headers['content-type'] = 'text/plain'
-      render :text => out
-    else
-      render :status => 403, :text => "need post\n"
-    end
-  end
-end
diff --git a/test/rails/app-2.0.2/app/helpers/application_helper.rb b/test/rails/app-2.0.2/app/helpers/application_helper.rb
deleted file mode 100644 (file)
index d9889b3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# -*- encoding: binary -*-
-
-module ApplicationHelper
-end
diff --git a/test/rails/app-2.0.2/config/boot.rb b/test/rails/app-2.0.2/config/boot.rb
deleted file mode 100644 (file)
index 84a5c18..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-# -*- encoding: binary -*-
-
-unless defined?(RAILS_ROOT)
-  root_path = File.join(File.dirname(__FILE__), '..')
-  RAILS_ROOT = root_path
-end
-
-unless defined?(Rails::Initializer)
-  require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
-  Rails::Initializer.run(:set_load_path)
-end
diff --git a/test/rails/app-2.0.2/config/database.yml b/test/rails/app-2.0.2/config/database.yml
deleted file mode 100644 (file)
index 9f77843..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-development:
-  adapter: sqlite3
-  database: db/development.sqlite3
-  timeout: 5000
-test:
-  adapter: sqlite3
-  database: db/test.sqlite3
-  timeout: 5000
-production:
-  adapter: sqlite3
-  database: db/production.sqlite3
-  timeout: 5000
diff --git a/test/rails/app-2.0.2/config/environment.rb b/test/rails/app-2.0.2/config/environment.rb
deleted file mode 100644 (file)
index 9961f08..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-# -*- encoding: binary -*-
-
-unless defined? RAILS_GEM_VERSION
-  RAILS_GEM_VERSION = ENV['UNICORN_RAILS_VERSION']
-end
-
-# Bootstrap the Rails environment, frameworks, and default configuration
-require File.join(File.dirname(__FILE__), 'boot')
-
-Rails::Initializer.run do |config|
-  config.frameworks -= [ :action_web_service, :action_mailer ]
-  config.action_controller.session_store = :active_record_store
-  config.action_controller.session = {
-    :session_key => "_unicorn_rails_test.#{rand}",
-    :secret => "#{rand}#{rand}#{rand}#{rand}",
-  }
-end
diff --git a/test/rails/app-2.0.2/config/environments/development.rb b/test/rails/app-2.0.2/config/environments/development.rb
deleted file mode 100644 (file)
index 5e0f1ca..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-# -*- encoding: binary -*-
-
-config.cache_classes = false
-config.whiny_nils = true
-config.action_controller.consider_all_requests_local = true
-config.action_controller.perform_caching = false
-config.action_view.cache_template_extensions = false
-config.action_view.debug_rjs = true
diff --git a/test/rails/app-2.0.2/config/environments/production.rb b/test/rails/app-2.0.2/config/environments/production.rb
deleted file mode 100644 (file)
index 1e049b2..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- encoding: binary -*-
-
-config.cache_classes = true
-config.action_controller.consider_all_requests_local = false
-config.action_controller.perform_caching             = true
diff --git a/test/rails/app-2.0.2/config/routes.rb b/test/rails/app-2.0.2/config/routes.rb
deleted file mode 100644 (file)
index 70816dc..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# -*- encoding: binary -*-
-
-ActionController::Routing::Routes.draw do |map|
-  map.connect ':controller/:action/:id.:format'
-  map.connect ':controller/:action/:id'
-end
diff --git a/test/rails/app-2.0.2/db/.gitignore b/test/rails/app-2.0.2/db/.gitignore
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/test/rails/app-2.0.2/log/.gitignore b/test/rails/app-2.0.2/log/.gitignore
deleted file mode 100644 (file)
index 397b4a7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-*.log
diff --git a/test/rails/app-2.0.2/public/404.html b/test/rails/app-2.0.2/public/404.html
deleted file mode 100644 (file)
index 44d986c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-404 Not Found
diff --git a/test/rails/app-2.0.2/public/500.html b/test/rails/app-2.0.2/public/500.html
deleted file mode 100644 (file)
index e534a49..0000000
+++ /dev/null
@@ -1 +0,0 @@
-500 Internal Server Error
diff --git a/test/rails/app-2.1.2/.gitignore b/test/rails/app-2.1.2/.gitignore
deleted file mode 100644 (file)
index f451f91..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/tmp
-/vendor
diff --git a/test/rails/app-2.1.2/Rakefile b/test/rails/app-2.1.2/Rakefile
deleted file mode 100644 (file)
index fbebfca..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-require(File.join(File.dirname(__FILE__), 'config', 'boot'))
-
-require 'rake'
-require 'rake/testtask'
-require 'rake/rdoctask'
-
-require 'tasks/rails'
diff --git a/test/rails/app-2.1.2/app/controllers/application.rb b/test/rails/app-2.1.2/app/controllers/application.rb
deleted file mode 100644 (file)
index e7bb740..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# -*- encoding: binary -*-
-
-class ApplicationController < ActionController::Base
-end
diff --git a/test/rails/app-2.1.2/app/controllers/foo_controller.rb b/test/rails/app-2.1.2/app/controllers/foo_controller.rb
deleted file mode 100644 (file)
index 52b7947..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# -*- encoding: binary -*-
-
-require 'digest/sha1'
-class FooController < ApplicationController
-  def index
-    render :text => "FOO\n"
-  end
-
-  def xcookie
-    cookies["foo"] = "cookie #$$"
-    render :text => ""
-  end
-
-  def xnotice
-    flash[:notice] = "session #$$"
-    render :text => ""
-  end
-
-  def xpost
-    if request.post?
-      digest = Digest::SHA1.new
-      out = "params: #{params.inspect}\n"
-      if file = params[:file]
-        loop do
-          buf = file.read(4096) or break
-          digest.update(buf)
-        end
-        out << "sha1: #{digest.to_s}\n"
-      end
-      headers['content-type'] = 'text/plain'
-      render :text => out
-    else
-      render :status => 403, :text => "need post\n"
-    end
-  end
-end
diff --git a/test/rails/app-2.1.2/app/helpers/application_helper.rb b/test/rails/app-2.1.2/app/helpers/application_helper.rb
deleted file mode 100644 (file)
index d9889b3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# -*- encoding: binary -*-
-
-module ApplicationHelper
-end
diff --git a/test/rails/app-2.1.2/config/boot.rb b/test/rails/app-2.1.2/config/boot.rb
deleted file mode 100644 (file)
index e357f0a..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-# -*- encoding: binary -*-
-
-# Don't change this file!
-# Configure your app in config/environment.rb and config/environments/*.rb
-
-RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
-
-module Rails
-  class << self
-    def boot!
-      unless booted?
-        preinitialize
-        pick_boot.run
-      end
-    end
-
-    def booted?
-      defined? Rails::Initializer
-    end
-
-    def pick_boot
-      (vendor_rails? ? VendorBoot : GemBoot).new
-    end
-
-    def vendor_rails?
-      File.exist?("#{RAILS_ROOT}/vendor/rails")
-    end
-
-    def preinitialize
-      load(preinitializer_path) if File.exist?(preinitializer_path)
-    end
-
-    def preinitializer_path
-      "#{RAILS_ROOT}/config/preinitializer.rb"
-    end
-  end
-
-  class Boot
-    def run
-      load_initializer
-      Rails::Initializer.run(:set_load_path)
-    end
-  end
-
-  class VendorBoot < Boot
-    def load_initializer
-      require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
-      Rails::Initializer.run(:install_gem_spec_stubs)
-    end
-  end
-
-  class GemBoot < Boot
-    def load_initializer
-      self.class.load_rubygems
-      load_rails_gem
-      require 'initializer'
-    end
-
-    def load_rails_gem
-      if version = self.class.gem_version
-        gem 'rails', version
-      else
-        gem 'rails'
-      end
-    rescue Gem::LoadError => load_error
-      $stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
-      exit 1
-    end
-
-    class << self
-      def rubygems_version
-        Gem::RubyGemsVersion rescue nil
-      end
-
-      def gem_version
-        if defined? RAILS_GEM_VERSION
-          RAILS_GEM_VERSION
-        elsif ENV.include?('RAILS_GEM_VERSION')
-          ENV['RAILS_GEM_VERSION']
-        else
-          parse_gem_version(read_environment_rb)
-        end
-      end
-
-      def load_rubygems
-        require 'rubygems'
-        min_version = '1.3.1'
-        unless rubygems_version >= min_version
-          $stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
-          exit 1
-        end
-
-      rescue LoadError
-        $stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
-        exit 1
-      end
-
-      def parse_gem_version(text)
-        $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
-      end
-
-      private
-        def read_environment_rb
-          File.read("#{RAILS_ROOT}/config/environment.rb")
-        end
-    end
-  end
-end
-
-# All that for this:
-Rails.boot!
diff --git a/test/rails/app-2.1.2/config/database.yml b/test/rails/app-2.1.2/config/database.yml
deleted file mode 100644 (file)
index 9f77843..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-development:
-  adapter: sqlite3
-  database: db/development.sqlite3
-  timeout: 5000
-test:
-  adapter: sqlite3
-  database: db/test.sqlite3
-  timeout: 5000
-production:
-  adapter: sqlite3
-  database: db/production.sqlite3
-  timeout: 5000
diff --git a/test/rails/app-2.1.2/config/environment.rb b/test/rails/app-2.1.2/config/environment.rb
deleted file mode 100644 (file)
index 9961f08..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-# -*- encoding: binary -*-
-
-unless defined? RAILS_GEM_VERSION
-  RAILS_GEM_VERSION = ENV['UNICORN_RAILS_VERSION']
-end
-
-# Bootstrap the Rails environment, frameworks, and default configuration
-require File.join(File.dirname(__FILE__), 'boot')
-
-Rails::Initializer.run do |config|
-  config.frameworks -= [ :action_web_service, :action_mailer ]
-  config.action_controller.session_store = :active_record_store
-  config.action_controller.session = {
-    :session_key => "_unicorn_rails_test.#{rand}",
-    :secret => "#{rand}#{rand}#{rand}#{rand}",
-  }
-end
diff --git a/test/rails/app-2.1.2/config/environments/development.rb b/test/rails/app-2.1.2/config/environments/development.rb
deleted file mode 100644 (file)
index 37f523f..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- encoding: binary -*-
-
-config.cache_classes = false
-config.whiny_nils = true
-config.action_controller.consider_all_requests_local = true
-config.action_controller.perform_caching = false
-config.action_view.debug_rjs = true
diff --git a/test/rails/app-2.1.2/config/environments/production.rb b/test/rails/app-2.1.2/config/environments/production.rb
deleted file mode 100644 (file)
index 1e049b2..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- encoding: binary -*-
-
-config.cache_classes = true
-config.action_controller.consider_all_requests_local = false
-config.action_controller.perform_caching             = true
diff --git a/test/rails/app-2.1.2/config/routes.rb b/test/rails/app-2.1.2/config/routes.rb
deleted file mode 100644 (file)
index 70816dc..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# -*- encoding: binary -*-
-
-ActionController::Routing::Routes.draw do |map|
-  map.connect ':controller/:action/:id.:format'
-  map.connect ':controller/:action/:id'
-end
diff --git a/test/rails/app-2.1.2/db/.gitignore b/test/rails/app-2.1.2/db/.gitignore
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/test/rails/app-2.1.2/log/.gitignore b/test/rails/app-2.1.2/log/.gitignore
deleted file mode 100644 (file)
index 397b4a7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-*.log
diff --git a/test/rails/app-2.1.2/public/404.html b/test/rails/app-2.1.2/public/404.html
deleted file mode 100644 (file)
index 44d986c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-404 Not Found
diff --git a/test/rails/app-2.1.2/public/500.html b/test/rails/app-2.1.2/public/500.html
deleted file mode 100644 (file)
index e534a49..0000000
+++ /dev/null
@@ -1 +0,0 @@
-500 Internal Server Error
diff --git a/test/rails/app-2.2.2/.gitignore b/test/rails/app-2.2.2/.gitignore
deleted file mode 100644 (file)
index f451f91..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/tmp
-/vendor
diff --git a/test/rails/app-2.2.2/Rakefile b/test/rails/app-2.2.2/Rakefile
deleted file mode 100644 (file)
index fbebfca..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-require(File.join(File.dirname(__FILE__), 'config', 'boot'))
-
-require 'rake'
-require 'rake/testtask'
-require 'rake/rdoctask'
-
-require 'tasks/rails'
diff --git a/test/rails/app-2.2.2/app/controllers/application.rb b/test/rails/app-2.2.2/app/controllers/application.rb
deleted file mode 100644 (file)
index e7bb740..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# -*- encoding: binary -*-
-
-class ApplicationController < ActionController::Base
-end
diff --git a/test/rails/app-2.2.2/app/controllers/foo_controller.rb b/test/rails/app-2.2.2/app/controllers/foo_controller.rb
deleted file mode 100644 (file)
index 52b7947..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# -*- encoding: binary -*-
-
-require 'digest/sha1'
-class FooController < ApplicationController
-  def index
-    render :text => "FOO\n"
-  end
-
-  def xcookie
-    cookies["foo"] = "cookie #$$"
-    render :text => ""
-  end
-
-  def xnotice
-    flash[:notice] = "session #$$"
-    render :text => ""
-  end
-
-  def xpost
-    if request.post?
-      digest = Digest::SHA1.new
-      out = "params: #{params.inspect}\n"
-      if file = params[:file]
-        loop do
-          buf = file.read(4096) or break
-          digest.update(buf)
-        end
-        out << "sha1: #{digest.to_s}\n"
-      end
-      headers['content-type'] = 'text/plain'
-      render :text => out
-    else
-      render :status => 403, :text => "need post\n"
-    end
-  end
-end
diff --git a/test/rails/app-2.2.2/app/helpers/application_helper.rb b/test/rails/app-2.2.2/app/helpers/application_helper.rb
deleted file mode 100644 (file)
index d9889b3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# -*- encoding: binary -*-
-
-module ApplicationHelper
-end
diff --git a/test/rails/app-2.2.2/config/boot.rb b/test/rails/app-2.2.2/config/boot.rb
deleted file mode 100644 (file)
index e357f0a..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-# -*- encoding: binary -*-
-
-# Don't change this file!
-# Configure your app in config/environment.rb and config/environments/*.rb
-
-RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
-
-module Rails
-  class << self
-    def boot!
-      unless booted?
-        preinitialize
-        pick_boot.run
-      end
-    end
-
-    def booted?
-      defined? Rails::Initializer
-    end
-
-    def pick_boot
-      (vendor_rails? ? VendorBoot : GemBoot).new
-    end
-
-    def vendor_rails?
-      File.exist?("#{RAILS_ROOT}/vendor/rails")
-    end
-
-    def preinitialize
-      load(preinitializer_path) if File.exist?(preinitializer_path)
-    end
-
-    def preinitializer_path
-      "#{RAILS_ROOT}/config/preinitializer.rb"
-    end
-  end
-
-  class Boot
-    def run
-      load_initializer
-      Rails::Initializer.run(:set_load_path)
-    end
-  end
-
-  class VendorBoot < Boot
-    def load_initializer
-      require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
-      Rails::Initializer.run(:install_gem_spec_stubs)
-    end
-  end
-
-  class GemBoot < Boot
-    def load_initializer
-      self.class.load_rubygems
-      load_rails_gem
-      require 'initializer'
-    end
-
-    def load_rails_gem
-      if version = self.class.gem_version
-        gem 'rails', version
-      else
-        gem 'rails'
-      end
-    rescue Gem::LoadError => load_error
-      $stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
-      exit 1
-    end
-
-    class << self
-      def rubygems_version
-        Gem::RubyGemsVersion rescue nil
-      end
-
-      def gem_version
-        if defined? RAILS_GEM_VERSION
-          RAILS_GEM_VERSION
-        elsif ENV.include?('RAILS_GEM_VERSION')
-          ENV['RAILS_GEM_VERSION']
-        else
-          parse_gem_version(read_environment_rb)
-        end
-      end
-
-      def load_rubygems
-        require 'rubygems'
-        min_version = '1.3.1'
-        unless rubygems_version >= min_version
-          $stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
-          exit 1
-        end
-
-      rescue LoadError
-        $stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
-        exit 1
-      end
-
-      def parse_gem_version(text)
-        $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
-      end
-
-      private
-        def read_environment_rb
-          File.read("#{RAILS_ROOT}/config/environment.rb")
-        end
-    end
-  end
-end
-
-# All that for this:
-Rails.boot!
diff --git a/test/rails/app-2.2.2/config/database.yml b/test/rails/app-2.2.2/config/database.yml
deleted file mode 100644 (file)
index 9f77843..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-development:
-  adapter: sqlite3
-  database: db/development.sqlite3
-  timeout: 5000
-test:
-  adapter: sqlite3
-  database: db/test.sqlite3
-  timeout: 5000
-production:
-  adapter: sqlite3
-  database: db/production.sqlite3
-  timeout: 5000
diff --git a/test/rails/app-2.2.2/config/environment.rb b/test/rails/app-2.2.2/config/environment.rb
deleted file mode 100644 (file)
index 9961f08..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-# -*- encoding: binary -*-
-
-unless defined? RAILS_GEM_VERSION
-  RAILS_GEM_VERSION = ENV['UNICORN_RAILS_VERSION']
-end
-
-# Bootstrap the Rails environment, frameworks, and default configuration
-require File.join(File.dirname(__FILE__), 'boot')
-
-Rails::Initializer.run do |config|
-  config.frameworks -= [ :action_web_service, :action_mailer ]
-  config.action_controller.session_store = :active_record_store
-  config.action_controller.session = {
-    :session_key => "_unicorn_rails_test.#{rand}",
-    :secret => "#{rand}#{rand}#{rand}#{rand}",
-  }
-end
diff --git a/test/rails/app-2.2.2/config/environments/development.rb b/test/rails/app-2.2.2/config/environments/development.rb
deleted file mode 100644 (file)
index 37f523f..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- encoding: binary -*-
-
-config.cache_classes = false
-config.whiny_nils = true
-config.action_controller.consider_all_requests_local = true
-config.action_controller.perform_caching = false
-config.action_view.debug_rjs = true
diff --git a/test/rails/app-2.2.2/config/environments/production.rb b/test/rails/app-2.2.2/config/environments/production.rb
deleted file mode 100644 (file)
index 1e049b2..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- encoding: binary -*-
-
-config.cache_classes = true
-config.action_controller.consider_all_requests_local = false
-config.action_controller.perform_caching             = true
diff --git a/test/rails/app-2.2.2/config/routes.rb b/test/rails/app-2.2.2/config/routes.rb
deleted file mode 100644 (file)
index 70816dc..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# -*- encoding: binary -*-
-
-ActionController::Routing::Routes.draw do |map|
-  map.connect ':controller/:action/:id.:format'
-  map.connect ':controller/:action/:id'
-end
diff --git a/test/rails/app-2.2.2/db/.gitignore b/test/rails/app-2.2.2/db/.gitignore
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/test/rails/app-2.2.2/log/.gitignore b/test/rails/app-2.2.2/log/.gitignore
deleted file mode 100644 (file)
index 397b4a7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-*.log
diff --git a/test/rails/app-2.2.2/public/404.html b/test/rails/app-2.2.2/public/404.html
deleted file mode 100644 (file)
index 44d986c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-404 Not Found
diff --git a/test/rails/app-2.2.2/public/500.html b/test/rails/app-2.2.2/public/500.html
deleted file mode 100644 (file)
index e534a49..0000000
+++ /dev/null
@@ -1 +0,0 @@
-500 Internal Server Error
diff --git a/test/rails/test_rails.rb b/test/rails/test_rails.rb
deleted file mode 100644 (file)
index 9cf92c0..0000000
+++ /dev/null
@@ -1,287 +0,0 @@
-# -*- encoding: binary -*-
-
-# Copyright (c) 2009 Eric Wong
-require 'test/test_helper'
-
-# don't call exit(0) since it may be run under rake (but gmake is recommended)
-do_test = true
-
-$unicorn_rails_bin = ENV['UNICORN_RAILS_TEST_BIN'] || "unicorn_rails"
-redirect_test_io { do_test = system($unicorn_rails_bin, '-v') }
-
-unless do_test
-  warn "#$unicorn_rails_bin not found in PATH=#{ENV['PATH']}, " \
-       "skipping this test"
-end
-
-unless which('git')
-  warn "git not found in PATH=#{ENV['PATH']}, skipping this test"
-  do_test = false
-end
-
-if RAILS_GIT_REPO = ENV['RAILS_GIT_REPO']
-  unless File.directory?(RAILS_GIT_REPO)
-    warn "#{RAILS_GIT_REPO} not found, create it with:\n" \
-         "\tgit clone --mirror git://github.com/rails/rails #{RAILS_GIT_REPO}" \
-         "skipping this test for now"
-    do_test = false
-  end
-else
-  warn "RAILS_GIT_REPO not defined, don't know where to git clone from"
-  do_test = false
-end
-
-unless UNICORN_RAILS_TEST_VERSION = ENV['UNICORN_RAILS_TEST_VERSION']
-  warn 'UNICORN_RAILS_TEST_VERSION not defined in environment, ' \
-       'skipping this test'
-  do_test = false
-end
-
-RAILS_ROOT = "#{File.dirname(__FILE__)}/app-#{UNICORN_RAILS_TEST_VERSION}"
-unless File.directory?(RAILS_ROOT)
-  warn "unsupported UNICORN_RAILS_TEST_VERSION=#{UNICORN_RAILS_TEST_VERSION}"
-  do_test = false
-end
-
-ROR_V = UNICORN_RAILS_TEST_VERSION.split(/\./).map { |x| x.to_i }
-RB_V = RUBY_VERSION.split(/\./).map { |x| x.to_i }
-if RB_V[0] >= 2
-  warn "skipping Ruby 2.0+ test with Rails <3"
-  do_test = false
-elsif RB_V[0] >= 1 && RB_V[1] >= 9
-  if RB_V[2] >= 2
-    warn "Ruby 1.9.2+ is not compatible with Rails 2.x"
-    do_test = false
-  end
-  unless ROR_V[0] >= 2 && ROR_V[1] >= 3
-    warn "skipping Ruby >=1.9 test with Rails <2.3"
-    do_test = false
-  end
-end
-
-class RailsTest < Test::Unit::TestCase
-  trap(:QUIT, 'IGNORE')
-
-  COMMON_TMP = Tempfile.new('unicorn_tmp') unless defined?(COMMON_TMP)
-
-  HEAVY_CFG = <<-EOS
-worker_processes 2
-timeout 30
-logger Logger.new('#{COMMON_TMP.path}')
-  EOS
-
-  def setup
-    @pwd = Dir.pwd
-    @tmpfile = Tempfile.new('unicorn_rails_test')
-    @tmpdir = @tmpfile.path
-    @tmpfile.close!
-    assert_nothing_raised do
-      FileUtils.cp_r(RAILS_ROOT, @tmpdir, :preserve => true)
-    end
-    Dir.chdir(@tmpdir)
-    system('git', 'clone', '-nsq', RAILS_GIT_REPO, 'vendor/rails')
-    Dir.chdir("#@tmpdir/vendor/rails") do
-      system('git', 'reset', '-q', '--hard', "v#{UNICORN_RAILS_TEST_VERSION}")
-    end
-
-    assert(system('rake', 'db:sessions:create'))
-    assert(system('rake', 'db:migrate'))
-
-    @addr = ENV['UNICORN_TEST_ADDR'] || '127.0.0.1'
-    @port = unused_port(@addr)
-    @start_pid = $$
-    @pid = nil
-  end
-
-  def test_launcher
-    tmp_dirs = %w(cache pids sessions sockets)
-    tmp_dirs.each { |dir| assert(! File.exist?("tmp/#{dir}")) }
-    redirect_test_io { @pid = fork { exec 'unicorn_rails', "-l#@addr:#@port" } }
-    wait_master_ready("test_stderr.#$$.log")
-
-    # basic GET
-    res = Net::HTTP.get_response(URI.parse("http://#@addr:#@port/foo"))
-    assert_equal "FOO\n", res.body
-    assert_match %r{^text/html\b}, res['Content-Type']
-    assert_equal "4", res['Content-Length']
-    assert_equal "200 OK", res['Status']
-
-    # temp dirs exist
-    tmp_dirs.each { |dir| assert(File.directory?("tmp/#{dir}")) }
-
-    # can we set cookies?
-    res = Net::HTTP.get_response(URI.parse("http://#@addr:#@port/foo/xcookie"))
-    assert_equal "200", res.code
-    assert_equal "200 OK", res['Status']
-    cookies = res.get_fields('Set-Cookie')
-    assert_equal 2, cookies.size
-    assert_equal 1, cookies.grep(/\A_unicorn_rails_test\./).size
-    assert_equal 1, cookies.grep(/\Afoo=cookie/).size
-
-    # how about just a session?
-    res = Net::HTTP.get_response(URI.parse("http://#@addr:#@port/foo/xnotice"))
-    assert_equal "200", res.code
-    assert_equal "200 OK", res['Status']
-    cookies = res.get_fields('Set-Cookie')
-    assert_equal 1, cookies.size
-    assert_equal 1, cookies.grep(/\A_unicorn_rails_test\./).size
-
-    # posting forms?
-    uri = URI.parse("http://#@addr:#@port/foo/xpost")
-    wait_master_ready("test_stderr.#$$.log")
-    res = Net::HTTP.post_form(uri, {"a" => "b", "c"=>"d"})
-    assert_equal "200", res.code
-    params = res.body.split(/\n/).grep(/^params:/)
-    assert_equal 1, params.size
-    params = eval(params[0].gsub!(/\Aparams:/, ''))
-    assert_equal Hash, params.class
-    assert_equal 'b', params['a']
-    assert_equal 'd', params['c']
-    assert_equal "200 OK", res['Status']
-
-    # try uploading a big file
-    tmp = Tempfile.new('random')
-    sha1 = Digest::SHA1.new
-    assert_nothing_raised do
-      File.open("/dev/urandom", "rb") do |fp|
-        256.times do
-          buf = fp.sysread(4096)
-          sha1.update(buf)
-          tmp.syswrite(buf)
-        end
-      end
-    end
-
-    # fixed in Rack commit 44ed4640f077504a49b7f1cabf8d6ad7a13f6441,
-    # no released version of Rails or Rack has this fix
-    if RB_V[0] >= 1 && RB_V[1] >= 9
-      warn "multipart broken with Rack 1.0.0 and Rails 2.3.2.1 under 1.9"
-    else
-      resp = `curl -isSfN -Ffile=@#{tmp.path} http://#@addr:#@port/foo/xpost`
-      assert $?.success?
-      resp = resp.split(/\r?\n/)
-      grepped = resp.grep(/^sha1: (.{40})/)
-      assert_equal 1, grepped.size
-      assert_equal(sha1.hexdigest, /^sha1: (.{40})/.match(grepped.first)[1])
-
-      grepped = resp.grep(/^Content-Type:\s+(.+)/i)
-      assert_equal 1, grepped.size
-      assert_match %r{^text/plain}, grepped.first.split(/\s*:\s*/)[1]
-      assert_equal 1, resp.grep(/^Status:/i).size
-    end
-
-    # make sure we can get 403 responses, too
-    uri = URI.parse("http://#@addr:#@port/foo/xpost")
-    wait_master_ready("test_stderr.#$$.log")
-    res = Net::HTTP.get_response(uri)
-    assert_equal "403", res.code
-    assert_equal "403 Forbidden", res['Status']
-
-    # non existent controller
-    uri = URI.parse("http://#@addr:#@port/asdf")
-    res = Net::HTTP.get_response(uri)
-    assert_equal "404", res.code
-    assert_equal "404 Not Found", res['Status']
-
-    # static files
-
-    # ensure file we're about to serve is not there yet
-    res = Net::HTTP.get_response(URI.parse("http://#@addr:#@port/pid.txt"))
-    assert_equal "404 Not Found", res['Status']
-    assert_equal '404', res.code
-
-    # can we serve text files based on suffix?
-    File.open("public/pid.txt", "wb") { |fp| fp.syswrite("#$$\n") }
-    res = Net::HTTP.get_response(URI.parse("http://#@addr:#@port/pid.txt"))
-    assert_equal '200', res.code
-    assert_equal "200 OK", res['Status']
-    assert_match %r{^text/plain}, res['Content-Type']
-    assert_equal "#$$\n", res.body
-
-    # can we serve HTML files based on suffix?
-    assert File.exist?("public/500.html")
-    res = Net::HTTP.get_response(URI.parse("http://#@addr:#@port/500.html"))
-    assert_equal '200', res.code
-    assert_equal '200 OK', res['Status']
-    assert_match %r{^text/html}, res['Content-Type']
-    five_hundred_body = res.body
-
-    # lets try pretending 500 is a controller that got cached
-    assert ! File.exist?("public/500")
-    assert_equal five_hundred_body, File.read("public/500.html")
-    res = Net::HTTP.get_response(URI.parse("http://#@addr:#@port/500"))
-    assert_equal '200', res.code
-    assert_equal '200 OK', res['Status']
-    assert_match %r{^text/html}, res['Content-Type']
-    assert_equal five_hundred_body, res.body
-  end
-
-  def test_alt_url_root
-    # cbf to actually work on this since I never use this feature (ewong)
-    return unless ROR_V[0] >= 2 && ROR_V[1] >= 3
-    redirect_test_io do
-      @pid = fork { exec 'unicorn_rails', "-l#@addr:#@port", '-P/poo' }
-    end
-    wait_master_ready("test_stderr.#$$.log")
-    res = Net::HTTP.get_response(URI.parse("http://#@addr:#@port/poo/foo"))
-    # p res
-    # p res.body
-    # system 'cat', 'log/development.log'
-    assert_equal "200", res.code
-    assert_equal '200 OK', res['Status']
-    assert_equal "FOO\n", res.body
-    assert_match %r{^text/html\b}, res['Content-Type']
-    assert_equal "4", res['Content-Length']
-
-    res = Net::HTTP.get_response(URI.parse("http://#@addr:#@port/foo"))
-    assert_equal "404", res.code
-    assert_equal '404 Not Found', res['Status']
-  end
-
-  def test_alt_url_root_config_env
-    # cbf to actually work on this since I never use this feature (ewong)
-    return unless ROR_V[0] >= 2 && ROR_V[1] >= 3
-    tmp = Tempfile.new('')
-    tmp.syswrite("ENV['RAILS_RELATIVE_URL_ROOT'] = '/poo'\n")
-    redirect_test_io do
-      @pid = fork { exec 'unicorn_rails', "-l#@addr:#@port", "-c", tmp.path }
-    end
-    wait_master_ready("test_stderr.#$$.log")
-    res = Net::HTTP.get_response(URI.parse("http://#@addr:#@port/poo/foo"))
-    assert_equal "200", res.code
-    assert_equal '200 OK', res['Status']
-    assert_equal "FOO\n", res.body
-    assert_match %r{^text/html\b}, res['Content-Type']
-    assert_equal "4", res['Content-Length']
-
-    res = Net::HTTP.get_response(URI.parse("http://#@addr:#@port/foo"))
-    assert_equal "404", res.code
-    assert_equal '404 Not Found', res['Status']
-
-    res = Net::HTTP.get_response(URI.parse("http://#@addr:#@port/poo/x.txt"))
-    assert_equal "200", res.code
-    assert_equal "HELLO\n", res.body
-  end
-
-  def teardown
-    return if @start_pid != $$
-
-    if @pid
-      Process.kill(:QUIT, @pid)
-      _, status = Process.waitpid2(@pid)
-      assert status.success?
-    end
-
-    Dir.chdir(@pwd)
-    FileUtils.rmtree(@tmpdir)
-    loop do
-      Process.kill('-QUIT', 0)
-      begin
-        Process.waitpid(-1, Process::WNOHANG) or break
-      rescue Errno::ECHILD
-        break
-      end
-    end
-  end
-
-end if do_test