diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-01-05 16:13:53 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-01-05 16:14:01 -0800 |
commit | 19dac8e60e12036b2717cb4933e79ac9efb04d40 (patch) | |
tree | 238433bb8b26657d05b6ae4a3b8cf70f59667d6e /test/rails/app-2.3.5/app | |
parent | 841f967666292f634c6af485f7ac452f36cc2028 (diff) | |
download | unicorn-19dac8e60e12036b2717cb4933e79ac9efb04d40.tar.gz |
Rails 2.3.3.1 is ancient
Diffstat (limited to 'test/rails/app-2.3.5/app')
3 files changed, 45 insertions, 0 deletions
diff --git a/test/rails/app-2.3.5/app/controllers/application_controller.rb b/test/rails/app-2.3.5/app/controllers/application_controller.rb new file mode 100644 index 0000000..07c333e --- /dev/null +++ b/test/rails/app-2.3.5/app/controllers/application_controller.rb @@ -0,0 +1,5 @@ +# -*- encoding: binary -*- + +class ApplicationController < ActionController::Base + helper :all +end diff --git a/test/rails/app-2.3.5/app/controllers/foo_controller.rb b/test/rails/app-2.3.5/app/controllers/foo_controller.rb new file mode 100644 index 0000000..54ca1ed --- /dev/null +++ b/test/rails/app-2.3.5/app/controllers/foo_controller.rb @@ -0,0 +1,36 @@ +# -*- encoding: binary -*- + +require 'digest/sha1' +class FooController < ApplicationController + def index + render :text => "FOO\n" + end + + def xcookie + cookies["foo"] = "cookie-#$$-#{session[:gotta_use_the_session_in_2_3]}" + 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.3.5/app/helpers/application_helper.rb b/test/rails/app-2.3.5/app/helpers/application_helper.rb new file mode 100644 index 0000000..d9889b3 --- /dev/null +++ b/test/rails/app-2.3.5/app/helpers/application_helper.rb @@ -0,0 +1,4 @@ +# -*- encoding: binary -*- + +module ApplicationHelper +end |