- <%= h headers['Status'] %>
+ <%= h("#{@status} #{@status_message}") %>
diff --git a/config/environment.rb b/config/environment.rb
index 4a3c41e0..3c0c53da 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -3,10 +3,11 @@
####
# Make sure we are using the latest rexml
-rexml_versions = ['', 'vendor/plugins/rexml/lib/'].collect { |v|
+rexml_versions = ['', File.dirname(__FILE__) + '/../vendor/plugins/rexml/lib/'].collect { |v|
`ruby -r #{v + 'rexml/rexml'} -e 'p REXML::VERSION'`.split('.').collect {|n| n.to_i} }
-$:.unshift('vendor/plugins/rexml/lib') if (rexml_versions[0] <=> rexml_versions[1]) == -1
+$:.unshift(File.dirname(__FILE__) + '/../vendor/plugins/rexml/lib') if (rexml_versions[0] <=> rexml_versions[1]) == -1
+$: << File.dirname(__FILE__) + '/../vendor/plugins/rack/lib'
require File.join(File.dirname(__FILE__), 'boot')
require 'active_support/secure_random'
diff --git a/instiki b/instiki
index bf720a1c..757a8312 100755
--- a/instiki
+++ b/instiki
@@ -1,5 +1,6 @@
#!/usr/bin/env ruby
+$: << File.dirname(__FILE__) + '/vendor/plugins/rack/lib'
# Executable file for a gem
# must be same as ./instiki.rb
diff --git a/lib/sanitizer.rb b/lib/sanitizer.rb
index aa886ab6..10faa662 100644
--- a/lib/sanitizer.rb
+++ b/lib/sanitizer.rb
@@ -5,7 +5,7 @@ module Sanitizer
#
# Based heavily on Sam Ruby's code in the Universal FeedParser.
- require 'html/tokenizer'
+ require 'action_controller/vendor/html-scanner/html/tokenizer'
require 'node'
require 'stringsupport'
diff --git a/script/server b/script/server
index 98789382..427c419b 100755
--- a/script/server
+++ b/script/server
@@ -1,65 +1,108 @@
#!/usr/bin/env ruby
+require File.dirname(__FILE__) + '/../config/boot'
+# Don't do this. Instead, put it here, where we can customize it.
+#require 'commands/server'
-require 'webrick'
+require 'active_support'
+require 'action_controller'
+
+require 'fileutils'
require 'optparse'
-OPTIONS = {
- :port => 2500,
- :ip => "0.0.0.0",
- :environment => "production",
- :server_root => File.expand_path(File.dirname(__FILE__) + "/../public/"),
- :server_type => WEBrick::SimpleServer,
- :mime_types => WEBrick::HTTPUtils::DefaultMimeTypes.merge({
- 'avi' => 'video/x-msvideo',
- 'gz' => 'application/x-gzip',
- 'js' => 'application/x-javascript',
- 'nb' => 'application/mathematica',
- 'pdf' => 'application/pdf',
- 'svg' => 'application/svg+xml',
- 'tar' => 'application/x-tar',
- 'tex' => 'application/x-tex',
- 'xhtml' => 'application/xhtml+xml',
- 'xml' => 'application/xml',
- 'xslt' => 'application/xslt+xml'
- })
+# TODO: Push Thin adapter upstream so we don't need worry about requiring it
+begin
+ require_library_or_gem 'thin'
+rescue Exception
+ # Thin not available
+end
+
+options = {
+ :Port => 2500,
+ :Host => "0.0.0.0",
+ :environment => (ENV['RAILS_ENV'] || "production").dup,
+ :config => RAILS_ROOT + "/config.ru",
+ :detach => false,
+ :debugger => false
}
-ARGV.options do |opts|
- script_name = File.basename($0)
- opts.banner = "Usage: ruby #{script_name} [options]"
-
- opts.separator ""
-
+ARGV.clone.options do |opts|
opts.on("-p", "--port=port", Integer,
- "Runs Instiki on the specified port.",
- "Default: 2500") { }
-# "Default: 2500") { |OPTIONS[:port]| }
+ "Runs Instiki on the specified port.", "Default: 2500") { |v| options[:Port] = v }
opts.on("-b", "--binding=ip", String,
- "Binds Instiki to the specified ip.",
- "Default: 0.0.0.0") { }
-# "Default: 0.0.0.0") { |OPTIONS[:ip]| }
+ "Binds Instiki to the specified ip.", "Default: 0.0.0.0") { |v| options[:Host] = v }
+ opts.on("-c", "--config=file", String,
+ "Use custom rackup configuration file") { |v| options[:config] = v }
+ opts.on("-d", "--daemon", "Make server run as a Daemon.") { options[:detach] = true }
+ opts.on("-u", "--debugger", "Enable ruby-debugging for the server.") { options[:debugger] = true }
opts.on("-e", "--environment=name", String,
"Specifies the environment to run this server under (test/development/production).",
- "Default: development") { }
-# "Default: development") { |OPTIONS[:environment]| }
- opts.on("-d", "--daemon",
- "Make Instiki run as a Daemon (only works if fork is available -- meaning on *nix)."
- ) { OPTIONS[:server_type] = WEBrick::Daemon }
+ "Default: production") { |v| options[:environment] = v }
opts.separator ""
- opts.on("-h", "--help",
- "Show this help message.") { puts opts; exit }
+ opts.on("-h", "--help", "Show this help message.") { puts opts; exit }
opts.parse!
end
-ENV["RAILS_ENV"] = OPTIONS[:environment]
-require File.dirname(__FILE__) + "/../config/environment"
-require 'webrick_server'
+server = Rack::Handler.get(ARGV.first) rescue nil
+unless server
+ begin
+ server = Rack::Handler::Mongrel
+ rescue LoadError => e
+ server = Rack::Handler::WEBrick
+ end
+end
-OPTIONS['working_directory'] = File.expand_path(RAILS_ROOT)
+puts "=> Booting #{ActiveSupport::Inflector.demodulize(server)}"
+puts "=> Rails #{Rails.version} application starting on http://#{options[:Host]}:#{options[:Port]}"
-puts "=> Instiki started on http://#{OPTIONS[:ip]}:#{OPTIONS[:port]}"
-puts "=> Ctrl-C to shutdown; call with --help for options" if OPTIONS[:server_type] == WEBrick::SimpleServer
-DispatchServlet.dispatch(OPTIONS)
+%w(cache pids sessions sockets).each do |dir_to_make|
+ FileUtils.mkdir_p(File.join(RAILS_ROOT, 'tmp', dir_to_make))
+end
+
+if options[:detach]
+ Process.daemon
+ pid = "#{RAILS_ROOT}/tmp/pids/server.pid"
+ File.open(pid, 'w'){ |f| f.write(Process.pid) }
+ at_exit { File.delete(pid) if File.exist?(pid) }
+end
+
+ENV["RAILS_ENV"] = options[:environment]
+RAILS_ENV.replace(options[:environment]) if defined?(RAILS_ENV)
+
+if File.exist?(options[:config])
+ config = options[:config]
+ if config =~ /\.ru$/
+ cfgfile = File.read(config)
+ if cfgfile[/^#\\(.*)/]
+ opts.parse!($1.split(/\s+/))
+ end
+ inner_app = eval("Rack::Builder.new {( " + cfgfile + "\n )}.to_app", nil, config)
+ else
+ require config
+ inner_app = Object.const_get(File.basename(config, '.rb').capitalize)
+ end
+else
+ require RAILS_ROOT + "/config/environment"
+ inner_app = ActionController::Dispatcher.new
+end
+
+app = Rack::Builder.new {
+ use Rails::Rack::LogTailer unless options[:detach]
+ use Rails::Rack::Static
+ use Rails::Rack::Debugger if options[:debugger]
+ run inner_app
+}.to_app
+
+puts "=> Call with -d to detach"
+
+trap(:INT) { exit }
+
+puts "=> Ctrl-C to shutdown server"
+
+begin
+ server.run(app, options.merge(:AccessLog => []))
+ensure
+ puts 'Exiting'
+end
diff --git a/test/functional/admin_controller_test.rb b/test/functional/admin_controller_test.rb
index 7d483f03..158bdffa 100644
--- a/test/functional/admin_controller_test.rb
+++ b/test/functional/admin_controller_test.rb
@@ -6,7 +6,7 @@ require 'admin_controller'
# Raise errors beyond the default web-based presentation
class AdminController; def rescue_action(e) logger.error(e); raise e end; end
-class AdminControllerTest < Test::Unit::TestCase
+class AdminControllerTest < ActionController::TestCase
fixtures :webs, :pages, :revisions, :system, :wiki_references
def setup
diff --git a/test/functional/application_test.rb b/test/functional/application_test.rb
index 2436ac99..5dfad5b1 100755
--- a/test/functional/application_test.rb
+++ b/test/functional/application_test.rb
@@ -6,7 +6,7 @@ require 'wiki_controller'
# Need some concrete class to test the abstract class features
class WikiController; def rescue_action(e) logger.error(e); raise e end; end
-class ApplicationTest < Test::Unit::TestCase
+class ApplicationTest < ActionController::TestCase
fixtures :webs, :pages, :revisions, :system
Mime::LOOKUP["text/html"] = HTML
@@ -20,43 +20,43 @@ class ApplicationTest < Test::Unit::TestCase
def test_utf8_header
get :show, :web => 'wiki1', :id => 'HomePage'
- assert_equal 'text/html; charset=utf-8', @response.headers['type']
+ assert_equal 'text/html; charset=utf-8', @response.headers['Content-Type']
end
def test_mathplayer_mime_type
@request.user_agent = 'MathPlayer'
get :show, :web => 'wiki1', :id => 'HomePage'
- assert_equal 'application/xhtml+xml', @response.headers['type']
+ assert_equal 'application/xhtml+xml', @response.headers['Content-Type']
end
def test_validator_mime_type
@request.user_agent = 'Validator'
get :show, :web => 'wiki1', :id => 'HomePage'
- assert_equal 'application/xhtml+xml; charset=utf-8', @response.headers['type']
+ assert_equal 'application/xhtml+xml; charset=utf-8', @response.headers['Content-Type']
end
def test_accept_header_xhtml
@request.user_agent = 'Mozilla/5.0'
@request.env.update({'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' })
get :show, :web => 'wiki1', :id => 'HomePage'
- assert_equal 'application/xhtml+xml; charset=utf-8', @response.headers['type']
+ assert_equal 'application/xhtml+xml; charset=utf-8', @response.headers['Content-Type']
end
def test_accept_header_html
@request.user_agent = 'Foo'
@request.env.update({'HTTP_ACCEPT' => 'text/html,application/xml;q=0.9,*/*;q=0.8' })
get :show, :web => 'wiki1', :id => 'HomePage'
- assert_equal 'text/html; charset=utf-8', @response.headers['type']
+ assert_equal 'text/html; charset=utf-8', @response.headers['Content-Type']
end
def test_tex_mime_type
get :tex, :web => 'wiki1', :id => 'HomePage'
- assert_equal 'text/plain; charset=utf-8', @response.headers['type']
+ assert_equal 'text/plain; charset=utf-8', @response.headers['Content-Type']
end
def test_atom_mime_type
get :atom_with_content, :web => 'wiki1'
- assert_equal 'application/atom+xml; charset=utf-8', @response.headers['type']
+ assert_equal 'application/atom+xml; charset=utf-8', @response.headers['Content-Type']
end
def test_connect_to_model_unknown_wiki
diff --git a/test/functional/file_controller_test.rb b/test/functional/file_controller_test.rb
index 779a4d74..2abc1edd 100755
--- a/test/functional/file_controller_test.rb
+++ b/test/functional/file_controller_test.rb
@@ -8,7 +8,7 @@ require 'stringio'
# Raise errors beyond the default web-based presentation
class FileController; def rescue_action(e) logger.error(e); raise e end; end
-class FileControllerTest < Test::Unit::TestCase
+class FileControllerTest < ActionController::TestCase
fixtures :webs, :pages, :revisions, :system
def setup
@@ -41,7 +41,7 @@ class FileControllerTest < Test::Unit::TestCase
assert_response(:success, bypass_body_parsing = true)
assert_equal "Contents of the file", r.body
- assert_equal 'text/plain', r.headers['type']
+ assert_equal 'text/plain', r.headers['Content-Type']
assert_equal 'inline; filename="foo.txt"', r.headers['Content-Disposition']
end
@@ -53,7 +53,7 @@ class FileControllerTest < Test::Unit::TestCase
assert_response(:success, bypass_body_parsing = true)
assert_equal "Contents of the file", r.body
- assert_equal 'application/octet-stream', r.headers['type']
+ assert_equal 'application/octet-stream', r.headers['Content-Type']
assert_equal 'attachment; filename="foo.html"', r.headers['Content-Disposition']
end
@@ -65,7 +65,7 @@ class FileControllerTest < Test::Unit::TestCase
assert_response(:success, bypass_body_parsing = true)
assert_equal "aaa\nbbb\n", r.body
- assert_equal 'application/pdf', r.headers['type']
+ assert_equal 'application/pdf', r.headers['Content-Type']
end
def test_pic_download_gif
@@ -75,7 +75,7 @@ class FileControllerTest < Test::Unit::TestCase
r = get :file, :web => 'wiki1', :id => 'rails.gif'
assert_response(:success, bypass_body_parsing = true)
- assert_equal 'image/gif', r.headers['type']
+ assert_equal 'image/gif', r.headers['Content-Type']
assert_equal pic.size, r.body.size
assert_equal pic, r.body
assert_equal 'inline; filename="rails.gif"', r.headers['Content-Disposition']
diff --git a/test/functional/routes_test.rb b/test/functional/routes_test.rb
index 7cdb46a7..177b2f4d 100644
--- a/test/functional/routes_test.rb
+++ b/test/functional/routes_test.rb
@@ -4,7 +4,7 @@ require File.dirname(__FILE__) + '/../test_helper'
require 'action_controller/routing'
-class RoutesTest < Test::Unit::TestCase
+class RoutesTest < ActionController::TestCase
def test_parse_uri
assert_routing('', :controller => 'wiki', :action => 'index')
diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb
index 666d5fe8..4b816c6e 100755
--- a/test/functional/wiki_controller_test.rb
+++ b/test/functional/wiki_controller_test.rb
@@ -13,7 +13,7 @@ require 'zip/zipfilesystem'
# Raise errors beyond the default web-based presentation
class WikiController; def rescue_action(e) logger.error(e); raise e end; end
-class WikiControllerTest < Test::Unit::TestCase
+class WikiControllerTest < ActionController::TestCase
fixtures :webs, :pages, :revisions, :system, :wiki_references
def setup
@@ -30,6 +30,7 @@ class WikiControllerTest < Test::Unit::TestCase
@home = @page = pages(:home_page)
@oak = pages(:oak)
@elephant = pages(:elephant)
+ @eternity = Regexp.new('author=.*; path=/; expires=' + Time.utc(2030).strftime("%a, %d-%b-%Y %H:%M:%S GMT"))
end
def test_authenticate
@@ -37,7 +38,7 @@ class WikiControllerTest < Test::Unit::TestCase
get :authenticate, :web => 'wiki1', :password => 'pswd'
assert_redirected_to :web => 'wiki1', :action => 'show', :id => 'HomePage'
- assert_equal ['pswd'], @response.cookies['wiki1']
+ assert_equal 'pswd', @response.cookies['wiki1']
end
def test_authenticate_wrong_password
@@ -118,7 +119,7 @@ class WikiControllerTest < Test::Unit::TestCase
r = process 'export_html', 'web' => 'wiki1'
assert_response(:success, bypass_body_parsing = true)
- assert_equal 'application/zip', r.headers['type']
+ assert_equal 'application/zip', r.headers['Content-Type']
assert_match /attachment; filename="wiki1-xhtml-\d\d\d\d-\d\d-\d\d-\d\d-\d\d-\d\d.zip"/,
r.headers['Content-Disposition']
assert_equal 'PK', r.body[0..1], 'Content is not a zip file'
@@ -149,7 +150,7 @@ class WikiControllerTest < Test::Unit::TestCase
r = process 'export_html', 'web' => 'wiki1'
assert_response(:success, bypass_body_parsing = true)
- assert_equal 'application/zip', r.headers['type']
+ assert_equal 'application/zip', r.headers['Content-Type']
assert_match /attachment; filename="wiki1-html-\d\d\d\d-\d\d-\d\d-\d\d-\d\d-\d\d.zip"/,
r.headers['Content-Disposition']
assert_equal 'PK', r.body[0..1], 'Content is not a zip file'
@@ -177,7 +178,7 @@ class WikiControllerTest < Test::Unit::TestCase
r = process 'export_html', 'web' => 'wiki1', 'layout' => 'no'
assert_response(:success, bypass_body_parsing = true)
- assert_equal 'application/zip', r.headers['type']
+ assert_equal 'application/zip', r.headers['Content-Type']
assert_match /attachment; filename="wiki1-x?html-\d\d\d\d-\d\d-\d\d-\d\d-\d\d-\d\d.zip"/,
r.headers['Content-Disposition']
assert_equal 'PK', r.body[0..1], 'Content is not a zip file'
@@ -187,7 +188,7 @@ class WikiControllerTest < Test::Unit::TestCase
r = process 'export_markup', 'web' => 'wiki1'
assert_response(:success, bypass_body_parsing = true)
- assert_equal 'application/zip', r.headers['type']
+ assert_equal 'application/zip', r.headers['Content-Type']
assert_match /attachment; filename="wiki1-markdownMML-\d\d\d\d-\d\d-\d\d-\d\d-\d\d-\d\d.zip"/,
r.headers['Content-Disposition']
assert_equal 'PK', r.body[0..1], 'Content is not a zip file'
@@ -199,7 +200,7 @@ class WikiControllerTest < Test::Unit::TestCase
# def test_export_pdf
# r = process 'export_pdf', 'web' => 'wiki1'
# assert_response(:success, bypass_body_parsing = true)
-# assert_equal 'application/pdf', r.headers['type']
+# assert_equal 'application/pdf', r.headers['Content-Type']
# assert_match /attachment; filename="wiki1-tex-\d\d\d\d-\d\d-\d\d-\d\d-\d\d-\d\d.pdf"/,
# r.headers['Content-Disposition']
# assert_equal '%PDF', r.body[0..3]
@@ -216,7 +217,7 @@ class WikiControllerTest < Test::Unit::TestCase
# r = process 'export_tex', 'web' => 'wiki1'
#
# assert_response(:success, bypass_body_parsing = true)
-# assert_equal 'application/octet-stream', r.headers['type']
+# assert_equal 'application/octet-stream', r.headers['Content-Type']
# assert_match /attachment; filename="wiki1-tex-\d\d\d\d-\d\d-\d\d-\d\d-\d\d-\d\d.tex"/,
# r.headers['Content-Disposition']
# assert_equal '\documentclass', r.body[0..13], 'Content is not a TeX file'
@@ -296,7 +297,7 @@ class WikiControllerTest < Test::Unit::TestCase
# assert_equal '%PDF', r.body[0..3]
# assert_equal "EOF\n", r.body[-4..-1]
#
-# assert_equal 'application/pdf', r.headers['type']
+# assert_equal 'application/pdf', r.headers['Content-Type']
# assert_match /attachment; filename="HomePage-wiki1-\d\d\d\d-\d\d-\d\d-\d\d-\d\d-\d\d.pdf"/,
# r.headers['Content-Disposition']
# end
@@ -591,8 +592,8 @@ class WikiControllerTest < Test::Unit::TestCase
'author' => 'AuthorOfNewPage'
assert_redirected_to :web => 'wiki1', :action => 'show', :id => 'NewPage'
- assert_equal ['AuthorOfNewPage'], r.cookies['author'].value
- assert_equal Time.utc(2030), r.cookies['author'].expires
+ assert_equal 'AuthorOfNewPage', r.cookies['author']
+ assert_match @eternity, r.headers["Set-Cookie"][0]
new_page = @wiki.read_page('wiki1', 'NewPage')
assert_equal 'Contents of a new page', new_page.content
assert_equal 'AuthorOfNewPage', new_page.author
@@ -603,8 +604,8 @@ class WikiControllerTest < Test::Unit::TestCase
'author' => 'AuthorOfNewPage'
assert_redirected_to :web => 'wiki1', :action => 'new', :id => 'NewPage', :content => ''
- assert_equal ['AuthorOfNewPage'], r.cookies['author'].value
- assert_equal Time.utc(2030), r.cookies['author'].expires
+ assert_equal 'AuthorOfNewPage', r.cookies['author']
+ assert_match @eternity, r.headers["Set-Cookie"][0]
end
def test_save_not_utf8_ncr
@@ -612,8 +613,8 @@ class WikiControllerTest < Test::Unit::TestCase
'author' => 'AuthorOfNewPage'
assert_redirected_to :web => 'wiki1', :action => 'new', :id => 'NewPage'
- assert_equal ['AuthorOfNewPage'], r.cookies['author'].value
- assert_equal Time.utc(2030), r.cookies['author'].expires
+ assert_equal 'AuthorOfNewPage', r.cookies['author']
+ assert_match @eternity, r.headers["Set-Cookie"][0]
end
def test_save_not_utf8_dec_ncr
@@ -621,8 +622,8 @@ class WikiControllerTest < Test::Unit::TestCase
'author' => 'AuthorOfNewPage'
assert_redirected_to :web => 'wiki1', :action => 'new', :id => 'NewPage'
- assert_equal ['AuthorOfNewPage'], r.cookies['author'].value
- assert_equal Time.utc(2030), r.cookies['author'].expires
+ assert_equal 'AuthorOfNewPage', r.cookies['author']
+ assert_match @eternity, r.headers["Set-Cookie"][0]
end
def test_save_new_revision_of_existing_page
@@ -633,7 +634,7 @@ class WikiControllerTest < Test::Unit::TestCase
'author' => 'Batman'
assert_redirected_to :web => 'wiki1', :action => 'show', :id => 'HomePage'
- assert_equal ['Batman'], r.cookies['author'].value
+ assert_equal 'Batman', r.cookies['author']
home_page = @wiki.read_page('wiki1', 'HomePage')
assert_equal current_revisions+1, home_page.revisions.size
assert_equal 'Revised HomePage', home_page.content
@@ -652,7 +653,7 @@ class WikiControllerTest < Test::Unit::TestCase
:content => 'HisWay would be MyWay $\sin(x)\begin{svg}\end{svg}\includegraphics[width' +
'=3em]{foo}$ in kinda ThatWay in HisWay though MyWay \OverThere -- see SmartEng' +
'ine in that SmartEngineGUI'
- assert_equal ['Batman'], r.cookies['author'].value
+ assert_equal 'Batman', r.cookies['author']
home_page = @wiki.read_page('wiki1', 'HomePage')
assert_equal current_revisions, home_page.revisions.size
assert_equal 'DavidHeinemeierHansson', home_page.author
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 24e61033..66a1b1e6 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -4,8 +4,7 @@ ENV['RAILS_ENV'] = 'test'
# File.expand_path can be removed if Ruby 1.9 is in use.
require File.expand_path(File.dirname(__FILE__) + '/../config/environment')
-require 'test/unit'
-require 'active_record/fixtures'
+require 'test_help'
require 'wiki_content'
require 'url_generator'
require 'digest/sha1'
@@ -17,10 +16,12 @@ class FakeSessionDbMan
end
end
-Test::Unit::TestCase.pre_loaded_fixtures = false
-Test::Unit::TestCase.use_transactional_fixtures = true
-Test::Unit::TestCase.use_instantiated_fixtures = false
-Test::Unit::TestCase.fixture_path = File.dirname(__FILE__) + "/fixtures/"
+class ActiveSupport::TestCase
+ self.pre_loaded_fixtures = false
+ self.use_transactional_fixtures = true
+ self.use_instantiated_fixtures = false
+ self.fixture_path = File.dirname(__FILE__) + "/fixtures/"
+end
# activate PageObserver
PageObserver.instance
diff --git a/test/unit/page_renderer_test.rb b/test/unit/page_renderer_test.rb
index fd29b826..7fc73e4f 100644
--- a/test/unit/page_renderer_test.rb
+++ b/test/unit/page_renderer_test.rb
@@ -1,6 +1,6 @@
require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
-class PageRendererTest < Test::Unit::TestCase
+class PageRendererTest < ActiveSupport::TestCase
fixtures :webs, :pages, :revisions, :system, :wiki_references
def setup
diff --git a/test/unit/page_test.rb b/test/unit/page_test.rb
index 66fe1deb..38efd80a 100644
--- a/test/unit/page_test.rb
+++ b/test/unit/page_test.rb
@@ -1,6 +1,6 @@
require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
-class PageTest < Test::Unit::TestCase
+class PageTest < ActiveSupport::TestCase
fixtures :webs, :pages, :revisions, :system
def setup
diff --git a/test/unit/web_test.rb b/test/unit/web_test.rb
index 00d1f514..ec85f81c 100644
--- a/test/unit/web_test.rb
+++ b/test/unit/web_test.rb
@@ -1,7 +1,7 @@
require File.dirname(__FILE__) + '/../test_helper'
#require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
-class WebTest < Test::Unit::TestCase
+class WebTest < ActiveSupport::TestCase
fixtures :system, :webs, :pages, :revisions, :wiki_references
def setup
diff --git a/test/unit/wiki_file_test.rb b/test/unit/wiki_file_test.rb
index 886bd36d..6ea42f3b 100644
--- a/test/unit/wiki_file_test.rb
+++ b/test/unit/wiki_file_test.rb
@@ -1,7 +1,7 @@
require File.dirname(__FILE__) + '/../test_helper'
require 'fileutils'
-class WikiFileTest < Test::Unit::TestCase
+class WikiFileTest < ActiveSupport::TestCase
include FileUtils
fixtures :webs, :pages, :revisions, :system, :wiki_references
diff --git a/vendor/plugins/form_spam_protection/lib/form_spam_protection.rb b/vendor/plugins/form_spam_protection/lib/form_spam_protection.rb
index b85aabd5..9d90cf04 100644
--- a/vendor/plugins/form_spam_protection/lib/form_spam_protection.rb
+++ b/vendor/plugins/form_spam_protection/lib/form_spam_protection.rb
@@ -14,7 +14,7 @@ module FormSpamProtection
def protect_form_handler_from_spam
unless request.get? || request.xml_http_request?
if params[:_form_key] && session[:form_keys]
- key = session.dbman.generate_digest(params[:_form_key])
+ key = Digest::SHA1.hexdigest(params[:_form_key])
if session[:form_keys].keys.include?(key)
session[:form_keys][key][1] += 1
if session[:form_keys][key][1] >= 4
diff --git a/vendor/plugins/form_spam_protection/lib/form_tag_helper_extensions.rb b/vendor/plugins/form_spam_protection/lib/form_tag_helper_extensions.rb
index 8649ea9f..fcef5bde 100644
--- a/vendor/plugins/form_spam_protection/lib/form_tag_helper_extensions.rb
+++ b/vendor/plugins/form_spam_protection/lib/form_tag_helper_extensions.rb
@@ -8,7 +8,7 @@ module ActionView
if name == :form && @protect_form_from_spam
session[:form_keys] ||= {}
form_key = Digest::SHA1.hexdigest(self.object_id.to_s + rand.to_s)
- session[:form_keys][session.dbman.generate_digest(form_key)] = [Time.now, 0]
+ session[:form_keys][Digest::SHA1.hexdigest(form_key)] = [Time.now, 0]
if session[:form_keys].length > 30
first = session[:form_keys].values.sort { |a,b| a[0] <=> b[0] } [0]
session[:form_keys].delete(session[:form_keys].index(first))
diff --git a/vendor/plugins/rack/AUTHORS b/vendor/plugins/rack/AUTHORS
new file mode 100644
index 00000000..dc0203de
--- /dev/null
+++ b/vendor/plugins/rack/AUTHORS
@@ -0,0 +1,8 @@
+* Christian Neukirchen
+* HTTP authentication: Tim Fletcher
+* Cookie sessions, Static handler: Luc Heinrich
+* Pool sessions, OpenID authentication: blink
+* Rack::Deflater: Christoffer Sawicki
+* LiteSpeed handler: Adrian Madrid
+* SCGI handler: Jeremy Evans
+* Official Logo: Armin Ronacher
diff --git a/vendor/plugins/rack/COPYING b/vendor/plugins/rack/COPYING
new file mode 100644
index 00000000..8ed138b9
--- /dev/null
+++ b/vendor/plugins/rack/COPYING
@@ -0,0 +1,18 @@
+Copyright (c) 2007 Christian Neukirchen
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/plugins/rack/ChangeLog b/vendor/plugins/rack/ChangeLog
new file mode 100644
index 00000000..059ae933
--- /dev/null
+++ b/vendor/plugins/rack/ChangeLog
@@ -0,0 +1,1423 @@
+Fri Jan 9 17:32:54 2009 +0100 Christian Neukirchen
+ * Fix directory traversal exploits in Rack::File and Rack::Directory
+
+Tue Jan 6 12:56:00 2009 +0100 Christian Neukirchen
+ * Last minute README fixes
+
+Tue Jan 6 12:46:37 2009 +0100 Christian Neukirchen
+ * Fix last glitches
+
+Tue Jan 6 12:44:44 2009 +0100 Christian Neukirchen
+ * Set release date
+
+Mon Jan 5 17:44:36 2009 -0800 Jon Crosby
+ * Store original HTTP method in MethodOverride middleware
+
+Tue Jan 6 12:30:29 2009 +0100 Christian Neukirchen
+ * Fix typos in auth/openid
+ Reported by Robert Adkins
+
+Mon Jan 5 18:41:15 2009 +0100 Christian Neukirchen
+ * Rack::File::MIME_TYPES is now Rack::Mime::MIME_TYPES
+
+Mon Jan 5 18:35:31 2009 +0100 Christian Neukirchen
+ * Update gemspec
+
+Mon Jan 5 18:46:08 2009 +0100 Christian Neukirchen
+ * Revert "Added Rack::Request initialization memoization to reduce repetitive instantiation cost."
+ Potentially causes problems with inheritance.
+
+ This reverts commits:
+ 4cf6f6eb0dd8fdb415016a4e2f41d1784146cd7a
+ 552f7b0718ee8cd79c185cd72413690f0da72402
+ eefbed89c4ece749e889132012d0f67cd87926a8
+
+Mon Jan 5 18:42:09 2009 +0100 Christian Neukirchen
+ * Branch 0.9
+
+Mon Jan 5 18:16:36 2009 +0100 Christian Neukirchen
+ * Update thanks
+
+Mon Jan 5 18:16:24 2009 +0100 Christian Neukirchen
+ * Update copyright
+
+Mon Jan 5 18:06:11 2009 +0100 Christian Neukirchen
+ * Update README
+
+Mon Jan 5 15:00:15 2009 +0100 Christian Neukirchen
+ * In URLMap, entries without host name should come first
+
+Mon Jan 5 14:59:38 2009 +0100 Christian Neukirchen
+ * Marshall of String changed in 1.9
+
+Mon Jan 5 14:59:27 2009 +0100 Christian Neukirchen
+ * Rewrite Response test to use a well-defined #each
+
+Mon Jan 5 14:59:06 2009 +0100 Christian Neukirchen
+ * Array#to_a changed in 1.9
+
+Mon Jan 5 14:58:45 2009 +0100 Christian Neukirchen
+ * Constants are symbols in 1.9
+
+Mon Jan 5 13:51:20 2009 +0100 Christian Neukirchen
+ * Shuffle scopes for 1.9
+
+Mon Jan 5 05:41:13 2009 -0400 raggi
+ * Fix spec_rack_response for 1.9
+
+Sun Jan 4 23:19:31 2009 +0900 Michael Fellinger
+ * Fix webrick handler for ruby 1.9.1
+
+Tue Dec 30 22:03:42 2008 +0100 Christian Neukirchen
+ * Merge commit 'official/master'
+
+Tue Dec 30 21:48:17 2008 +0100 Christian Neukirchen
+ * Add trailing slash to the alternative gem server
+
+Mon Dec 29 22:31:27 2008 -0600 Joshua Peek
+ * Support X-Http-Method-Override header in MethodOverride middleware
+
+Tue Dec 30 12:23:26 2008 +0100 Christian Neukirchen
+ * Don't leak absolute paths in error messages
+ Reported by Yonghui Luo.
+
+Mon Dec 29 02:15:25 2008 -0800 Ryan Tomayko
+ * Implement HeaderHash#merge! and HeaderHash#merge
+
+Mon Dec 29 00:40:46 2008 -0800 Ryan Tomayko
+ * Use HeaderHash where header case should be insensitive
+
+ The ConditionalGet, ContentLength, Deflator, and ShowStatus
+ middleware components were reading/checking headers case
+ sensitively.
+
+Thu Dec 11 21:00:27 2008 -0800 Ryan Tomayko
+ * Non-normalizing HeaderHash with case-insensitive lookups
+
+ This is a backwards incompatible change that removes header name
+ normalization while attempting to keep most of its benefits. The
+ header name case is preserved but the Hash has case insensitive
+ lookup, replace, delete, and include semantics.
+
+Mon Dec 29 11:49:29 2008 -0600 Joshua Peek
+ * Don't try to rewind CGI input
+
+Sun Dec 28 14:08:47 2008 +0100 Christian Neukirchen
+ * Reformat Rack::Deflater code
+
+Tue Dec 23 00:23:49 2008 -0800 Ryan Tomayko
+ * Rack::Deflator respects the no-transform cache control directive
+
+Thu Dec 25 12:20:50 2008 +0100 Christian Neukirchen
+ * Update README
+
+Thu Dec 25 12:09:42 2008 +0100 Christian Neukirchen
+ * Idiomize code
+
+Wed Dec 24 19:33:17 2008 -0500 Matt Todd
+ * Added specification for Rack::Request memoization.
+
+Wed Dec 24 19:25:20 2008 -0500 Matt Todd
+ * Updated spec with the new size of the content length based on the new environment variable data included with the Rack::Request instantiation memoization.
+
+Wed Dec 24 19:24:44 2008 -0500 Matt Todd
+ * Added Rack::Request initialization memoization to reduce repetitive instantiation cost.
+
+Tue Dec 23 21:32:38 2008 -0600 Joshua Peek
+ * Rewind input after parsing request form vars
+
+Tue Dec 23 21:22:50 2008 -0600 Joshua Peek
+ * Delegate Lint::InputWrapper#rewind to underlying IO object
+
+Tue Dec 23 11:52:11 2008 -0800 Ryan Tomayko
+ * use Set instead of Array for STATUS_WITH_NO_ENTITY_BODY
+
+Mon Dec 22 22:17:18 2008 -0800 Ryan Tomayko
+ * Rack::ContentLength tweaks ...
+
+ * Adds a Content-Length header only when the body is of knownable
+ length (String, Array).
+ * Does nothing when Transfer-Encoding header is present in
+ response.
+ * Uses a Set instead of an Array for status code lookup (linear
+ search through 102 elements seemed expensive).
+
+Sat Dec 20 13:36:22 2008 -0800 Dan Kubb
+ * Fixed Rack::Deflater to handle responses with Last-Modified header
+
+ * There was a bug when performing gzip compression where the
+ Last-Modified response header was assumed to be a Time object,
+ and passed directly to Zlib::GzipWriter#mtime, causing an exception
+ since it is always a String.
+
+ This fix parses the Last-Modified header using Time.httpdate and
+ returns a Time obejct, which can be safely passed to
+ Zlib::GzipWriter#mtime.
+
+Sat Dec 20 13:23:05 2008 -0800 Dan Kubb
+ * Do not add Content-Encoding for a response without and entity body
+
+Sat Dec 20 13:17:18 2008 -0800 Dan Kubb
+ * Updated Rack::Deflater spec helper to allow setting the default status
+
+Sat Dec 20 13:06:28 2008 -0800 Dan Kubb
+ * Moved STATUS_WITH_NO_ENTITY_BODY into Rack::Utils
+
+ * Removed duplicate constant from Rack::ContentLength and Rack::Lint
+
+Sat Dec 20 13:00:58 2008 -0800 Dan Kubb
+ * Added Accept-Encoding to HTTP Vary header
+
+Fri Dec 19 15:24:21 2008 +0100 Christian Neukirchen
+ * Merge commit 'rtomayko/methodoverride'
+
+Thu Dec 18 19:25:24 2008 -0800 Ryan Tomayko
+ * Fix MethodOverride error when POST has no _method param
+
+Wed Dec 17 10:02:15 2008 -0500 macournoyer
+ * Add autoload for Thin handler
+
+Tue Dec 16 21:48:21 2008 -0500 macournoyer
+ * Add Thin handler
+
+Tue Dec 9 10:34:19 2008 -0600 Joshua Peek
+ * Add ContentLength middleware
+
+Mon Dec 1 22:24:23 2008 -0700 kastner
+ * fixing camping bug. see gist:26011
+
+Tue Dec 2 11:28:49 2008 -0600 Joshua Peek
+ * Correct status code language to follow RFC 2616
+
+Wed Nov 19 22:07:38 2008 +0100 Daniel Roethlisberger
+ * Improve session id security: Make session id size configurable, raise the default size from 32 bits to 128 bits, and refactor to allow for easy monkey patching the actual session id generation. Modified version according to feedback.
+
+Wed Nov 19 22:23:30 2008 +0100 Daniel Roethlisberger
+ * Add support for Secure and HttpOnly flags to session cookies. Set HttpOnly flag by default, since normally, there is no need to read a Rack session from JavaScript in the browser. Do not set the Secure flag by default, since that breaks if the application is not served over TLS.
+
+Fri Oct 17 11:43:25 2008 -0700 Eric Wong
+ * Avoid slurping or parsing request body on PUT requests
+
+ Uploading a large file via the HTTP PUT method causes
+ `@env["rack.input"].read' to be called inside the POST method. This
+ means the entire file is slurped into memory and was needlessly causing
+ my Sinatra process to eat up 300M+ for some uploads I've been doing.
+
+Thu Nov 20 14:49:32 2008 -0800 postmodern
+ * Use the universally supported select event handler for lighttpd.
+
+ * freebsd-kqueue is obviously not supported on Linux.
+
+Thu Nov 20 00:14:21 2008 -0800 postmodern
+ * When calling map, create another object of the same class.
+
+ * This allows one to extend Rack::Builder to create specialized Rack
+ DSLs.
+
+Fri Nov 28 15:51:48 2008 +0100 Christian Neukirchen
+ * Silence Net::HTTP warning
+
+Tue Nov 25 16:33:27 2008 -0800 Phil Hagelberg
+ * Updated the tests to use net/http since open-uri doesn't stream responses.
+
+ Oh, and now the tests actually pass.
+
+Tue Nov 25 16:16:39 2008 -0800 Phil Hagelberg
+ * Allow streaming with the Mongrel Handler.
+
+ Write directly to the socket instead of keeping it in the Mongrel Response body.
+ Send the status/headers up front.
+
+Tue Nov 25 15:29:24 2008 -0800 Phil Hagelberg
+ * Add tests for streaming with Mongrel.
+
+Sun Oct 19 00:15:49 2008 -0600 Ben Alpert
+ * Implemented Rack::Head, modified Rack::Lint to ensure responses to HEAD requests have empty bodies
+
+Sat Oct 11 16:45:41 2008 +0200 Christian Neukirchen
+ * Fix header emission for WEBrick and Set-Cookie
+ Found by Michael Fellinger.
+ This does not fix Set-Cookie2, Warning, or WWW-Authenticate, because
+ WEBrick has no way to have duplicates for them.
+
+Wed Oct 1 12:10:40 2008 +0200 Christian Neukirchen
+ * Test that Rack::Session::Cookie ignores tampered with session cookies
+ by Christoffer Sawicki
+
+Tue Sep 30 19:18:35 2008 +0200 Christian Neukirchen
+ * Add secure cookies
+ Proposed by necrodome.
+
+Tue Sep 30 17:25:29 2008 +0900 Michael Fellinger
+ * Empty is if Content-Length is 0, [''] ain't empty?
+
+Tue Sep 16 11:50:27 2008 +0200 Christian Neukirchen
+ * Rewrite Rack::Builder tests to avoid race-conditions
+
+Sat Sep 13 04:28:51 2008 -0400 Matt Todd
+ * Added another example demonstrating the Rack::Builder.app method.
+
+Sat Sep 13 04:21:38 2008 -0400 Matt Todd
+ * Added spec for application initialization to be performed only once.
+
+Sat Sep 13 03:47:12 2008 -0400 Matt Todd
+ * Implemented Rack::Builder.app and added specs.
+
+Wed Sep 10 18:56:46 2008 +0200 Christian Neukirchen
+ * Add :secure option for set_cookie
+ By Brad Hilton.
+
+Tue Sep 9 11:25:49 2008 +0200 Christian Neukirchen
+ * ConditionalGet middleware (Last-Modified/Etag)
+
+ Adapted from Michael Klishin's implementation for Merb:
+ http://github.com/wycats/merb-core/tree/master/lib/merb-core/rack/middleware/conditional_get.rb
+
+ Implemented by Ryan Tomayko.
+
+Sun Sep 7 12:20:22 2008 -0500 Joshua Peek
+ * Add MethodOverride middleware to allow browsers to fake PUT and DELETE methods
+
+Sun Sep 7 20:20:30 2008 +0200 Christian Neukirchen
+ * Update emongrel and add swiftiplied mongrel
+
+Sun Sep 7 20:15:26 2008 +0200 Christian Neukirchen
+ * Update Rack::File
+
+ * Fix trouble with wrong Content-Length if File.size returns 0
+ * Use Rack::Mime
+ * Split _call into methods for easier subclassing
+
+ Based on a patch by Michael Fellinger.
+
+Sun Sep 7 19:52:15 2008 +0200 Christian Neukirchen
+ * New version of Rack::Directory
+
+ * Handles symlinks
+ * Less disk access
+ * Uses UTF8
+ * Human-readable filesize from Bytes to Terabytes
+ * Uses Rack::File as app by default
+ * Does a File.expand_path on the
+ * +root+ argument
+ * Splits up the _call
+ * method for easier
+ * subclassing
+ * Use new Rack::Mime
+
+ Based on a patch by Michael Fellinger.
+
+Sun Sep 7 17:51:44 2008 +0200 Christian Neukirchen
+ * Add Rack::Mime, a module containing a MIME-type list and helpers
+ Proposed and implemented by Michael Fellinger.
+
+Fri Sep 5 22:22:16 2008 +0300 Michael S. Klishin
+ * Make Rack::Lint::InputWrapper delegate size method to underlying IO object.
+
+ See http://snurl.com/3nesq: Lint was breaking file uploads in a Merb app.
+
+ Signed-off-by: Michael S. Klishin
+
+Sat Aug 30 16:47:50 2008 +0900 Michael Fellinger
+ * Add Request#ip and corresponding spec
+
+Thu Aug 28 15:57:14 2008 +0200 Christian Neukirchen
+ * Make Rack::Lobster set Content-Length
+
+Thu Aug 28 15:55:19 2008 +0200 Christian Neukirchen
+ * Make Rack::ShowExceptions set Content-Length
+
+Thu Aug 28 15:54:21 2008 +0200 Christian Neukirchen
+ * Make Rack::Response count Content-Length
+
+Thu Aug 28 15:47:47 2008 +0200 Christian Neukirchen
+ * Remove empty FastCGI headers nginx likes to pass
+
+Thu Aug 21 12:26:47 2008 +0200 Christian Neukirchen
+ * Update to version 0.4
+
+Thu Aug 21 13:24:41 2008 +0200 Christian Neukirchen
+ * Cosmetics
+
+Thu Aug 21 12:26:36 2008 +0200 Christian Neukirchen
+ * Fix packaging script
+
+Thu Aug 21 12:13:57 2008 +0200 Christian Neukirchen
+ * Update README
+
+Tue Aug 19 13:15:18 2008 +0200 Christian Neukirchen
+ * REQUEST_METHOD only must be a valid token
+
+Sat Aug 9 18:53:04 2008 +0200 Christian Neukirchen
+ * Improve test documentation
+
+Sat Aug 9 18:52:33 2008 +0200 Christian Neukirchen
+ * Don't test OpenID in the default test suite
+
+Sat Aug 9 18:52:03 2008 +0200 Christian Neukirchen
+ * Wrangle paths so finally lighttpd should start everything on all platforms correctly
+
+Sat Aug 9 18:50:33 2008 +0200 Christian Neukirchen
+ * Don't test openid if not available
+
+Sat Aug 9 18:49:53 2008 +0200 Christian Neukirchen
+ * Don't test mongrel if not available
+
+Sat Aug 9 18:29:44 2008 +0200 Christian Neukirchen
+ * Silence OpenID warnings
+
+Sat Aug 9 18:29:15 2008 +0200 Christian Neukirchen
+ * Make memcache tests start and kill memcached itself
+
+Thu Aug 7 03:32:31 2008 -0700 Scytrin dai Kinthra
+ * BUG: Output of date in wrong time format for cookie expiration (fixed)
+ Altered test output to match correct name of gem needing to be installed for memcache
+
+Thu Aug 7 03:01:31 2008 -0700 Scytrin dai Kinthra
+ * Merge commit 'core/master'
+
+Fri Aug 1 12:24:43 2008 +0200 Christian Neukirchen
+ * Make Rack::Lint threadsafe
+ reported by Sunny Hirai
+
+Thu Jul 24 11:26:17 2008 +0200 Christian Neukirchen
+ * Merge git://github.com/dkubb/rack
+
+Thu Jul 24 01:40:18 2008 -0700 Dan Kubb
+ * Ensure the comparison is case insensitive
+
+Thu Jul 24 01:12:25 2008 -0700 Dan Kubb
+ * Updated Rake::Lint to ensure Content-Length header is present for non-chunked responses
+
+Sat Jul 12 12:47:35 2008 +0200 Julik
+ * Make Lint show proper errors for headers
+
+Wed Jul 9 15:18:35 2008 +0200 Clive Crous
+ * Fix digest paramater scanning.
+ Current scan sometimes took down sites.
+ Worst case scenario is when a user just clicked "ok" without entering a username. This could take down the entire website.
+ This is related to the ruby (language) bug:
+ http://rubyforge.org/tracker/index.php?func=detail&aid=21131&group_id=426&atid=1698
+
+Tue Jul 1 22:59:09 2008 +0200 Christoffer Sawicki
+ * spec_rack_handler.rb - Fixed typos
+
+Mon Jun 23 17:18:28 2008 +0200 Christoffer Sawicki
+ * spec_rack_utils.rb - Reformulated two test case descriptions
+
+Sat Jul 5 02:23:45 2008 +0200 Christoffer Sawicki
+ * deflater.rb - Make gzip's mtime parameter mandatory
+
+Sat Jul 5 02:16:09 2008 +0200 Christoffer Sawicki
+ * deflater.rb - Update TODOs
+
+Sat Jul 5 02:13:17 2008 +0200 Christoffer Sawicki
+ * deflater.rb - Move out the Zlib::Deflate constructor arguments to a constant
+
+Fri Jul 4 23:57:05 2008 +0200 Christoffer Sawicki
+ * deflater.rb - Removed unnecessary require "time" and whitespace
+
+Fri Jul 4 12:53:43 2008 -0600 Ben Alpert
+ * added mtime for Deflater.gzip and fixed gzip spec
+
+Fri Jul 4 13:36:18 2008 +0200 Christoffer Sawicki
+ * deflater.rb - Added an error message for the 406 Not Acceptable case
+
+Fri Jul 4 02:35:15 2008 -0600 Ben
+ * added gzip support to Rack::Deflater
+
+Wed Jul 2 00:11:06 2008 +0200 Christoffer Sawicki
+ * Implemented Rack::Deflater
+
+Tue Jul 1 22:37:58 2008 +0200 Christoffer Sawicki
+ * Added support for Accept-Encoding (via Request#accept_encoding and Utils.select_best_encoding)
+
+Tue Jul 1 15:09:16 2008 -0700 Scytrin dai Kinthra
+ * Merge branch 'openid2'
+
+Tue Jul 1 15:02:00 2008 -0700 Scytrin dai Kinthra
+ * Refactoring of sanity checks on adding extensions for more descriptive exceptions.
+ Additional tests on extension handling.
+
+Tue Jul 1 14:58:27 2008 -0700 Scytrin dai Kinthra
+ * Default :return_to is Request#url.
+ Reordering of finish vs check to prevent recursive oid checks.
+ Additional $DEBUG output
+
+Tue Jul 1 14:55:37 2008 -0700 Scytrin dai Kinthra
+ * Documentation revisions. 80 cols!
+
+Sun Jun 29 13:37:27 2008 -0700 Scytrin dai Kinthra
+ * Additional documentation examples.
+
+Sun Jun 29 13:06:34 2008 -0700 Scytrin dai Kinthra
+ * Merge branch 'openid2'
+
+Sun Jun 29 13:05:05 2008 -0700 Scytrin dai Kinthra
+ * Revisions to setup checks in order to match test specs.
+ Revisions to corresponding documentation.
+ Addition of #extension_namespaces for conveniance.
+
+Sat Jun 28 17:54:45 2008 -0700 Scytrin dai Kinthra
+ * Additional checks and tests for extension handling.
+
+Sat Jun 28 17:19:07 2008 -0700 Scytrin dai Kinthra
+ * Expansion and better handling of extensions.
+ Additional documentation and revisions in reference to extensions.
+ General documentation revisions.
+
+Sat Jun 28 14:07:57 2008 -0700 Scytrin dai Kinthra
+ * Initial support for OpenID extensions.
+ Extensions require implementation from ::OpenID::Extension
+
+Sat Jun 28 14:37:09 2008 -0700 Scytrin dai Kinthra
+ * Reformatting of debug warning
+
+Fri Jun 27 09:44:38 2008 -0700 Dan Kubb
+ * Make Rack::File use RFC 2616 HTTP Date/Time format for Last-Modified
+
+Tue Jun 24 13:55:25 2008 +0200 Christian Neukirchen
+ * Merge commit 'scytrin/master'
+
+Tue Jun 24 11:57:04 2008 +0200 Christian Neukirchen
+ * Only call binmode when possible in the multipart parser
+
+Tue Jun 24 01:58:27 2008 -0700 Scytrin dai Kinthra
+ * Merge commit 'chneukirchen/master'
+
+Tue Jun 24 01:52:16 2008 -0700 Scytrin dai Kinthra
+ * Merge branch 'openid2'
+
+Tue Jun 24 01:43:03 2008 -0700 Scytrin dai Kinthra
+ * Documentation revisions
+
+Mon Jun 23 04:26:38 2008 -0700 Scytrin dai Kinthra
+ * OpenID2 moved to replace OpenID
+
+Fri Jun 20 23:16:21 2008 +0200 Christoffer Sawicki
+ * file.rb - Added MP3 to MIME_TYPES
+
+Mon Jun 23 04:25:10 2008 -0700 Scytrin dai Kinthra
+ * Merge branch 'openid2'
+
+Mon Jun 23 01:55:35 2008 -0700 Scytrin dai Kinthra
+ * Removed extraneous test file
+ Updated rubygems specification
+
+Mon Jun 23 01:04:10 2008 -0700 Scytrin dai Kinthra
+ * Addition of initial tests for OpenID2
+ Additional checks on provided URIs.
+
+Sun Jun 22 08:27:48 2008 -0700 Scytrin dai Kinthra
+ * typo correction
+
+Sun Jun 22 01:09:49 2008 -0700 Scytrin dai Kinthra
+ * More rephrasing.
+
+Sat Jun 21 18:31:09 2008 -0700 Scytrin dai Kinthra
+ * Initial import of OpenID tests
+
+Sat Jun 21 18:29:45 2008 -0700 Scytrin dai Kinthra
+ * Revisions to check logic and presentation
+
+Sat Jun 21 18:10:27 2008 -0700 Scytrin dai Kinthra
+ * Documentation updates and revisions.
+ Addition of additional checks.
+
+Fri Jun 20 13:23:07 2008 -0700 Scytrin dai Kinthra
+ * Documentation update.
+ Removal of message appending in a cancel response.
+
+Fri Jun 20 12:56:05 2008 -0700 Scytrin dai Kinthra
+ * Documentation updates and improvements.
+ Adjusted naming for a few options.
+ The method #finish will always return a 303 redirect unless an error occurs.
+
+Wed Jun 18 03:57:23 2008 -0700 Scytrin dai Kinthra
+ * Inlining the management of exceptional responses.
+ Removal of extension support until assurance of a decent and clean way of support.
+ Revisions to documentation.
+ Rewriting of various expressions for clarity and consistancy.
+ Replaced hard coded symbols with constant reference.
+ Included list of optional arguments for notes on later documentation.
+
+Thu Jun 12 16:53:07 2008 -0700 Scytrin dai Kinthra
+ * Removed bare_login functionality, added an optional 500 returning intercept
+
+Mon Jun 2 23:37:45 2008 -0700 Scytrin dai Kinthra
+ * Removal of trailing whitespace
+
+Mon Jun 2 21:14:40 2008 -0700 Scytrin dai Kinthra
+ * Use $DEBUG for introspective output
+
+Sun May 25 19:26:55 2008 -0700 Scytrin dai Kinthra
+ * Make OpenID2 accessible by default
+
+Sun May 25 19:18:44 2008 -0700 Scytrin dai Kinthra
+ * Inclusion of ruby-openid 2.x compatible OpenID implementation
+
+Mon Jun 23 03:32:04 2008 -0700 Scytrin dai Kinthra
+ * Removal of extraneous debugging output
+
+Sun Jun 15 13:51:31 2008 +0200 Christian Neukirchen
+ * Check for block in Builder before instance_eval
+
+Thu Jun 12 17:17:24 2008 +0200 Christian Neukirchen
+ * Merge commit 'scytrin/master'
+
+Fri Jun 6 20:54:30 2008 -0700 Scytrin dai Kinthra
+ * Added documentation, checks, and tests for Rack::Utils::Context
+
+Fri Jun 6 17:25:35 2008 -0700 Adam Wiggins
+ * commonlogger passes through close call (fixes zombie process bug when serving popen responses)
+
+Tue Jun 3 21:55:55 2008 -0700 Scytrin dai Kinthra
+ * Reworking session/abstract/id and derived session implementations
+ Formatting for readability
+ Adjusted session-id finding for compatibility
+ Added checks, rescues, and debugging output
+ Adjusted and added tests
+
+Tue Jun 3 20:09:19 2008 -0700 Scytrin dai Kinthra
+ * Removal of lingering debug output in directory.rb
+
+Mon Jun 2 00:50:45 2008 -0700 Scytrin dai Kinthra
+ * Requiring socket stdlib for UNIXSocket and TCPSocket
+
+Sun Jun 1 06:34:14 2008 -0700 Scytrin dai Kinthra
+ * Tests for Rack::Directory, as well as removal of Rack::File dependency
+
+Sun Jun 1 06:07:44 2008 -0700 Scytrin dai Kinthra
+ * Addition of Directory to autoload index
+
+Sat May 31 14:32:34 2008 +0200 Christian Neukirchen
+ * Merge commit 'josh-mirror/master'
+
+Sat May 31 14:26:43 2008 +0200 Christian Neukirchen
+ * More cleanup
+
+Sat May 31 14:21:56 2008 +0200 Christian Neukirchen
+ * Mention Git repositories in README
+
+Sat May 31 14:09:31 2008 +0200 Christian Neukirchen
+ * Cleanup
+
+Mon May 26 09:12:22 2008 -0500 Joshua Peek
+ * Skip Camping and Memcache tests if the gems are not installed.
+
+Sun May 25 14:32:00 2008 +0000 Christian Neukirchen
+ * Add Rack.release for the version of the release.
+
+Sat May 24 17:54:49 2008 +0200 Christian Neukirchen
+ * Merge commit 'josh/master'
+
+Sat May 24 15:54:00 2008 +0000 Christian Neukirchen
+ * Allow handlers to register themselves with Rack::Handler.
+
+Sat May 24 09:57:09 2008 -0500 Joshua Peek
+ * Allow handlers to register themselves with Rack::Handler.
+
+Sat May 24 14:23:10 2008 +0200 Christian Neukirchen
+ * Merge commit '37c59dce25df4'
+
+Sat May 24 12:22:00 2008 +0000 Christian Neukirchen
+ * Merge walf443/rack-mirror
+
+Sat May 24 02:16:39 2008 +0900 Keiji, Yoshimi
+ * It may be better to show HTTP_X_FORWARDED_FOR if it exists.
+ It's useful when using reverse proxy in front of app server using Rack.
+
+Sun May 18 17:06:58 2008 +0200 Christian Neukirchen
+ * Merge commit 'josh/master'
+
+Sun May 18 15:05:00 2008 +0000 Christian Neukirchen
+ * Merge 'josh/rack-mirror'
+
+Sat May 17 15:39:16 2008 -0500 Joshua Peek
+ * Include EventedMongrel handler with Rack.
+
+Sat May 10 17:16:29 2008 +0200 Christian Neukirchen
+ * Merge commit 'josh/daemonize'
+
+Sat May 10 15:10:00 2008 +0000 Christian Neukirchen
+ * Merge josh/daemonize
+
+Tue May 6 18:14:47 2008 -0500 Joshua Peek
+ * Only write a rack pid if a file is given.
+
+Tue May 6 15:44:15 2008 -0500 Joshua Peek
+ * Added support for daemonizing servers started with rackup.
+
+Fri May 2 21:05:00 2008 +0000 Christoffer Sawicki
+ * utils.rb, spec_rack_utils.rb - Added build_query, the inverse of parse_query
+
+Fri May 2 20:53:00 2008 +0000 Christoffer Sawicki
+ * utils.rb - Cleaned up parse_query
+
+Fri May 2 21:04:00 2008 +0000 Christoffer Sawicki
+ * spec_rack_utils.rb - Added another test for parse_query
+
+Sat Apr 26 21:37:00 2008 +0000 Scytrin dai Kinthra
+ * session/abstract/id.rb - removal of gratuitous debug output
+
+Fri Apr 25 23:55:00 2008 +0000 Scytrin dai Kinthra
+ * directory.rb - serves html index for nonfile paths
+
+ Rack::File similar processing of paths. On directory lookups it will serve
+ a html index of it's contents. Entries begining with '.' are not presented.
+ On lookups that result in a file, it will pass an unmodified env to the
+ provided app. If an app is not provided, a Rack::File with the same root is
+ used.
+
+Fri Apr 18 10:12:00 2008 +0000 Christian Neukirchen
+ * Open multipart tempfiles in binary mode
+
+Thu Apr 10 20:26:00 2008 +0000 ryan
+ * handle EOFError exception in Request#params
+
+Sat Mar 29 19:58:00 2008 +0000 Scytrin dai Kinthra
+ * utils.rb - addition of recontexting from a Context
+
+Sun May 25 14:33:00 2008 +0000 Christian Neukirchen
+ * Convert Rakefile to use Git
+
+Thu Mar 27 11:09:00 2008 +0000 Adam Harper
+ * Bug fix for Tempfile POST bodies under Ruby 1.8
+
+ The Tempfile class in Ruby 1.8 doesn't implement the == method correctly.
+ This causes Rack::Requests to re-parse the input (when the input is a
+ Tempfile) each time the POST method is called, this in turn raises an
+ EOFError because the input has already been read.
+
+ One example of when this happens is when handling large POST requests
+ (e.g. file uploads) under Mongrel.
+
+ This issue only effects Ruby 1.8 (tested against 1.8.6). Ruby 1.9 does
+ not suffer from this issue (presumably due to changes in the Delegate
+ implementation.)
+
+Sat Mar 29 04:32:00 2008 +0000 Scytrin dai Kinthra
+ * memcache.rb - Fixed immortal key bug, updated tests
+
+ Old multithread behaviour was to merge sessions, which would never delete
+ keys, even if deleted in the current session.
+
+Tue Mar 25 11:15:00 2008 +0000 Scytrin dai Kinthra
+ * abstract/id.rb - Added check on correctness of response.
+
+Thu Mar 20 16:11:00 2008 +0000 Christian Neukirchen
+ * Run Rack::Session::Memcache tests in fulltest only
+
+Wed Mar 19 11:43:00 2008 +0000 Scytrin dai Kinthra
+ * memcache.rb - memcached based session management
+
+Thu Mar 20 16:06:00 2008 +0000 Christian Neukirchen
+ * Rack::Reloader is not loaded in rackup development mode anymore
+
+Tue Mar 18 04:04:00 2008 +0000 Scytrin dai Kinthra
+ * openid.rb - documentation and check on using ruby-openid 1.x.x
+
+Tue Mar 18 10:59:00 2008 +0000 Christian Neukirchen
+ * Update History
+
+Tue Mar 18 10:57:00 2008 +0000 Christian Neukirchen
+ * Update Rakefile
+
+Tue Mar 18 10:55:00 2008 +0000 Christian Neukirchen
+ * Make fulltest chmod the executables
+
+Tue Mar 18 10:54:00 2008 +0000 Christian Neukirchen
+ * Small README tweak
+
+Mon Mar 17 23:28:00 2008 +0000 stephen.bannasch
+ * Changes to get lighttpd setup and running when rake fulltest is run; also added some doc to the readme about running tests
+
+Mon Mar 17 16:03:00 2008 +0000 Scytrin dai Kinthra
+ * urlmap.rb - update test in allowance of non-destructive HeaderHash
+
+Mon Mar 17 15:59:00 2008 +0000 Scytrin dai Kinthra
+ * pool.rb - cleanup of session merging and threading collision checks
+
+Mon Mar 17 15:51:00 2008 +0000 Christian Neukirchen
+ * URLMap tweaks and more tests
+
+Mon Mar 17 15:51:00 2008 +0000 Christian Neukirchen
+ * Don't lose empty headers in HeaderHash
+
+Mon Mar 17 15:26:00 2008 +0000 Scytrin dai Kinthra
+ * urlmap.rb - alteration of path selection routines, with updated tests
+
+ Previous implementation would append an extra '/' if PATH_NAME would otherwise
+ be empty.
+
+Mon Mar 17 11:19:00 2008 +0000 Scytrin dai Kinthra
+ * pool.rb - explicit require for thread stdlib
+
+Mon Mar 17 09:12:00 2008 +0000 Scytrin dai Kinthra
+ * pool.rb, id.rb - creation of abstract id based session handler
+
+ Allows simpler implementation of various storage based sessioning.
+ More stringent type checks in id.rb
+
+Sun Mar 16 14:31:00 2008 +0000 Scytrin dai Kinthra
+ * updated and addition to tests for pool.rb for expiration and thread safety
+
+ Running the freshness tests sleeps for 4 seconds to allow a session's
+ expiration point to pass.
+
+Sun Mar 16 14:30:00 2008 +0000 Scytrin dai Kinthra
+ * pool.rb - addition of session freshness check and upkeep routines
+
+Sun Mar 16 13:23:00 2008 +0000 Scytrin dai Kinthra
+ * utils.rb - Utils::Context - addition of introspection methods
+
+Sun Mar 16 11:55:00 2008 +0000 Scytrin dai Kinthra
+ * pool.rb - documentation update and collision warnings
+
+Sun Mar 16 09:01:00 2008 +0000 Scytrin dai Kinthra
+ * pool.rb - documentation revision, addition of @mutex accessor
+
+Sun Mar 16 08:33:00 2008 +0000 Scytrin dai Kinthra
+ * pool.rb - setup of expiry not using defined?, from apeiros
+
+Sun Mar 16 08:26:00 2008 +0000 Scytrin dai Kinthra
+ * pool.rb - saner metadata storage
+
+Sun Mar 16 08:23:00 2008 +0000 Scytrin dai Kinthra
+ * pool.rb - cleanup and THANKS
+
+Sun Mar 16 08:21:00 2008 +0000 Scytrin dai Kinthra
+ * pool.rb - addition of thread safety
+
+Sun Mar 16 04:59:00 2008 +0000 Scytrin dai Kinthra
+ * pool.rb - moved cookie building back to #commit_session
+
+Fri Mar 14 23:57:00 2008 +0000 Scytrin dai Kinthra
+ * pool.rb - faster session id generation from apeiros
+
+Mon Mar 17 10:56:00 2008 +0000 Christian Neukirchen
+ * Require time in rack/file.rb
+
+ Reported by Stephen Bannasch.
+
+Sat Mar 15 13:51:00 2008 +0000 r
+ * Fix that Request assumes form-data even when Content-Type says otherwise
+
+ Fixes cases where accessing Request#params causes the body to be read and
+ processed as form-data improperly. For example, consider the following
+ request:
+
+ PUT /foo/bar?baz=bizzle HTTP/1.1
+ Content-Type: text/plain
+
+ This is not form-data.
+
+ When Rack::Request gets ahold of the corresponding environment, and the
+ application attempts to access the "baz" query string param, the body is read
+ and interpreted as form-data. If the body is an IOish object, this causes the
+ offset to be forwarded to the end of file.
+
+ The patch prevents the Request#POST method from going into the body unless the
+ media type is application/x-www-form-urlencoded, multipart/form-data, or not
+ specified.
+
+ While here, added a few unrelated helper methods to Request that I've found
+ particularly useful in Rack apps: #content_length, #head?, and #content_charset.
+
+ Tests and doc included for all changes.
+
+Tue Mar 11 12:02:00 2008 +0000 Scytrin dai Kinthra
+ * pool.rb - cleanup and portability revisions
+
+Tue Mar 11 11:59:00 2008 +0000 Scytrin dai Kinthra
+ * pool.rb - exported assignment of session id cookie
+
+Tue Mar 11 11:56:00 2008 +0000 Scytrin dai Kinthra
+ * pool.rb - exported session to pool commit
+
+Tue Mar 11 11:52:00 2008 +0000 Scytrin dai Kinthra
+ * pool.rb - altered session metadata storage and session commit point
+
+Tue Mar 11 11:29:00 2008 +0000 Scytrin dai Kinthra
+ * pool.rb - exported generation of a new session id
+
+Tue Mar 11 11:25:00 2008 +0000 Scytrin dai Kinthra
+ * pool.rb - moved inline hash to DEFAULT_OPTIONS
+
+Tue Mar 11 11:11:00 2008 +0000 Scytrin dai Kinthra
+ * pool.rb - removal of blocks for #context
+
+ Before you could pass a block to Pool#context that would be passed the env
+ before performing a call on the passed app. This has been removed in deference
+ to the practice setting up the block as the passed app, which should
+ subsequently call the intended app.
+ Seems more in accordance with Rack's prescribed behaviour.
+
+Tue Mar 11 07:51:00 2008 +0000 Scytrin dai Kinthra
+ * Alteration of Mongrel.run for Mongrel based routing
+
+ With the passing of the :map option Mongrel.run will handle the passing of a
+ Hash or URLMap rather than a standard rack app. The mapping provided by the
+ passed object will be used to register uris with the mongrel instance.
+
+ Hashes should only have absolute paths for keys and apps for values.
+
+ URLMaps will be filtered if the :Host options is specified, or the mapping's
+ host is set.
+
+Tue Mar 11 06:31:00 2008 +0000 Scytrin dai Kinthra
+ * Addition of #add, #<<, and #include? to Cascade, allowing iterative addition of apps
+
+Mon Mar 10 15:18:00 2008 +0000 Scytrin dai Kinthra
+ * Changed urlmap.rb's uri check to successive conditionals rather than one big one
+
+Tue Feb 26 12:28:00 2008 +0000 Christian Neukirchen
+ * Update README and docs
+
+Sun Feb 24 19:37:00 2008 +0000 Christian Neukirchen
+ * Don't use autoloads in the test suite
+
+Sun Feb 24 18:48:00 2008 +0000 Christian Neukirchen
+ * Fix test cases that used 201 as a status where Content-Type is not allowed
+
+Sun Feb 24 18:46:00 2008 +0000 Christian Neukirchen
+ * Fix cookie parsing
+
+Sun Feb 24 17:51:00 2008 +0000 Christian Neukirchen
+ * Let Rack::Builder#use accept blocks
+
+ Contributed by Corey Jewett.
+
+Mon Feb 18 21:18:00 2008 +0000 Christian Neukirchen
+ * Don't create invalid header lines when only deleting a cookie
+
+ Reported by Andreas Zehnder
+
+Sun Feb 3 17:14:00 2008 +0000 Christian Neukirchen
+ * Update lint to not check for 201 status headers
+
+Sun Feb 3 17:00:00 2008 +0000 Christian Neukirchen
+ * HTTP status 201 can contain a body
+
+Fri Jan 25 08:36:00 2008 +0000 Christian Neukirchen
+ * Add SCGI handler, by Jeremy Evans
+
+Tue Jan 22 04:23:00 2008 +0000 m.fellinger
+ * Fix syntax for toggle() in ShowExceptions
+
+Mon Jan 21 02:27:00 2008 +0000 Aman Gupta
+ * Conform to RFC 2109 regarding multiple values for same cookie
+
+Thu Jan 10 15:29:00 2008 +0000 Christian Neukirchen
+ * Remove Rack::Adapter::Rails autoload
+
+Mon Dec 31 18:34:00 2007 +0000 Christian Neukirchen
+ * Remove uses of base64 for Ruby 1.9 support
+
+Sun Dec 9 16:48:00 2007 +0000 Christian Neukirchen
+ * Make Rack::Lint actually check what the spec says.
+
+Sun Nov 18 20:09:00 2007 +0000 Scytrin dai Kinthra
+ * lib/rack/auth/openid.rb - typo!
+
+Sun Nov 18 20:03:00 2007 +0000 Scytrin dai Kinthra
+ * lib/rack/auth/openid.rb - updates to reflect rack styling
+
+Sun Nov 18 19:54:00 2007 +0000 Scytrin dai Kinthra