about summary refs log tree commit homepage
path: root/test/rails/app-2.0.2
diff options
context:
space:
mode:
Diffstat (limited to 'test/rails/app-2.0.2')
-rw-r--r--test/rails/app-2.0.2/.gitignore2
-rw-r--r--test/rails/app-2.0.2/Rakefile7
-rw-r--r--test/rails/app-2.0.2/app/controllers/application.rb2
-rw-r--r--test/rails/app-2.0.2/app/controllers/foo_controller.rb34
-rw-r--r--test/rails/app-2.0.2/app/helpers/application_helper.rb2
-rw-r--r--test/rails/app-2.0.2/config/boot.rb9
-rw-r--r--test/rails/app-2.0.2/config/database.yml12
-rw-r--r--test/rails/app-2.0.2/config/environment.rb15
-rw-r--r--test/rails/app-2.0.2/config/environments/development.rb6
-rw-r--r--test/rails/app-2.0.2/config/environments/production.rb3
-rw-r--r--test/rails/app-2.0.2/config/routes.rb4
-rw-r--r--test/rails/app-2.0.2/db/.gitignore0
-rw-r--r--test/rails/app-2.0.2/log/.gitignore1
-rw-r--r--test/rails/app-2.0.2/public/404.html1
-rw-r--r--test/rails/app-2.0.2/public/500.html1
15 files changed, 99 insertions, 0 deletions
diff --git a/test/rails/app-2.0.2/.gitignore b/test/rails/app-2.0.2/.gitignore
new file mode 100644
index 0000000..f451f91
--- /dev/null
+++ b/test/rails/app-2.0.2/.gitignore
@@ -0,0 +1,2 @@
+/tmp
+/vendor
diff --git a/test/rails/app-2.0.2/Rakefile b/test/rails/app-2.0.2/Rakefile
new file mode 100644
index 0000000..fbebfca
--- /dev/null
+++ b/test/rails/app-2.0.2/Rakefile
@@ -0,0 +1,7 @@
+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
new file mode 100644
index 0000000..09705d1
--- /dev/null
+++ b/test/rails/app-2.0.2/app/controllers/application.rb
@@ -0,0 +1,2 @@
+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
new file mode 100644
index 0000000..8d877d1
--- /dev/null
+++ b/test/rails/app-2.0.2/app/controllers/foo_controller.rb
@@ -0,0 +1,34 @@
+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
new file mode 100644
index 0000000..de6be79
--- /dev/null
+++ b/test/rails/app-2.0.2/app/helpers/application_helper.rb
@@ -0,0 +1,2 @@
+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
new file mode 100644
index 0000000..71c7d7c
--- /dev/null
+++ b/test/rails/app-2.0.2/config/boot.rb
@@ -0,0 +1,9 @@
+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
new file mode 100644
index 0000000..9f77843
--- /dev/null
+++ b/test/rails/app-2.0.2/config/database.yml
@@ -0,0 +1,12 @@
+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
new file mode 100644
index 0000000..7c720f6
--- /dev/null
+++ b/test/rails/app-2.0.2/config/environment.rb
@@ -0,0 +1,15 @@
+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
new file mode 100644
index 0000000..6a613c1
--- /dev/null
+++ b/test/rails/app-2.0.2/config/environments/development.rb
@@ -0,0 +1,6 @@
+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
new file mode 100644
index 0000000..c4059e3
--- /dev/null
+++ b/test/rails/app-2.0.2/config/environments/production.rb
@@ -0,0 +1,3 @@
+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
new file mode 100644
index 0000000..774028f
--- /dev/null
+++ b/test/rails/app-2.0.2/config/routes.rb
@@ -0,0 +1,4 @@
+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
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/rails/app-2.0.2/db/.gitignore
diff --git a/test/rails/app-2.0.2/log/.gitignore b/test/rails/app-2.0.2/log/.gitignore
new file mode 100644
index 0000000..397b4a7
--- /dev/null
+++ b/test/rails/app-2.0.2/log/.gitignore
@@ -0,0 +1 @@
+*.log
diff --git a/test/rails/app-2.0.2/public/404.html b/test/rails/app-2.0.2/public/404.html
new file mode 100644
index 0000000..44d986c
--- /dev/null
+++ b/test/rails/app-2.0.2/public/404.html
@@ -0,0 +1 @@
+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
new file mode 100644
index 0000000..e534a49
--- /dev/null
+++ b/test/rails/app-2.0.2/public/500.html
@@ -0,0 +1 @@
+500 Internal Server Error