about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEvan Weaver <eweaver@twitter.com>2008-11-22 18:59:21 -0800
committerEvan Weaver <eweaver@twitter.com>2008-11-22 18:59:21 -0800
commit3e1c8c363126814b60c164922ffa26b8227defda (patch)
treefc02630aed03cfd6f13aad8074d5459020e221d2
parent559edfb1fbf18e9496a4235831fd49c5b0d8b459 (diff)
parentc365ba16d12a14bdf1cc50a26f67dd3b45f5a4d8 (diff)
downloadunicorn-3e1c8c363126814b60c164922ffa26b8227defda.tar.gz
-rw-r--r--Rakefile96
-rw-r--r--examples/builder.rb29
-rw-r--r--examples/camping/README3
-rwxr-xr-xexamples/camping/blog.rb294
-rw-r--r--examples/camping/tepee.rb149
-rw-r--r--examples/httpd.conf474
-rw-r--r--examples/mime.yaml3
-rw-r--r--examples/mongrel.conf9
-rw-r--r--examples/mongrel_simple_ctrl.rb92
-rw-r--r--examples/mongrel_simple_service.rb116
-rw-r--r--examples/monitrc57
-rw-r--r--examples/random_thrash.rb19
-rw-r--r--examples/simpletest.rb52
-rw-r--r--examples/webrick_compare.rb20
-rw-r--r--lib/mongrel/camping.rb107
-rw-r--r--lib/mongrel/debug.rb203
-rw-r--r--lib/mongrel/gems.rb22
-rw-r--r--lib/mongrel/rails.rb185
-rw-r--r--projects/cgi_multipart_eof_fix/CHANGELOG14
-rw-r--r--projects/cgi_multipart_eof_fix/LICENSE55
-rw-r--r--projects/cgi_multipart_eof_fix/Manifest6
-rw-r--r--projects/cgi_multipart_eof_fix/README40
-rw-r--r--projects/cgi_multipart_eof_fix/Rakefile18
-rw-r--r--projects/cgi_multipart_eof_fix/lib/cgi_multipart_eof_fix.rb127
-rwxr-xr-xprojects/cgi_multipart_eof_fix/test/test_cgi_multipart_eof_fix.rb59
-rw-r--r--projects/fastthread/CHANGELOG7
-rw-r--r--projects/fastthread/Manifest9
-rw-r--r--projects/fastthread/Rakefile28
-rw-r--r--projects/fastthread/ext/fastthread/.gitignore2
-rw-r--r--projects/fastthread/ext/fastthread/extconf.rb28
-rw-r--r--projects/fastthread/ext/fastthread/fastthread.c1201
-rwxr-xr-xprojects/fastthread/setup.rb1585
-rw-r--r--projects/fastthread/test/test_all.rb6
-rw-r--r--projects/fastthread/test/test_condvar.rb34
-rw-r--r--projects/fastthread/test/test_mutex.rb74
-rw-r--r--projects/fastthread/test/test_queue.rb79
-rw-r--r--projects/gem_plugin/CHANGELOG4
-rw-r--r--projects/gem_plugin/COPYING504
-rw-r--r--projects/gem_plugin/LICENSE55
-rw-r--r--projects/gem_plugin/Manifest15
-rw-r--r--projects/gem_plugin/README115
-rw-r--r--projects/gem_plugin/Rakefile28
-rwxr-xr-xprojects/gem_plugin/bin/gpgen60
-rw-r--r--projects/gem_plugin/lib/gem_plugin.rb297
-rw-r--r--projects/gem_plugin/resources/COPYING1
-rw-r--r--projects/gem_plugin/resources/LICENSE1
-rw-r--r--projects/gem_plugin/resources/README5
-rw-r--r--projects/gem_plugin/resources/Rakefile61
-rw-r--r--projects/gem_plugin/resources/lib/project/init.rb6
-rw-r--r--projects/gem_plugin/resources/resources/defaults.yaml2
-rw-r--r--projects/gem_plugin/setup.rb1360
-rw-r--r--projects/gem_plugin/test/test_plugins.rb72
-rw-r--r--projects/mongrel_cluster/CHANGELOG6
-rw-r--r--projects/mongrel_cluster/COPYING506
-rw-r--r--projects/mongrel_cluster/LICENSE55
-rw-r--r--projects/mongrel_cluster/Manifest12
-rw-r--r--projects/mongrel_cluster/README56
-rw-r--r--projects/mongrel_cluster/Rakefile29
-rwxr-xr-xprojects/mongrel_cluster/bin/mongrel_cluster_ctl70
-rw-r--r--projects/mongrel_cluster/lib/mongrel_cluster/init.rb362
-rw-r--r--projects/mongrel_cluster/lib/mongrel_cluster/recipes.rb6
-rw-r--r--projects/mongrel_cluster/lib/mongrel_cluster/recipes_1.rb104
-rw-r--r--projects/mongrel_cluster/lib/mongrel_cluster/recipes_2.rb118
-rw-r--r--projects/mongrel_cluster/resources/defaults.yaml2
-rw-r--r--projects/mongrel_cluster/resources/mongrel_cluster51
-rw-r--r--projects/mongrel_config/CHANGELOG2
-rw-r--r--projects/mongrel_config/COPYING504
-rw-r--r--projects/mongrel_config/LICENSE55
-rw-r--r--projects/mongrel_config/Manifest21
-rw-r--r--projects/mongrel_config/README7
-rw-r--r--projects/mongrel_config/Rakefile16
-rw-r--r--projects/mongrel_config/lib/mongrel_config/app.rb158
-rw-r--r--projects/mongrel_config/lib/mongrel_config/init.rb75
-rw-r--r--projects/mongrel_config/lib/mongrel_config/win32.rb85
-rw-r--r--projects/mongrel_config/lib/mongrel_config/win32_app.rb251
-rw-r--r--projects/mongrel_config/resources/defaults.yaml2
-rw-r--r--projects/mongrel_config/resources/images/0170_bubble.pngbin130 -> 0 bytes
-rw-r--r--projects/mongrel_config/resources/images/0171_new_page.pngbin135 -> 0 bytes
-rw-r--r--projects/mongrel_config/resources/images/bottom.gifbin3031 -> 0 bytes
-rw-r--r--projects/mongrel_config/resources/images/bottom_orig.gifbin4365 -> 0 bytes
-rw-r--r--projects/mongrel_config/resources/images/middle.jpgbin624 -> 0 bytes
-rw-r--r--projects/mongrel_config/resources/images/top.jpgbin490 -> 0 bytes
-rw-r--r--projects/mongrel_config/resources/images/topbar.jpgbin16031 -> 0 bytes
-rw-r--r--projects/mongrel_config/resources/index.html71
-rw-r--r--projects/mongrel_config/resources/index_win32.html68
-rw-r--r--projects/mongrel_config/resources/style.css170
-rw-r--r--projects/mongrel_config/test/test_config.rb53
-rw-r--r--projects/mongrel_console/CHANGELOG2
-rw-r--r--projects/mongrel_console/COPYING1
-rw-r--r--projects/mongrel_console/LICENSE55
-rw-r--r--projects/mongrel_console/Manifest8
-rw-r--r--projects/mongrel_console/README5
-rw-r--r--projects/mongrel_console/Rakefile15
-rw-r--r--projects/mongrel_console/lib/mongrel_console/console.rb83
-rw-r--r--projects/mongrel_console/lib/mongrel_console/init.rb27
-rw-r--r--projects/mongrel_console/resources/defaults.yaml2
-rw-r--r--projects/mongrel_experimental/CHANGELOG2
-rw-r--r--projects/mongrel_experimental/COPYING504
-rw-r--r--projects/mongrel_experimental/LICENSE55
-rw-r--r--projects/mongrel_experimental/Manifest17
-rw-r--r--projects/mongrel_experimental/README3
-rw-r--r--projects/mongrel_experimental/Rakefile15
-rw-r--r--projects/mongrel_experimental/ext/uri_classifier/ext_help.h14
-rw-r--r--projects/mongrel_experimental/ext/uri_classifier/extconf.rb5
-rw-r--r--projects/mongrel_experimental/ext/uri_classifier/tst.h40
-rw-r--r--projects/mongrel_experimental/ext/uri_classifier/tst_cleanup.c23
-rw-r--r--projects/mongrel_experimental/ext/uri_classifier/tst_delete.c146
-rw-r--r--projects/mongrel_experimental/ext/uri_classifier/tst_grow_node_free_list.c38
-rw-r--r--projects/mongrel_experimental/ext/uri_classifier/tst_init.c41
-rw-r--r--projects/mongrel_experimental/ext/uri_classifier/tst_insert.c218
-rw-r--r--projects/mongrel_experimental/ext/uri_classifier/tst_search.c73
-rw-r--r--projects/mongrel_experimental/ext/uri_classifier/uri_classifier.c216
-rw-r--r--projects/mongrel_experimental/lib/mongrel_experimental.rb3
-rw-r--r--projects/mongrel_experimental/test/test_uriclassifier.rb262
-rw-r--r--projects/mongrel_service/CHANGELOG41
-rw-r--r--projects/mongrel_service/COPYING20
-rw-r--r--projects/mongrel_service/LICENSE55
-rw-r--r--projects/mongrel_service/Manifest21
-rw-r--r--projects/mongrel_service/README11
-rw-r--r--projects/mongrel_service/Rakefile138
-rw-r--r--projects/mongrel_service/TODO19
-rw-r--r--projects/mongrel_service/lib/ServiceFB/ServiceFB.bas650
-rw-r--r--projects/mongrel_service/lib/ServiceFB/ServiceFB.bi109
-rw-r--r--projects/mongrel_service/lib/ServiceFB/ServiceFB_Utils.bas493
-rw-r--r--projects/mongrel_service/lib/ServiceFB/ServiceFB_Utils.bi70
-rw-r--r--projects/mongrel_service/lib/ServiceFB/_internals.bi50
-rw-r--r--projects/mongrel_service/lib/ServiceFB/_utils_internals.bi51
-rw-r--r--projects/mongrel_service/lib/mongrel_service/init.rb211
-rw-r--r--projects/mongrel_service/native/_debug.bi59
-rw-r--r--projects/mongrel_service/native/boolean.bi18
-rw-r--r--projects/mongrel_service/native/console_process.bas397
-rw-r--r--projects/mongrel_service/native/console_process.bi75
-rw-r--r--projects/mongrel_service/native/mongrel_service.bas179
-rw-r--r--projects/mongrel_service/native/mongrel_service.bi61
-rw-r--r--projects/mongrel_service/resources/defaults.yaml2
-rw-r--r--projects/mongrel_service/tests/all_tests.bas18
-rw-r--r--projects/mongrel_service/tests/fixtures/mock_process.bas92
-rw-r--r--projects/mongrel_service/tests/test_console_process.bas402
-rw-r--r--projects/mongrel_service/tests/test_helpers.bas35
-rw-r--r--projects/mongrel_service/tests/test_helpers.bi8
-rw-r--r--projects/mongrel_service/tools/freebasic.rb361
-rw-r--r--projects/mongrel_status/CHANGELOG2
-rw-r--r--projects/mongrel_status/COPYING504
-rw-r--r--projects/mongrel_status/LICENSE55
-rw-r--r--projects/mongrel_status/Manifest6
-rw-r--r--projects/mongrel_status/README6
-rw-r--r--projects/mongrel_status/Rakefile16
-rw-r--r--projects/mongrel_status/lib/mongrel_status/init.rb32
-rw-r--r--projects/mongrel_upload_progress/CHANGELOG2
-rw-r--r--projects/mongrel_upload_progress/COPYING1
-rw-r--r--projects/mongrel_upload_progress/LICENSE55
-rw-r--r--projects/mongrel_upload_progress/Manifest7
-rw-r--r--projects/mongrel_upload_progress/README5
-rw-r--r--projects/mongrel_upload_progress/Rakefile15
-rw-r--r--projects/mongrel_upload_progress/lib/mongrel_upload_progress/init.rb90
-rw-r--r--projects/mongrel_upload_progress/resources/defaults.yaml3
-rw-r--r--test/unit/test_debug.rb25
157 files changed, 5 insertions, 17141 deletions
diff --git a/Rakefile b/Rakefile
index fbe8801..a0d91a0 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,20 +1,18 @@
 
 require 'rubygems'
-gem 'echoe', '>=2.7.11'
 require 'echoe'
 
-e = Echoe.new("mongrel") do |p|
-  p.summary = "A small fast HTTP library and server that runs Rails, Camping, Nitro and Iowa apps."
-  p.author = "Zed A. Shaw"
-  p.email = "mongrel-development@rubyforge.org"
+Echoe.new("mongrel") do |p|
+  p.summary = "A small fast HTTP library and server for Rack applications."
+  p.author = "Evan Weaver"
+  p.email = "evan@cloudbur.st"
   p.clean_pattern = ['ext/http11/*.{bundle,so,o,obj,pdb,lib,def,exp}', 'lib/*.{bundle,so,o,obj,pdb,lib,def,exp}', 'ext/http11/Makefile', 'pkg', 'lib/*.bundle', '*.gem', 'site/output', '.config', 'lib/http11.jar', 'ext/http11_java/classes', 'coverage', 'test_*.log', 'log', 'doc']
   p.url = "http://mongrel.rubyforge.org"
   p.rdoc_pattern = ['README', 'LICENSE', 'CONTRIBUTORS', 'CHANGELOG', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc']
   p.docs_host = 'mongrel.cloudbur.st:/home/eweaver/www/mongrel/htdocs/web'
   p.ignore_pattern = /^(pkg|site|projects|doc|log)|CVS|\.log/
-  p.ruby_version = '>=1.8.4'
-  p.dependencies = ['gem_plugin >=0.2.3']  
   p.extension_pattern = nil
+  p.dependencies = ['daemons', 'rack']
   
   p.certificate_chain = case (ENV['USER'] || ENV['USERNAME']).downcase
     when 'eweaver'
@@ -114,87 +112,3 @@ elsif Platform.java?
   task :compile => [filename]
 
 end
-
-#### Project-wide install and uninstall tasks
-
-def sub_project(project, *targets)
-  targets.each do |target|
-    Dir.chdir "projects/#{project}" do
-      sh("#{Platform.rake} #{target.to_s}") # --trace
-    end
-  end
-end
-
-desc "Compile all the projects"
-task :compile_all => [:compile] do
-  sub_project("fastthread", :compile)
-  sub_project("mongrel_service", :compile)
-end
-
-desc "Package Mongrel and all subprojects"
-task :package_all => [:package] do
-  sub_project("gem_plugin", :package)
-  sub_project("cgi_multipart_eof_fix", :package)
-  sub_project("fastthread", :package)
-  sub_project("mongrel_status", :package)
-  sub_project("mongrel_upload_progress", :package)
-  sub_project("mongrel_console", :package)
-  sub_project("mongrel_cluster", :package)
-  sub_project("mongrel_experimental", :package)
-
-  sh("rake java package") unless Platform.windows?
-  
-  sub_project("mongrel_service", :package) if Platform.windows?
-end
-
-task :install_requirements do
-  # These run before Mongrel is installed
-  sub_project("gem_plugin", :install)
-  sub_project("cgi_multipart_eof_fix", :install)
-  sub_project("fastthread", :install)
-end
-
-desc "for Mongrel and all subprojects"
-task :install => [:install_requirements] do
-  # These run after Mongrel is installed
-  sub_project("mongrel_status", :install)
-  sub_project("mongrel_upload_progress", :install)
-  sub_project("mongrel_console", :install)
-  sub_project("mongrel_cluster", :install)
-  # sub_project("mongrel_experimental", :install)
-  sub_project("mongrel_service", :install) if Platform.windows?
-end
-
-desc "for Mongrel and all its subprojects"
-task :uninstall => [:clean] do
-  sub_project("mongrel_status", :uninstall)
-  sub_project("cgi_multipart_eof_fix", :uninstall)
-  sub_project("mongrel_upload_progress", :uninstall)
-  sub_project("mongrel_console", :uninstall)
-  sub_project("gem_plugin", :uninstall)
-  sub_project("fastthread", :uninstall)
-  # sub_project("mongrel_experimental", :uninstall)
-  sub_project("mongrel_service", :uninstall) if Platform.windows?
-end
-
-desc "for Mongrel and all its subprojects"
-task :clean_all => [:clean] do
-  sub_project("gem_plugin", :clean)
-  sub_project("cgi_multipart_eof_fix", :clean)
-  sub_project("fastthread", :clean)
-  sub_project("mongrel_status", :clean)
-  sub_project("mongrel_upload_progress", :clean)
-  sub_project("mongrel_console", :clean)
-  sub_project("mongrel_cluster", :clean)
-  sub_project("mongrel_experimental", :clean)
-  sub_project("mongrel_service", :clean) if Platform.windows?
-end
-
-#### Site upload tasks
-
-namespace :site do
-  desc "Upload the coverage report"
-  task :coverage => [:rcov] do
-    sh "rsync -azv --no-perms --no-times test/coverage/* mongrel.cloudbur.st:/home/eweaver/www/mongrel/htdocs/web/coverage" rescue nil
-  end
-end
diff --git a/examples/builder.rb b/examples/builder.rb
deleted file mode 100644
index 5f0803a..0000000
--- a/examples/builder.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-require 'mongrel'
-
-class TestPlugin < GemPlugin::Plugin "/handlers"
-  include Mongrel::HttpHandlerPlugin
-
-  def process(request, response)
-    STDERR.puts "My options are: #{options.inspect}"
-    STDERR.puts "Request Was:"
-    STDERR.puts request.params.to_yaml
-  end
-end
-
-config = Mongrel::Configurator.new :host => "127.0.0.1" do
-  load_plugins :includes => ["mongrel"], :excludes => ["rails"]
-  daemonize :cwd => Dir.pwd, :log_file => "mongrel.log", :pid_file => "mongrel.pid"
-  
-  listener :port => 3000 do
-    uri "/app", :handler => plugin("/handlers/testplugin", :test => "that")
-    uri "/app", :handler => Mongrel::DirHandler.new(".")
-    load_plugins :includes => ["mongrel", "rails"]
-  end
-
-  trap("INT") { stop }
-  run
-end
-
-config.join
-
-
diff --git a/examples/camping/README b/examples/camping/README
deleted file mode 100644
index 73ae9a0..0000000
--- a/examples/camping/README
+++ /dev/null
@@ -1,3 +0,0 @@
-To get these examples running, install Camping.
-
-Instructions here: http://code.whytheluckystiff.net/camping/
diff --git a/examples/camping/blog.rb b/examples/camping/blog.rb
deleted file mode 100755
index 81a87da..0000000
--- a/examples/camping/blog.rb
+++ /dev/null
@@ -1,294 +0,0 @@
-#!/usr/bin/env ruby
-
-$:.unshift File.dirname(__FILE__) + "/../../lib"
-require 'rubygems'
-require_gem 'camping', '>=1.4'
-require 'camping/session'
-  
-Camping.goes :Blog
-
-module Blog
-    include Camping::Session
-end
-
-module Blog::Models
-    def self.schema(&block)
-        @@schema = block if block_given?
-        @@schema
-    end
-  
-    class Post < Base; belongs_to :user; end
-    class Comment < Base; belongs_to :user; end
-    class User < Base; end
-end
-
-Blog::Models.schema do
-    create_table :blog_posts, :force => true do |t|
-      t.column :id,       :integer, :null => false
-      t.column :user_id,  :integer, :null => false
-      t.column :title,    :string,  :limit => 255
-      t.column :body,     :text
-    end
-    create_table :blog_users, :force => true do |t|
-      t.column :id,       :integer, :null => false
-      t.column :username, :string
-      t.column :password, :string
-    end
-    create_table :blog_comments, :force => true do |t|
-      t.column :id,       :integer, :null => false
-      t.column :post_id,  :integer, :null => false
-      t.column :username, :string
-      t.column :body,     :text
-    end
-    execute "INSERT INTO blog_users (username, password) VALUES ('admin', 'camping')"
-end
-
-module Blog::Controllers
-    class Index < R '/'
-        def get
-            @posts = Post.find :all
-            render :index
-        end
-    end
-    
-    class Add
-        def get
-            unless @state.user_id.blank?
-                @user = User.find @state.user_id
-                @post = Post.new
-            end
-            render :add
-        end
-        def post
-            post = Post.create :title => input.post_title, :body => input.post_body,
-                               :user_id => @state.user_id
-            redirect View, post
-        end
-    end
-
-    class Info < R '/info/(\d+)', '/info/(\w+)/(\d+)', '/info', '/info/(\d+)/(\d+)/(\d+)/([\w-]+)'
-        def get(*args)
-            div do
-                code args.inspect; br; br
-                code ENV.inspect; br
-                code "Link: #{R(Info, 1, 2)}"
-            end
-        end
-    end
-
-    class View < R '/view/(\d+)'
-        def get post_id
-            @post = Post.find post_id
-            @comments = Models::Comment.find :all, :conditions => ['post_id = ?', post_id]
-            render :view
-        end
-    end
-    
-    class Edit < R '/edit/(\d+)', '/edit'
-        def get post_id
-            unless @state.user_id.blank?
-                @user = User.find @state.user_id
-            end
-            @post = Post.find post_id
-            render :edit
-        end
-    
-        def post
-            @post = Post.find input.post_id
-            @post.update_attributes :title => input.post_title, :body => input.post_body
-            redirect View, @post
-        end
-    end
-    
-    class Comment
-        def post
-            Models::Comment.create(:username => input.post_username,
-                       :body => input.post_body, :post_id => input.post_id)
-            redirect View, input.post_id
-        end
-    end
-    
-    class Login
-        def post
-            @user = User.find :first, :conditions => ['username = ? AND password = ?', input.username, input.password]
-    
-            if @user
-                @login = 'login success !'
-                @state.user_id = @user.id
-            else
-                @login = 'wrong user name or password'
-            end
-            render :login
-        end
-    end
-    
-    class Logout
-        def get
-            @state.user_id = nil
-            render :logout
-        end
-    end
-    
-    class Style < R '/styles.css'
-        def get
-            @headers["Content-Type"] = "text/css; charset=utf-8"
-            @body = %{
-                body {
-                    font-family: Utopia, Georga, serif;
-                }
-                h1.header {
-                    background-color: #fef;
-                    margin: 0; padding: 10px;
-                }
-                div.content {
-                    padding: 10px;
-                }
-            }
-        end
-    end
-end
-
-module Blog::Views
-
-    def layout
-      html do
-        head do
-          title 'blog'
-          link :rel => 'stylesheet', :type => 'text/css',
-               :href => '/styles.css', :media => 'screen'
-        end
-        body do
-          h1.header { a 'blog', :href => R(Index) }
-          div.content do
-            self << yield
-          end
-        end
-      end
-    end
-
-    def index
-      if @posts.empty?
-        p 'No posts found.'
-        p { a 'Add', :href => R(Add) }
-      else
-        for post in @posts
-          _post(post)
-        end
-      end
-    end
-
-    def login
-      p { b @login }
-      p { a 'Continue', :href => R(Add) }
-    end
-
-    def logout
-      p "You have been logged out."
-      p { a 'Continue', :href => R(Index) }
-    end
-
-    def add
-      if @user
-        _form(post, :action => R(Add))
-      else
-        _login
-      end
-    end
-
-    def edit
-      if @user
-        _form(post, :action => R(Edit))
-      else
-        _login
-      end
-    end
-
-    def view
-        _post(post)
-
-        p "Comment for this post:"
-        for c in @comments
-          h1 c.username
-          p c.body
-        end
-
-        form :action => R(Comment), :method => 'post' do
-          label 'Name', :for => 'post_username'; br
-          input :name => 'post_username', :type => 'text'; br
-          label 'Comment', :for => 'post_body'; br
-          textarea :name => 'post_body' do; end; br
-          input :type => 'hidden', :name => 'post_id', :value => post.id
-          input :type => 'submit'
-        end
-    end
-
-    # partials
-    def _login
-      form :action => R(Login), :method => 'post' do
-        label 'Username', :for => 'username'; br
-        input :name => 'username', :type => 'text'; br
-
-        label 'Password', :for => 'password'; br
-        input :name => 'password', :type => 'text'; br
-
-        input :type => 'submit', :name => 'login', :value => 'Login'
-      end
-    end
-
-    def _post(post)
-      h1 post.title
-      p post.body
-      p do
-        a "Edit", :href => R(Edit, post)
-        a "View", :href => R(View, post)
-      end
-    end
-
-    def _form(post, opts)
-      p do
-        text "You are logged in as #{@user.username} | "
-        a 'Logout', :href => R(Logout)
-      end
-      form({:method => 'post'}.merge(opts)) do
-        label 'Title', :for => 'post_title'; br
-        input :name => 'post_title', :type => 'text',
-              :value => post.title; br
-
-        label 'Body', :for => 'post_body'; br
-        textarea post.body, :name => 'post_body'; br
-
-        input :type => 'hidden', :name => 'post_id', :value => post.id
-        input :type => 'submit'
-      end
-    end
-end
-
-def Blog.create
-    Camping::Models::Session.create_schema
-    unless Blog::Models::Post.table_exists?
-        ActiveRecord::Schema.define(&Blog::Models.schema)
-    end
-end
-
-if __FILE__ == $0
-  require 'mongrel/camping'
-
-  Blog::Models::Base.establish_connection :adapter => 'sqlite3', :database => 'blog.db'
-  Blog::Models::Base.logger = Logger.new('camping.log')
-  Blog::Models::Base.threaded_connections=false
-  Blog.create
-  
-  # Use the Configurator as an example rather than Mongrel::Camping.start
-  config = Mongrel::Configurator.new :host => "0.0.0.0" do
-    listener :port => 3002 do
-      uri "/blog", :handler => Mongrel::Camping::CampingHandler.new(Blog)
-      uri "/favicon", :handler => Mongrel::Error404Handler.new("")
-      trap("INT") { stop }
-      run
-    end
-  end
-
-  puts "** Blog example is running at http://localhost:3002/blog"
-  puts "** Default username is `admin', password is `camping'"
-  config.join
-end
diff --git a/examples/camping/tepee.rb b/examples/camping/tepee.rb
deleted file mode 100644
index 199be37..0000000
--- a/examples/camping/tepee.rb
+++ /dev/null
@@ -1,149 +0,0 @@
-#!/usr/bin/ruby
-$:.unshift File.dirname(__FILE__) + "/../../lib"
-%w(rubygems redcloth camping acts_as_versioned).each { |lib| require lib }
-
-Camping.goes :Tepee
-
-module Tepee::Models
-  def self.schema(&block)
-    @@schema = block if block_given?
-    @@schema
-  end
-  
-  class Page < Base
-    PAGE_LINK = /\[\[([^\]|]*)[|]?([^\]]*)\]\]/
-    validates_uniqueness_of :title
-    before_save { |r| r.title = r.title.underscore }
-    acts_as_versioned
-  end
-end
-
-Tepee::Models.schema do
-  create_table :tepee_pages, :force => true do |t|
-    t.column :title, :string, :limit => 255
-    t.column :body, :text
-  end
-  Tepee::Models::Page.create_versioned_table
-end
-
-module Tepee::Controllers
-  class Index < R '/'
-    def get
-      redirect Show, 'home_page'
-    end
-  end
-
-  class List < R '/list'
-    def get
-      @pages = Page.find :all, :order => 'title'
-      render :list
-    end
-  end
-
-  class Show < R '/s/(\w+)', '/s/(\w+)/(\d+)'
-    def get page_name, version = nil
-      redirect(Edit, page_name, 1) and return unless @page = Page.find_by_title(page_name)
-      @version = (version.nil? or version == @page.version.to_s) ? @page : @page.versions.find_by_version(version)
-      render :show
-    end
-  end
-
-  class Edit < R '/e/(\w+)/(\d+)', '/e/(\w+)'
-    def get page_name, version = nil
-      @page = Page.find_or_create_by_title(page_name)
-      @page = @page.versions.find_by_version(version) unless version.nil? or version == @page.version.to_s
-      render :edit
-    end
-    
-    def post page_name
-      Page.find_or_create_by_title(page_name).update_attributes :body => input.post_body and redirect Show, page_name
-    end
-  end
-end
-
-module Tepee::Views
-  def layout
-    html do
-      head do
-        title 'test'
-      end
-      body do
-        p do
-          small do
-            span "welcome to " ; a 'tepee', :href => "http://code.whytheluckystiff.net/svn/camping/trunk/examples/tepee/"
-            span '. go ' ;       a 'home',  :href => R(Show, 'home_page')
-            span '. list all ' ; a 'pages', :href => R(List)
-          end
-        end
-        div.content do
-          self << yield
-        end
-      end
-    end
-  end
-
-  def show
-    h1 @page.title
-    div { _markup @version.body }
-    p do
-      a 'edit',    :href => R(Edit, @version.title, @version.version)
-      a 'back',    :href => R(Show, @version.title, @version.version-1) unless @version.version == 1
-      a 'next',    :href => R(Show, @version.title, @version.version+1) unless @version.version == @page.version
-      a 'current', :href => R(Show, @version.title)                     unless @version.version == @page.version
-    end
-  end
-
-  def edit
-    form :method => 'post', :action => R(Edit, @page.title) do
-      p do
-        label 'Body' ; br
-        textarea @page.body, :name => 'post_body', :rows => 50, :cols => 100
-      end
-      
-      p do
-        input :type => 'submit'
-        a 'cancel', :href => R(Show, @page.title, @page.version)
-      end
-    end
-  end
-
-  def list
-    h1 'all pages'
-    ul { @pages.each { |p| li { a p.title, :href => R(Show, p.title) } } }
-  end
-
-  def _markup body
-    return '' if body.blank?
-    body.gsub!(Tepee::Models::Page::PAGE_LINK) do
-      page = title = $1
-      title = $2 unless $2.empty?
-      page = page.gsub /\W/, '_'
-      if Tepee::Models::Page.find(:all, :select => 'title').collect { |p| p.title }.include?(page)
-        %Q{<a href="#{self/R(Show, page)}">#{title}</a>}
-      else
-        %Q{<span>#{title}<a href="#{self/R(Edit, page, 1)}">?</a></span>}
-      end
-    end
-    RedCloth.new(body, [ :hard_breaks ]).to_html
-  end
-end
-
-def Tepee.create
-  unless Tepee::Models::Page.table_exists?
-    ActiveRecord::Schema.define(&Tepee::Models.schema)
-    Tepee::Models::Page.reset_column_information
-  end
-end
-
-if __FILE__ == $0
-  require 'mongrel/camping'
-
-  Tepee::Models::Base.establish_connection :adapter => 'sqlite3', :database => 'tepee.db'
-  Tepee::Models::Base.logger = Logger.new('camping.log')
-  Tepee::Models::Base.threaded_connections=false
-  Tepee.create
-  
-  server = Mongrel::Camping::start("0.0.0.0",3000,"/tepee",Tepee)
-  puts "** Tepee example is running at http://localhost:3000/tepee"
-  server.acceptor.join
-end
diff --git a/examples/httpd.conf b/examples/httpd.conf
deleted file mode 100644
index 778124a..0000000
--- a/examples/httpd.conf
+++ /dev/null
@@ -1,474 +0,0 @@
-#
-# This is the main Apache HTTP server configuration file.  It contains the
-# configuration directives that give the server its instructions.
-# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
-# In particular, see
-# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
-# for a discussion of each configuration directive.
-#
-# Do NOT simply read the instructions in here without understanding
-# what they do.  They're here only as hints or reminders.  If you are unsure
-# consult the online docs. You have been warned.  
-#
-# Configuration and logfile names: If the filenames you specify for many
-# of the server's control files begin with "/" (or "drive:/" for Win32), the
-# server will use that explicit path.  If the filenames do *not* begin
-# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
-# with ServerRoot set to "/usr/local/apache2" will be interpreted by the
-# server as "/usr/local/apache2/logs/foo.log".
-
-#
-# ServerRoot: The top of the directory tree under which the server's
-# configuration, error, and log files are kept.
-#
-# Do not add a slash at the end of the directory path.  If you point
-# ServerRoot at a non-local disk, be sure to point the LockFile directive
-# at a local disk.  If you wish to share the same ServerRoot for multiple
-# httpd daemons, you will need to change at least LockFile and PidFile.
-#
-ServerRoot "/usr/local/apache2"
-
-#
-# Listen: Allows you to bind Apache to specific IP addresses and/or
-# ports, instead of the default. See also the <VirtualHost>
-# directive.
-#
-# Change this to Listen on specific IP addresses as shown below to
-# prevent Apache from glomming onto all bound IP addresses.
-#
-#Listen 12.34.56.78:80
-Listen 8088
-
-#
-# Dynamic Shared Object (DSO) Support
-#
-# To be able to use the functionality of a module which was built as a DSO you
-# have to place corresponding `LoadModule' lines at this location so the
-# directives contained in it are actually available _before_ they are used.
-# Statically compiled modules (those listed by `httpd -l') do not need
-# to be loaded here.
-#
-# Example:
-# LoadModule foo_module modules/mod_foo.so
-#
-
-LoadModule deflate_module modules/mod_deflate.so
-LoadModule expires_module modules/mod_expires.so
-LoadModule headers_module modules/mod_headers.so
-LoadModule mime_magic_module modules/mod_mime_magic.so
-LoadModule proxy_module modules/mod_proxy.so
-LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
-LoadModule proxy_http_module modules/mod_proxy_http.so
-LoadModule rewrite_module modules/mod_rewrite.so
-LoadModule version_module modules/mod_version.so
-LoadModule vhost_alias_module modules/mod_vhost_alias.so
-
-<IfModule !mpm_netware_module>
-#
-# If you wish httpd to run as a different user or group, you must run
-# httpd as root initially and it will switch.  
-#
-# User/Group: The name (or #number) of the user/group to run httpd as.
-# It is usually good practice to create a dedicated user and group for
-# running httpd, as with most system services.
-#
-User www-data
-Group www-data
-</IfModule>
-
-# 'Main' server configuration
-#
-# The directives in this section set up the values used by the 'main'
-# server, which responds to any requests that aren't handled by a
-# <VirtualHost> definition.  These values also provide defaults for
-# any <VirtualHost> containers you may define later in the file.
-#
-# All of these directives may appear inside <VirtualHost> containers,
-# in which case these default settings will be overridden for the
-# virtual host being defined.
-#
-
-#
-# ServerAdmin: Your address, where problems with the server should be
-# e-mailed.  This address appears on some server-generated pages, such
-# as error documents.  e.g. admin@your-domain.com
-#
-ServerAdmin admin@SERVER
-
-#
-# ServerName gives the name and port that the server uses to identify itself.
-# This can often be determined automatically, but we recommend you specify
-# it explicitly to prevent problems during startup.
-#
-# If your host doesn't have a registered DNS name, enter its IP address here.
-#
-ServerName SERVER:8088
-
-#
-# DocumentRoot: The directory out of which you will serve your
-# documents. By default, all requests are taken from this directory, but
-# symbolic links and aliases may be used to point to other locations.
-#
-DocumentRoot "/usr/local/apache2/htdocs"
-
-#
-# Each directory to which Apache has access can be configured with respect
-# to which services and features are allowed and/or disabled in that
-# directory (and its subdirectories).
-#
-# First, we configure the "default" to be a very restrictive set of
-# features.  
-#
-<Directory />
-    Options FollowSymLinks
-    AllowOverride None
-    Order deny,allow
-    Deny from all
-</Directory>
-
-#
-# Note that from this point forward you must specifically allow
-# particular features to be enabled - so if something's not working as
-# you might expect, make sure that you have specifically enabled it
-# below.
-#
-
-#
-# This should be changed to whatever you set DocumentRoot to.
-#
-<Directory "/usr/local/apache2/htdocs">
-    #
-    # Possible values for the Options directive are "None", "All",
-    # or any combination of:
-    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
-    #
-    # Note that "MultiViews" must be named *explicitly* --- "Options All"
-    # doesn't give it to you.
-    #
-    # The Options directive is both complicated and important.  Please see
-    # http://httpd.apache.org/docs/2.2/mod/core.html#options
-    # for more information.
-    #
-    Options Indexes FollowSymLinks
-
-    #
-    # AllowOverride controls what directives may be placed in .htaccess files.
-    # It can be "All", "None", or any combination of the keywords:
-    #   Options FileInfo AuthConfig Limit
-    #
-    AllowOverride None
-
-    #
-    # Controls who can get stuff from this server.
-    #
-    Order allow,deny
-    Allow from all
-
-</Directory>
-
-#
-# DirectoryIndex: sets the file that Apache will serve if a directory
-# is requested.
-#
-<IfModule dir_module>
-    DirectoryIndex index.html
-</IfModule>
-
-#
-# The following lines prevent .htaccess and .htpasswd files from being
-# viewed by Web clients.
-#
-<FilesMatch "^\.ht">
-    Order allow,deny
-    Deny from all
-    Satisfy All
-</FilesMatch>
-
-#
-# ErrorLog: The location of the error log file.
-# If you do not specify an ErrorLog directive within a <VirtualHost>
-# container, error messages relating to that virtual host will be
-# logged here.  If you *do* define an error logfile for a <VirtualHost>
-# container, that host's errors will be logged there and not here.
-#
-ErrorLog logs/error_log
-
-#
-# LogLevel: Control the number of messages logged to the error_log.
-# Possible values include: debug, info, notice, warn, error, crit,
-# alert, emerg.
-#
-LogLevel warn
-
-<IfModule log_config_module>
-    #
-    # The following directives define some format nicknames for use with
-    # a CustomLog directive (see below).
-    #
-    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
-    LogFormat "%h %l %u %t \"%r\" %>s %b" common
-
-    <IfModule logio_module>
-      # You need to enable mod_logio.c to use %I and %O
-      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
-    </IfModule>
-
-    #
-    # The location and format of the access logfile (Common Logfile Format).
-    # If you do not define any access logfiles within a <VirtualHost>
-    # container, they will be logged here.  Contrariwise, if you *do*
-    # define per-<VirtualHost> access logfiles, transactions will be
-    # logged therein and *not* in this file.
-    #
-    CustomLog logs/access_log common
-
-    #
-    # If you prefer a logfile with access, agent, and referer information
-    # (Combined Logfile Format) you can use the following directive.
-    #
-    #CustomLog logs/access_log combined
-</IfModule>
-
-<IfModule alias_module>
-    #
-    # Redirect: Allows you to tell clients about documents that used to
-    # exist in your server's namespace, but do not anymore. The client
-    # will make a new request for the document at its new location.
-    # Example:
-    # Redirect permanent /foo http://www.example.com/bar
-
-    #
-    # Alias: Maps web paths into filesystem paths and is used to
-    # access content that does not live under the DocumentRoot.
-    # Example:
-    # Alias /webpath /full/filesystem/path
-    #
-    # If you include a trailing / on /webpath then the server will
-    # require it to be present in the URL.  You will also likely
-    # need to provide a <Directory> section to allow access to
-    # the filesystem path.
-
-    #
-    # ScriptAlias: This controls which directories contain server scripts.
-    # ScriptAliases are essentially the same as Aliases, except that
-    # documents in the target directory are treated as applications and
-    # run by the server when requested rather than as documents sent to the
-    # client.  The same rules about trailing "/" apply to ScriptAlias
-    # directives as to Alias.
-    #
-    ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
-
-</IfModule>
-
-<IfModule cgid_module>
-    #
-    # ScriptSock: On threaded servers, designate the path to the UNIX
-    # socket used to communicate with the CGI daemon of mod_cgid.
-    #
-    #Scriptsock logs/cgisock
-</IfModule>
-
-#
-# "/usr/local/apache2/cgi-bin" should be changed to whatever your ScriptAliased
-# CGI directory exists, if you have that configured.
-#
-<Directory "/usr/local/apache2/cgi-bin">
-    AllowOverride None
-    Options None
-    Order allow,deny
-    Allow from all
-</Directory>
-
-#
-# DefaultType: the default MIME type the server will use for a document
-# if it cannot otherwise determine one, such as from filename extensions.
-# If your server contains mostly text or HTML documents, "text/plain" is
-# a good value.  If most of your content is binary, such as applications
-# or images, you may want to use "application/octet-stream" instead to
-# keep browsers from trying to display binary files as though they are
-# text.
-#
-DefaultType text/plain
-
-<IfModule mime_module>
-    #
-    # TypesConfig points to the file containing the list of mappings from
-    # filename extension to MIME-type.
-    #
-    TypesConfig conf/mime.types
-
-    #
-    # AddType allows you to add to or override the MIME configuration
-    # file specified in TypesConfig for specific file types.
-    #
-    #AddType application/x-gzip .tgz
-    #
-    # AddEncoding allows you to have certain browsers uncompress
-    # information on the fly. Note: Not all browsers support this.
-    #
-    #AddEncoding x-compress .Z
-    #AddEncoding x-gzip .gz .tgz
-    #
-    # If the AddEncoding directives above are commented-out, then you
-    # probably should define those extensions to indicate media types:
-    #
-    AddType application/x-compress .Z
-    AddType application/x-gzip .gz .tgz
-
-    #
-    # AddHandler allows you to map certain file extensions to "handlers":
-    # actions unrelated to filetype. These can be either built into the server
-    # or added with the Action directive (see below)
-    #
-    # To use CGI scripts outside of ScriptAliased directories:
-    # (You will also need to add "ExecCGI" to the "Options" directive.)
-    #
-    #AddHandler cgi-script .cgi
-
-    # For type maps (negotiated resources):
-    #AddHandler type-map var
-
-    #
-    # Filters allow you to process content before it is sent to the client.
-    #
-    # To parse .shtml files for server-side includes (SSI):
-    # (You will also need to add "Includes" to the "Options" directive.)
-    #
-    #AddType text/html .shtml
-    #AddOutputFilter INCLUDES .shtml
-</IfModule>
-
-#
-# The mod_mime_magic module allows the server to use various hints from the
-# contents of the file itself to determine its type.  The MIMEMagicFile
-# directive tells the module where the hint definitions are located.
-#
-#MIMEMagicFile conf/magic
-
-#
-# Customizable error responses come in three flavors:
-# 1) plain text 2) local redirects 3) external redirects
-#
-# Some examples:
-#ErrorDocument 500 "The server made a boo boo."
-#ErrorDocument 404 /missing.html
-#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
-#ErrorDocument 402 http://www.example.com/subscription_info.html
-#
-
-#
-# EnableMMAP and EnableSendfile: On systems that support it,
-# memory-mapping or the sendfile syscall is used to deliver
-# files.  This usually improves server performance, but must
-# be turned off when serving from networked-mounted
-# filesystems or if support for these functions is otherwise
-# broken on your system.
-#
-#EnableMMAP off
-EnableSendfile on
-
-# Supplemental configuration
-#
-# The configuration files in the conf/extra/ directory can be
-# included to add extra features or to modify the default configuration of
-# the server, or you may simply copy their contents here and change as
-# necessary.
-
-# Server-pool management (MPM specific)
-#Include conf/extra/httpd-mpm.conf
-
-# Multi-language error messages
-#Include conf/extra/httpd-multilang-errordoc.conf
-
-# Fancy directory listings
-#Include conf/extra/httpd-autoindex.conf
-
-# Language settings
-#Include conf/extra/httpd-languages.conf
-
-# User home directories
-#Include conf/extra/httpd-userdir.conf
-
-# Real-time info on requests and configuration
-#Include conf/extra/httpd-info.conf
-
-# Virtual hosts
-#Include conf/extra/httpd-vhosts.conf
-
-# Local access to the Apache HTTP Server Manual
-#Include conf/extra/httpd-manual.conf
-
-# Distributed authoring and versioning (WebDAV)
-#Include conf/extra/httpd-dav.conf
-
-# Various default settings
-#Include conf/extra/httpd-default.conf
-
-# Secure (SSL/TLS) connections
-#Include conf/extra/httpd-ssl.conf
-#
-# Note: The following must must be present to support
-#       starting without SSL on platforms with no /dev/random equivalent
-#       but a statically compiled-in mod_ssl.
-#
-<IfModule ssl_module>
-SSLRandomSeed startup builtin
-SSLRandomSeed connect builtin
-</IfModule>
-
-<VirtualHost *:8088>
-  ServerName SERVER
-  DocumentRoot /var/rails/MYAPP/public
-
-  <Directory "/var/rails/MYAPP/public">
-    Options FollowSymLinks
-    AllowOverride None
-    Order allow,deny
-    Allow from all
-  </Directory>
-
-  # Configure mongrel_cluster
-  <Proxy balancer://mongrel_cluster>
-    BalancerMember http://127.0.0.1:8000
-    BalancerMember http://127.0.0.1:8001
-  </Proxy>
-
-  RewriteEngine On
-
-  # Uncomment for rewrite debugging
-  #RewriteLog logs/your_app_rewrite_log
-  #RewriteLogLevel 9
-
-  # Check for maintenance file and redirect all requests
-  RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
-  RewriteCond %{SCRIPT_FILENAME} !maintenance.html
-  RewriteRule ^.*$ /system/maintenance.html [L]
-
-  # Rewrite index to check for static
-  RewriteRule ^/$ /index.html [QSA]
-
-  # Rewrite to check for Rails cached page
-  RewriteRule ^([^.]+)$ $1.html [QSA]
-
-  # Redirect all non-static requests to cluster
-  RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
-  RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]
-
-  # Deflate
-  AddOutputFilterByType DEFLATE text/html text/plain text/xml
-  BrowserMatch ^Mozilla/4 gzip-only-text/html
-  BrowserMatch ^Mozilla/4\.0[678] no-gzip
-  BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
-
-  # Uncomment for deflate debugging
-  #DeflateFilterNote Input input_info
-  #DeflateFilterNote Output output_info
-  #DeflateFilterNote Ratio ratio_info
-  #LogFormat '"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' deflate
-  #CustomLog logs/your_app_deflate_log deflate
-
-  ErrorLog logs/your_app_error_log
-  CustomLog logs/your_access_log combined
-</VirtualHost>
-
-
diff --git a/examples/mime.yaml b/examples/mime.yaml
deleted file mode 100644
index 6e7bb04..0000000
--- a/examples/mime.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-.jpeg: image/jpeg
-.png: image/test
diff --git a/examples/mongrel.conf b/examples/mongrel.conf
deleted file mode 100644
index 5c77707..0000000
--- a/examples/mongrel.conf
+++ /dev/null
@@ -1,9 +0,0 @@
----
-:environment: production
-:daemon: "true"
-:host: 0.0.0.0
-:log_file: log/mongrel.log
-:docroot: public
-:debug: "false"
-:port: 3000
-:pid_file: log/mongrel.pid
diff --git a/examples/mongrel_simple_ctrl.rb b/examples/mongrel_simple_ctrl.rb
deleted file mode 100644
index 4663d1c..0000000
--- a/examples/mongrel_simple_ctrl.rb
+++ /dev/null
@@ -1,92 +0,0 @@
-###############################################
-# mongrel_simple_ctrl.rb
-#
-# Control script for the Mongrel server
-###############################################
-require "optparse"
-require "win32/service"
-include Win32
-
-# I start the service name with an 'A' so that it appears at the top
-SERVICE_NAME = "MongrelSvc"
-SERVICE_DISPLAYNAME = "Mongrel HTTP Server"
-SCRIPT_ROOT = File.join(File.dirname(__FILE__), '.')
-SCRIPT_NAME = "mongrel_simple_service.rb"
-SERVICE_SCRIPT = File.expand_path(SCRIPT_ROOT + '/' + SCRIPT_NAME)
-
-OPTIONS = {}
-
-ARGV.options do |opts|
-   opts.on("-d", "--delete", "Delete the service"){ OPTIONS[:delete] = true }
-   opts.on("-u", "--uninstall","Delete the service"){ OPTIONS[:uninstall] = true }
-   opts.on("-s", "--start",  "Start the service"){ OPTIONS[:start] = true }
-   opts.on("-x", "--stop",   "Stop the service"){ OPTIONS[:stop] = true }
-   opts.on("-i", "--install","Install the service"){ OPTIONS[:install] = true }
-
-   opts.on("-h", "--help",   "Show this help message."){ puts opts; exit }
-
-   opts.parse!
-end
-
-# Install the service
-if OPTIONS[:install]  
-   require 'rbconfig'
-  
-   svc = Service.new
-   svc.create_service{ |s|
-      s.service_name     = SERVICE_NAME
-      s.display_name     = SERVICE_DISPLAYNAME
-      s.binary_path_name = Config::CONFIG['bindir'] + '/ruby ' + SERVICE_SCRIPT
-      s.dependencies     = []
-   }
-   svc.close
-   puts "#{SERVICE_DISPLAYNAME} service installed"
-end
-
-# Start the service
-if OPTIONS[:start]
-   Service.start(SERVICE_NAME)
-   started = false
-   while started == false
-      s = Service.status(SERVICE_NAME)
-      started = true if s.current_state == "running"
-      break if started == true
-      puts "One moment, " + s.current_state
-      sleep 1
-   end
-   puts "#{SERVICE_DISPLAYNAME} service started"
-end
-
-# Stop the service
-if OPTIONS[:stop]
-   Service.stop(SERVICE_NAME)
-   stopped = false
-   while stopped == false
-      s = Service.status(SERVICE_NAME)
-      stopped = true if s.current_state == "stopped"
-      break if stopped == true
-      puts "One moment, " + s.current_state
-      sleep 1
-   end
-   puts "#{SERVICE_DISPLAYNAME} service stopped"
-end
-
-# Delete the service.  Stop it first.
-if OPTIONS[:delete] || OPTIONS[:uninstall]
-   begin
-      Service.stop(SERVICE_NAME)
-   rescue
-   end
-   begin
-    Service.delete(SERVICE_NAME)
-   rescue
-   end
-   puts "#{SERVICE_DISPLAYNAME} service deleted"
-end
-# END mongrel_rails_ctrl.rb
-
-
-
-
-
-
diff --git a/examples/mongrel_simple_service.rb b/examples/mongrel_simple_service.rb
deleted file mode 100644
index 3f9bc2c..0000000
--- a/examples/mongrel_simple_service.rb
+++ /dev/null
@@ -1,116 +0,0 @@
-# This script emualtes script/server behavior but running webrick http server
-require 'rubygems'
-
-require 'mongrel'
-require 'yaml'
-require 'zlib'
-
-require 'win32/service'
-
-DEBUG_LOG_FILE = File.expand_path(File.dirname(__FILE__) + '/debug.log')
-
-class SimpleHandler < Mongrel::HttpHandler
-    def process(request, response)
-      response.start do |head,out|
-        head["Content-Type"] = "text/html"
-        results = "<html><body>Your request:<br /><pre>#{request.params.to_yaml}</pre><a href=\"/files\">View the files.</a></body></html>"
-        if request.params["HTTP_ACCEPT_ENCODING"] == "gzip,deflate"
-          head["Content-Encoding"] = "deflate"
-          # send it back deflated
-          out << Zlib::Deflate.deflate(results)
-        else
-          # no gzip supported, send it back normal
-          out << results
-        end
-      end
-    end
-end
-
-class MongrelDaemon < Win32::Daemon
-  def initialize(options)
-    @options = options
-  end
-  
-  def service_init
-    File.open(DEBUG_LOG_FILE,"a+") { |f| f.puts("#{Time.now} - service_init entered") }
-
-    File.open(DEBUG_LOG_FILE,"a+") { |f| f.puts("Mongrel running on #{@options[:ip]}:#{@options[:port]} with docroot #{@options[:server_root]}") }
-
-    @simple = SimpleHandler.new
-    @files = Mongrel::DirHandler.new(@options[:server_root])
-
-    @http_server = Mongrel::HttpServer.new(@options[:ip], @options[:port])
-    @http_server.register("/", @simple)
-    @http_server.register("/files", @files)
-
-    File.open(DEBUG_LOG_FILE,"a+") { |f| f.puts("#{Time.now} - service_init left") }
-  end
-  
-  def service_stop
-    File.open(DEBUG_LOG_FILE,"a+"){ |f|
-      f.puts "stop signal received: " + Time.now.to_s
-      f.puts "sending stop to mongrel threads: " + Time.now.to_s
-    }
-    #@http_server.stop
-  end
-
-  def service_pause
-    File.open(DEBUG_LOG_FILE,"a+"){ |f|
-      f.puts "pause signal received: " + Time.now.to_s
-    }
-  end
-  
-  def service_resume
-    File.open(DEBUG_LOG_FILE,"a+"){ |f|
-      f.puts "continue/resume signal received: " + Time.now.to_s
-    }
-  end
-
-  def service_main
-    File.open(DEBUG_LOG_FILE,"a+") { |f| f.puts("#{Time.now} - service_main entered") }
-    
-    begin
-      File.open(DEBUG_LOG_FILE,"a+") { |f| f.puts("#{Time.now} - http_server.run") }
-      @http_server.run
-    
-      # No runner thread was needed after all!
-      #@runner = Thread.new do
-      #  @http_server.acceptor.join
-      #end
-      #File.open("d:\\test.log","a+") { |f| f.puts("#{Time.now} - runner.run") }
-      #@runner.run
-      
-      # here is where magic happens!
-      # if put blocking code here, the thread never left service_main, and the rb_func_call in service.c
-      # never exit, even if the stop signal is received.
-      #
-      # to probe my theory, just comment the while loop and remove the '1' from sleep function
-      # service start ok, but fail to stop.
-      #
-      # Even if no functional code is in service_main (because we have other working threads),
-      # we must monitor the state of the service to exit when the STOP event is received.
-      #
-      # Note: maybe not loop in 1 second intervals?
-      while state == RUNNING
-        sleep 1
-      end
-      
-    rescue StandardError, Exception, interrupt  => err
-      File.open(DEBUG_LOG_FILE,"a+"){ |f| f.puts("#{Time.now} - Error: #{err}") }
-      File.open(DEBUG_LOG_FILE,"a+"){ |f| f.puts("BACKTRACE: " + err.backtrace.join("\n")) }
-      
-    end
-    
-    File.open(DEBUG_LOG_FILE,"a+") { |f| f.puts("#{Time.now} - service_main left") }
-  end
-  
-end
-
-OPTIONS = {
-  :port            => 3000,
-  :ip              => "0.0.0.0",
-  :server_root     => File.expand_path(File.dirname(__FILE__)),
-}
-
-web_server = MongrelDaemon.new(OPTIONS)
-web_server.mainloop
diff --git a/examples/monitrc b/examples/monitrc
deleted file mode 100644
index 9964ae9..0000000
--- a/examples/monitrc
+++ /dev/null
@@ -1,57 +0,0 @@
-set daemon  60
-set logfile syslog facility log_daemon
-set mailserver localhost
-set mail-format { from: monit@localhost }
-set alert root@localhost
-
-check process sshd with pidfile /var/run/sshd.pid
-   start program  "/etc/init.d/ssh start"
-   stop program  "/etc/init.d/ssh stop"
-   if failed port 22 protocol ssh then restart
-   if 5 restarts within 5 cycles then timeout
-
-check process mysql with pidfile /var/run/mysqld/mysqld.pid
-   group database
-   start program = "/etc/init.d/mysql start"
-   stop program = "/etc/init.d/mysql stop"
-   if failed host 127.0.0.1 port 3306 then restart
-   if 5 restarts within 5 cycles then timeout
-
-check process httpd with pidfile /usr/local/apache2/logs/httpd.pid
-   group www-data
-   start program  "/usr/local/apache2/bin/apachectl start"
-   stop program  "/usr/local/apache2/bin/apachectl stop"
-   if failed host localhost port 80 protocol http
-      and request "/" then alert
-   if cpu is greater than 60% for 2 cycles then alert
-   if cpu > 80% for 5 cycles then restart
-   if children > 250 then restart
-   if loadavg(5min) greater than 10 for 8 cycles then alert
-   if 3 restarts within 5 cycles then timeout
-
-check process mongrel_8000 with pidfile /var/rails/MYAPP/log/mongrel.8000.pid
-   group root
-   if failed host 127.0.0.1 port 8000 protocol http
-      and request "/" then alert
-   if cpu is greater than 60% for 2 cycles then alert
-   if cpu > 80% for 5 cycles then restart
-   if loadavg(5min) greater than 10 for 8 cycles then restart
-   if 3 restarts within 5 cycles then timeout
-
-check process mongrel_8001 with pidfile /var/rails/MYAPP/log/mongrel.8001.pid
-   group root
-   if failed host 127.0.0.1 port 8001 protocol http
-      and request "/" then alert
-   if cpu is greater than 60% for 2 cycles then alert
-   if cpu > 80% for 5 cycles then alert
-   if loadavg(5min) greater than 10 for 8 cycles then alert
-   if 3 restarts within 5 cycles then timeout
-
-check process postfix with pidfile /var/spool/postfix/pid/master.pid
-   group mail
-   start program = "/etc/init.d/postfix start"
-   stop  program = "/etc/init.d/postfix stop"
-   if failed port 25 protocol smtp then restart
-   if 5 restarts within 5 cycles then timeout
-
-
diff --git a/examples/random_thrash.rb b/examples/random_thrash.rb
deleted file mode 100644
index fe9311c..0000000
--- a/examples/random_thrash.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-require 'socket'
-devrand = open("/dev/random","r")
-
-loop do
-  s = TCPSocket.new(ARGV[0],ARGV[1])
-  s.write("GET / HTTP/1.1\r\n")
-  total = 0
-  begin
-    loop do
-       r = devrand.read(10)
-       n = s.write(r)
-       total += n
-    end  
-  rescue Object
-        STDERR.puts "#$!: #{total}"
-  end
-   s.close
-   sleep 1
-end
diff --git a/examples/simpletest.rb b/examples/simpletest.rb
deleted file mode 100644
index b82e2c6..0000000
--- a/examples/simpletest.rb
+++ /dev/null
@@ -1,52 +0,0 @@
-$LOAD_PATH << File.join(File.dirname(__FILE__), "..", "lib")
-require 'mongrel'
-require 'yaml'
-
-class SimpleHandler < Mongrel::HttpHandler
-  def process(request, response)
-    response.start do |head,out|
-      head["Content-Type"] = "text/html"
-      results = "<html><body>Your request:<br /><pre>#{request.params.to_yaml}</pre><a href=\"/files\">View the files.</a></body></html>"
-      out << results
-    end
-  end
-end
-
-class DumbHandler < Mongrel::HttpHandler
-  def process(request, response)
-    response.start do |head,out|
-      head["Content-Type"] = "text/html"
-      out.write("test")
-    end
-  end
-end
-
-
-if ARGV.length != 3
-  STDERR.puts "usage:  simpletest.rb <host> <port> <docroot>"
-  exit(1)
-end
-
-stats = Mongrel::StatisticsFilter.new(:sample_rate => 1)
-
-config = Mongrel::Configurator.new :host => ARGV[0], :port => ARGV[1] do
-  listener do
-    uri "/", :handler => SimpleHandler.new
-    uri "/", :handler => Mongrel::DeflateFilter.new
-    uri "/", :handler => stats
-    uri "/dumb", :handler => DumbHandler.new
-    uri "/dumb", :handler => Mongrel::DeflateFilter.new
-    uri "/dumb", :handler => stats
-    uri "/files", :handler => Mongrel::DirHandler.new(ARGV[2])
-    uri "/files", :handler => stats
-    uri "/status", :handler => Mongrel::StatusHandler.new(:stats_filter => stats)
-    redirect "/redir1", "/"
-    redirect "/to", /to/, 'w'
-  end
-
-  trap("INT") { stop }
-  run
-end
-
-puts "Mongrel running on #{ARGV[0]}:#{ARGV[1]} with docroot #{ARGV[2]}"
-config.join
diff --git a/examples/webrick_compare.rb b/examples/webrick_compare.rb
deleted file mode 100644
index 15199b0..0000000
--- a/examples/webrick_compare.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/local/bin/ruby
-require 'webrick'
-include WEBrick
-
-s = HTTPServer.new( :Port => 4000 )
-
-# HTTPServer#mount(path, servletclass)
-#   When a request referring "/hello" is received,
-#   the HTTPServer get an instance of servletclass
-#   and then call a method named do_"a HTTP method".
-
-class HelloServlet < HTTPServlet::AbstractServlet
-  def do_GET(req, res)
-    res.body = "hello!"
-    res['Content-Type'] = "text/html"
-  end
-end
-s.mount("/test", HelloServlet)
-
-s.start \ No newline at end of file
diff --git a/lib/mongrel/camping.rb b/lib/mongrel/camping.rb
deleted file mode 100644
index 31bd196..0000000
--- a/lib/mongrel/camping.rb
+++ /dev/null
@@ -1,107 +0,0 @@
-# Copyright (c) 2005 Zed A. Shaw
-# You can redistribute it and/or modify it under the same terms as Ruby.
-#
-# Additional work donated by contributors.  See http://mongrel.rubyforge.org/attributions.html
-# for more information.
-
-require 'mongrel'
-
-
-module Mongrel
-  # Support for the Camping micro framework at http://camping.rubyforge.org
-  # This implements the unusually long Postamble that Camping usually
-  # needs and shrinks it down to just a single line or two.
-  #
-  # Your Postamble would now be:
-  #
-  #   Mongrel::Camping::start("0.0.0.0",3001,"/tepee",Tepee).join
-  #
-  # If you wish to get fancier than this then you can use the
-  # Camping::CampingHandler directly instead and do your own
-  # wiring:
-  #
-  #   h = Mongrel::HttpServer.new(server, port)
-  #   h.register(uri, CampingHandler.new(Tepee))
-  #   h.register("/favicon.ico", Mongrel::Error404Handler.new(""))
-  #
-  # I add the /favicon.ico since camping apps typically don't
-  # have them and it's just annoying anyway.
-  module Camping
-
-    # This is a specialized handler for Camping applications
-    # that has them process the request and then translates
-    # the results into something the Mongrel::HttpResponse
-    # needs.
-    class CampingHandler < Mongrel::HttpHandler
-      attr_reader :files
-      attr_reader :guard
-      @@file_only_methods = ["GET","HEAD"]
-
-      def initialize(klass)
-        @files = Mongrel::DirHandler.new(nil, false)
-        @guard = Mutex.new
-        @klass = klass
-      end
-
-      def process(request, response)
-        if response.socket.closed?
-          return
-        end
-
-        controller = nil
-        @guard.synchronize {
-          controller = @klass.run(request.body, request.params)
-        }
-
-        sendfile, clength = nil
-        response.status = controller.status
-        controller.headers.each do |k, v|
-          if k =~ /^X-SENDFILE$/i
-            sendfile = v
-          elsif k =~ /^CONTENT-LENGTH$/i
-            clength = v.to_i
-          else
-            [*v].each do |vi|
-              response.header[k] = vi
-            end
-          end
-        end
-
-        if sendfile
-          request.params[Mongrel::Const::PATH_INFO] = sendfile
-          @files.process(request, response)
-        elsif controller.body.respond_to? :read
-          response.send_status(clength)
-          response.send_header
-          while chunk = controller.body.read(16384)
-            response.write(chunk)
-          end
-          if controller.body.respond_to? :close
-            controller.body.close
-          end
-        else
-          body = controller.body.to_s
-          response.send_status(body.length)
-          response.send_header
-          response.write(body)
-        end
-      end
-    end
-
-    # This is a convenience method that wires up a CampingHandler
-    # for your application on a given port and uri.  It's pretty
-    # much all you need for a camping application to work right.
-    #
-    # It returns the Mongrel::HttpServer which you should either
-    # join or somehow manage.  The thread is running when
-    # returned.
-
-    def Camping.start(server, port, uri, klass)
-      h = Mongrel::HttpServer.new(server, port)
-      h.register(uri, CampingHandler.new(klass))
-      h.register("/favicon.ico", Mongrel::Error404Handler.new(""))
-      h.run
-      return h
-    end
-  end
-end
diff --git a/lib/mongrel/debug.rb b/lib/mongrel/debug.rb
deleted file mode 100644
index 2686c1e..0000000
--- a/lib/mongrel/debug.rb
+++ /dev/null
@@ -1,203 +0,0 @@
-# Copyright (c) 2005 Zed A. Shaw
-# You can redistribute it and/or modify it under the same terms as Ruby.
-#
-# Additional work donated by contributors.  See http://mongrel.rubyforge.org/attributions.html
-# for more information.
-
-require 'logger'
-require 'set'
-require 'socket'
-require 'fileutils'
-
-module MongrelDbg
-  SETTINGS = { :tracing => {}}
-  LOGGING = { }
-
-  def MongrelDbg::configure(log_dir = File.join("log","mongrel_debug"))
-    FileUtils.mkdir_p(log_dir)
-    @log_dir = log_dir
-    $objects_out=open(File.join("log","mongrel_debug","objects.log"),"w")
-    $objects_out.puts "run,classname,last,count,delta,lenmean,lensd,lenmax"
-    $objects_out.sync = true
-    $last_stat = nil
-    $run_count = 0
-  end
-
-  
-  def MongrelDbg::trace(target, message)
-    if SETTINGS[:tracing][target] and LOGGING[target]
-      LOGGING[target].log(Logger::DEBUG, message)
-    end
-  end
-
-  def MongrelDbg::begin_trace(target)
-    SETTINGS[:tracing][target] = true
-    if not LOGGING[target]
-      LOGGING[target] = Logger.new(File.join(@log_dir, "#{target.to_s}.log"))
-    end                          
-    MongrelDbg::trace(target, "TRACING ON #{Time.now}")
-  end
-
-  def MongrelDbg::end_trace(target)
-    SETTINGS[:tracing][target] = false
-    MongrelDbg::trace(target, "TRACING OFF #{Time.now}")
-    LOGGING[target].close
-    LOGGING[target] = nil
-  end
-
-  def MongrelDbg::tracing?(target)
-    SETTINGS[:tracing][target]
-  end
-end
-
-
-
-$open_files = {}
-
-class IO
-  alias_method :orig_open, :open
-  alias_method :orig_close, :close
-
-  def open(*arg, &blk)
-    $open_files[self] = args.inspect
-    orig_open(*arg,&blk)
-  end
-
-  def close(*arg,&blk)
-    $open_files.delete self
-    orig_close(*arg,&blk)
-  end
-end
-
-
-module Kernel
-  alias_method :orig_open, :open
-
-  def open(*arg, &blk)
-    $open_files[self] = arg[0]
-    orig_open(*arg,&blk)
-  end
-
-  def log_open_files
-    open_counts = {}
-    $open_files.each do |f,args|
-      open_counts[args] ||= 0
-      open_counts[args] += 1
-    end
-    MongrelDbg::trace(:files, open_counts.to_yaml)
-  end
-end  
-
-
-
-module RequestLog
-
-  # Just logs whatever requests it gets to STDERR (which ends up in the mongrel
-  # log when daemonized).
-  class Access < GemPlugin::Plugin "/handlers"
-    include Mongrel::HttpHandlerPlugin
-    
-    def process(request,response)
-      p = request.params
-      STDERR.puts "#{p['REMOTE_ADDR']} - [#{Time.now.httpdate}] \"#{p['REQUEST_METHOD']} #{p["REQUEST_URI"]} HTTP/1.1\""
-    end
-  end
-  
-
-  class Files < GemPlugin::Plugin "/handlers"
-    include Mongrel::HttpHandlerPlugin
-    
-    def process(request, response)
-      MongrelDbg::trace(:files, "#{Time.now} FILES OPEN BEFORE REQUEST #{request.params['PATH_INFO']}")
-      log_open_files
-    end
-    
-  end
-
-  # stolen from Robert Klemme
-  class Objects < GemPlugin::Plugin "/handlers"
-    include Mongrel::HttpHandlerPlugin
-
-    def process(request,response)
-      begin
-        stats = Hash.new(0)
-        lengths = {}
-        begin
-          ObjectSpace.each_object do |o|
-            begin
-              if o.respond_to? :length
-                len = o.length
-                lengths[o.class] ||= Mongrel::Stats.new(o.class)
-                lengths[o.class].sample(len)
-              end
-            rescue Object
-            end
-  
-            stats[o.class] += 1
-          end
-        rescue Object # Ignore since ObjectSpace might not be loaded on JRuby
-        end
-
-        stats.sort {|(k1,v1),(k2,v2)| v2 <=> v1}.each do |k,v|
-          if $last_stat
-            delta = v - $last_stat[k]
-            if v > 10 and delta != 0
-              if lengths[k]
-                $objects_out.printf "%d,%s,%d,%d,%d,%f,%f,%f\n", $run_count, k, $last_stat[k], v, delta,lengths[k].mean,lengths[k].sd,lengths[k].max
-              else
-                $objects_out.printf "%d,%s,%d,%d,%d,,,\n", $run_count, k, $last_stat[k], v, delta
-              end
-            end
-          end
-        end
-
-        $run_count += 1
-        $last_stat = stats
-      rescue Object
-        STDERR.puts "object.log ERROR: #$!"
-      end
-    end
-  end
-
-  class Params < GemPlugin::Plugin "/handlers"
-    include Mongrel::HttpHandlerPlugin
-
-    def process(request, response)
-      MongrelDbg::trace(:rails, "#{Time.now} REQUEST #{request.params['PATH_INFO']}")
-      MongrelDbg::trace(:rails, request.params.to_yaml)
-    end
-
-  end
-
-  class Threads < GemPlugin::Plugin "/handlers"
-    include Mongrel::HttpHandlerPlugin
-
-    def process(request, response)
-      MongrelDbg::trace(:threads, "#{Time.now} REQUEST #{request.params['PATH_INFO']}")
-      begin
-        ObjectSpace.each_object do |obj|
-          begin
-            if obj.class == Mongrel::HttpServer
-              worker_list = obj.workers.list
-  
-              if worker_list.length > 0
-                keys = "-----\n\tKEYS:"
-                worker_list.each {|t| keys << "\n\t\t-- #{t}: #{t.keys.inspect}" }
-              end
-  
-              MongrelDbg::trace(:threads, "#{obj.host}:#{obj.port} -- THREADS: #{worker_list.length} #{keys}")
-            end
-          rescue Object # Ignore since obj.class can sometimes take parameters            
-          end
-        end
-      rescue Object # Ignore since ObjectSpace might not be loaded on JRuby
-      end
-    end
-  end
-end
-
-
-END {
-  MongrelDbg::trace(:files, "FILES OPEN AT EXIT")
-  log_open_files
-}
diff --git a/lib/mongrel/gems.rb b/lib/mongrel/gems.rb
deleted file mode 100644
index eb6d0d6..0000000
--- a/lib/mongrel/gems.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-module Mongrel
-  module Gems
-    class << self
-    
-      def require(library, version = nil)
-        begin
-          Kernel.require library
-        rescue LoadError, RuntimeError => e
-          begin
-            # ActiveSupport breaks 'require' by making it always return a true value
-            Kernel.require 'rubygems'
-            version ? gem(library, version) : gem(library)
-            retry
-          rescue Gem::LoadError, LoadError, RuntimeError
-            # puts "** #{library.inspect} could not be loaded" unless library == "mongrel_experimental"
-          end
-        end  
-      end
-      
-    end    
-  end
-end \ No newline at end of file
diff --git a/lib/mongrel/rails.rb b/lib/mongrel/rails.rb
deleted file mode 100644
index 7f66a5e..0000000
--- a/lib/mongrel/rails.rb
+++ /dev/null
@@ -1,185 +0,0 @@
-# Copyright (c) 2005 Zed A. Shaw
-# You can redistribute it and/or modify it under the same terms as Ruby.
-#
-# Additional work donated by contributors.  See http://mongrel.rubyforge.org/attributions.html
-# for more information.
-
-require 'mongrel'
-require 'cgi'
-
-
-module Mongrel
-  module Rails
-    # Implements a handler that can run Rails and serve files out of the
-    # Rails application's public directory.  This lets you run your Rails
-    # application with Mongrel during development and testing, then use it
-    # also in production behind a server that's better at serving the
-    # static files.
-    #
-    # The RailsHandler takes a mime_map parameter which is a simple suffix=mimetype
-    # mapping that it should add to the list of valid mime types.
-    #
-    # It also supports page caching directly and will try to resolve a request
-    # in the following order:
-    #
-    # * If the requested exact PATH_INFO exists as a file then serve it.
-    # * If it exists at PATH_INFO+".html" exists then serve that.
-    # * Finally, construct a Mongrel::CGIWrapper and run Dispatcher.dispatch to have Rails go.
-    #
-    # This means that if you are using page caching it will actually work with Mongrel
-    # and you should see a decent speed boost (but not as fast as if you use a static
-    # server like Apache or Litespeed).
-    class RailsHandler < Mongrel::HttpHandler
-      attr_reader :files
-      attr_reader :guard
-      @@file_only_methods = ["GET","HEAD"]
-
-      def initialize(dir, mime_map = {})
-        @files = Mongrel::DirHandler.new(dir,false)
-        @guard = Mutex.new
-
-        # Register the requested MIME types
-        mime_map.each {|k,v| Mongrel::DirHandler::add_mime_type(k,v) }
-      end
-
-      # Attempts to resolve the request as follows:
-      #
-      # * If the requested exact PATH_INFO exists as a file then serve it.
-      # * If it exists at PATH_INFO+".html" exists then serve that.
-      # * Finally, construct a Mongrel::CGIWrapper and run Dispatcher.dispatch to have Rails go.
-      def process(request, response)
-        return if response.socket.closed?
-        
-        path_info = request.params[Mongrel::Const::PATH_INFO]
-        rest_operator = request.params[Mongrel::Const::REQUEST_URI][/^#{Regexp.escape path_info}(;[^\?]+)/, 1].to_s
-        path_info.chomp!("/")
-        
-        page_cached = path_info + rest_operator + ActionController::Base.page_cache_extension
-        get_or_head = @@file_only_methods.include? request.params[Mongrel::Const::REQUEST_METHOD]
-
-        if get_or_head and @files.can_serve(path_info)
-          # File exists as-is so serve it up
-          @files.process(request,response)
-        elsif get_or_head and @files.can_serve(page_cached)
-          # Possible cached page, serve it up
-          request.params[Mongrel::Const::PATH_INFO] = page_cached
-          @files.process(request,response)
-        else
-          begin
-            cgi = Mongrel::CGIWrapper.new(request, response)
-            cgi.handler = self
-            # We don't want the output to be really final until we're out of the lock
-            cgi.default_really_final = false
-
-            @guard.synchronize {
-              @active_request_path = request.params[Mongrel::Const::PATH_INFO]
-              Dispatcher.dispatch(cgi, ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS, response.body)
-              @active_request_path = nil
-            }
-
-            # This finalizes the output using the proper HttpResponse way
-            cgi.out("text/html",true) {""}
-          rescue Errno::EPIPE
-            response.socket.close
-          rescue Object => rails_error
-            STDERR.puts "#{Time.now}: Error calling Dispatcher.dispatch #{rails_error.inspect}"
-            STDERR.puts rails_error.backtrace.join("\n")
-          end
-        end
-      end
-
-      # Does the internal reload for Rails.  It might work for most cases, but
-      # sometimes you get exceptions.  In that case just do a real restart.
-      def reload!
-        begin
-          @guard.synchronize {
-            $".replace $orig_dollar_quote
-            GC.start
-            Dispatcher.reset_application!
-            ActionController::Routing::Routes.reload
-          }
-        end
-      end
-    end
-
-    # Creates Rails specific configuration options for people to use
-    # instead of the base Configurator.
-    class RailsConfigurator < Mongrel::Configurator
-
-      # Creates a single rails handler and returns it so you
-      # can add it to a URI. You can actually attach it to
-      # as many URIs as you want, but this returns the
-      # same RailsHandler for each call.
-      #
-      # Requires the following options:
-      #
-      # * :docroot => The public dir to serve from.
-      # * :environment => Rails environment to use.
-      # * :cwd => The change to working directory
-      #
-      # And understands the following optional settings:
-      #
-      # * :mime => A map of mime types.
-      #
-      # Because of how Rails is designed you can only have
-      # one installed per Ruby interpreter (talk to them
-      # about thread safety).  Because of this the first
-      # time you call this function it does all the config
-      # needed to get your Rails working.  After that
-      # it returns the one handler you've configured.
-      # This lets you attach Rails to any URI(s) you want,
-      # but it still protects you from threads destroying
-      # your handler.
-      def rails(options={})
-
-        return @rails_handler if @rails_handler
-
-        ops = resolve_defaults(options)
-
-        # fix up some defaults
-        ops[:environment] ||= "development"
-        ops[:docroot] ||= "public"
-        ops[:mime] ||= {}
-
-        $orig_dollar_quote = $".clone
-        ENV['RAILS_ENV'] = ops[:environment]
-        env_location = "#{ops[:cwd]}/config/environment"
-        require env_location
-        require 'dispatcher'
-        require 'mongrel/rails'
-
-        ActionController::AbstractRequest.relative_url_root = ops[:prefix] if ops[:prefix]
-
-        @rails_handler = RailsHandler.new(ops[:docroot], ops[:mime])
-      end
-
-      # Reloads Rails.  This isn't too reliable really, but it
-      # should work for most minimal reload purposes.  The only reliable
-      # way to reload properly is to stop and then start the process.
-      def reload!
-        if not @rails_handler
-          raise "Rails was not configured.  Read the docs for RailsConfigurator."
-        end
-
-        log "Reloading Rails..."
-        @rails_handler.reload!
-        log "Done reloading Rails."
-
-      end
-
-      # Takes the exact same configuration as Mongrel::Configurator (and actually calls that)
-      # but sets up the additional HUP handler to call reload!.
-      def setup_rails_signals(options={})
-        ops = resolve_defaults(options)
-        setup_signals(options)
-
-        if RUBY_PLATFORM !~ /djgpp|(cyg|ms|bcc)win|mingw/
-          # rails reload
-          trap("HUP") { log "HUP signal received."; reload!          }
-
-          log "Rails signals registered.  HUP => reload (without restart).  It might not work well."
-        end
-      end
-    end
-  end
-end
diff --git a/projects/cgi_multipart_eof_fix/CHANGELOG b/projects/cgi_multipart_eof_fix/CHANGELOG
deleted file mode 100644
index 0a11961..0000000
--- a/projects/cgi_multipart_eof_fix/CHANGELOG
+++ /dev/null
@@ -1,14 +0,0 @@
-
-v2.5.0. Not required for JRuby.
-
-v2.4.0. Signed gem.
-
-v2.3.0. Use STDERR, not $stderr, just like Mongrel; tests now use Test::Unit; moving to the mongrel project on RubyForge.
-
-v2.2.0. Don't load on Ruby > 1.8.5; copyright correction.
-
-v2.1.0. License change due to no provision for use in original Ruby license (prevents installation in Florida).
-
-v2.0.0. Updated for second cgi.rb vulnerability.
-
-v1.0.0. Original single-patch release by Zed Shaw, et. al.
diff --git a/projects/cgi_multipart_eof_fix/LICENSE b/projects/cgi_multipart_eof_fix/LICENSE
deleted file mode 100644
index e5a926e..0000000
--- a/projects/cgi_multipart_eof_fix/LICENSE
+++ /dev/null
@@ -1,55 +0,0 @@
-Mongrel Web Server (Mongrel) is copyrighted free software by Zed A. Shaw
-<zedshaw at zedshaw dot com> and contributors. You can redistribute it
-and/or modify it under either the terms of the GPL2 or the conditions below:
-
-1. You may make and give away verbatim copies of the source form of the
-   software without restriction, provided that you duplicate all of the
-   original copyright notices and associated disclaimers.
-
-2. You may modify your copy of the software in any way, provided that
-   you do at least ONE of the following:
-
-     a) place your modifications in the Public Domain or otherwise make them
-     Freely Available, such as by posting said modifications to Usenet or an
-     equivalent medium, or by allowing the author to include your
-     modifications in the software.
-
-     b) use the modified software only within your corporation or
-        organization.
-
-     c) rename any non-standard executables so the names do not conflict with
-     standard executables, which must also be provided.
-
-     d) make other distribution arrangements with the author.
-
-3. You may distribute the software in object code or executable
-   form, provided that you do at least ONE of the following:
-
-     a) distribute the executables and library files of the software,
-     together with instructions (in the manual page or equivalent) on where
-     to get the original distribution.
-
-     b) accompany the distribution with the machine-readable source of the
-     software.
-
-     c) give non-standard executables non-standard names, with
-        instructions on where to get the original software distribution.
-
-     d) make other distribution arrangements with the author.
-
-4. You may modify and include the part of the software into any other
-   software (possibly commercial).  But some files in the distribution
-   are not written by the author, so that they are not under this terms.
-
-5. The scripts and library files supplied as input to or produced as
-   output from the software do not automatically fall under the
-   copyright of the software, but belong to whomever generated them,
-   and may be sold commercially, and may be aggregated with this
-   software.
-
-6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
-   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-   PURPOSE.
-
-
diff --git a/projects/cgi_multipart_eof_fix/Manifest b/projects/cgi_multipart_eof_fix/Manifest
deleted file mode 100644
index b0004d6..0000000
--- a/projects/cgi_multipart_eof_fix/Manifest
+++ /dev/null
@@ -1,6 +0,0 @@
-CHANGELOG
-lib/cgi_multipart_eof_fix.rb
-LICENSE
-Manifest
-README
-test/test_cgi_multipart_eof_fix.rb
diff --git a/projects/cgi_multipart_eof_fix/README b/projects/cgi_multipart_eof_fix/README
deleted file mode 100644
index a70f21b..0000000
--- a/projects/cgi_multipart_eof_fix/README
+++ /dev/null
@@ -1,40 +0,0 @@
-
-cgi_multipart_eof_fix
-
-Fix an exploitable bug in CGI multipart parsing.
-
-== License
-
-Copyright 2006, 2007 Cloudburst, LLC. Portions copyright 2006 Jeremy Kemper, Jamis Buck, Zed A. Shaw, and Yukihiro Matsumoto, and used with permission. See the included LICENSE file.
-
-== Description
-
-Fixes an exploitable bug in CGI multipart parsing which affects Ruby <= 1.8.5. When multipart boundary attributes contain non-halting regular expression strings, the boundary searcher in the CGI module does not properly escape the parameter and will execute arbitrary regular expressions. This fix adds escaping for the user data.
-
-* Affected application servers: standalone CGI, Mongrel, WEBrick
-* Unaffected: FastCGI, Ruby 1.8.6 (all servers)
-* Unknown: mod_ruby
-
-This fix will not modify versions of Ruby greater than 1.8.5, and is cumulative with previous CGI multipart vulnerability fixes.
-
-== Usage
-
-Install the gem:
-  sudo gem install cgi_multipart_eof_fix
-
-Run the included test to verify that the patch works as intended. Then, <tt>require</tt> the gem in every affected application, as follows:
-
-  require 'rubygems'
-  require 'cgi_multipart_eof_fix'
-  
-Currently <tt>mongrel_rails</tt> requires this gem automatically. However, Mongrel may change in the future.
-
-== Reporting problems
-
-* http://rubyforge.org/tracker/?group_id=1306
-
-== Further resources
-
-* http://rubyforge.org/mailman/listinfo/mongrel-users
-* http://blog.evanweaver.com/articles/2006/12/05/cgi-rb-vulnerability-hotfix
-* http://www.ruby-lang.org/en/news/2006/12/04/another-dos-vulnerability-in-cgi-library/
diff --git a/projects/cgi_multipart_eof_fix/Rakefile b/projects/cgi_multipart_eof_fix/Rakefile
deleted file mode 100644
index 424c1a4..0000000
--- a/projects/cgi_multipart_eof_fix/Rakefile
+++ /dev/null
@@ -1,18 +0,0 @@
-
-require 'echoe'
-
-Echoe.new("cgi_multipart_eof_fix") do |p|
-  p.author = "Evan Weaver"
-  p.rubyforge_name = "mongrel"
-  p.summary = p.description = "Fix an exploitable bug in CGI multipart parsing."    
-  p.url = "http://blog.evanweaver.com/pages/code#cgi_multipart_eof_fix"
-  p.docs_host = "blog.evanweaver.com:~/www/bax/public/files/doc/"
-  p.rdoc_pattern = /CHANGELOG|LICENSE|README|lib\/cgi_multipart_eof_fix/
-
-  p.need_tar_gz = false
-  p.need_tgz = true
-  p.certificate_chain = ['/Users/eweaver/p/configuration/gem_certificates/mongrel/mongrel-public_cert.pem',
-    '/Users/eweaver/p/configuration/gem_certificates/evan_weaver-mongrel-public_cert.pem']    
-  p.require_signed = true
-end
-
diff --git a/projects/cgi_multipart_eof_fix/lib/cgi_multipart_eof_fix.rb b/projects/cgi_multipart_eof_fix/lib/cgi_multipart_eof_fix.rb
deleted file mode 100644
index a968594..0000000
--- a/projects/cgi_multipart_eof_fix/lib/cgi_multipart_eof_fix.rb
+++ /dev/null
@@ -1,127 +0,0 @@
-
-# unfortunately:
-# >> "1.8.6" < "1.8.10"
-# => false
-
-version = RUBY_VERSION.split(".").map {|i| i.to_i }
-
-if version [0] < 2 and version [1] < 9 and version [2] < 6 and RUBY_PLATFORM !~ /java/
-
-  STDERR.puts "** Ruby version is not up-to-date; loading cgi_multipart_eof_fix"  
-
-  require 'cgi'  
-  
-  class CGI
-    module QueryExtension
-      def read_multipart(boundary, content_length)
-        params = Hash.new([])
-        boundary = "--" + boundary
-        quoted_boundary = Regexp.quote(boundary, "n")
-        buf = ""
-        bufsize = 10 * 1024
-        boundary_end=""
-  
-        # start multipart/form-data
-        stdinput.binmode if defined? stdinput.binmode
-        boundary_size = boundary.size + EOL.size
-        content_length -= boundary_size
-        status = stdinput.read(boundary_size)
-        if nil == status
-          raise EOFError, "no content body"
-        elsif boundary + EOL != status
-          raise EOFError, "bad content body #{status.inspect} expected, got #{(boundary + EOL).inspect}"
-        end
-  
-        loop do
-          head = nil
-          if 10240 < content_length
-            require "tempfile"
-            body = Tempfile.new("CGI")
-          else
-            begin
-              require "stringio"
-              body = StringIO.new
-            rescue LoadError
-              require "tempfile"
-              body = Tempfile.new("CGI")
-            end
-          end
-          body.binmode if defined? body.binmode
-  
-          until head and /#{quoted_boundary}(?:#{EOL}|--)/n.match(buf)
-  
-            if (not head) and /#{EOL}#{EOL}/n.match(buf)
-              buf = buf.sub(/\A((?:.|\n)*?#{EOL})#{EOL}/n) do
-                head = $1.dup
-                ""
-              end
-              next
-            end
-  
-            if head and ( (EOL + boundary + EOL).size < buf.size )
-              body.print buf[0 ... (buf.size - (EOL + boundary + EOL).size)]
-              buf[0 ... (buf.size - (EOL + boundary + EOL).size)] = ""
-            end
-  
-            c = if bufsize < content_length
-                  stdinput.read(bufsize)
-                else
-                  stdinput.read(content_length)
-                end
-            if c.nil? || c.empty?
-              raise EOFError, "bad content body"
-            end
-            buf.concat(c)
-            content_length -= c.size
-          end
-  
-          buf = buf.sub(/\A((?:.|\n)*?)(?:[\r\n]{1,2})?#{quoted_boundary}([\r\n]{1,2}|--)/n) do
-            body.print $1
-            if "--" == $2
-              content_length = -1
-            end
-           boundary_end = $2.dup
-            ""
-          end
-  
-          body.rewind
-  
-          /Content-Disposition:.* filename="?([^\";]*)"?/ni.match(head)
-          filename = ($1 or "")
-          if /Mac/ni.match(env_table['HTTP_USER_AGENT']) and
-              /Mozilla/ni.match(env_table['HTTP_USER_AGENT']) and
-              (not /MSIE/ni.match(env_table['HTTP_USER_AGENT']))
-            filename = CGI::unescape(filename)
-          end
-          
-          /Content-Type: (.*)/ni.match(head)
-          content_type = ($1 or "")
-  
-          (class << body; self; end).class_eval do
-            alias local_path path
-            define_method(:original_filename) {filename.dup.taint}
-            define_method(:content_type) {content_type.dup.taint}
-          end
-  
-          /Content-Disposition:.* name="?([^\";]*)"?/ni.match(head)
-          name = $1.dup
-  
-          if params.has_key?(name)
-            params[name].push(body)
-          else
-            params[name] = [body]
-          end
-          break if buf.size == 0
-          break if content_length === -1
-        end
-        raise EOFError, "bad boundary end of body part" unless boundary_end=~/--/
-  
-        params
-      end # read_multipart
-      private :read_multipart
-    end
-  end
-
-else
-  # Ruby version is up-to-date; cgi_multipart_eof_fix was not loaded
-end
diff --git a/projects/cgi_multipart_eof_fix/test/test_cgi_multipart_eof_fix.rb b/projects/cgi_multipart_eof_fix/test/test_cgi_multipart_eof_fix.rb
deleted file mode 100755
index fc2ac16..0000000
--- a/projects/cgi_multipart_eof_fix/test/test_cgi_multipart_eof_fix.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'cgi'
-require 'stringio'
-require 'timeout'
-
-BOUNDARY = '%?%(\w*)\\((\w*)\\)'
-PAYLOAD = "--#{BOUNDARY}\r\nContent-Disposition: form-data; name=\"a_field\"\r\n\r\nBang!\r\n--#{BOUNDARY}--\r\n"
-ENV['REQUEST_METHOD'] = "POST"
-ENV['CONTENT_TYPE']   = "multipart/form-data; boundary=\"#{BOUNDARY}\""
-ENV['CONTENT_LENGTH'] = PAYLOAD.length.to_s
-
-Object.send(:remove_const, :STDERR)
-STDERR = StringIO.new # hide the multipart load warnings
-
-version  = RUBY_VERSION.split(".").map {|i| i.to_i }
-IS_VULNERABLE = (version [0] < 2 and version [1] < 9 and version [2] < 6 and RUBY_PLATFORM !~ /java/)
-
-class CgiMultipartTestError < StandardError
-end
-
-class CgiMultipartEofFixTest < Test::Unit::TestCase
-
-  def read_multipart  
-    # can't use STDIN because of the dynamic constant assignment rule
-    $stdin = StringIO.new(PAYLOAD)
-  
-    begin
-      Timeout.timeout(3) do
-        CGI.new
-      end
-      "CGI is safe: read_multipart does not hang on malicious multipart requests."
-    rescue TimeoutError
-      raise CgiMultipartTestError, "CGI is exploitable: read_multipart hangs on malicious multipart requests."
-    end
-  end
-  
-  def test_exploitable
-    if IS_VULNERABLE
-      assert_raises CgiMultipartTestError do
-        read_multipart
-      end
-    else
-      # we're on 1.8.6 or higher already
-      assert_nothing_raised do
-        read_multipart      
-      end      
-    end
-  end
-  
-  def test_fixed
-    assert_nothing_raised do
-      load "#{File.dirname(__FILE__)}/../lib/cgi_multipart_eof_fix.rb"
-      read_multipart
-    end
-  end  
-  
-end
diff --git a/projects/fastthread/CHANGELOG b/projects/fastthread/CHANGELOG
deleted file mode 100644
index e02bb1a..0000000
--- a/projects/fastthread/CHANGELOG
+++ /dev/null
@@ -1,7 +0,0 @@
-
-  v1.0.3. Make native build a noop on Rubies that have no real need for fastthread
-
-  v1.0.2. Merged stale wait entries fixes from ruby_1_8, fixed SizedQueue#enq
-
-  v1.0.1. Signed gem.
-  
diff --git a/projects/fastthread/Manifest b/projects/fastthread/Manifest
deleted file mode 100644
index e0d9518..0000000
--- a/projects/fastthread/Manifest
+++ /dev/null
@@ -1,9 +0,0 @@
-test/test_queue.rb
-test/test_mutex.rb
-test/test_condvar.rb
-test/test_all.rb
-setup.rb
-Manifest
-ext/fastthread/fastthread.c
-ext/fastthread/extconf.rb
-CHANGELOG
diff --git a/projects/fastthread/Rakefile b/projects/fastthread/Rakefile
deleted file mode 100644
index e418a5a..0000000
--- a/projects/fastthread/Rakefile
+++ /dev/null
@@ -1,28 +0,0 @@
-
-require 'rubygems'
-gem 'echoe', '>=2.7.11'
-require 'echoe'
-
-Echoe.new("fastthread") do |p|
-  p.project = "mongrel"
-  p.author = "MenTaLguY <mental@rydia.net>"
-  p.email = "mental@rydia.net"
-  p.summary = "Optimized replacement for thread.rb primitives"
-  p.extensions = "ext/fastthread/extconf.rb"
-  p.clean_pattern = ['build/*', '**/*.o', '**/*.so', '**/*.a', 'lib/*-*', '**/*.log', "ext/fastthread/*.{bundle,so,obj,pdb,lib,def,exp}", "ext/fastthread/Makefile", "pkg", "lib/*.bundle", "*.gem", ".config"]
-
-  p.need_tar_gz = false
-  p.need_tgz = true
-  p.certificate_chain = ['/Users/eweaver/p/configuration/gem_certificates/mongrel/mongrel-public_cert.pem',
-    '/Users/eweaver/p/configuration/gem_certificates/evan_weaver-mongrel-public_cert.pem']    
-  p.require_signed = true
-
-  p.eval = proc do
-    if Platform.windows?
-      self.platform = Gem::Platform::CURRENT
-      self.files += ['lib/fastthread.so']
-      task :package => [:clean, :compile]
-    end
-  end
-
-end
diff --git a/projects/fastthread/ext/fastthread/.gitignore b/projects/fastthread/ext/fastthread/.gitignore
deleted file mode 100644
index 522b58a..0000000
--- a/projects/fastthread/ext/fastthread/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.so
-Makefile
diff --git a/projects/fastthread/ext/fastthread/extconf.rb b/projects/fastthread/ext/fastthread/extconf.rb
deleted file mode 100644
index 5f3fa2c..0000000
--- a/projects/fastthread/ext/fastthread/extconf.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-require 'mkmf'
-
-version_components = RUBY_VERSION.split('.').map { |c| c.to_i }
-
-need_fastthread = ( !defined? RUBY_ENGINE )
-need_fastthread &= ( RUBY_PLATFORM != 'java' )
-need_fastthread &= ( version_components[0..1] == [1, 8] && ( version_components[2] < 6 || version_components[2] == 6 && RUBY_PATCHLEVEL < 111 ) )
-
-if need_fastthread
-  create_makefile('fastthread')
-else
-  File.open('Makefile', 'w') do |stream|
-    CONFIG.each do |key, value|
-      stream.puts "#{key} = #{value}"
-    end
-    stream.puts
-    stream << <<EOS
-RUBYARCHDIR = $(sitearchdir)$(target_prefix)
-
-default:
-
-install:
-        mkdir -p $(RUBYARCHDIR)
-        touch $(RUBYARCHDIR)/fastthread.rb
-
-EOS
-  end
-end
diff --git a/projects/fastthread/ext/fastthread/fastthread.c b/projects/fastthread/ext/fastthread/fastthread.c
deleted file mode 100644
index 533222c..0000000
--- a/projects/fastthread/ext/fastthread/fastthread.c
+++ /dev/null
@@ -1,1201 +0,0 @@
-/*
- * Optimized Ruby Mutex implementation, loosely based on thread.rb by
- * Yukihiro Matsumoto <matz@ruby-lang.org>
- *
- *  Copyright 2006-2007  MenTaLguY <mental@rydia.net>
- *
- * RDoc taken from original.
- *
- * This file is made available under the same terms as Ruby.
- */
-
-#include <ruby.h>
-#include <intern.h>
-#include <rubysig.h>
-
-static VALUE rb_cMutex;
-static VALUE rb_cConditionVariable;
-static VALUE rb_cQueue;
-static VALUE rb_cSizedQueue;
-/* earlier versions of ruby do not export rb_eThreadError */
-static VALUE private_eThreadError;
-
-static VALUE set_critical(VALUE value);
-
-static VALUE
-thread_exclusive(VALUE (*func)(ANYARGS), VALUE arg)
-{
-    VALUE critical = rb_thread_critical;
-
-    rb_thread_critical = 1;
-    return rb_ensure(func, arg, set_critical, (VALUE)critical);
-}
-
-typedef struct _Entry {
-    VALUE value;
-    struct _Entry *next;
-} Entry;
-
-typedef struct _List {
-    Entry *entries;
-    Entry *last_entry;
-    Entry *entry_pool;
-    unsigned long size;
-} List;
-
-static void
-init_list(List *list)
-{
-    list->entries = NULL;
-    list->last_entry = NULL;
-    list->entry_pool = NULL;
-    list->size = 0;
-}
-
-static void
-mark_list(List *list)
-{
-    Entry *entry;
-    for (entry = list->entries; entry; entry = entry->next) {
-        rb_gc_mark(entry->value);
-    }
-}
-
-static void
-free_entries(Entry *first)
-{
-    Entry *next;
-    while (first) {
-        next = first->next;
-        xfree(first);
-        first = next;
-    }
-}
-
-static void
-finalize_list(List *list)
-{
-    free_entries(list->entries);
-    free_entries(list->entry_pool);
-}
-
-static void
-push_list(List *list, VALUE value)
-{
-    Entry *entry;
-
-    if (list->entry_pool) {
-        entry = list->entry_pool;
-        list->entry_pool = entry->next;
-    } else {
-        entry = ALLOC(Entry);
-    }
-
-    entry->value = value;
-    entry->next = NULL;
-
-    if (list->last_entry) {
-        list->last_entry->next = entry;
-    } else {
-        list->entries = entry;
-    }
-    list->last_entry = entry;
-
-    ++list->size;
-}
-
-static void
-push_multiple_list(List *list, VALUE *values, unsigned count)
-{
-    unsigned i;
-    for (i = 0; i < count; i++) {
-        push_list(list, values[i]);
-    }
-}
-
-static void
-recycle_entries(List *list, Entry *first_entry, Entry *last_entry)
-{
-#ifdef USE_MEM_POOLS
-    last_entry->next = list->entry_pool;
-    list->entry_pool = first_entry;
-#else
-    last_entry->next = NULL;
-    free_entries(first_entry);
-#endif
-}
-
-static VALUE
-shift_list(List *list)
-{
-    Entry *entry;
-    VALUE value;
-
-    entry = list->entries;
-    if (!entry) return Qnil;
-
-    list->entries = entry->next;
-    if (entry == list->last_entry) {
-        list->last_entry = NULL;
-    }
-
-    --list->size;
-
-    value = entry->value;
-    recycle_entries(list, entry, entry);
-
-    return value;
-}
-
-static void
-remove_one(List *list, VALUE value)
-{
-    Entry **ref;
-    Entry *prev;
-    Entry *entry;
-
-    for (ref = &list->entries, prev = NULL, entry = list->entries;
-              entry != NULL;
-              ref = &entry->next, prev = entry, entry = entry->next) {
-        if (entry->value == value) {
-            *ref = entry->next;
-            list->size--;
-            if (!entry->next) {
-                list->last_entry = prev;
-            }
-            recycle_entries(list, entry, entry);
-            break;
-        }
-    }
-}
-
-static void
-clear_list(List *list)
-{
-    if (list->last_entry) {
-        recycle_entries(list, list->entries, list->last_entry);
-        list->entries = NULL;
-        list->last_entry = NULL;
-        list->size = 0;
-    }
-}
-
-static VALUE
-array_from_list(List const *list)
-{
-    VALUE ary;
-    Entry *entry;
-    ary = rb_ary_new();
-    for (entry = list->entries; entry; entry = entry->next) {
-        rb_ary_push(ary, entry->value);
-    }
-    return ary;
-}
-
-static VALUE return_value(VALUE value) {
-    return value;
-}
-
-static VALUE
-wake_thread(VALUE thread)
-{
-#if RUBY_VERSION_MINOR == 8 && RUBY_VERSION_TEENY >= 6 && RUBY_PATCHLEVEL > 31
-    return rb_thread_wakeup_alive(thread);
-#else
-    return rb_rescue2(rb_thread_wakeup, thread, return_value, Qnil, private_eThreadError, (VALUE)0);
-#endif
-}
-
-static VALUE
-run_thread(VALUE thread)
-{
-    thread = wake_thread(thread);
-    if (RTEST(thread) && !rb_thread_critical)
-        rb_thread_schedule();
-    return thread;
-}
-
-static VALUE
-wake_one(List *list)
-{
-    VALUE waking;
-
-    waking = Qnil;
-    while (list->entries && !RTEST(waking)) {
-        waking = wake_thread(shift_list(list));
-    }
-
-    return waking;
-}
-
-static VALUE
-wake_all(List *list)
-{
-    while (list->entries) {
-        wake_one(list);
-    }
-    return Qnil;
-}
-
-static VALUE
-wait_list_inner(List *list)
-{
-    push_list(list, rb_thread_current());
-    rb_thread_stop();
-    return Qnil;
-}
-
-static VALUE
-wait_list_cleanup(List *list)
-{
-    /* cleanup in case of spurious wakeups */
-    remove_one(list, rb_thread_current());
-    return Qnil;
-}
-
-static VALUE
-wait_list(List *list)
-{
-    return rb_ensure(wait_list_inner, (VALUE)list, wait_list_cleanup, (VALUE)list);
-}
-
-static void
-kill_waiting_threads(List *waiting)
-{
-    Entry *entry;
-
-    for (entry = waiting->entries; entry; entry = entry->next) {
-        rb_thread_kill(entry->value);
-    }
-}
-
-/*
- * Document-class: Mutex
- *
- * Mutex implements a simple semaphore that can be used to coordinate access to
- * shared data from multiple concurrent threads.
- *
- * Example:
- *
- *   require 'thread'
- *   semaphore = Mutex.new
- *
- *   a = Thread.new {
- *     semaphore.synchronize {
- *       # access shared resource
- *     }
- *   }
- *
- *   b = Thread.new {
- *     semaphore.synchronize {
- *       # access shared resource
- *     }
- *   }
- *
- */
-
-typedef struct _Mutex {
-    VALUE owner;
-    List waiting;
-} Mutex;
-
-#define MUTEX_LOCKED_P(mutex) (RTEST((mutex)->owner) && rb_thread_alive_p((mutex)->owner))
-
-static void
-mark_mutex(Mutex *mutex)
-{
-    rb_gc_mark(mutex->owner);
-    mark_list(&mutex->waiting);
-}
-
-static void
-finalize_mutex(Mutex *mutex)
-{
-    finalize_list(&mutex->waiting);
-}
-
-static void
-free_mutex(Mutex *mutex)
-{
-    kill_waiting_threads(&mutex->waiting);
-    finalize_mutex(mutex);
-    xfree(mutex);
-}
-
-static void
-init_mutex(Mutex *mutex)
-{
-    mutex->owner = Qnil;
-    init_list(&mutex->waiting);
-}
-
-/*
- * Document-method: new
- * call-seq: Mutex.new
- *
- * Creates a new Mutex
- *
- */
-
-static VALUE
-rb_mutex_alloc(VALUE klass)
-{
-    Mutex *mutex;
-    mutex = ALLOC(Mutex);
-    init_mutex(mutex);
-    return Data_Wrap_Struct(klass, mark_mutex, free_mutex, mutex);
-}
-
-/*
- * Document-method: locked?
- * call-seq: locked?
- *
- * Returns +true+ if this lock is currently held by some thread.
- *
- */
-
-static VALUE
-rb_mutex_locked_p(VALUE self)
-{
-    Mutex *mutex;
-    Data_Get_Struct(self, Mutex, mutex);
-    return MUTEX_LOCKED_P(mutex) ? Qtrue : Qfalse;
-}
-
-/*
- * Document-method: try_lock
- * call-seq: try_lock
- *
- * Attempts to obtain the lock and returns immediately. Returns +true+ if the
- * lock was granted.
- *
- */
-
-static VALUE
-rb_mutex_try_lock(VALUE self)
-{
-    Mutex *mutex;
-
-    Data_Get_Struct(self, Mutex, mutex);
-
-    if (MUTEX_LOCKED_P(mutex))
-        return Qfalse;
-
-    mutex->owner = rb_thread_current();
-    return Qtrue;
-}
-
-/*
- * Document-method: lock
- * call-seq: lock
- *
- * Attempts to grab the lock and waits if it isn't available.
- *
- */
-
-static VALUE
-lock_mutex(Mutex *mutex)
-{
-    VALUE current;
-    current = rb_thread_current();
-
-    rb_thread_critical = 1;
-
-    if (!MUTEX_LOCKED_P(mutex)) {
-        mutex->owner = current;
-    }
-    else {
-        do {
-            wait_list(&mutex->waiting);
-            rb_thread_critical = 1;
-            if (!MUTEX_LOCKED_P(mutex)) {
-                mutex->owner = current;
-                break;
-            }
-        } while (mutex->owner != current);
-    }
-
-    rb_thread_critical = 0;
-    return Qnil;
-}
-
-static VALUE
-rb_mutex_lock(VALUE self)
-{
-    Mutex *mutex;
-    Data_Get_Struct(self, Mutex, mutex);
-    lock_mutex(mutex);
-    return self;
-}
-
-/*
- * Document-method: unlock
- *
- * Releases the lock. Returns +nil+ if ref wasn't locked.
- *
- */
-
-static VALUE
-unlock_mutex_inner(Mutex *mutex)
-{
-    VALUE waking;
-
-    if (mutex->owner != rb_thread_current()) {
-        rb_raise(private_eThreadError, "not owner");
-    }
-
-    mutex->owner = Qnil;
-    waking = wake_one(&mutex->waiting);
-    mutex->owner = waking;
-
-    return waking;
-}
-
-static VALUE
-set_critical(VALUE value)
-{
-    rb_thread_critical = (int)value;
-    return Qundef;
-}
-
-static VALUE
-unlock_mutex(Mutex *mutex)
-{
-    VALUE waking = thread_exclusive(unlock_mutex_inner, (VALUE)mutex);
-
-    if (!RTEST(waking)) {
-        return Qfalse;
-    }
-
-    run_thread(waking);
-
-    return Qtrue;
-}
-
-static VALUE
-rb_mutex_unlock(VALUE self)
-{
-    Mutex *mutex;
-    Data_Get_Struct(self, Mutex, mutex);
-
-    if (RTEST(unlock_mutex(mutex))) {
-        return self;
-    } else {
-        return Qnil;
-    }
-}
-
-/*
- * Document-method: exclusive_unlock
- * call-seq: exclusive_unlock { ... }
- *
- * If the mutex is locked, unlocks the mutex, wakes one waiting thread, and
- * yields in a critical section.
- *
- */
-
-static VALUE
-rb_mutex_exclusive_unlock_inner(Mutex *mutex)
-{
-    VALUE waking;
-    waking = unlock_mutex_inner(mutex);
-    rb_yield(Qundef);
-    return waking;
-}
-
-static VALUE
-rb_mutex_exclusive_unlock(VALUE self)
-{
-    Mutex *mutex;
-    VALUE waking;
-    Data_Get_Struct(self, Mutex, mutex);
-
-    waking = thread_exclusive(rb_mutex_exclusive_unlock_inner, (VALUE)mutex);
-
-    if (!RTEST(waking)) {
-        return Qnil;
-    }
-
-    run_thread(waking);
-
-    return self;
-}
-
-/*
- * Document-method: synchronize
- * call-seq: synchronize { ... }
- *
- * Obtains a lock, runs the block, and releases the lock when the block
- * completes.  See the example under Mutex.
- *
- */
-
-static VALUE
-rb_mutex_synchronize(VALUE self)
-{
-    rb_mutex_lock(self);
-    return rb_ensure(rb_yield, Qundef, rb_mutex_unlock, self);
-}
-
-/*
- * Document-class: ConditionVariable
- *
- * ConditionVariable objects augment class Mutex. Using condition variables,
- * it is possible to suspend while in the middle of a critical section until a
- * resource becomes available.
- *
- * Example:
- *
- *   require 'thread'
- *
- *   mutex = Mutex.new
- *   resource = ConditionVariable.new
- *
- *   a = Thread.new {
- *     mutex.synchronize {
- *       # Thread 'a' now needs the resource
- *       resource.wait(mutex)
- *       # 'a' can now have the resource
- *     }
- *   }
- *
- *   b = Thread.new {
- *     mutex.synchronize {
- *       # Thread 'b' has finished using the resource
- *       resource.signal
- *     }
- *   }
- *
- */
-
-typedef struct _ConditionVariable {
-    List waiting;
-} ConditionVariable;
-
-static void
-mark_condvar(ConditionVariable *condvar)
-{
-    mark_list(&condvar->waiting);
-}
-
-static void
-finalize_condvar(ConditionVariable *condvar)
-{
-    finalize_list(&condvar->waiting);
-}
-
-static void
-free_condvar(ConditionVariable *condvar)
-{
-    kill_waiting_threads(&condvar->waiting);
-    finalize_condvar(condvar);
-    xfree(condvar);
-}
-
-static void
-init_condvar(ConditionVariable *condvar)
-{
-    init_list(&condvar->waiting);
-}
-
-/*
- * Document-method: new
- * call-seq: ConditionVariable.new
- *
- * Creates a new ConditionVariable
- *
- */
-
-static VALUE
-rb_condvar_alloc(VALUE klass)
-{
-    ConditionVariable *condvar;
-
-    condvar = ALLOC(ConditionVariable);
-    init_condvar(condvar);
-
-    return Data_Wrap_Struct(klass, mark_condvar, free_condvar, condvar);
-}
-
-/*
- * Document-method: wait
- * call-seq: wait
- *
- * Releases the lock held in +mutex+ and waits; reacquires the lock on wakeup.
- *
- */
-
-static void
-wait_condvar(ConditionVariable *condvar, Mutex *mutex)
-{
-    VALUE waking;
-
-    rb_thread_critical = 1;
-    if (rb_thread_current() != mutex->owner) {
-        rb_thread_critical = 0;
-        rb_raise(private_eThreadError, "not owner of the synchronization mutex");
-    }
-    waking = unlock_mutex_inner(mutex);
-    if (RTEST(waking)) {
-        wake_thread(waking);
-    }
-    rb_ensure(wait_list, (VALUE)&condvar->waiting, lock_mutex, (VALUE)mutex);
-}
-
-static VALUE
-legacy_exclusive_unlock(VALUE mutex)
-{
-    return rb_funcall(mutex, rb_intern("exclusive_unlock"), 0);
-}
-
-typedef struct {
-    ConditionVariable *condvar;
-    VALUE mutex;
-} legacy_wait_args;
-
-static VALUE
-legacy_wait(VALUE unused, legacy_wait_args *args)
-{
-    wait_list(&args->condvar->waiting);
-    rb_funcall(args->mutex, rb_intern("lock"), 0);
-    return Qnil;
-}
-
-static VALUE
-rb_condvar_wait(VALUE self, VALUE mutex_v)
-{
-    ConditionVariable *condvar;
-    Data_Get_Struct(self, ConditionVariable, condvar);
-
-    if (CLASS_OF(mutex_v) != rb_cMutex) {
-        /* interoperate with legacy mutex */
-        legacy_wait_args args;
-        args.condvar = condvar;
-        args.mutex = mutex_v;
-        rb_iterate(legacy_exclusive_unlock, mutex_v, legacy_wait, (VALUE)&args);
-    } else {
-        Mutex *mutex;
-        Data_Get_Struct(mutex_v, Mutex, mutex);
-        wait_condvar(condvar, mutex);
-    }
-
-    return self;
-}
-
-/*
- * Document-method: broadcast
- * call-seq: broadcast
- *
- * Wakes up all threads waiting for this condition.
- *
- */
-
-static VALUE
-rb_condvar_broadcast(VALUE self)
-{
-    ConditionVariable *condvar;
-
-    Data_Get_Struct(self, ConditionVariable, condvar);
-  
-    thread_exclusive(wake_all, (VALUE)&condvar->waiting);
-    rb_thread_schedule();
-
-    return self;
-}
-
-/*
- * Document-method: signal
- * call-seq: signal
- *
- * Wakes up the first thread in line waiting for this condition.
- *
- */
-
-static void
-signal_condvar(ConditionVariable *condvar)
-{
-    VALUE waking = thread_exclusive(wake_one, (VALUE)&condvar->waiting);
-
-    if (RTEST(waking)) {
-        run_thread(waking);
-    }
-}
-
-static VALUE
-rb_condvar_signal(VALUE self)
-{
-    ConditionVariable *condvar;
-    Data_Get_Struct(self, ConditionVariable, condvar);
-    signal_condvar(condvar);
-    return self;
-}
-
-/*
- * Document-class: Queue
- *
- * This class provides a way to synchronize communication between threads.
- *
- * Example:
- *
- *   require 'thread'
- *
- *   queue = Queue.new
- *
- *   producer = Thread.new do
- *     5.times do |i|
- *       sleep rand(i) # simulate expense
- *       queue << i
- *       puts "#{i} produced"
- *     end
- *   end
- *
- *   consumer = Thread.new do
- *     5.times do |i|
- *       value = queue.pop
- *       sleep rand(i/2) # simulate expense
- *       puts "consumed #{value}"
- *     end
- *   end
- *
- *   consumer.join
- *
- */
-
-typedef struct _Queue {
-    Mutex mutex;
-    ConditionVariable value_available;
-    ConditionVariable space_available;
-    List values;
-    unsigned long capacity;
-} Queue;
-
-static void
-mark_queue(Queue *queue)
-{
-    mark_mutex(&queue->mutex);
-    mark_condvar(&queue->value_available);
-    mark_condvar(&queue->space_available);
-    mark_list(&queue->values);
-}
-
-static void
-finalize_queue(Queue *queue)
-{
-    finalize_mutex(&queue->mutex);
-    finalize_condvar(&queue->value_available);
-    finalize_condvar(&queue->space_available);
-    finalize_list(&queue->values);
-}
-
-static void
-free_queue(Queue *queue)
-{
-    kill_waiting_threads(&queue->mutex.waiting);
-    kill_waiting_threads(&queue->space_available.waiting);
-    kill_waiting_threads(&queue->value_available.waiting);
-    finalize_queue(queue);
-    xfree(queue);
-}
-
-static void
-init_queue(Queue *queue)
-{
-    init_mutex(&queue->mutex);
-    init_condvar(&queue->value_available);
-    init_condvar(&queue->space_available);
-    init_list(&queue->values);
-    queue->capacity = 0;
-}
-
-/*
- * Document-method: new
- * call-seq: new
- *
- * Creates a new queue.
- *
- */
-
-static VALUE
-rb_queue_alloc(VALUE klass)
-{
-    Queue *queue;
-    queue = ALLOC(Queue);
-    init_queue(queue);
-    return Data_Wrap_Struct(klass, mark_queue, free_queue, queue);
-}
-
-static VALUE
-rb_queue_marshal_load(VALUE self, VALUE data)
-{
-    Queue *queue;
-    VALUE array;
-    Data_Get_Struct(self, Queue, queue);
-
-    array = rb_marshal_load(data);
-    if (TYPE(array) != T_ARRAY) {
-        rb_raise(rb_eTypeError, "expected Array of queue data");
-    }
-    if (RARRAY(array)->len < 1) {
-        rb_raise(rb_eArgError, "missing capacity value");
-    }
-    queue->capacity = NUM2ULONG(rb_ary_shift(array));
-    push_multiple_list(&queue->values, RARRAY(array)->ptr, (unsigned)RARRAY(array)->len);
-
-    return self;
-}
-
-static VALUE
-rb_queue_marshal_dump(VALUE self)
-{
-    Queue *queue;
-    VALUE array;
-    Data_Get_Struct(self, Queue, queue);
-
-    array = array_from_list(&queue->values);
-    rb_ary_unshift(array, ULONG2NUM(queue->capacity));
-    return rb_marshal_dump(array, Qnil);
-}
-
-/*
- * Document-method: clear
- * call-seq: clear
- *
- * Removes all objects from the queue.
- *
- */
-
-static VALUE
-rb_queue_clear(VALUE self)
-{
-    Queue *queue;
-    Data_Get_Struct(self, Queue, queue);
-
-    lock_mutex(&queue->mutex);
-    clear_list(&queue->values);
-    signal_condvar(&queue->space_available);
-    unlock_mutex(&queue->mutex);
-
-    return self;
-}
-
-/*
- * Document-method: empty?
- * call-seq: empty?
- *
- * Returns +true+ if the queue is empty.
- *
- */
-
-static VALUE
-rb_queue_empty_p(VALUE self)
-{
-    Queue *queue;
-    VALUE result;
-    Data_Get_Struct(self, Queue, queue);
-
-    lock_mutex(&queue->mutex);
-    result = queue->values.size == 0 ? Qtrue : Qfalse;
-    unlock_mutex(&queue->mutex);
-
-    return result;
-}
-
-/*
- * Document-method: length
- * call-seq: length
- *
- * Returns the length of the queue.
- *
- */
-
-static VALUE
-rb_queue_length(VALUE self)
-{
-    Queue *queue;
-    VALUE result;
-    Data_Get_Struct(self, Queue, queue);
-
-    lock_mutex(&queue->mutex);
-    result = ULONG2NUM(queue->values.size);
-    unlock_mutex(&queue->mutex);
-
-    return result;
-}
-
-/*
- * Document-method: num_waiting
- * call-seq: num_waiting
- *
- * Returns the number of threads waiting on the queue.
- *
- */
-
-static VALUE
-rb_queue_num_waiting(VALUE self)
-{
-    Queue *queue;
-    VALUE result;
-    Data_Get_Struct(self, Queue, queue);
-
-    lock_mutex(&queue->mutex);
-    result = ULONG2NUM(queue->value_available.waiting.size +
-      queue->space_available.waiting.size);
-    unlock_mutex(&queue->mutex);
-
-    return result;
-}
-
-/*
- * Document-method: pop
- * call_seq: pop(non_block=false)
- *
- * Retrieves data from the queue.  If the queue is empty, the calling thread is
- * suspended until data is pushed onto the queue.  If +non_block+ is true, the
- * thread isn't suspended, and an exception is raised.
- *
- */
-
-static VALUE
-rb_queue_pop(int argc, VALUE *argv, VALUE self)
-{
-    Queue *queue;
-    int should_block;
-    VALUE result;
-    Data_Get_Struct(self, Queue, queue);
-
-    if (argc == 0) {
-        should_block = 1;
-    } else if (argc == 1) {
-        should_block = !RTEST(argv[0]);
-    } else {
-        rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc);
-    }
-
-    lock_mutex(&queue->mutex);
-    if (!queue->values.entries && !should_block) {
-        unlock_mutex(&queue->mutex);
-        rb_raise(private_eThreadError, "queue empty");
-    }
-
-    while (!queue->values.entries) {
-        wait_condvar(&queue->value_available, &queue->mutex);
-    }
-
-    result = shift_list(&queue->values);
-    if (queue->capacity && queue->values.size < queue->capacity) {
-        signal_condvar(&queue->space_available);
-    }
-    unlock_mutex(&queue->mutex);
-
-    return result;
-}
-
-/*
- * Document-method: push
- * call-seq: push(obj)
- *
- * Pushes +obj+ to the queue.
- *
- */
-
-static VALUE
-rb_queue_push(VALUE self, VALUE value)
-{
-    Queue *queue;
-    Data_Get_Struct(self, Queue, queue);
-
-    lock_mutex(&queue->mutex);
-    while (queue->capacity && queue->values.size >= queue->capacity) {
-        wait_condvar(&queue->space_available, &queue->mutex);
-    }
-    push_list(&queue->values, value);
-    signal_condvar(&queue->value_available);
-    unlock_mutex(&queue->mutex);
-
-    return self;
-}
-
-/*
- * Document-class: SizedQueue
- *
- * This class represents queues of specified size capacity.  The push operation
- * may be blocked if the capacity is full.
- *
- * See Queue for an example of how a SizedQueue works.
- *
- */
-
-/*
- * Document-method: new
- * call-seq: new
- *
- * Creates a fixed-length queue with a maximum size of +max+.
- *
- */
-
-/*
- * Document-method: max
- * call-seq: max
- *
- * Returns the maximum size of the queue.
- *
- */
-
-static VALUE
-rb_sized_queue_max(VALUE self)
-{
-    Queue *queue;
-    VALUE result;
-    Data_Get_Struct(self, Queue, queue);
-
-    lock_mutex(&queue->mutex);
-    result = ULONG2NUM(queue->capacity);
-    unlock_mutex(&queue->mutex);
-
-    return result;
-}
-
-/*
- * Document-method: max=
- * call-seq: max=(size)
- *
- * Sets the maximum size of the queue.
- *
- */
-
-static VALUE
-rb_sized_queue_max_set(VALUE self, VALUE value)
-{
-    Queue *queue;
-    unsigned long new_capacity;
-    unsigned long difference;
-    Data_Get_Struct(self, Queue, queue);
-
-    new_capacity = NUM2ULONG(value);
-
-    if (new_capacity < 1) {
-        rb_raise(rb_eArgError, "value must be positive");
-    }
-
-    lock_mutex(&queue->mutex);
-    if (queue->capacity && new_capacity > queue->capacity) {
-        difference = new_capacity - queue->capacity;
-    } else {
-        difference = 0;
-    }
-    queue->capacity = new_capacity;
-    for (; difference > 0; --difference) {
-        signal_condvar(&queue->space_available);
-    }
-    unlock_mutex(&queue->mutex);
-
-    return self;
-}
-
-/*
- * Document-method: push
- * call-seq: push(obj)
- *
- * Pushes +obj+ to the queue.  If there is no space left in the queue, waits
- * until space becomes available.
- *
- */
-
-/*
- * Document-method: pop
- * call-seq: pop(non_block=false)
- *
- * Retrieves data from the queue and runs a waiting thread, if any.
- *
- */
-
-/* for marshalling mutexes and condvars */
-
-static VALUE
-dummy_load(VALUE self, VALUE string)
-{
-    return Qnil;
-}
-
-static VALUE
-dummy_dump(VALUE self)
-{
-    return rb_str_new2("");
-}
-
-
-static VALUE
-setup_classes(VALUE unused)
-{
-    rb_mod_remove_const(rb_cObject, ID2SYM(rb_intern("Mutex")));
-    rb_cMutex = rb_define_class("Mutex", rb_cObject);
-    rb_define_alloc_func(rb_cMutex, rb_mutex_alloc);
-    rb_define_method(rb_cMutex, "marshal_load", dummy_load, 1);
-    rb_define_method(rb_cMutex, "marshal_dump", dummy_dump, 0);
-    rb_define_method(rb_cMutex, "locked?", rb_mutex_locked_p, 0);
-    rb_define_method(rb_cMutex, "try_lock", rb_mutex_try_lock, 0);
-    rb_define_method(rb_cMutex, "lock", rb_mutex_lock, 0);
-    rb_define_method(rb_cMutex, "unlock", rb_mutex_unlock, 0);
-    rb_define_method(rb_cMutex, "exclusive_unlock", rb_mutex_exclusive_unlock, 0);
-    rb_define_method(rb_cMutex, "synchronize", rb_mutex_synchronize, 0);
-
-    rb_mod_remove_const(rb_cObject, ID2SYM(rb_intern("ConditionVariable")));
-    rb_cConditionVariable = rb_define_class("ConditionVariable", rb_cObject);
-    rb_define_alloc_func(rb_cConditionVariable, rb_condvar_alloc);
-    rb_define_method(rb_cConditionVariable, "marshal_load", dummy_load, 1);
-    rb_define_method(rb_cConditionVariable, "marshal_dump", dummy_dump, 0);
-    rb_define_method(rb_cConditionVariable, "wait", rb_condvar_wait, 1);
-    rb_define_method(rb_cConditionVariable, "broadcast", rb_condvar_broadcast, 0);
-    rb_define_method(rb_cConditionVariable, "signal", rb_condvar_signal, 0);
-
-    rb_mod_remove_const(rb_cObject, ID2SYM(rb_intern("Queue")));
-    rb_cQueue = rb_define_class("Queue", rb_cObject);
-    rb_define_alloc_func(rb_cQueue, rb_queue_alloc);
-    rb_define_method(rb_cQueue, "marshal_load", rb_queue_marshal_load, 1);
-    rb_define_method(rb_cQueue, "marshal_dump", rb_queue_marshal_dump, 0);
-    rb_define_method(rb_cQueue, "clear", rb_queue_clear, 0);
-    rb_define_method(rb_cQueue, "empty?", rb_queue_empty_p, 0);
-    rb_define_method(rb_cQueue, "length", rb_queue_length, 0);
-    rb_define_method(rb_cQueue, "num_waiting", rb_queue_num_waiting, 0);
-    rb_define_method(rb_cQueue, "pop", rb_queue_pop, -1);
-    rb_define_method(rb_cQueue, "push", rb_queue_push, 1);
-    rb_alias(rb_cQueue, rb_intern("enq"), rb_intern("push"));
-    rb_alias(rb_cQueue, rb_intern("<<"), rb_intern("push"));
-    rb_alias(rb_cQueue, rb_intern("deq"), rb_intern("pop"));
-    rb_alias(rb_cQueue, rb_intern("shift"), rb_intern("pop"));
-    rb_alias(rb_cQueue, rb_intern("size"), rb_intern("length"));
-
-    rb_mod_remove_const(rb_cObject, ID2SYM(rb_intern("SizedQueue")));
-    rb_cSizedQueue = rb_define_class("SizedQueue", rb_cQueue);
-    rb_define_method(rb_cSizedQueue, "initialize", rb_sized_queue_max_set, 1);
-    rb_define_method(rb_cSizedQueue, "clear", rb_queue_clear, 0);
-    rb_define_method(rb_cSizedQueue, "empty?", rb_queue_empty_p, 0);
-    rb_define_method(rb_cSizedQueue, "length", rb_queue_length, 0);
-    rb_define_method(rb_cSizedQueue, "num_waiting", rb_queue_num_waiting, 0);
-    rb_define_method(rb_cSizedQueue, "pop", rb_queue_pop, -1);
-    rb_define_method(rb_cSizedQueue, "push", rb_queue_push, 1);
-    rb_define_method(rb_cSizedQueue, "max", rb_sized_queue_max, 0);
-    rb_define_method(rb_cSizedQueue, "max=", rb_sized_queue_max_set, 1);
-    rb_alias(rb_cSizedQueue, rb_intern("enq"), rb_intern("push"));
-    rb_alias(rb_cSizedQueue, rb_intern("<<"), rb_intern("push"));
-    rb_alias(rb_cSizedQueue, rb_intern("deq"), rb_intern("pop"));
-    rb_alias(rb_cSizedQueue, rb_intern("shift"), rb_intern("pop"));
-
-    return Qnil;
-}
-
-void
-Init_fastthread()
-{
-    int saved_critical;
-
-    rb_require("thread");
-
-    private_eThreadError = rb_const_get(rb_cObject, rb_intern("ThreadError"));
-
-    /* ensure that classes get replaced atomically */
-    saved_critical = rb_thread_critical;
-    rb_thread_critical = 1;
-    rb_ensure(setup_classes, Qnil, set_critical, (VALUE)saved_critical);
-}
-
diff --git a/projects/fastthread/setup.rb b/projects/fastthread/setup.rb
deleted file mode 100755
index f54f84e..0000000
--- a/projects/fastthread/setup.rb
+++ /dev/null
@@ -1,1585 +0,0 @@
-#
-# setup.rb
-#
-# Copyright (c) 2000-2005 Minero Aoki
-#
-# This program is free software.
-# You can distribute/modify this program under the terms of
-# the GNU LGPL, Lesser General Public License version 2.1.
-#
-
-unless Enumerable.method_defined?(:map)   # Ruby 1.4.6
-  module Enumerable
-    alias map collect
-  end
-end
-
-unless File.respond_to?(:read)   # Ruby 1.6
-  def File.read(fname)
-    open(fname) {|f|
-      return f.read
-    }
-  end
-end
-
-unless Errno.const_defined?(:ENOTEMPTY)   # Windows?
-  module Errno
-    class ENOTEMPTY
-      # We do not raise this exception, implementation is not needed.
-    end
-  end
-end
-
-def File.binread(fname)
-  open(fname, 'rb') {|f|
-    return f.read
-  }
-end
-
-# for corrupted Windows' stat(2)
-def File.dir?(path)
-  File.directory?((path[-1,1] == '/') ? path : path + '/')
-end
-
-
-class ConfigTable
-
-  include Enumerable
-
-  def initialize(rbconfig)
-    @rbconfig = rbconfig
-    @items = []
-    @table = {}
-    # options
-    @install_prefix = nil
-    @config_opt = nil
-    @verbose = true
-    @no_harm = false
-  end
-
-  attr_accessor :install_prefix
-  attr_accessor :config_opt
-
-  attr_writer :verbose
-
-  def verbose?
-    @verbose
-  end
-
-  attr_writer :no_harm
-
-  def no_harm?
-    @no_harm
-  end
-
-  def [](key)
-    lookup(key).resolve(self)
-  end
-
-  def []=(key, val)
-    lookup(key).set val
-  end
-
-  def names
-    @items.map {|i| i.name }
-  end
-
-  def each(&block)
-    @items.each(&block)
-  end
-
-  def key?(name)
-    @table.key?(name)
-  end
-
-  def lookup(name)
-    @table[name] or setup_rb_error "no such config item: #{name}"
-  end
-
-  def add(item)
-    @items.push item
-    @table[item.name] = item
-  end
-
-  def remove(name)
-    item = lookup(name)
-    @items.delete_if {|i| i.name == name }
-    @table.delete_if {|name, i| i.name == name }
-    item
-  end
-
-  def load_script(path, inst = nil)
-    if File.file?(path)
-      MetaConfigEnvironment.new(self, inst).instance_eval File.read(path), path
-    end
-  end
-
-  def savefile
-    '.config'
-  end
-
-  def load_savefile
-    begin
-      File.foreach(savefile()) do |line|
-        k, v = *line.split(/=/, 2)
-        self[k] = v.strip
-      end
-    rescue Errno::ENOENT
-      setup_rb_error $!.message + "\n#{File.basename($0)} config first"
-    end
-  end
-
-  def save
-    @items.each {|i| i.value }
-    File.open(savefile(), 'w') {|f|
-      @items.each do |i|
-        f.printf "%s=%s\n", i.name, i.value if i.value? and i.value
-      end
-    }
-  end
-
-  def load_standard_entries
-    standard_entries(@rbconfig).each do |ent|
-      add ent
-    end
-  end
-
-  def standard_entries(rbconfig)
-    c = rbconfig
-
-    rubypath = File.join(c['bindir'], c['ruby_install_name'] + c['EXEEXT'])
-
-    major = c['MAJOR'].to_i
-    minor = c['MINOR'].to_i
-    teeny = c['TEENY'].to_i
-    version = "#{major}.#{minor}"
-
-    # ruby ver. >= 1.4.4?
-    newpath_p = ((major >= 2) or
-                 ((major == 1) and
-                  ((minor >= 5) or
-                   ((minor == 4) and (teeny >= 4)))))
-
-    if c['rubylibdir']
-      # V > 1.6.3
-      libruby         = "#{c['prefix']}/lib/ruby"
-      librubyver      = c['rubylibdir']
-      librubyverarch  = c['archdir']
-      siteruby        = c['sitedir']
-      siterubyver     = c['sitelibdir']
-      siterubyverarch = c['sitearchdir']
-    elsif newpath_p
-      # 1.4.4 <= V <= 1.6.3
-      libruby         = "#{c['prefix']}/lib/ruby"
-      librubyver      = "#{c['prefix']}/lib/ruby/#{version}"
-      librubyverarch  = "#{c['prefix']}/lib/ruby/#{version}/#{c['arch']}"
-      siteruby        = c['sitedir']
-      siterubyver     = "$siteruby/#{version}"
-      siterubyverarch = "$siterubyver/#{c['arch']}"
-    else
-      # V < 1.4.4
-      libruby         = "#{c['prefix']}/lib/ruby"
-      librubyver      = "#{c['prefix']}/lib/ruby/#{version}"
-      librubyverarch  = "#{c['prefix']}/lib/ruby/#{version}/#{c['arch']}"
-      siteruby        = "#{c['prefix']}/lib/ruby/#{version}/site_ruby"
-      siterubyver     = siteruby
-      siterubyverarch = "$siterubyver/#{c['arch']}"
-    end
-    parameterize = lambda {|path|
-      path.sub(/\A#{Regexp.quote(c['prefix'])}/, '$prefix')
-    }
-
-    if arg = c['configure_args'].split.detect {|arg| /--with-make-prog=/ =~ arg }
-      makeprog = arg.sub(/'/, '').split(/=/, 2)[1]
-    else
-      makeprog = 'make'
-    end
-
-    [
-      ExecItem.new('installdirs', 'std/site/home',
-                   'std: install under libruby; site: install under site_ruby; home: install under $HOME')\
-          {|val, table|
-            case val
-            when 'std'
-              table['rbdir'] = '$librubyver'
-              table['sodir'] = '$librubyverarch'
-            when 'site'
-              table['rbdir'] = '$siterubyver'
-              table['sodir'] = '$siterubyverarch'
-            when 'home'
-              setup_rb_error '$HOME was not set' unless ENV['HOME']
-              table['prefix'] = ENV['HOME']
-              table['rbdir'] = '$libdir/ruby'
-              table['sodir'] = '$libdir/ruby'
-            end
-          },
-      PathItem.new('prefix', 'path', c['prefix'],
-                   'path prefix of target environment'),
-      PathItem.new('bindir', 'path', parameterize.call(c['bindir']),
-                   'the directory for commands'),
-      PathItem.new('libdir', 'path', parameterize.call(c['libdir']),
-                   'the directory for libraries'),
-      PathItem.new('datadir', 'path', parameterize.call(c['datadir']),
-                   'the directory for shared data'),
-      PathItem.new('mandir', 'path', parameterize.call(c['mandir']),
-                   'the directory for man pages'),
-      PathItem.new('sysconfdir', 'path', parameterize.call(c['sysconfdir']),
-                   'the directory for system configuration files'),
-      PathItem.new('localstatedir', 'path', parameterize.call(c['localstatedir']),
-                   'the directory for local state data'),
-      PathItem.new('libruby', 'path', parameterize.call(libruby),
-                   'the directory for ruby libraries'),
-      PathItem.new('librubyver', 'path', parameterize.call(librubyver),
-                   'the directory for standard ruby libraries'),
-      PathItem.new('librubyverarch', 'path', parameterize.call(librubyverarch),
-                   'the directory for standard ruby extensions'),
-      PathItem.new('siteruby', 'path', parameterize.call(siteruby),
-          'the directory for version-independent aux ruby libraries'),
-      PathItem.new('siterubyver', 'path', parameterize.call(siterubyver),
-                   'the directory for aux ruby libraries'),
-      PathItem.new('siterubyverarch', 'path', parameterize.call(siterubyverarch),
-                   'the directory for aux ruby binaries'),
-      PathItem.new('rbdir', 'path', '$siterubyver',
-                   'the directory for ruby scripts'),
-      PathItem.new('sodir', 'path', '$siterubyverarch',
-                   'the directory for ruby extentions'),
-      PathItem.new('rubypath', 'path', rubypath,
-                   'the path to set to #! line'),
-      ProgramItem.new('rubyprog', 'name', rubypath,
-                      'the ruby program using for installation'),
-      ProgramItem.new('makeprog', 'name', makeprog,
-                      'the make program to compile ruby extentions'),
-      SelectItem.new('shebang', 'all/ruby/never', 'ruby',
-                     'shebang line (#!) editing mode'),
-      BoolItem.new('without-ext', 'yes/no', 'no',
-                   'does not compile/install ruby extentions')
-    ]
-  end
-  private :standard_entries
-
-  def load_multipackage_entries
-    multipackage_entries().each do |ent|
-      add ent
-    end
-  end
-
-  def multipackage_entries
-    [
-      PackageSelectionItem.new('with', 'name,name...', '', 'ALL',
-                               'package names that you want to install'),
-      PackageSelectionItem.new('without', 'name,name...', '', 'NONE',
-                               'package names that you do not want to install')
-    ]
-  end
-  private :multipackage_entries
-
-  ALIASES = {
-    'std-ruby'         => 'librubyver',
-    'stdruby'          => 'librubyver',
-    'rubylibdir'       => 'librubyver',
-    'archdir'          => 'librubyverarch',
-    'site-ruby-common' => 'siteruby',     # For backward compatibility
-    'site-ruby'        => 'siterubyver',  # For backward compatibility
-    'bin-dir'          => 'bindir',
-    'bin-dir'          => 'bindir',
-    'rb-dir'           => 'rbdir',
-    'so-dir'           => 'sodir',
-    'data-dir'         => 'datadir',
-    'ruby-path'        => 'rubypath',
-    'ruby-prog'        => 'rubyprog',
-    'ruby'             => 'rubyprog',
-    'make-prog'        => 'makeprog',
-    'make'             => 'makeprog'
-  }
-
-  def fixup
-    ALIASES.each do |ali, name|
-      @table[ali] = @table[name]
-    end
-    @items.freeze
-    @table.freeze
-    @options_re = /\A--(#{@table.keys.join('|')})(?:=(.*))?\z/
-  end
-
-  def parse_opt(opt)
-    m = @options_re.match(opt) or setup_rb_error "config: unknown option #{opt}"
-    m.to_a[1,2]
-  end
-
-  def dllext
-    @rbconfig['DLEXT']
-  end
-
-  def value_config?(name)
-    lookup(name).value?
-  end
-
-  class Item
-    def initialize(name, template, default, desc)
-      @name = name.freeze
-      @template = template
-      @value = default
-      @default = default
-      @description = desc
-    end
-
-    attr_reader :name
-    attr_reader :description
-
-    attr_accessor :default
-    alias help_default default
-
-    def help_opt
-      "--#{@name}=#{@template}"
-    end
-
-    def value?
-      true
-    end
-
-    def value
-      @value
-    end
-
-    def resolve(table)
-      @value.gsub(%r<\$([^/]+)>) { table[$1] }
-    end
-
-    def set(val)
-      @value = check(val)
-    end
-
-    private
-
-    def check(val)
-      setup_rb_error "config: --#{name} requires argument" unless val
-      val
-    end
-  end
-
-  class BoolItem < Item
-    def config_type
-      'bool'
-    end
-
-    def help_opt
-      "--#{@name}"
-    end
-
-    private
-
-    def check(val)
-      return 'yes' unless val
-      case val
-      when /\Ay(es)?\z/i, /\At(rue)?\z/i then 'yes'
-      when /\An(o)?\z/i, /\Af(alse)\z/i  then 'no'
-      else
-        setup_rb_error "config: --#{@name} accepts only yes/no for argument"
-      end
-    end
-  end
-
-  class PathItem < Item
-    def config_type
-      'path'
-    end
-
-    private
-
-    def check(path)
-      setup_rb_error "config: --#{@name} requires argument"  unless path
-      path[0,1] == '$' ? path : File.expand_path(path)
-    end
-  end
-
-  class ProgramItem < Item
-    def config_type
-      'program'
-    end
-  end
-
-  class SelectItem < Item
-    def initialize(name, selection, default, desc)
-      super
-      @ok = selection.split('/')
-    end
-
-    def config_type
-      'select'
-    end
-
-    private
-
-    def check(val)
-      unless @ok.include?(val.strip)
-        setup_rb_error "config: use --#{@name}=#{@template} (#{val})"
-      end
-      val.strip
-    end
-  end
-
-  class ExecItem < Item
-    def initialize(name, selection, desc, &block)
-      super name, selection, nil, desc
-      @ok = selection.split('/')
-      @action = block
-    end
-
-    def config_type
-      'exec'
-    end
-
-    def value?
-      false
-    end
-
-    def resolve(table)
-      setup_rb_error "$#{name()} wrongly used as option value"
-    end
-
-    undef set
-
-    def evaluate(val, table)
-      v = val.strip.downcase
-      unless @ok.include?(v)
-        setup_rb_error "invalid option --#{@name}=#{val} (use #{@template})"
-      end
-      @action.call v, table
-    end
-  end
-
-  class PackageSelectionItem < Item
-    def initialize(name, template, default, help_default, desc)
-      super name, template, default, desc
-      @help_default = help_default
-    end
-
-    attr_reader :help_default
-
-    def config_type
-      'package'
-    end
-
-    private
-
-    def check(val)
-      unless File.dir?("packages/#{val}")
-        setup_rb_error "config: no such package: #{val}"
-      end
-      val
-    end
-  end
-
-  class MetaConfigEnvironment
-    def initialize(config, installer)
-      @config = config
-      @installer = installer
-    end
-
-    def config_names
-      @config.names
-    end
-
-    def config?(name)
-      @config.key?(name)
-    end
-
-    def bool_config?(name)
-      @config.lookup(name).config_type == 'bool'
-    end
-
-    def path_config?(name)
-      @config.lookup(name).config_type == 'path'
-    end
-
-    def value_config?(name)
-      @config.lookup(name).config_type != 'exec'
-    end
-
-    def add_config(item)
-      @config.add item
-    end
-
-    def add_bool_config(name, default, desc)
-      @config.add BoolItem.new(name, 'yes/no', default ? 'yes' : 'no', desc)
-    end
-
-    def add_path_config(name, default, desc)
-      @config.add PathItem.new(name, 'path', default, desc)
-    end
-
-    def set_config_default(name, default)
-      @config.lookup(name).default = default
-    end
-
-    def remove_config(name)
-      @config.remove(name)
-    end
-
-    # For only multipackage
-    def packages
-      raise '[setup.rb fatal] multi-package metaconfig API packages() called for single-package; contact application package vendor' unless @installer
-      @installer.packages
-    end
-
-    # For only multipackage
-    def declare_packages(list)
-      raise '[setup.rb fatal] multi-package metaconfig API declare_packages() called for single-package; contact application package vendor' unless @installer
-      @installer.packages = list
-    end
-  end
-
-end   # class ConfigTable
-
-
-# This module requires: #verbose?, #no_harm?
-module FileOperations
-
-  def mkdir_p(dirname, prefix = nil)
-    dirname = prefix + File.expand_path(dirname) if prefix
-    $stderr.puts "mkdir -p #{dirname}" if verbose?
-    return if no_harm?
-
-    # Does not check '/', it's too abnormal.
-    dirs = File.expand_path(dirname).split(%r<(?=/)>)
-    if /\A[a-z]:\z/i =~ dirs[0]
-      disk = dirs.shift
-      dirs[0] = disk + dirs[0]
-    end
-    dirs.each_index do |idx|
-      path = dirs[0..idx].join('')
-      Dir.mkdir path unless File.dir?(path)
-    end
-  end
-
-  def rm_f(path)
-    $stderr.puts "rm -f #{path}" if verbose?
-    return if no_harm?
-    force_remove_file path
-  end
-
-  def rm_rf(path)
-    $stderr.puts "rm -rf #{path}" if verbose?
-    return if no_harm?
-    remove_tree path
-  end
-
-  def remove_tree(path)
-    if File.symlink?(path)
-      remove_file path
-    elsif File.dir?(path)
-      remove_tree0 path
-    else
-      force_remove_file path
-    end
-  end
-
-  def remove_tree0(path)
-    Dir.foreach(path) do |ent|
-      next if ent == '.'
-      next if ent == '..'
-      entpath = "#{path}/#{ent}"
-      if File.symlink?(entpath)
-        remove_file entpath
-      elsif File.dir?(entpath)
-        remove_tree0 entpath
-      else
-        force_remove_file entpath
-      end
-    end
-    begin
-      Dir.rmdir path
-    rescue Errno::ENOTEMPTY
-      # directory may not be empty
-    end
-  end
-
-  def move_file(src, dest)
-    force_remove_file dest
-    begin
-      File.rename src, dest
-    rescue
-      File.open(dest, 'wb') {|f|
-        f.write File.binread(src)
-      }
-      File.chmod File.stat(src).mode, dest
-      File.unlink src
-    end
-  end
-
-  def force_remove_file(path)
-    begin
-      remove_file path
-    rescue
-    end
-  end
-
-  def remove_file(path)
-    File.chmod 0777, path
-    File.unlink path
-  end
-
-  def install(from, dest, mode, prefix = nil)
-    $stderr.puts "install #{from} #{dest}" if verbose?
-    return if no_harm?
-
-    realdest = prefix ? prefix + File.expand_path(dest) : dest
-    realdest = File.join(realdest, File.basename(from)) if File.dir?(realdest)
-    str = File.binread(from)
-    if diff?(str, realdest)
-      verbose_off {
-        rm_f realdest if File.exist?(realdest)
-      }
-      File.open(realdest, 'wb') {|f|
-        f.write str
-      }
-      File.chmod mode, realdest
-
-      File.open("#{objdir_root()}/InstalledFiles", 'a') {|f|
-        if prefix
-          f.puts realdest.sub(prefix, '')
-        else
-          f.puts realdest
-        end
-      }
-    end
-  end
-
-  def diff?(new_content, path)
-    return true unless File.exist?(path)
-    new_content != File.binread(path)
-  end
-
-  def command(*args)
-    $stderr.puts args.join(' ') if verbose?
-    system(*args) or raise RuntimeError,
-        "system(#{args.map{|a| a.inspect }.join(' ')}) failed"
-  end
-
-  def ruby(*args)
-    command config('rubyprog'), *args
-  end
-  
-  def make(task = nil)
-    command(*[config('makeprog'), task].compact)
-  end
-
-  def extdir?(dir)
-    File.exist?("#{dir}/MANIFEST") or File.exist?("#{dir}/extconf.rb")
-  end
-
-  def files_of(dir)
-    Dir.open(dir) {|d|
-      return d.select {|ent| File.file?("#{dir}/#{ent}") }
-    }
-  end
-
-  DIR_REJECT = %w( . .. CVS SCCS RCS CVS.adm .svn )
-
-  def directories_of(dir)
-    Dir.open(dir) {|d|
-      return d.select {|ent| File.dir?("#{dir}/#{ent}") } - DIR_REJECT
-    }
-  end
-
-end
-
-
-# This module requires: #srcdir_root, #objdir_root, #relpath
-module HookScriptAPI
-
-  def get_config(key)
-    @config[key]
-  end
-
-  alias config get_config
-
-  # obsolete: use metaconfig to change configuration
-  def set_config(key, val)
-    @config[key] = val
-  end
-
-  #
-  # srcdir/objdir (works only in the package directory)
-  #
-
-  def curr_srcdir
-    "#{srcdir_root()}/#{relpath()}"
-  end
-
-  def curr_objdir
-    "#{objdir_root()}/#{relpath()}"
-  end
-
-  def srcfile(path)
-    "#{curr_srcdir()}/#{path}"
-  end
-
-  def srcexist?(path)
-    File.exist?(srcfile(path))
-  end
-
-  def srcdirectory?(path)
-    File.dir?(srcfile(path))
-  end
-  
-  def srcfile?(path)
-    File.file?(srcfile(path))
-  end
-
-  def srcentries(path = '.')
-    Dir.open("#{curr_srcdir()}/#{path}") {|d|
-      return d.to_a - %w(. ..)
-    }
-  end
-
-  def srcfiles(path = '.')
-    srcentries(path).select {|fname|
-      File.file?(File.join(curr_srcdir(), path, fname))
-    }
-  end
-
-  def srcdirectories(path = '.')
-    srcentries(path).select {|fname|
-      File.dir?(File.join(curr_srcdir(), path, fname))
-    }
-  end
-
-end
-
-
-class ToplevelInstaller
-
-  Version   = '3.4.1'
-  Copyright = 'Copyright (c) 2000-2005 Minero Aoki'
-
-  TASKS = [
-    [ 'all',      'do config, setup, then install' ],
-    [ 'config',   'saves your configurations' ],
-    [ 'show',     'shows current configuration' ],
-    [ 'setup',    'compiles ruby extentions and others' ],
-    [ 'install',  'installs files' ],
-    [ 'test',     'run all tests in test/' ],
-    [ 'clean',    "does `make clean' for each extention" ],
-    [ 'distclean',"does `make distclean' for each extention" ]
-  ]
-
-  def ToplevelInstaller.invoke
-    config = ConfigTable.new(load_rbconfig())
-    config.load_standard_entries
-    config.load_multipackage_entries if multipackage?
-    config.fixup
-    klass = (multipackage?() ? ToplevelInstallerMulti : ToplevelInstaller)
-    klass.new(File.dirname($0), config).invoke
-  end
-
-  def ToplevelInstaller.multipackage?
-    File.dir?(File.dirname($0) + '/packages')
-  end
-
-  def ToplevelInstaller.load_rbconfig
-    if arg = ARGV.detect {|arg| /\A--rbconfig=/ =~ arg }
-      ARGV.delete(arg)
-      load File.expand_path(arg.split(/=/, 2)[1])
-      $".push 'rbconfig.rb'
-    else
-      require 'rbconfig'
-    end
-    ::Config::CONFIG
-  end
-
-  def initialize(ardir_root, config)
-    @ardir = File.expand_path(ardir_root)
-    @config = config
-    # cache
-    @valid_task_re = nil
-  end
-
-  def config(key)
-    @config[key]
-  end
-
-  def inspect
-    "#<#{self.class} #{__id__()}>"
-  end
-
-  def invoke
-    run_metaconfigs
-    case task = parsearg_global()
-    when nil, 'all'
-      parsearg_config
-      init_installers
-      exec_config
-      exec_setup
-      exec_install
-    else
-      case task
-      when 'config', 'test'
-        ;
-      when 'clean', 'distclean'
-        @config.load_savefile if File.exist?(@config.savefile)
-      else
-        @config.load_savefile
-      end
-      __send__ "parsearg_#{task}"
-      init_installers
-      __send__ "exec_#{task}"
-    end
-  end
-  
-  def run_metaconfigs
-    @config.load_script "#{@ardir}/metaconfig"
-  end
-
-  def init_installers
-    @installer = Installer.new(@config, @ardir, File.expand_path('.'))
-  end
-
-  #
-  # Hook Script API bases
-  #
-
-  def srcdir_root
-    @ardir
-  end
-
-  def objdir_root
-    '.'
-  end
-
-  def relpath
-    '.'
-  end
-
-  #
-  # Option Parsing
-  #
-
-  def parsearg_global
-    while arg = ARGV.shift
-      case arg
-      when /\A\w+\z/
-        setup_rb_error "invalid task: #{arg}" unless valid_task?(arg)
-        return arg
-      when '-q', '--quiet'
-        @config.verbose = false
-      when '--verbose'
-        @config.verbose = true
-      when '--help'
-        print_usage $stdout
-        exit 0
-      when '--version'
-        puts "#{File.basename($0)} version #{Version}"
-        exit 0
-      when '--copyright'
-        puts Copyright
-        exit 0
-      else
-        setup_rb_error "unknown global option '#{arg}'"
-      end
-    end
-    nil
-  end
-
-  def valid_task?(t)
-    valid_task_re() =~ t
-  end
-
-  def valid_task_re
-    @valid_task_re ||= /\A(?:#{TASKS.map {|task,desc| task }.join('|')})\z/
-  end
-
-  def parsearg_no_options
-    unless ARGV.empty?
-      task = caller(0).first.slice(%r<`parsearg_(\w+)'>, 1)
-      setup_rb_error "#{task}: unknown options: #{ARGV.join(' ')}"
-    end
-  end
-
-  alias parsearg_show       parsearg_no_options
-  alias parsearg_setup      parsearg_no_options
-  alias parsearg_test       parsearg_no_options
-  alias parsearg_clean      parsearg_no_options
-  alias parsearg_distclean  parsearg_no_options
-
-  def parsearg_config
-    evalopt = []
-    set = []
-    @config.config_opt = []
-    while i = ARGV.shift
-      if /\A--?\z/ =~ i
-        @config.config_opt = ARGV.dup
-        break
-      end
-      name, value = *@config.parse_opt(i)
-      if @config.value_config?(name)
-        @config[name] = value
-      else
-        evalopt.push [name, value]
-      end
-      set.push name
-    end
-    evalopt.each do |name, value|
-      @config.lookup(name).evaluate value, @config
-    end
-    # Check if configuration is valid
-    set.each do |n|
-      @config[n] if @config.value_config?(n)
-    end
-  end
-
-  def parsearg_install
-    @config.no_harm = false
-    @config.install_prefix = ''
-    while a = ARGV.shift
-      case a
-      when '--no-harm'
-        @config.no_harm = true
-      when /\A--prefix=/
-        path = a.split(/=/, 2)[1]
-        path = File.expand_path(path) unless path[0,1] == '/'
-        @config.install_prefix = path
-      else
-        setup_rb_error "install: unknown option #{a}"
-      end
-    end
-  end
-
-  def print_usage(out)
-    out.puts 'Typical Installation Procedure:'
-    out.puts "  $ ruby #{File.basename $0} config"
-    out.puts "  $ ruby #{File.basename $0} setup"
-    out.puts "  # ruby #{File.basename $0} install (may require root privilege)"
-    out.puts
-    out.puts 'Detailed Usage:'
-    out.puts "  ruby #{File.basename $0} <global option>"
-    out.puts "  ruby #{File.basename $0} [<global options>] <task> [<task options>]"
-
-    fmt = "  %-24s %s\n"
-    out.puts
-    out.puts 'Global options:'
-    out.printf fmt, '-q,--quiet',   'suppress message outputs'
-    out.printf fmt, '   --verbose', 'output messages verbosely'
-    out.printf fmt, '   --help',    'print this message'
-    out.printf fmt, '   --version', 'print version and quit'
-    out.printf fmt, '   --copyright',  'print copyright and quit'
-    out.puts
-    out.puts 'Tasks:'
-    TASKS.each do |name, desc|
-      out.printf fmt, name, desc
-    end
-
-    fmt = "  %-24s %s [%s]\n"
-    out.puts
-    out.puts 'Options for CONFIG or ALL:'
-    @config.each do |item|
-      out.printf fmt, item.help_opt, item.description, item.help_default
-    end
-    out.printf fmt, '--rbconfig=path', 'rbconfig.rb to load',"running ruby's"
-    out.puts
-    out.puts 'Options for INSTALL:'
-    out.printf fmt, '--no-harm', 'only display what to do if given', 'off'
-    out.printf fmt, '--prefix=path',  'install path prefix', ''
-    out.puts
-  end
-
-  #
-  # Task Handlers
-  #
-
-  def exec_config
-    @installer.exec_config
-    @config.save   # must be final
-  end
-
-  def exec_setup
-    @installer.exec_setup
-  end
-
-  def exec_install
-    @installer.exec_install
-  end
-
-  def exec_test
-    @installer.exec_test
-  end
-
-  def exec_show
-    @config.each do |i|
-      printf "%-20s %s\n", i.name, i.value if i.value?
-    end
-  end
-
-  def exec_clean
-    @installer.exec_clean
-  end
-
-  def exec_distclean
-    @installer.exec_distclean
-  end
-
-end   # class ToplevelInstaller
-
-
-class ToplevelInstallerMulti < ToplevelInstaller
-
-  include FileOperations
-
-  def initialize(ardir_root, config)
-    super
-    @packages = directories_of("#{@ardir}/packages")
-    raise 'no package exists' if @packages.empty?
-    @root_installer = Installer.new(@config, @ardir, File.expand_path('.'))
-  end
-
-  def run_metaconfigs
-    @config.load_script "#{@ardir}/metaconfig", self
-    @packages.each do |name|
-      @config.load_script "#{@ardir}/packages/#{name}/metaconfig"
-    end
-  end
-
-  attr_reader :packages
-
-  def packages=(list)
-    raise 'package list is empty' if list.empty?
-    list.each do |name|
-      raise "directory packages/#{name} does not exist"\
-              unless File.dir?("#{@ardir}/packages/#{name}")
-    end
-    @packages = list
-  end
-
-  def init_installers
-    @installers = {}
-    @packages.each do |pack|
-      @installers[pack] = Installer.new(@config,
-                                       "#{@ardir}/packages/#{pack}",
-                                       "packages/#{pack}")
-    end
-    with    = extract_selection(config('with'))
-    without = extract_selection(config('without'))
-    @selected = @installers.keys.select {|name|
-                  (with.empty? or with.include?(name)) \
-                      and not without.include?(name)
-                }
-  end
-
-  def extract_selection(list)
-    a = list.split(/,/)
-    a.each do |name|
-      setup_rb_error "no such package: #{name}"  unless @installers.key?(name)
-    end
-    a
-  end
-
-  def print_usage(f)
-    super
-    f.puts 'Inluded packages:'
-    f.puts '  ' + @packages.sort.join(' ')
-    f.puts
-  end
-
-  #
-  # Task Handlers
-  #
-
-  def exec_config
-    run_hook 'pre-config'
-    each_selected_installers {|inst| inst.exec_config }
-    run_hook 'post-config'
-    @config.save   # must be final
-  end
-
-  def exec_setup
-    run_hook 'pre-setup'
-    each_selected_installers {|inst| inst.exec_setup }
-    run_hook 'post-setup'
-  end
-
-  def exec_install
-    run_hook 'pre-install'
-    each_selected_installers {|inst| inst.exec_install }
-    run_hook 'post-install'
-  end
-
-  def exec_test
-    run_hook 'pre-test'
-    each_selected_installers {|inst| inst.exec_test }
-    run_hook 'post-test'
-  end
-
-  def exec_clean
-    rm_f @config.savefile
-    run_hook 'pre-clean'
-    each_selected_installers {|inst| inst.exec_clean }
-    run_hook 'post-clean'
-  end
-
-  def exec_distclean
-    rm_f @config.savefile
-    run_hook 'pre-distclean'
-    each_selected_installers {|inst| inst.exec_distclean }
-    run_hook 'post-distclean'
-  end
-
-  #
-  # lib
-  #
-
-  def each_selected_installers
-    Dir.mkdir 'packages' unless File.dir?('packages')
-    @selected.each do |pack|
-      $stderr.puts "Processing the package `#{pack}' ..." if verbose?
-      Dir.mkdir "packages/#{pack}" unless File.dir?("packages/#{pack}")
-      Dir.chdir "packages/#{pack}"
-      yield @installers[pack]
-      Dir.chdir '../..'
-    end
-  end
-
-  def run_hook(id)
-    @root_installer.run_hook id
-  end
-
-  # module FileOperations requires this
-  def verbose?
-    @config.verbose?
-  end
-
-  # module FileOperations requires this
-  def no_harm?
-    @config.no_harm?
-  end
-
-end   # class ToplevelInstallerMulti
-
-
-class Installer
-
-  FILETYPES = %w( bin lib ext data conf man )
-
-  include FileOperations
-  include HookScriptAPI
-
-  def initialize(config, srcroot, objroot)
-    @config = config
-    @srcdir = File.expand_path(srcroot)
-    @objdir = File.expand_path(objroot)
-    @currdir = '.'
-  end
-
-  def inspect
-    "#<#{self.class} #{File.basename(@srcdir)}>"
-  end
-
-  def noop(rel)
-  end
-
-  #
-  # Hook Script API base methods
-  #
-
-  def srcdir_root
-    @srcdir
-  end
-
-  def objdir_root
-    @objdir
-  end
-
-  def relpath
-    @currdir
-  end
-
-  #
-  # Config Access
-  #
-
-  # module FileOperations requires this
-  def verbose?
-    @config.verbose?
-  end
-
-  # module FileOperations requires this
-  def no_harm?
-    @config.no_harm?
-  end
-
-  def verbose_off
-    begin
-      save, @config.verbose = @config.verbose?, false
-      yield
-    ensure
-      @config.verbose = save
-    end
-  end
-
-  #
-  # TASK config
-  #
-
-  def exec_config
-    exec_task_traverse 'config'
-  end
-
-  alias config_dir_bin noop
-  alias config_dir_lib noop
-
-  def config_dir_ext(rel)
-    extconf if extdir?(curr_srcdir())
-  end
-
-  alias config_dir_data noop
-  alias config_dir_conf noop
-  alias config_dir_man noop
-
-  def extconf
-    ruby "#{curr_srcdir()}/extconf.rb", *@config.config_opt
-  end
-
-  #
-  # TASK setup
-  #
-
-  def exec_setup
-    exec_task_traverse 'setup'
-  end
-
-  def setup_dir_bin(rel)
-    files_of(curr_srcdir()).each do |fname|
-      update_shebang_line "#{curr_srcdir()}/#{fname}"
-    end
-  end
-
-  alias setup_dir_lib noop
-
-  def setup_dir_ext(rel)
-    make if extdir?(curr_srcdir())
-  end
-
-  alias setup_dir_data noop
-  alias setup_dir_conf noop
-  alias setup_dir_man noop
-
-  def update_shebang_line(path)
-    return if no_harm?
-    return if config('shebang') == 'never'
-    old = Shebang.load(path)
-    if old
-      $stderr.puts "warning: #{path}: Shebang line includes too many args.  It is not portable and your program may not work." if old.args.size > 1
-      new = new_shebang(old)
-      return if new.to_s == old.to_s
-    else
-      return unless config('shebang') == 'all'
-      new = Shebang.new(config('rubypath'))
-    end
-    $stderr.puts "updating shebang: #{File.basename(path)}" if verbose?
-    open_atomic_writer(path) {|output|
-      File.open(path, 'rb') {|f|
-        f.gets if old   # discard
-        output.puts new.to_s
-        output.print f.read
-      }
-    }
-  end
-
-  def new_shebang(old)
-    if /\Aruby/ =~ File.basename(old.cmd)
-      Shebang.new(config('rubypath'), old.args)
-    elsif File.basename(old.cmd) == 'env' and old.args.first == 'ruby'
-      Shebang.new(config('rubypath'), old.args[1..-1])
-    else
-      return old unless config('shebang') == 'all'
-      Shebang.new(config('rubypath'))
-    end
-  end
-
-  def open_atomic_writer(path, &block)
-    tmpfile = File.basename(path) + '.tmp'
-    begin
-      File.open(tmpfile, 'wb', &block)
-      File.rename tmpfile, File.basename(path)
-    ensure
-      File.unlink tmpfile if File.exist?(tmpfile)
-    end
-  end
-
-  class Shebang
-    def Shebang.load(path)
-      line = nil
-      File.open(path) {|f|
-        line = f.gets
-      }
-      return nil unless /\A#!/ =~ line
-      parse(line)
-    end
-
-    def Shebang.parse(line)
-      cmd, *args = *line.strip.sub(/\A\#!/, '').split(' ')
-      new(cmd, args)
-    end
-
-    def initialize(cmd, args = [])
-      @cmd = cmd
-      @args = args
-    end
-
-    attr_reader :cmd
-    attr_reader :args
-
-    def to_s
-      "#! #{@cmd}" + (@args.empty? ? '' : " #{@args.join(' ')}")
-    end
-  end
-
-  #
-  # TASK install
-  #
-
-  def exec_install
-    rm_f 'InstalledFiles'
-    exec_task_traverse 'install'
-  end
-
-  def install_dir_bin(rel)
-    install_files targetfiles(), "#{config('bindir')}/#{rel}", 0755
-  end
-
-  def install_dir_lib(rel)
-    install_files libfiles(), "#{config('rbdir')}/#{rel}", 0644
-  end
-
-  def install_dir_ext(rel)
-    return unless extdir?(curr_srcdir())
-    install_files rubyextentions('.'),
-                  "#{config('sodir')}/#{File.dirname(rel)}",
-                  0555
-  end
-
-  def install_dir_data(rel)
-    install_files targetfiles(), "#{config('datadir')}/#{rel}", 0644
-  end
-
-  def install_dir_conf(rel)
-    # FIXME: should not remove current config files
-    # (rename previous file to .old/.org)
-    install_files targetfiles(), "#{config('sysconfdir')}/#{rel}", 0644
-  end
-
-  def install_dir_man(rel)
-    install_files targetfiles(), "#{config('mandir')}/#{rel}", 0644
-  end
-
-  def install_files(list, dest, mode)
-    mkdir_p dest, @config.install_prefix
-    list.each do |fname|
-      install fname, dest, mode, @config.install_prefix
-    end
-  end
-
-  def libfiles
-    glob_reject(%w(*.y *.output), targetfiles())
-  end
-
-  def rubyextentions(dir)
-    ents = glob_select("*.#{@config.dllext}", targetfiles())
-    if ents.empty?
-      setup_rb_error "no ruby extention exists: 'ruby #{$0} setup' first"
-    end
-    ents
-  end
-
-  def targetfiles
-    mapdir(existfiles() - hookfiles())
-  end
-
-  def mapdir(ents)
-    ents.map {|ent|
-      if File.exist?(ent)
-      then ent                         # objdir
-      else "#{curr_srcdir()}/#{ent}"   # srcdir
-      end
-    }
-  end
-
-  # picked up many entries from cvs-1.11.1/src/ignore.c
-  JUNK_FILES = %w(
-    core RCSLOG tags TAGS .make.state
-    .nse_depinfo #* .#* cvslog.* ,* .del-* *.olb
-    *~ *.old *.bak *.BAK *.orig *.rej _$* *$
-
-    *.org *.in .*
-  )
-
-  def existfiles
-    glob_reject(JUNK_FILES, (files_of(curr_srcdir()) | files_of('.')))
-  end
-
-  def hookfiles
-    %w( pre-%s post-%s pre-%s.rb post-%s.rb ).map {|fmt|
-      %w( config setup install clean ).map {|t| sprintf(fmt, t) }
-    }.flatten
-  end
-
-  def glob_select(pat, ents)
-    re = globs2re([pat])
-    ents.select {|ent| re =~ ent }
-  end
-
-  def glob_reject(pats, ents)
-    re = globs2re(pats)
-    ents.reject {|ent| re =~ ent }
-  end
-
-  GLOB2REGEX = {
-    '.' => '\.',
-    '$' => '\$',
-    '#' => '\#',
-    '*' => '.*'
-  }
-
-  def globs2re(pats)
-    /\A(?:#{
-      pats.map {|pat| pat.gsub(/[\.\$\#\*]/) {|ch| GLOB2REGEX[ch] } }.join('|')
-    })\z/
-  end
-
-  #
-  # TASK test
-  #
-
-  TESTDIR = 'test'
-
-  def exec_test
-    unless File.directory?('test')
-      $stderr.puts 'no test in this package' if verbose?
-      return
-    end
-    $stderr.puts 'Running tests...' if verbose?
-    begin
-      require 'test/unit'
-    rescue LoadError
-      setup_rb_error 'test/unit cannot loaded.  You need Ruby 1.8 or later to invoke this task.'
-    end
-    runner = Test::Unit::AutoRunner.new(true)
-    runner.to_run << TESTDIR
-    runner.run
-  end
-
-  #
-  # TASK clean
-  #
-
-  def exec_clean
-    exec_task_traverse 'clean'
-    rm_f @config.savefile
-    rm_f 'InstalledFiles'
-  end
-
-  alias clean_dir_bin noop
-  alias clean_dir_lib noop
-  alias clean_dir_data noop
-  alias clean_dir_conf noop
-  alias clean_dir_man noop
-
-  def clean_dir_ext(rel)
-    return unless extdir?(curr_srcdir())
-    make 'clean' if File.file?('Makefile')
-  end
-
-  #
-  # TASK distclean
-  #
-
-  def exec_distclean
-    exec_task_traverse 'distclean'
-    rm_f @config.savefile
-    rm_f 'InstalledFiles'
-  end
-
-  alias distclean_dir_bin noop
-  alias distclean_dir_lib noop
-
-  def distclean_dir_ext(rel)
-    return unless extdir?(curr_srcdir())
-    make 'distclean' if File.file?('Makefile')
-  end
-
-  alias distclean_dir_data noop
-  alias distclean_dir_conf noop
-  alias distclean_dir_man noop
-
-  #
-  # Traversing
-  #
-
-  def exec_task_traverse(task)
-    run_hook "pre-#{task}"
-    FILETYPES.each do |type|
-      if type == 'ext' and config('without-ext') == 'yes'
-        $stderr.puts 'skipping ext/* by user option' if verbose?
-        next
-      end
-      traverse task, type, "#{task}_dir_#{type}"
-    end
-    run_hook "post-#{task}"
-  end
-
-  def traverse(task, rel, mid)
-    dive_into(rel) {
-      run_hook "pre-#{task}"
-      __send__ mid, rel.sub(%r[\A.*?(?:/|\z)], '')
-      directories_of(curr_srcdir()).each do |d|
-        traverse task, "#{rel}/#{d}", mid
-      end
-      run_hook "post-#{task}"
-    }
-  end
-
-  def dive_into(rel)
-    return unless File.dir?("#{@srcdir}/#{rel}")
-
-    dir = File.basename(rel)
-    Dir.mkdir dir unless File.dir?(dir)
-    prevdir = Dir.pwd
-    Dir.chdir dir
-    $stderr.puts '---> ' + rel if verbose?
-    @currdir = rel
-    yield
-    Dir.chdir prevdir
-    $stderr.puts '<--- ' + rel if verbose?
-    @currdir = File.dirname(rel)
-  end
-
-  def run_hook(id)
-    path = [ "#{curr_srcdir()}/#{id}",
-             "#{curr_srcdir()}/#{id}.rb" ].detect {|cand| File.file?(cand) }
-    return unless path
-    begin
-      instance_eval File.read(path), path, 1
-    rescue
-      raise if $DEBUG
-      setup_rb_error "hook #{path} failed:\n" + $!.message
-    end
-  end
-
-end   # class Installer
-
-
-class SetupError < StandardError; end
-
-def setup_rb_error(msg)
-  raise SetupError, msg
-end
-
-if $0 == __FILE__
-  begin
-    ToplevelInstaller.invoke
-  rescue SetupError
-    raise if $DEBUG
-    $stderr.puts $!.message
-    $stderr.puts "Try 'ruby #{$0} --help' for detailed usage."
-    exit 1
-  end
-end
diff --git a/projects/fastthread/test/test_all.rb b/projects/fastthread/test/test_all.rb
deleted file mode 100644
index 3dbd90e..0000000
--- a/projects/fastthread/test/test_all.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require 'test/unit'
-$:.unshift File.expand_path( File.dirname( __FILE__ ) )
-require 'test_mutex'
-require 'test_condvar'
-require 'test_queue'
-
diff --git a/projects/fastthread/test/test_condvar.rb b/projects/fastthread/test/test_condvar.rb
deleted file mode 100644
index 3b6b948..0000000
--- a/projects/fastthread/test/test_condvar.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-require 'test/unit'
-require 'thread'
-if RUBY_PLATFORM != "java"
-  $:.unshift File.expand_path( File.join( File.dirname( __FILE__ ), "../ext/fastthread" ) )
-  require 'fastthread'
-end
-
-class TestCondVar < Test::Unit::TestCase
-  def test_signal
-    s = ""
-    m = Mutex.new
-    cv = ConditionVariable.new
-    ready = false
-
-    t = Thread.new do
-      nil until ( Thread.pass ; m.synchronize { ready } )
-      m.synchronize { s << "b" }
-      cv.signal
-    end
-
-    m.synchronize do
-      s << "a"
-      ready = true
-      cv.wait m
-      assert m.locked?
-      s << "c"
-    end
-
-    t.join
-
-    assert_equal "abc", s
-  end
-end
-
diff --git a/projects/fastthread/test/test_mutex.rb b/projects/fastthread/test/test_mutex.rb
deleted file mode 100644
index 1793c6d..0000000
--- a/projects/fastthread/test/test_mutex.rb
+++ /dev/null
@@ -1,74 +0,0 @@
-require 'test/unit'
-require 'thread'
-if RUBY_PLATFORM != "java"
-  $:.unshift File.expand_path( File.join( File.dirname( __FILE__ ), "../ext/fastthread" ) )
-  require 'fastthread'
-end
-
-class TestMutex < Test::Unit::TestCase
-  def self.mutex_test( name, &body )
-    define_method( "test_#{ name }" ) do
-      body.call( self, Mutex.new, "" )
-    end
-    # at one time we also tested Mutex_m here, but it's no longer
-    # part of fastthread
-  end
-
-  mutex_test( :locked_p ) do |test, m, prefix|
-    test.instance_eval do
-      assert_equal false, m.send( "#{ prefix }locked?" )
-      m.send "#{ prefix }lock"
-      assert_equal true, m.send( "#{ prefix }locked?" )
-      m.send "#{ prefix }unlock"
-      assert_equal false, m.send( "#{ prefix }locked?" )
-    end
-  end
-
-  mutex_test( :synchronize ) do |test, m, prefix|
-    test.instance_eval do
-      assert !m.send( "#{ prefix }locked?" )
-      m.send "#{ prefix }synchronize" do
-        assert m.send( "#{ prefix }locked?" )
-      end
-      assert !m.send( "#{ prefix }locked?" )
-    end
-  end
-
-  mutex_test( :synchronize_exception ) do |test, m, prefix|
-    test.instance_eval do
-      assert !m.send( "#{ prefix }locked?" )
-      assert_raise ArgumentError do
-        m.send "#{ prefix }synchronize" do
-          assert m.send( "#{ prefix }locked?" )
-          raise ArgumentError
-        end
-      end
-      assert !m.send( "#{ prefix }locked?" )
-    end
-  end
-
-  mutex_test( :mutual_exclusion ) do |test, m, prefix|
-    test.instance_eval do
-      s = ""
-
-      ("a".."c").map do |c|
-        Thread.new do
-          Thread.pass
-          5.times do
-            m.send "#{ prefix }synchronize" do
-              s << c
-              Thread.pass
-              s << c
-            end
-          end
-        end
-      end.each do |thread|
-        thread.join
-      end
-
-      assert_equal 30, s.length
-      assert s.match( /^(aa|bb|cc)+$/ )
-    end
-  end
-end
-
diff --git a/projects/fastthread/test/test_queue.rb b/projects/fastthread/test/test_queue.rb
deleted file mode 100644
index 70a2c86..0000000
--- a/projects/fastthread/test/test_queue.rb
+++ /dev/null
@@ -1,79 +0,0 @@
-require 'test/unit'
-require 'thread'
-if RUBY_PLATFORM != "java"
-  $:.unshift File.expand_path( File.join( File.dirname( __FILE__ ), "../ext/fastthread" ) )
-  require 'fastthread'
-end
-
-class TestQueue < Test::Unit::TestCase
-  def check_sequence( q )
-    range = "a".."f"
-
-    s = ""
-    e = nil
-
-    t = Thread.new do
-      begin
-        for c in range
-          q.push c
-          s << c
-          Thread.pass
-        end
-      rescue Exception => e
-      end
-    end
-
-    for c in range
-      unless t.alive?
-        raise e if e
-        assert_equal range.to_a.join, s, "expected all values pushed"
-      end
-      x = q.shift
-      assert_equal c, x, "sequence error: expected #{ c } but got #{ x }"
-    end
-  end
-
-  def test_queue
-    check_sequence( Queue.new )
-  end
-
-  def test_sized_queue_full
-    check_sequence( SizedQueue.new( 6 ) )
-  end
-
-  def test_sized_queue_half
-    check_sequence( SizedQueue.new( 3 ) )
-  end
-
-  def test_sized_queue_one
-    check_sequence( SizedQueue.new( 1 ) )
-  end
-
-  def check_serialization( k, *args )
-    q1 = k.new *args
-    %w(a b c d e f).each { |c| q1.push c }
-    q2 = Marshal.load(Marshal.dump(q1))
-    assert( ( q1.size == q2.size ), "queues are same size" )
-    q1.size.times do
-      assert( ( q1.pop == q2.pop ), "same data" )
-    end
-    [ q1, q2 ]
-  end
-
-  def test_queue_serialization
-    check_serialization Queue
-  end
-
-  def test_sized_queue_serialization
-    (q1, q2) = check_serialization SizedQueue, 20
-    assert( ( q1.max == q2.max ), "maximum sizes equal" )
-  end
-
-  def test_sized_queue_size
-    q = SizedQueue.new 3
-    assert_equal 3, q.max, "queue has expected max (3)"
-    q.max = 5
-    assert_equal 5, q.max, "queue has expected max (5)"
-  end
-end
-
diff --git a/projects/gem_plugin/CHANGELOG b/projects/gem_plugin/CHANGELOG
deleted file mode 100644
index cf39b5b..0000000
--- a/projects/gem_plugin/CHANGELOG
+++ /dev/null
@@ -1,4 +0,0 @@
-
-v0.3. Use Gem.path, not Gem.dir, so that local gem repositories work (rooster).
-
-v0.2.3. Signed gem.
diff --git a/projects/gem_plugin/COPYING b/projects/gem_plugin/COPYING
deleted file mode 100644
index b1e3f5a..0000000
--- a/projects/gem_plugin/COPYING
+++ /dev/null
@@ -1,504 +0,0 @@
-                  GNU LESSER GENERAL PUBLIC LICENSE
-                       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-                            Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-                  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-  
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-                            NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-                     END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
-
diff --git a/projects/gem_plugin/LICENSE b/projects/gem_plugin/LICENSE
deleted file mode 100644
index e5a926e..0000000
--- a/projects/gem_plugin/LICENSE
+++ /dev/null
@@ -1,55 +0,0 @@
-Mongrel Web Server (Mongrel) is copyrighted free software by Zed A. Shaw
-<zedshaw at zedshaw dot com> and contributors. You can redistribute it
-and/or modify it under either the terms of the GPL2 or the conditions below:
-
-1. You may make and give away verbatim copies of the source form of the
-   software without restriction, provided that you duplicate all of the
-   original copyright notices and associated disclaimers.
-
-2. You may modify your copy of the software in any way, provided that
-   you do at least ONE of the following:
-
-     a) place your modifications in the Public Domain or otherwise make them
-     Freely Available, such as by posting said modifications to Usenet or an
-     equivalent medium, or by allowing the author to include your
-     modifications in the software.
-
-     b) use the modified software only within your corporation or
-        organization.
-
-     c) rename any non-standard executables so the names do not conflict with
-     standard executables, which must also be provided.
-
-     d) make other distribution arrangements with the author.
-
-3. You may distribute the software in object code or executable
-   form, provided that you do at least ONE of the following:
-
-     a) distribute the executables and library files of the software,
-     together with instructions (in the manual page or equivalent) on where
-     to get the original distribution.
-
-     b) accompany the distribution with the machine-readable source of the
-     software.
-
-     c) give non-standard executables non-standard names, with
-        instructions on where to get the original software distribution.
-
-     d) make other distribution arrangements with the author.
-
-4. You may modify and include the part of the software into any other
-   software (possibly commercial).  But some files in the distribution
-   are not written by the author, so that they are not under this terms.
-
-5. The scripts and library files supplied as input to or produced as
-   output from the software do not automatically fall under the
-   copyright of the software, but belong to whomever generated them,
-   and may be sold commercially, and may be aggregated with this
-   software.
-
-6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
-   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-   PURPOSE.
-
-
diff --git a/projects/gem_plugin/Manifest b/projects/gem_plugin/Manifest
deleted file mode 100644
index f669084..0000000
--- a/projects/gem_plugin/Manifest
+++ /dev/null
@@ -1,15 +0,0 @@
-test/test_plugins.rb
-setup.rb
-resources/resources/defaults.yaml
-resources/README
-resources/Rakefile
-resources/LICENSE
-resources/lib/project/init.rb
-resources/COPYING
-README
-Manifest
-LICENSE
-lib/gem_plugin.rb
-COPYING
-CHANGELOG
-bin/gpgen
diff --git a/projects/gem_plugin/README b/projects/gem_plugin/README
deleted file mode 100644
index b4c87f7..0000000
--- a/projects/gem_plugin/README
+++ /dev/null
@@ -1,115 +0,0 @@
-= GemPlugin:  Gem Based Plugin System
-
-GemPlugin is a system that lets your users install gems and lets you load
-them as additional features to use in your software.  It originated from the
-Mongrel (http://mongrel.rubyforge.org) project but proved useful enough to
-break out into a separate project.
-
-GemPlugin works by listing the gems installed, and doing a require_gem on
-any that have the right dependencies.  For example, if a gem depends on
-"gem_plugin" and "mongrel" then it'll load as a Mongrel plugin.  This
-makes it so that users of the plugins only need to gem install (and maybe
-config a bit), and plugin authors only need to make gems.
-
-
-== Implementers
-
-To use GemPlugin in your system you only have to require 'gem_plugin' and
-then use the GemPlugin::Manager.create, GemPlugin::Manager.load, and
-GemPlugin::Manager.available methods to work with them.
-
-* GemPlugin::Manager.load -- Takes a "depend include/exclude map" and loads plugins based on it.
-* GemPlugin::Manager.create -- Takes a URI style name and some options then creates one for you.
-* GemPlugin::Manager.available -- Lets you inspect and mess with the internal plugin registry.
-
-=== Loading Plugins
-
-As an example from Mongrel it's necessary to load plugins that depend on rails after
-the Rails system is configured, but load other plugins right when Mongrel is ready.
-To do this we very first do:
-
- GemPlugin::Manager.instance.load "mongrel" => GemPlugin::INCLUDE, "rails" => GemPlugin::EXCLUDE
-
-Later, when it's ready to load Rails plugins as well we do this:
-
- GemPlugin::Manager.instance.load "mongrel" => GemPlugin::INCLUDE
-
-This simply loads any plugins that remain and are ready for use in Rails.
-
-=== Creating Plugins
-
-Creating a plugin is cake:
-
- plug = GemPlugin::Manager.instance.create("/commands/snazzy", "something" => "yeah")
-
-In this case we're making the snazzy command and passing a couple fake options.
-
-=== Finding Available Plugins
-
-Finding plugins is also very easy, you just call GemPlugin::Manager.instance.available
-and you get a Hash that maps categories to name => class.  For example, if I had
-the "/commands/snazzy" plugin registered above, then I'd get the following:
-
- puts GemPlugin::Manager.instance.available["/commands"].inspect
- -> { "/snazzy" => Snazzy}
-
-
-=== Plugins Inside Modules
-
-Plugins that are placed in modules are also lowercased when registered but
-still retain their module.  So, if Snazzy was actually MyModule::Snazzy, then
-it'd be registered as "/commands/mymodule::snazzy".
-
-
-== Plugin Authors
-
-People who wish to write gem plugins have a faily easy time of it, but need
-to know the particular rules for the target system.  To keep this example
-concrete we'll assume you want to write a Mongrel command plugin.
-
-First thing is create your project like normal and setup Rake to make
-your gem.  Your plugin then needs to be created like so:
-
- class Snazzy < GemPlugin::Plugin "/commands"
-    ...
- end
-
-And place this code in a file you will have RubyGems autorequire (I use lib/init.rb).
-
-Next you need to add the following to whatever Rakefile code you use to create
-your gem:
-
- spec.add_dependency('gem_plugin', '>= 0.1')
- spec.add_dependency('mongrel', '>= 0.3.9')
- spec.autorequire = 'init.rb'
-
-This does three things:
-
-* Tells GemPlugins::Manager.load that this is a GemPlugin.
-* Tells Mongrel that this is a Mongrel specific GemPlugin.
-* Tells RubyGems to run init.rb when the gem is required, just hooking up your plugin.
-
-Now, all the users of your plugin have to do is gem install it and then
-they get the plugin automagically.
-
-People writing GemPlugins for other systems would have to check the
-documentation from that project to get an idea of what extra
-requirements might be needed.  For example, you'd probably have to
-depend on another project other that *mongrel* and most likely have
-a few more things to configure in your init.rb.
-
-== Plugin Users
-
-Plugin users have it the easiest of all.  They simply do:
-
- gem install mongrel_command_snazzy
-
-And that's it.  When they run mongrel_rails (given the above example)
-this snazzy command get loaded automatically without any intervention.
-
-The only thing missing in this release is a way for end users to configure
-such a plugin.  I really think this is the job of the implementers to define.
-
-== Contact
-
-E-mail zedshaw at zedshaw.com and I'll help.  Comments about the API are welcome.
diff --git a/projects/gem_plugin/Rakefile b/projects/gem_plugin/Rakefile
deleted file mode 100644
index b312bfe..0000000
--- a/projects/gem_plugin/Rakefile
+++ /dev/null
@@ -1,28 +0,0 @@
-
-require 'rubygems'
-gem 'echoe', '>=2.7.11'
-require 'echoe'
-
-Echoe.new("gem_plugin") do |p|
-  p.author= "Zed A. Shaw"
-  p.email = "mongrel-development@rubyforge.org"
-  p.project = "mongrel"
-  p.summary = "A plugin system based on rubygems that uses dependencies only"
-
-  p.need_tar_gz = false
-  p.need_tgz = true
-  p.require_signed = true
-  p.certificate_chain = ['/Users/eweaver/p/configuration/gem_certificates/mongrel/mongrel-public_cert.pem',
-    '/Users/eweaver/p/configuration/gem_certificates/evan_weaver-mongrel-public_cert.pem']    
-  
-  p.test_pattern = "test/test_plugins.rb"
-  p.clean_pattern += ["pkg", "lib/*.bundle", "*.gem", ".config"]
-  p.rdoc_pattern = ['README', 'LICENSE', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc']
-  p.rdoc_template = `#{Platform.windows? ? 'allison.bat' : 'allison'} --path`.chomp  
-end
-
-namespace :site do
-  task :rdoc => [:doc] do
-    sh "rsync -azv --no-perms --no-times  doc/* rubyforge.org:/var/www/gforge-projects/mongrel/gem_plugin_rdoc/"
-  end
-end \ No newline at end of file
diff --git a/projects/gem_plugin/bin/gpgen b/projects/gem_plugin/bin/gpgen
deleted file mode 100755
index db77bfd..0000000
--- a/projects/gem_plugin/bin/gpgen
+++ /dev/null
@@ -1,60 +0,0 @@
-require 'erb'
-require 'fileutils'
-include FileUtils
-
-if ARGV.length != 1
-  STDERR.puts "ERROR: You must give a name for your plugin and directory."
-  STDERR.puts "usage:  gpgen name"
-  STDERR.puts "example:  gpgen mygemplugin"
-  exit 1
-end
-
-# setup the required binding variables for erb processing later
-project = ARGV.shift
-gem_plugin_base = File.expand_path(File.join(File.dirname(__FILE__), ".."))
-resources = File.join(gem_plugin_base, "resources")
-gem_plugin_version = gem_plugin_base[gem_plugin_base.rindex("-")+1 .. -1]
-
-
-# make the dir if it don't exist
-if not File.exist? project
-  puts "Creating directory #{project}"
-  mkdir project
-else
-  puts "Directory #{project} exists, skipping."
-end
-
-
-# go through all the resource files, erb them, and write them verbatim to output
-# do not overwrite if exists already
-
-Dir.glob("#{resources}/**/*") do |infile|
-  outfile = File.join(project, infile[resources.length .. -1])
-  if File.exist? outfile
-    puts "File #{outfile} exists, skipping."
-  else
-    if File.directory? infile
-      puts "Creating directory #{outfile}"
-      mkdir_p outfile
-    elsif File.file? infile
-      puts "Creating file #{outfile}"
-      open(infile) do |content|
-        template = ERB.new(content.read)
-        open(outfile,"w") {|f| f.write(template.result(binding)) }
-      end
-    else
-      puts "!!! Resources contains something not a file or directory."
-      puts "Skipping #{infile}."
-    end
-  end
-end
-
-# Finally, move the base init.rb to the right dir
-init_file = File.join(project,"lib",project)
-if File.exist? init_file
-  puts "File init.rb already exists, skipping."
-  puts "WARNING:  There might be a junk '#{project}/lib/project/init.rb' file you can delete."
-else
-  puts "Creating proper '#{project}/lib/#{project}/init.rb' file"
-  mv File.join(project,"lib","project"), init_file
-end
diff --git a/projects/gem_plugin/lib/gem_plugin.rb b/projects/gem_plugin/lib/gem_plugin.rb
deleted file mode 100644
index 782a990..0000000
--- a/projects/gem_plugin/lib/gem_plugin.rb
+++ /dev/null
@@ -1,297 +0,0 @@
-require 'singleton'
-require 'rubygems'
-
-# Implements a dynamic plugin loading, configuration, and discovery system
-# based on RubyGems and a simple additional name space that looks like a URI.
-#
-# A plugin is created and put into a category with the following code:
-#
-#  class MyThing < GemPlugin::Plugin "/things"
-#    ...
-#  end
-#
-# What this does is sets up your MyThing in the plugin registry via GemPlugin::Manager.
-# You can then later get this plugin with GemPlugin::Manager.create("/things/mything")
-# and can also pass in options as a second parameter.
-#
-# This isn't such a big deal, but the power is really from the GemPlugin::Manager.load
-# method.  This method will go through the installed gems and require_gem any
-# that depend on the gem_plugin RubyGem.  You can arbitrarily include or exclude
-# gems based on what they also depend on, thus letting you load these gems when appropriate.
-#
-# Since this system was written originally for the Mongrel project that'll be the
-# best example of using it.
-#
-# Imagine you have a neat plugin for Mongrel called snazzy_command that gives the
-# mongrel_rails a new command snazzy (like:  mongrel_rails snazzy).  You'd like
-# people to be able to grab this plugin if they want and use it, because it's snazzy.
-#
-# First thing you do is create a gem of your project and make sure that it depends
-# on "mongrel" AND "gem_plugin".  This signals to the GemPlugin system that this is
-# a plugin for mongrel.
-#
-# Next you put this code into a file like lib/init.rb (can be anything really):
-#
-#  class Snazzy < GemPlugin::Plugin "/commands"
-#    ...
-#  end
-#  
-# Then when you create your gem you have the following bits in your Rakefile:
-#
-#  spec.add_dependency('mongrel', '>= 0.3.9')
-#  spec.add_dependency('gem_plugin', '>= 0.1')
-#  spec.autorequire = 'init.rb'
-#
-# Finally, you just have to now publish this gem for people to install and Mongrel
-# will "magically" be able to install it.
-#
-# The "magic" part though is pretty simple and done via the GemPlugin::Manager.load
-# method.  Read that to see how it is really done.
-module GemPlugin
-
-  EXCLUDE = true
-  INCLUDE = false
-
-  class PluginNotLoaded < StandardError; end
-
-  
-  # This class is used by people who use gem plugins (but don't necessarily make them)
-  # to add plugins to their own systems.  It provides a way to load plugins, list them,
-  # and create them as needed.
-  #
-  # It is a singleton so you use like this:  GemPlugins::Manager.instance.load
-  class Manager
-    include Singleton
-    attr_reader :plugins
-    attr_reader :gems
-    
-
-    def initialize
-      # plugins that have been loaded
-      @plugins = {}
-
-      # keeps track of gems which have been loaded already by the manager *and*
-      # where they came from so that they can be referenced later
-      @gems = {}
-    end
-
-
-    # Responsible for going through the list of available gems and loading
-    # any plugins requested.  It keeps track of what it's loaded already
-    # and won't load them again.
-    #
-    # It accepts one parameter which is a hash of gem depends that should include
-    # or exclude a gem from being loaded.  A gem must depend on gem_plugin to be
-    # considered, but then each system has to add it's own INCLUDE to make sure
-    # that only plugins related to it are loaded.
-    #
-    # An example again comes from Mongrel.  In order to load all Mongrel plugins:
-    #
-    #  GemPlugin::Manager.instance.load "mongrel" => GemPlugin::INCLUDE
-    #
-    # Which will load all plugins that depend on mongrel AND gem_plugin.  Now, one
-    # extra thing we do is we delay loading Rails Mongrel plugins until after rails
-    # is configured.  Do do this the mongrel_rails script has:
-    #
-    # GemPlugin::Manager.instance.load "mongrel" => GemPlugin::INCLUDE, "rails" => GemPlugin::EXCLUDE
-    # The only thing to remember is that this is saying "include a plugin if it
-    # depends on gem_plugin, mongrel, but NOT rails".  If a plugin also depends on other
-    # stuff then it's loaded just fine.  Only gem_plugin, mongrel, and rails are
-    # ever used to determine if it should be included.
-    #
-    # NOTE: Currently RubyGems will run autorequire on gems that get required AND
-    # on their dependencies.  This really messes with people running edge rails
-    # since activerecord or other stuff gets loaded for just touching a gem plugin.
-    # To prevent this load requires the full path to the "init.rb" file, which
-    # avoids the RubyGems autorequire magic.
-    def load(needs = {})
-      sdirs = Gem::SourceIndex.installed_spec_directories
-      gems = Gem::SourceIndex.from_gems_in(sdirs)
-      needs = needs.merge({"gem_plugin" => INCLUDE})
-      
-      gems.each do |path, gem|
-        # don't load gems more than once
-        next if @gems.has_key? gem.name        
-        check = needs.dup
-
-        # rolls through the depends and inverts anything it finds
-        gem.dependencies.each do |dep|
-          # this will fail if a gem is depended more than once
-          if check.has_key? dep.name
-            check[dep.name] = !check[dep.name]
-          end
-        end
-        
-        # now since excluded gems start as true, inverting them
-        # makes them false so we'll skip this gem if any excludes are found
-        if (check.select {|name,test| !test}).length == 0
-          # looks like no needs were set to false, so it's good
-          
-          # Previously was set wrong, we already have the correct gem path!
-          gem_dir = ""
-          Gem.path.each do |gem_path|
-            gem_dir = File.join(gem_path, "gems", path)
-            break if File.exist?(gem_dir)
-          end
-          
-          gem_init = File.join(gem_dir, "lib", gem.name, "init.rb")
-          if File.exist?(gem_init)
-            require gem_init
-            @gems[gem.name] = gem_dir
-          end
-        end
-      end
-
-      return nil
-    end
-
-
-    # Not necessary for you to call directly, but this is
-    # how GemPlugin::Base.inherited actually adds a
-    # plugin to a category.
-    def register(category, name, klass)
-      @plugins[category] ||= {}
-      @plugins[category][name.downcase] = klass
-    end
-  
-
-    # Resolves the given name (should include /category/name) to
-    # find the plugin class and create an instance.  You can
-    # pass a second hash option that is then given to the Plugin
-    # to configure it.
-    def create(name, options = {})
-      last_slash = name.rindex("/")
-      category = name[0 ... last_slash]
-      plugin = name[last_slash .. -1]
-
-      map = @plugins[category]
-      if not map
-        raise "Plugin category #{category} does not exist"
-      elsif not map.has_key? plugin
-        raise "Plugin #{plugin} does not exist in category #{category}"
-      else
-        map[plugin].new(options)
-      end
-    end
-    
-
-    # Simply says whether the given gem has been loaded yet or not.
-    def loaded?(gem_name)
-      @gems.has_key? gem_name
-    end
-
-
-    # GemPlugins can have a 'resources' directory which is packaged with them
-    # and can hold any data resources the plugin may need.  The main problem
-    # is that it's difficult to figure out where these resources are
-    # actually located on the file system.  The resource method tries to
-    # locate the real path for a given resource path.
-    #
-    # Let's say you have a 'resources/stylesheets/default.css' file in your
-    # gem distribution, then finding where this file really is involves:
-    #
-    #   Manager.instance.resource("mygem", "/stylesheets/default.css")
-    #
-    # You either get back the full path to the resource or you get a nil
-    # if it doesn't exist.
-    #
-    # If you request a path for a GemPlugin that hasn't been loaded yet
-    # then it will throw an PluginNotLoaded exception.  The gem may be
-    # present on your system in this case, but you just haven't loaded
-    # it with Manager.instance.load properly.
-    def resource(gem_name, path)
-      if not loaded? gem_name
-        raise PluginNotLoaded.new("Plugin #{gem_name} not loaded when getting resource #{path}")
-      end
-      
-      file = File.join(@gems[gem_name], "resources", path)
-
-      if File.exist? file
-        return file
-      else
-        return nil
-      end
-    end
-
-    
-    # While Manager.resource will find arbitrary resources, a special
-    # case is when you need to load a set of configuration defaults.
-    # GemPlugin normalizes this to be if you have a file "resources/defaults.yaml"
-    # then you'll be able to load them via Manager.config.
-    #
-    # How you use the method is you get the options the user wants set, pass
-    # them to Manager.instance.config, and what you get back is a new Hash
-    # with the user's settings overriding the defaults.
-    #
-    #   opts = Manager.instance.config "mygem", :age => 12, :max_load => .9
-    #
-    # In the above case, if defaults had {:age => 14} then it would be
-    # changed to 12.
-    #
-    # This loads the .yaml file on the fly every time, so doing it a
-    # whole lot is very stupid.  If you need to make frequent calls to
-    # this, call it once with no options (Manager.instance.config) then
-    # use the returned defaults directly from then on.
-    def config(gem_name, options={})
-      config_file = Manager.instance.resource(gem_name, "/defaults.yaml")
-      if config_file
-        begin
-          defaults = YAML.load_file(config_file)
-          return defaults.merge(options)
-        rescue
-          raise "Error loading config #{config_file} for gem #{gem_name}"
-        end
-      else
-        return options
-      end
-    end
-  end
-
-  # This base class for plugins really does nothing
-  # more than wire up the new class into the right category.
-  # It is not thread-safe yet but will be soon.
-  class Base
-    
-    attr_reader :options
-
-
-    # See Mongrel::Plugin for an explanation.
-    def Base.inherited(klass)
-      name = "/" + klass.to_s.downcase
-      Manager.instance.register(@@category, name, klass)
-      @@category = nil
-    end
-    
-    # See Mongrel::Plugin for an explanation.
-    def Base.category=(category)
-      @@category = category
-    end
-
-    def initialize(options = {})
-      @options = options
-    end
-
-  end
-  
-  # This nifty function works with the GemPlugin::Base to give you
-  # the syntax:
-  #
-  #  class MyThing < GemPlugin::Plugin "/things"
-  #    ...
-  #  end
-  #
-  # What it does is temporarily sets the GemPlugin::Base.category, and then
-  # returns GemPlugin::Base.  Since the next immediate thing Ruby does is
-  # use this returned class to create the new class, GemPlugin::Base.inherited
-  # gets called.  GemPlugin::Base.inherited then uses the set category, class name,
-  # and class to register the plugin in the right way.
-  def GemPlugin::Plugin(c)
-    Base.category = c
-    Base
-  end
-
-end
-
-
-
-
diff --git a/projects/gem_plugin/resources/COPYING b/projects/gem_plugin/resources/COPYING
deleted file mode 100644
index bff74f4..0000000
--- a/projects/gem_plugin/resources/COPYING
+++ /dev/null
@@ -1 +0,0 @@
-No copying restrictions/license given. \ No newline at end of file
diff --git a/projects/gem_plugin/resources/LICENSE b/projects/gem_plugin/resources/LICENSE
deleted file mode 100644
index 5ac4cab..0000000
--- a/projects/gem_plugin/resources/LICENSE
+++ /dev/null
@@ -1 +0,0 @@
-No license given. \ No newline at end of file
diff --git a/projects/gem_plugin/resources/README b/projects/gem_plugin/resources/README
deleted file mode 100644
index 6d354aa..0000000
--- a/projects/gem_plugin/resources/README
+++ /dev/null
@@ -1,5 +0,0 @@
-== <%= project.capitalize %> GemPlugin
-
-You should document your project here.
-
-
diff --git a/projects/gem_plugin/resources/Rakefile b/projects/gem_plugin/resources/Rakefile
deleted file mode 100644
index b42d198..0000000
--- a/projects/gem_plugin/resources/Rakefile
+++ /dev/null
@@ -1,61 +0,0 @@
-require 'rake'
-require 'rake/testtask'
-require 'rake/clean'
-require 'rake/gempackagetask'
-require 'rake/rdoctask'
-require 'fileutils'
-include FileUtils
-
-version="0.1"
-name="<%= project %>"
-
-spec = Gem::Specification.new do |s|
-  s.name = name
-  s.version = version
-  s.description = s.summary = "The <%= project %> GemPlugin"
-  s.author = "Nobody"
-  s.add_dependency('gem_plugin', '>= <%= gem_plugin_version %>')
-  
-  s.platform = Gem::Platform::RUBY
-  s.has_rdoc = true
-  s.extra_rdoc_files = ["README"]
-  
-  s.files = %w(COPYING LICENSE README Rakefile) +
-    Dir.glob("{bin,doc/rdoc,test,lib}/**/*") +
-    Dir.glob("ext/**/*.{h,c,rb}") +
-    Dir.glob("examples/**/*.rb") +
-    Dir.glob("tools/*.rb") +
-    Dir.glob("resources/**/*")
-  
-  s.require_path = "lib"
-  s.bindir = "bin"
-end
-
-Rake::GemPackageTask.new(spec) do |p|
-  p.need_tar = true if RUBY_PLATFORM !~ /mswin/
-end
-
-task :install => [:test, :package] do
-  sh %{sudo gem install pkg/#{name}-#{version}.gem}
-end
-
-task :uninstall => [:clean] do
-  sh %{sudo gem uninstall #{name}}
-end
-
-Rake::TestTask.new do |t|
-  t.libs << "test"
-  t.test_files = FileList['test/test*.rb']
-  t.verbose = true
-end
-
-Rake::RDocTask.new do |rdoc|
-  rdoc.rdoc_dir = 'doc/rdoc'
-  rdoc.options << '--line-numbers'
-  rdoc.rdoc_files.add ['README', 'LICENSE', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc']
-end
-
-task :default => [:test, :package]
-
-CLEAN.include ['build/*', '**/*.o', '**/*.so', '**/*.a', 'lib/*-*', '**/*.log', 'pkg', 'lib/*.bundle', '*.gem', '.config']
-
diff --git a/projects/gem_plugin/resources/lib/project/init.rb b/projects/gem_plugin/resources/lib/project/init.rb
deleted file mode 100644
index 7d6544a..0000000
--- a/projects/gem_plugin/resources/lib/project/init.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require 'gem_plugin'
-
-# give this class the name you want for your command <%= project %>
-class ChangeME < GemPlugin::Plugin "/somecategory"
-end
-
diff --git a/projects/gem_plugin/resources/resources/defaults.yaml b/projects/gem_plugin/resources/resources/defaults.yaml
deleted file mode 100644
index 10d2a47..0000000
--- a/projects/gem_plugin/resources/resources/defaults.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-:debug: false
diff --git a/projects/gem_plugin/setup.rb b/projects/gem_plugin/setup.rb
deleted file mode 100644
index 0807023..0000000
--- a/projects/gem_plugin/setup.rb
+++ /dev/null
@@ -1,1360 +0,0 @@
-#
-# setup.rb
-#
-# Copyright (c) 2000-2004 Minero Aoki
-#
-# This program is free software.
-# You can distribute/modify this program under the terms of
-# the GNU LGPL, Lesser General Public License version 2.1.
-#
-
-unless Enumerable.method_defined?(:map)   # Ruby 1.4.6
-  module Enumerable
-    alias map collect
-  end
-end
-
-unless File.respond_to?(:read)   # Ruby 1.6
-  def File.read(fname)
-    open(fname) {|f|
-      return f.read
-    }
-  end
-end
-
-def File.binread(fname)
-  open(fname, 'rb') {|f|
-    return f.read
-  }
-end
-
-# for corrupted windows stat(2)
-def File.dir?(path)
-  File.directory?((path[-1,1] == '/') ? path : path + '/')
-end
-
-
-class SetupError < StandardError; end
-
-def setup_rb_error(msg)
-  raise SetupError, msg
-end
-
-#
-# Config
-#
-
-if arg = ARGV.detect {|arg| /\A--rbconfig=/ =~ arg }
-  ARGV.delete(arg)
-  require arg.split(/=/, 2)[1]
-  $".push 'rbconfig.rb'
-else
-  require 'rbconfig'
-end
-
-def multipackage_install?
-  FileTest.directory?(File.dirname($0) + '/packages')
-end
-
-
-class ConfigItem
-  def initialize(name, template, default, desc)
-    @name = name.freeze
-    @template = template
-    @value = default
-    @default = default.dup.freeze
-    @description = desc
-  end
-
-  attr_reader :name
-  attr_reader :description
-
-  attr_accessor :default
-  alias help_default default
-
-  def help_opt
-    "--#{@name}=#{@template}"
-  end
-
-  def value
-    @value
-  end
-
-  def eval(table)
-    @value.gsub(%r<\$([^/]+)>) { table[$1] }
-  end
-
-  def set(val)
-    @value = check(val)
-  end
-
-  private
-
-  def check(val)
-    setup_rb_error "config: --#{name} requires argument" unless val
-    val
-  end
-end
-
-class BoolItem < ConfigItem
-  def config_type
-    'bool'
-  end
-
-  def help_opt
-    "--#{@name}"
-  end
-
-  private
-
-  def check(val)
-    return 'yes' unless val
-    unless /\A(y(es)?|n(o)?|t(rue)?|f(alse))\z/i =~ val
-      setup_rb_error "config: --#{@name} accepts only yes/no for argument"
-    end
-    (/\Ay(es)?|\At(rue)/i =~ value) ? 'yes' : 'no'
-  end
-end
-
-class PathItem < ConfigItem
-  def config_type
-    'path'
-  end
-
-  private
-
-  def check(path)
-    setup_rb_error "config: --#{@name} requires argument"  unless path
-    path[0,1] == '$' ? path : File.expand_path(path)
-  end
-end
-
-class ProgramItem < ConfigItem
-  def config_type
-    'program'
-  end
-end
-
-class SelectItem < ConfigItem
-  def initialize(name, template, default, desc)
-    super
-    @ok = template.split('/')
-  end
-
-  def config_type
-    'select'
-  end
-
-  private
-
-  def check(val)
-    unless @ok.include?(val.strip)
-      setup_rb_error "config: use --#{@name}=#{@template} (#{val})"
-    end
-    val.strip
-  end
-end
-
-class PackageSelectionItem < ConfigItem
-  def initialize(name, template, default, help_default, desc)
-    super name, template, default, desc
-    @help_default = help_default
-  end
-
-  attr_reader :help_default
-
-  def config_type
-    'package'
-  end
-
-  private
-
-  def check(val)
-    unless File.dir?("packages/#{val}")
-      setup_rb_error "config: no such package: #{val}"
-    end
-    val
-  end
-end
-
-class ConfigTable_class
-
-  def initialize(items)
-    @items = items
-    @table = {}
-    items.each do |i|
-      @table[i.name] = i
-    end
-    ALIASES.each do |ali, name|
-      @table[ali] = @table[name]
-    end
-  end
-
-  include Enumerable
-
-  def each(&block)
-    @items.each(&block)
-  end
-
-  def key?(name)
-    @table.key?(name)
-  end
-
-  def lookup(name)
-    @table[name] or raise ArgumentError, "no such config item: #{name}"
-  end
-
-  def add(item)
-    @items.push item
-    @table[item.name] = item
-  end
-
-  def remove(name)
-    item = lookup(name)
-    @items.delete_if {|i| i.name == name }
-    @table.delete_if {|name, i| i.name == name }
-    item
-  end
-
-  def new
-    dup()
-  end
-
-  def savefile
-    '.config'
-  end
-
-  def load
-    begin
-      t = dup()
-      File.foreach(savefile()) do |line|
-        k, v = *line.split(/=/, 2)
-        t[k] = v.strip
-      end
-      t
-    rescue Errno::ENOENT
-      setup_rb_error $!.message + "#{File.basename($0)} config first"
-    end
-  end
-
-  def save
-    @items.each {|i| i.value }
-    File.open(savefile(), 'w') {|f|
-      @items.each do |i|
-        f.printf "%s=%s\n", i.name, i.value if i.value
-      end
-    }
-  end
-
-  def [](key)
-    lookup(key).eval(self)
-  end
-
-  def []=(key, val)
-    lookup(key).set val
-  end
-
-end
-
-c = ::Config::CONFIG
-
-rubypath = c['bindir'] + '/' + c['ruby_install_name']
-
-major = c['MAJOR'].to_i
-minor = c['MINOR'].to_i
-teeny = c['TEENY'].to_i
-version = "#{major}.#{minor}"
-
-# ruby ver. >= 1.4.4?
-newpath_p = ((major >= 2) or
-             ((major == 1) and
-              ((minor >= 5) or
-               ((minor == 4) and (teeny >= 4)))))
-
-if c['rubylibdir']
-  # V < 1.6.3
-  _stdruby         = c['rubylibdir']
-  _siteruby        = c['sitedir']
-  _siterubyver     = c['sitelibdir']
-  _siterubyverarch = c['sitearchdir']
-elsif newpath_p
-  # 1.4.4 <= V <= 1.6.3
-  _stdruby         = "$prefix/lib/ruby/#{version}"
-  _siteruby        = c['sitedir']
-  _siterubyver     = "$siteruby/#{version}"
-  _siterubyverarch = "$siterubyver/#{c['arch']}"
-else
-  # V < 1.4.4
-  _stdruby         = "$prefix/lib/ruby/#{version}"
-  _siteruby        = "$prefix/lib/ruby/#{version}/site_ruby"
-  _siterubyver     = _siteruby
-  _siterubyverarch = "$siterubyver/#{c['arch']}"
-end
-libdir = '-* dummy libdir *-'
-stdruby = '-* dummy rubylibdir *-'
-siteruby = '-* dummy site_ruby *-'
-siterubyver = '-* dummy site_ruby version *-'
-parameterize = lambda {|path|
-  path.sub(/\A#{Regexp.quote(c['prefix'])}/, '$prefix')\
-      .sub(/\A#{Regexp.quote(libdir)}/,      '$libdir')\
-      .sub(/\A#{Regexp.quote(stdruby)}/,     '$stdruby')\
-      .sub(/\A#{Regexp.quote(siteruby)}/,    '$siteruby')\
-      .sub(/\A#{Regexp.quote(siterubyver)}/, '$siterubyver')
-}
-libdir          = parameterize.call(c['libdir'])
-stdruby         = parameterize.call(_stdruby)
-siteruby        = parameterize.call(_siteruby)
-siterubyver     = parameterize.call(_siterubyver)
-siterubyverarch = parameterize.call(_siterubyverarch)
-
-if arg = c['configure_args'].split.detect {|arg| /--with-make-prog=/ =~ arg }
-  makeprog = arg.sub(/'/, '').split(/=/, 2)[1]
-else
-  makeprog = 'make'
-end
-
-common_conf = [
-  PathItem.new('prefix', 'path', c['prefix'],
-               'path prefix of target environment'),
-  PathItem.new('bindir', 'path', parameterize.call(c['bindir']),
-               'the directory for commands'),
-  PathItem.new('libdir', 'path', libdir,
-               'the directory for libraries'),
-  PathItem.new('datadir', 'path', parameterize.call(c['datadir']),
-               'the directory for shared data'),
-  PathItem.new('mandir', 'path', parameterize.call(c['mandir']),
-               'the directory for man pages'),
-  PathItem.new('sysconfdir', 'path', parameterize.call(c['sysconfdir']),
-               'the directory for man pages'),
-  PathItem.new('stdruby', 'path', stdruby,
-               'the directory for standard ruby libraries'),
-  PathItem.new('siteruby', 'path', siteruby,
-      'the directory for version-independent aux ruby libraries'),
-  PathItem.new('siterubyver', 'path', siterubyver,
-               'the directory for aux ruby libraries'),
-  PathItem.new('siterubyverarch', 'path', siterubyverarch,
-               'the directory for aux ruby binaries'),
-  PathItem.new('rbdir', 'path', '$siterubyver',
-               'the directory for ruby scripts'),
-  PathItem.new('sodir', 'path', '$siterubyverarch',
-               'the directory for ruby extentions'),
-  PathItem.new('rubypath', 'path', rubypath,
-               'the path to set to #! line'),
-  ProgramItem.new('rubyprog', 'name', rubypath,
-                  'the ruby program using for installation'),
-  ProgramItem.new('makeprog', 'name', makeprog,
-                  'the make program to compile ruby extentions'),
-  SelectItem.new('shebang', 'all/ruby/never', 'ruby',
-                 'shebang line (#!) editing mode'),
-  BoolItem.new('without-ext', 'yes/no', 'no',
-               'does not compile/install ruby extentions')
-]
-class ConfigTable_class   # open again
-  ALIASES = {
-    'std-ruby'         => 'stdruby',
-    'site-ruby-common' => 'siteruby',     # For backward compatibility
-    'site-ruby'        => 'siterubyver',  # For backward compatibility
-    'bin-dir'          => 'bindir',
-    'bin-dir'          => 'bindir',
-    'rb-dir'           => 'rbdir',
-    'so-dir'           => 'sodir',
-    'data-dir'         => 'datadir',
-    'ruby-path'        => 'rubypath',
-    'ruby-prog'        => 'rubyprog',
-    'ruby'             => 'rubyprog',
-    'make-prog'        => 'makeprog',
-    'make'             => 'makeprog'
-  }
-end
-multipackage_conf = [
-  PackageSelectionItem.new('with', 'name,name...', '', 'ALL',
-                           'package names that you want to install'),
-  PackageSelectionItem.new('without', 'name,name...', '', 'NONE',
-                           'package names that you do not want to install')
-]
-if multipackage_install?
-  ConfigTable = ConfigTable_class.new(common_conf + multipackage_conf)
-else
-  ConfigTable = ConfigTable_class.new(common_conf)
-end
-
-
-module MetaConfigAPI
-
-  def eval_file_ifexist(fname)
-    instance_eval File.read(fname), fname, 1 if File.file?(fname)
-  end
-
-  def config_names
-    ConfigTable.map {|i| i.name }
-  end
-
-  def config?(name)
-    ConfigTable.key?(name)
-  end
-
-  def bool_config?(name)
-    ConfigTable.lookup(name).config_type == 'bool'
-  end
-
-  def path_config?(name)
-    ConfigTable.lookup(name).config_type == 'path'
-  end
-
-  def value_config?(name)
-    case ConfigTable.lookup(name).config_type
-    when 'bool', 'path'
-      true
-    else
-      false
-    end
-  end
-
-  def add_config(item)
-    ConfigTable.add item
-  end
-
-  def add_bool_config(name, default, desc)
-    ConfigTable.add BoolItem.new(name, 'yes/no', default ? 'yes' : 'no', desc)
-  end
-
-  def add_path_config(name, default, desc)
-    ConfigTable.add PathItem.new(name, 'path', default, desc)
-  end
-
-  def set_config_default(name, default)
-    ConfigTable.lookup(name).default = default
-  end
-
-  def remove_config(name)
-    ConfigTable.remove(name)
-  end
-
-end
-
-
-#
-# File Operations
-#
-
-module FileOperations
-
-  def mkdir_p(dirname, prefix = nil)
-    dirname = prefix + File.expand_path(dirname) if prefix
-    $stderr.puts "mkdir -p #{dirname}" if verbose?
-    return if no_harm?
-
-    # does not check '/'... it's too abnormal case
-    dirs = File.expand_path(dirname).split(%r<(?=/)>)
-    if /\A[a-z]:\z/i =~ dirs[0]
-      disk = dirs.shift
-      dirs[0] = disk + dirs[0]
-    end
-    dirs.each_index do |idx|
-      path = dirs[0..idx].join('')
-      Dir.mkdir path unless File.dir?(path)
-    end
-  end
-
-  def rm_f(fname)
-    $stderr.puts "rm -f #{fname}" if verbose?
-    return if no_harm?
-
-    if File.exist?(fname) or File.symlink?(fname)
-      File.chmod 0777, fname
-      File.unlink fname
-    end
-  end
-
-  def rm_rf(dn)
-    $stderr.puts "rm -rf #{dn}" if verbose?
-    return if no_harm?
-
-    Dir.chdir dn
-    Dir.foreach('.') do |fn|
-      next if fn == '.'
-      next if fn == '..'
-      if File.dir?(fn)
-        verbose_off {
-          rm_rf fn
-        }
-      else
-        verbose_off {
-          rm_f fn
-        }
-      end
-    end
-    Dir.chdir '..'
-    Dir.rmdir dn
-  end
-
-  def move_file(src, dest)
-    File.unlink dest if File.exist?(dest)
-    begin
-      File.rename src, dest
-    rescue
-      File.open(dest, 'wb') {|f| f.write File.binread(src) }
-      File.chmod File.stat(src).mode, dest
-      File.unlink src
-    end
-  end
-
-  def install(from, dest, mode, prefix = nil)
-    $stderr.puts "install #{from} #{dest}" if verbose?
-    return if no_harm?
-
-    realdest = prefix ? prefix + File.expand_path(dest) : dest
-    realdest = File.join(realdest, File.basename(from)) if File.dir?(realdest)
-    str = File.binread(from)
-    if diff?(str, realdest)
-      verbose_off {
-        rm_f realdest if File.exist?(realdest)
-      }
-      File.open(realdest, 'wb') {|f|
-        f.write str
-      }
-      File.chmod mode, realdest
-
-      File.open("#{objdir_root()}/InstalledFiles", 'a') {|f|
-        if prefix
-          f.puts realdest.sub(prefix, '')
-        else
-          f.puts realdest
-        end
-      }
-    end
-  end
-
-  def diff?(new_content, path)
-    return true unless File.exist?(path)
-    new_content != File.binread(path)
-  end
-
-  def command(str)
-    $stderr.puts str if verbose?
-    system str or raise RuntimeError, "'system #{str}' failed"
-  end
-
-  def ruby(str)
-    command config('rubyprog') + ' ' + str
-  end
-  
-  def make(task = '')
-    command config('makeprog') + ' ' + task
-  end
-
-  def extdir?(dir)
-    File.exist?(dir + '/MANIFEST')
-  end
-
-  def all_files_in(dirname)
-    Dir.open(dirname) {|d|
-      return d.select {|ent| File.file?("#{dirname}/#{ent}") }
-    }
-  end
-
-  REJECT_DIRS = %w(
-    CVS SCCS RCS CVS.adm .svn
-  )
-
-  def all_dirs_in(dirname)
-    Dir.open(dirname) {|d|
-      return d.select {|n| File.dir?("#{dirname}/#{n}") } - %w(. ..) - REJECT_DIRS
-    }
-  end
-
-end
-
-
-#
-# Main Installer
-#
-
-module HookUtils
-
-  def run_hook(name)
-    try_run_hook "#{curr_srcdir()}/#{name}" or
-    try_run_hook "#{curr_srcdir()}/#{name}.rb"
-  end
-
-  def try_run_hook(fname)
-    return false unless File.file?(fname)
-    begin
-      instance_eval File.read(fname), fname, 1
-    rescue
-      setup_rb_error "hook #{fname} failed:\n" + $!.message
-    end
-    true
-  end
-
-end
-
-
-module HookScriptAPI
-
-  def get_config(key)
-    @config[key]
-  end
-
-  alias config get_config
-
-  def set_config(key, val)
-    @config[key] = val
-  end
-
-  #
-  # srcdir/objdir (works only in the package directory)
-  #
-
-  #abstract srcdir_root
-  #abstract objdir_root
-  #abstract relpath
-
-  def curr_srcdir
-    "#{srcdir_root()}/#{relpath()}"
-  end
-
-  def curr_objdir
-    "#{objdir_root()}/#{relpath()}"
-  end
-
-  def srcfile(path)
-    "#{curr_srcdir()}/#{path}"
-  end
-
-  def srcexist?(path)
-    File.exist?(srcfile(path))
-  end
-
-  def srcdirectory?(path)
-    File.dir?(srcfile(path))
-  end
-  
-  def srcfile?(path)
-    File.file? srcfile(path)
-  end
-
-  def srcentries(path = '.')
-    Dir.open("#{curr_srcdir()}/#{path}") {|d|
-      return d.to_a - %w(. ..)
-    }
-  end
-
-  def srcfiles(path = '.')
-    srcentries(path).select {|fname|
-      File.file?(File.join(curr_srcdir(), path, fname))
-    }
-  end
-
-  def srcdirectories(path = '.')
-    srcentries(path).select {|fname|
-      File.dir?(File.join(curr_srcdir(), path, fname))
-    }
-  end
-
-end
-
-
-class ToplevelInstaller
-
-  Version   = '3.3.1'
-  Copyright = 'Copyright (c) 2000-2004 Minero Aoki'
-
-  TASKS = [
-    [ 'all',      'do config, setup, then install' ],
-    [ 'config',   'saves your configurations' ],
-    [ 'show',     'shows current configuration' ],
-    [ 'setup',    'compiles ruby extentions and others' ],
-    [ 'install',  'installs files' ],
-    [ 'clean',    "does `make clean' for each extention" ],
-    [ 'distclean',"does `make distclean' for each extention" ]
-  ]
-
-  def ToplevelInstaller.invoke
-    instance().invoke
-  end
-
-  @singleton = nil
-
-  def ToplevelInstaller.instance
-    @singleton ||= new(File.dirname($0))
-    @singleton
-  end
-
-  include MetaConfigAPI
-
-  def initialize(ardir_root)
-    @config = nil
-    @options = { 'verbose' => true }
-    @ardir = File.expand_path(ardir_root)
-  end
-
-  def inspect
-    "#<#{self.class} #{__id__()}>"
-  end
-
-  def invoke
-    run_metaconfigs
-    case task = parsearg_global()
-    when nil, 'all'
-      @config = load_config('config')
-      parsearg_config
-      init_installers
-      exec_config
-      exec_setup
-      exec_install
-    else
-      @config = load_config(task)
-      __send__ "parsearg_#{task}"
-      init_installers
-      __send__ "exec_#{task}"
-    end
-  end
-  
-  def run_metaconfigs
-    eval_file_ifexist "#{@ardir}/metaconfig"
-  end
-
-  def load_config(task)
-    case task
-    when 'config'
-      ConfigTable.new
-    when 'clean', 'distclean'
-      if File.exist?(ConfigTable.savefile)
-      then ConfigTable.load
-      else ConfigTable.new
-      end
-    else
-      ConfigTable.load
-    end
-  end
-
-  def init_installers
-    @installer = Installer.new(@config, @options, @ardir, File.expand_path('.'))
-  end
-
-  #
-  # Hook Script API bases
-  #
-
-  def srcdir_root
-    @ardir
-  end
-
-  def objdir_root
-    '.'
-  end
-
-  def relpath
-    '.'
-  end
-
-  #
-  # Option Parsing
-  #
-
-  def parsearg_global
-    valid_task = /\A(?:#{TASKS.map {|task,desc| task }.join '|'})\z/
-
-    while arg = ARGV.shift
-      case arg
-      when /\A\w+\z/
-        setup_rb_error "invalid task: #{arg}" unless valid_task =~ arg
-        return arg
-
-      when '-q', '--quiet'
-        @options['verbose'] = false
-
-      when       '--verbose'
-        @options['verbose'] = true
-
-      when '-h', '--help'
-        print_usage $stdout
-        exit 0
-
-      when '-v', '--version'
-        puts "#{File.basename($0)} version #{Version}"
-        exit 0
-      
-      when '--copyright'
-        puts Copyright
-        exit 0
-
-      else
-        setup_rb_error "unknown global option '#{arg}'"
-      end
-    end
-
-    nil
-  end
-
-
-  def parsearg_no_options
-    unless ARGV.empty?
-      setup_rb_error "#{task}:  unknown options: #{ARGV.join ' '}"
-    end
-  end
-
-  alias parsearg_show       parsearg_no_options
-  alias parsearg_setup      parsearg_no_options
-  alias parsearg_clean      parsearg_no_options
-  alias parsearg_distclean  parsearg_no_options
-
-  def parsearg_config
-    re = /\A--(#{ConfigTable.map {|i| i.name }.join('|')})(?:=(.*))?\z/
-    @options['config-opt'] = []
-
-    while i = ARGV.shift
-      if /\A--?\z/ =~ i
-        @options['config-opt'] = ARGV.dup
-        break
-      end
-      m = re.match(i)  or setup_rb_error "config: unknown option #{i}"
-      name, value = *m.to_a[1,2]
-      @config[name] = value
-    end
-  end
-
-  def parsearg_install
-    @options['no-harm'] = false
-    @options['install-prefix'] = ''
-    while a = ARGV.shift
-      case a
-      when /\A--no-harm\z/
-        @options['no-harm'] = true
-      when /\A--prefix=(.*)\z/
-        path = $1
-        path = File.expand_path(path) unless path[0,1] == '/'
-        @options['install-prefix'] = path
-      else
-        setup_rb_error "install: unknown option #{a}"
-      end
-    end
-  end
-
-  def print_usage(out)
-    out.puts 'Typical Installation Procedure:'
-    out.puts "  $ ruby #{File.basename $0} config"
-    out.puts "  $ ruby #{File.basename $0} setup"
-    out.puts "  # ruby #{File.basename $0} install (may require root privilege)"
-    out.puts
-    out.puts 'Detailed Usage:'
-    out.puts "  ruby #{File.basename $0} <global option>"
-    out.puts "  ruby #{File.basename $0} [<global options>] <task> [<task options>]"
-
-    fmt = "  %-24s %s\n"
-    out.puts
-    out.puts 'Global options:'
-    out.printf fmt, '-q,--quiet',   'suppress message outputs'
-    out.printf fmt, '   --verbose', 'output messages verbosely'
-    out.printf fmt, '-h,--help',    'print this message'
-    out.printf fmt, '-v,--version', 'print version and quit'
-    out.printf fmt, '   --copyright',  'print copyright and quit'
-    out.puts
-    out.puts 'Tasks:'
-    TASKS.each do |name, desc|
-      out.printf fmt, name, desc
-    end
-
-    fmt = "  %-24s %s [%s]\n"
-    out.puts
-    out.puts 'Options for CONFIG or ALL:'
-    ConfigTable.each do |item|
-      out.printf fmt, item.help_opt, item.description, item.help_default
-    end
-    out.printf fmt, '--rbconfig=path', 'rbconfig.rb to load',"running ruby's"
-    out.puts
-    out.puts 'Options for INSTALL:'
-    out.printf fmt, '--no-harm', 'only display what to do if given', 'off'
-    out.printf fmt, '--prefix=path',  'install path prefix', '$prefix'
-    out.puts
-  end
-
-  #
-  # Task Handlers
-  #
-
-  def exec_config
-    @installer.exec_config
-    @config.save   # must be final
-  end
-
-  def exec_setup
-    @installer.exec_setup
-  end
-
-  def exec_install
-    @installer.exec_install
-  end
-
-  def exec_show
-    ConfigTable.each do |i|
-      printf "%-20s %s\n", i.name, i.value
-    end
-  end
-
-  def exec_clean
-    @installer.exec_clean
-  end
-
-  def exec_distclean
-    @installer.exec_distclean
-  end
-
-end
-
-
-class ToplevelInstallerMulti < ToplevelInstaller
-
-  include HookUtils
-  include HookScriptAPI
-  include FileOperations
-
-  def initialize(ardir)
-    super
-    @packages = all_dirs_in("#{@ardir}/packages")
-    raise 'no package exists' if @packages.empty?
-  end
-
-  def run_metaconfigs
-    eval_file_ifexist "#{@ardir}/metaconfig"
-    @packages.each do |name|
-      eval_file_ifexist "#{@ardir}/packages/#{name}/metaconfig"
-    end
-  end
-
-  def init_installers
-    @installers = {}
-    @packages.each do |pack|
-      @installers[pack] = Installer.new(@config, @options,
-                                       "#{@ardir}/packages/#{pack}",
-                                       "packages/#{pack}")
-    end
-
-    with    = extract_selection(config('with'))
-    without = extract_selection(config('without'))
-    @selected = @installers.keys.select {|name|
-                  (with.empty? or with.include?(name)) \
-                      and not without.include?(name)
-                }
-  end
-
-  def extract_selection(list)
-    a = list.split(/,/)
-    a.each do |name|
-      setup_rb_error "no such package: #{name}"  unless @installers.key?(name)
-    end
-    a
-  end
-
-  def print_usage(f)
-    super
-    f.puts 'Inluded packages:'
-    f.puts '  ' + @packages.sort.join(' ')
-    f.puts
-  end
-
-  #
-  # multi-package metaconfig API
-  #
-
-  attr_reader :packages
-
-  def declare_packages(list)
-    raise 'package list is empty' if list.empty?
-    list.each do |name|
-      raise "directory packages/#{name} does not exist"\
-              unless File.dir?("#{@ardir}/packages/#{name}")
-    end
-    @packages = list
-  end
-
-  #
-  # Task Handlers
-  #
-
-  def exec_config
-    run_hook 'pre-config'
-    each_selected_installers {|inst| inst.exec_config }
-    run_hook 'post-config'
-    @config.save   # must be final
-  end
-
-  def exec_setup
-    run_hook 'pre-setup'
-    each_selected_installers {|inst| inst.exec_setup }
-    run_hook 'post-setup'
-  end
-
-  def exec_install
-    run_hook 'pre-install'
-    each_selected_installers {|inst| inst.exec_install }
-    run_hook 'post-install'
-  end
-
-  def exec_clean
-    rm_f ConfigTable.savefile
-    run_hook 'pre-clean'
-    each_selected_installers {|inst| inst.exec_clean }
-    run_hook 'post-clean'
-  end
-
-  def exec_distclean
-    rm_f ConfigTable.savefile
-    run_hook 'pre-distclean'
-    each_selected_installers {|inst| inst.exec_distclean }
-    run_hook 'post-distclean'
-  end
-
-  #
-  # lib
-  #
-
-  def each_selected_installers
-    Dir.mkdir 'packages' unless File.dir?('packages')
-    @selected.each do |pack|
-      $stderr.puts "Processing the package `#{pack}' ..." if @options['verbose']
-      Dir.mkdir "packages/#{pack}" unless File.dir?("packages/#{pack}")
-      Dir.chdir "packages/#{pack}"
-      yield @installers[pack]
-      Dir.chdir '../..'
-    end
-  end
-
-  def verbose?
-    @options['verbose']
-  end
-
-  def no_harm?
-    @options['no-harm']
-  end
-
-end
-
-
-class Installer
-
-  FILETYPES = %w( bin lib ext data )
-
-  include HookScriptAPI
-  include HookUtils
-  include FileOperations
-
-  def initialize(config, opt, srcroot, objroot)
-    @config = config
-    @options = opt
-    @srcdir = File.expand_path(srcroot)
-    @objdir = File.expand_path(objroot)
-    @currdir = '.'
-  end
-
-  def inspect
-    "#<#{self.class} #{File.basename(@srcdir)}>"
-  end
-
-  #
-  # Hook Script API base methods
-  #
-
-  def srcdir_root
-    @srcdir
-  end
-
-  def objdir_root
-    @objdir
-  end
-
-  def relpath
-    @currdir
-  end
-
-  #
-  # configs/options
-  #
-
-  def no_harm?
-    @options['no-harm']
-  end
-
-  def verbose?
-    @options['verbose']
-  end
-
-  def verbose_off
-    begin
-      save, @options['verbose'] = @options['verbose'], false
-      yield
-    ensure
-      @options['verbose'] = save
-    end
-  end
-
-  #
-  # TASK config
-  #
-
-  def exec_config
-    exec_task_traverse 'config'
-  end
-
-  def config_dir_bin(rel)
-  end
-
-  def config_dir_lib(rel)
-  end
-
-  def config_dir_ext(rel)
-    extconf if extdir?(curr_srcdir())
-  end
-
-  def extconf
-    opt = @options['config-opt'].join(' ')
-    command "#{config('rubyprog')} #{curr_srcdir()}/extconf.rb #{opt}"
-  end
-
-  def config_dir_data(rel)
-  end
-
-  #
-  # TASK setup
-  #
-
-  def exec_setup
-    exec_task_traverse 'setup'
-  end
-
-  def setup_dir_bin(rel)
-    all_files_in(curr_srcdir()).each do |fname|
-      adjust_shebang "#{curr_srcdir()}/#{fname}"
-    end
-  end
-
-  def adjust_shebang(path)
-    return if no_harm?
-    tmpfile = File.basename(path) + '.tmp'
-    begin
-      File.open(path, 'rb') {|r|
-        first = r.gets
-        return unless File.basename(config('rubypath')) == 'ruby'
-        return unless File.basename(first.sub(/\A\#!/, '').split[0]) == 'ruby'
-        $stderr.puts "adjusting shebang: #{File.basename(path)}" if verbose?
-        File.open(tmpfile, 'wb') {|w|
-          w.print first.sub(/\A\#!\s*\S+/, '#! ' + config('rubypath'))
-          w.write r.read
-        }
-        move_file tmpfile, File.basename(path)
-      }
-    ensure
-      File.unlink tmpfile if File.exist?(tmpfile)
-    end
-  end
-
-  def setup_dir_lib(rel)
-  end
-
-  def setup_dir_ext(rel)
-    make if extdir?(curr_srcdir())
-  end
-
-  def setup_dir_data(rel)
-  end
-
-  #
-  # TASK install
-  #
-
-  def exec_install
-    rm_f 'InstalledFiles'
-    exec_task_traverse 'install'
-  end
-
-  def install_dir_bin(rel)
-    install_files collect_filenames_auto(), "#{config('bindir')}/#{rel}", 0755
-  end
-
-  def install_dir_lib(rel)
-    install_files ruby_scripts(), "#{config('rbdir')}/#{rel}", 0644
-  end
-
-  def install_dir_ext(rel)
-    return unless extdir?(curr_srcdir())
-    install_files ruby_extentions('.'),
-                  "#{config('sodir')}/#{File.dirname(rel)}",
-                  0555
-  end
-
-  def install_dir_data(rel)
-    install_files collect_filenames_auto(), "#{config('datadir')}/#{rel}", 0644
-  end
-
-  def install_files(list, dest, mode)
-    mkdir_p dest, @options['install-prefix']
-    list.each do |fname|
-      install fname, dest, mode, @options['install-prefix']
-    end
-  end
-
-  def ruby_scripts
-    collect_filenames_auto().select {|n| /\.rb\z/ =~ n }
-  end
-  
-  # picked up many entries from cvs-1.11.1/src/ignore.c
-  reject_patterns = %w(
-    core RCSLOG tags TAGS .make.state
-    .nse_depinfo #* .#* cvslog.* ,* .del-* *.olb
-    *~ *.old *.bak *.BAK *.orig *.rej _$* *$
-
-    *.org *.in .*
-  )
-  mapping = {
-    '.' => '\.',
-    '$' => '\$',
-    '#' => '\#',
-    '*' => '.*'
-  }
-  REJECT_PATTERNS = Regexp.new('\A(?:' +
-                               reject_patterns.map {|pat|
-                                 pat.gsub(/[\.\$\#\*]/) {|ch| mapping[ch] }
-                               }.join('|') +
-                               ')\z')
-
-  def collect_filenames_auto
-    mapdir((existfiles() - hookfiles()).reject {|fname|
-             REJECT_PATTERNS =~ fname
-           })
-  end
-
-  def existfiles
-    all_files_in(curr_srcdir()) | all_files_in('.')
-  end
-
-  def hookfiles
-    %w( pre-%s post-%s pre-%s.rb post-%s.rb ).map {|fmt|
-      %w( config setup install clean ).map {|t| sprintf(fmt, t) }
-    }.flatten
-  end
-
-  def mapdir(filelist)
-    filelist.map {|fname|
-      if File.exist?(fname)   # objdir
-        fname
-      else                    # srcdir
-        File.join(curr_srcdir(), fname)
-      end
-    }
-  end
-
-  def ruby_extentions(dir)
-    Dir.open(dir) {|d|
-      ents = d.select {|fname| /\.#{::Config::CONFIG['DLEXT']}\z/ =~ fname }
-      if ents.empty?
-        setup_rb_error "no ruby extention exists: 'ruby #{$0} setup' first"
-      end
-      return ents
-    }
-  end
-
-  #
-  # TASK clean
-  #
-
-  def exec_clean
-    exec_task_traverse 'clean'
-    rm_f ConfigTable.savefile
-    rm_f 'InstalledFiles'
-  end
-
-  def clean_dir_bin(rel)
-  end
-
-  def clean_dir_lib(rel)
-  end
-
-  def clean_dir_ext(rel)
-    return unless extdir?(curr_srcdir())
-    make 'clean' if File.file?('Makefile')
-  end
-
-  def clean_dir_data(rel)
-  end
-
-  #
-  # TASK distclean
-  #
-
-  def exec_distclean
-    exec_task_traverse 'distclean'
-    rm_f ConfigTable.savefile
-    rm_f 'InstalledFiles'
-  end
-
-  def distclean_dir_bin(rel)
-  end
-
-  def distclean_dir_lib(rel)
-  end
-
-  def distclean_dir_ext(rel)
-    return unless extdir?(curr_srcdir())
-    make 'distclean' if File.file?('Makefile')
-  end
-
-  #
-  # lib
-  #
-
-  def exec_task_traverse(task)
-    run_hook "pre-#{task}"
-    FILETYPES.each do |type|
-      if config('without-ext') == 'yes' and type == 'ext'
-        $stderr.puts 'skipping ext/* by user option' if verbose?
-        next
-      end
-      traverse task, type, "#{task}_dir_#{type}"
-    end
-    run_hook "post-#{task}"
-  end
-
-  def traverse(task, rel, mid)
-    dive_into(rel) {
-      run_hook "pre-#{task}"
-      __send__ mid, rel.sub(%r[\A.*?(?:/|\z)], '')
-      all_dirs_in(curr_srcdir()).each do |d|
-        traverse task, "#{rel}/#{d}", mid
-      end
-      run_hook "post-#{task}"
-    }
-  end
-
-  def dive_into(rel)
-    return unless File.dir?("#{@srcdir}/#{rel}")
-
-    dir = File.basename(rel)
-    Dir.mkdir dir unless File.dir?(dir)
-    prevdir = Dir.pwd
-    Dir.chdir dir
-    $stderr.puts '---> ' + rel if verbose?
-    @currdir = rel
-    yield
-    Dir.chdir prevdir
-    $stderr.puts '<--- ' + rel if verbose?
-    @currdir = File.dirname(rel)
-  end
-
-end
-
-
-if $0 == __FILE__
-  begin
-    if multipackage_install?
-      ToplevelInstallerMulti.invoke
-    else
-      ToplevelInstaller.invoke
-    end
-  rescue SetupError
-    raise if $DEBUG
-    $stderr.puts $!.message
-    $stderr.puts "Try 'ruby #{$0} --help' for detailed usage."
-    exit 1
-  end
-end
diff --git a/projects/gem_plugin/test/test_plugins.rb b/projects/gem_plugin/test/test_plugins.rb
deleted file mode 100644
index 7123d11..0000000
--- a/projects/gem_plugin/test/test_plugins.rb
+++ /dev/null
@@ -1,72 +0,0 @@
-require 'test/unit'
-require 'gem_plugin'
-
-include GemPlugin
-
-class ATestPlugin < GemPlugin::Plugin "/stuff"
-end
-
-class First < GemPlugin::Plugin "/commands"
-  def initialize(options = {})
-    puts "First with options: #{options.inspect}"
-  end
-end
-
-class Second < GemPlugin::Plugin "/commands"
-  def initialize(options = {})
-    puts "Second with options: #{options.inspect}"
-  end
-end
-
-class Last < GemPlugin::Plugin "/commands"
-  def initialize(options = {})
-    puts "Last with options: #{options.inspect}"
-  end
-end
-
-
-class PluginTest < Test::Unit::TestCase
-
-  def setup
-    @pmgr = Manager.instance
-    @pmgr.load({"rails" => EXCLUDE})
-    @categories = ["/commands"]
-    @names = ["/first", "/second", "/last", "/atestplugin"]
-  end
-
-  def test_load_plugins
-    puts "#{@pmgr.plugins.inspect}"
-    @pmgr.plugins.each {|cat,plugins|
-      plugins.each do |n,p|
-        puts "TEST: #{cat}#{n}"
-      end
-    }
-
-    @pmgr.load
-    @pmgr.plugins.each do |cat,plugins|
-      plugins.each do |n,p|
-        STDERR.puts "#{cat}#{n}"
-        plugin = @pmgr.create("#{cat}#{n}", options={"name" => p})
-      end
-    end
-  end
-
-  def test_similar_uris
-
-    @pmgr.register("/test", "/testme", ATestPlugin)
-    @pmgr.register("/test2", "/testme", ATestPlugin)
-
-    assert_equal @pmgr.create("/test/testme").class, ATestPlugin
-    assert_equal @pmgr.create("/test2/testme").class, ATestPlugin
-
-  end
-
-
-  def test_create
-    last = @pmgr.create("/commands/last", "test" => "stuff")
-    assert last != nil, "Didn't make the right plugin"
-    first = @pmgr.create("/commands/last")
-    assert first != nil, "Didn't make the right plugin"
-  end
-
-end
diff --git a/projects/mongrel_cluster/CHANGELOG b/projects/mongrel_cluster/CHANGELOG
deleted file mode 100644
index d860d6d..0000000
--- a/projects/mongrel_cluster/CHANGELOG
+++ /dev/null
@@ -1,6 +0,0 @@
-
-v1.0.5. Close #15406 (find_pid returning non-false) (Eden Li).
-
-v1.0.4. Actually ship the Cap 2 tasks; use an autorequire based on whether namespace() is available (Kevin Runde).
-
-v1.0.3. Signed gem.
diff --git a/projects/mongrel_cluster/COPYING b/projects/mongrel_cluster/COPYING
deleted file mode 100644
index d65793e..0000000
--- a/projects/mongrel_cluster/COPYING
+++ /dev/null
@@ -1,506 +0,0 @@
-Copyright (c) 2007 Bradley Taylor, bradley@fluxura.com
-
-                  GNU LESSER GENERAL PUBLIC LICENSE
-                       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-                            Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-                  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-  
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-                            NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-                     END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
-
diff --git a/projects/mongrel_cluster/LICENSE b/projects/mongrel_cluster/LICENSE
deleted file mode 100644
index e5a926e..0000000
--- a/projects/mongrel_cluster/LICENSE
+++ /dev/null
@@ -1,55 +0,0 @@
-Mongrel Web Server (Mongrel) is copyrighted free software by Zed A. Shaw
-<zedshaw at zedshaw dot com> and contributors. You can redistribute it
-and/or modify it under either the terms of the GPL2 or the conditions below:
-
-1. You may make and give away verbatim copies of the source form of the
-   software without restriction, provided that you duplicate all of the
-   original copyright notices and associated disclaimers.
-
-2. You may modify your copy of the software in any way, provided that
-   you do at least ONE of the following:
-
-     a) place your modifications in the Public Domain or otherwise make them
-     Freely Available, such as by posting said modifications to Usenet or an
-     equivalent medium, or by allowing the author to include your
-     modifications in the software.
-
-     b) use the modified software only within your corporation or
-        organization.
-
-     c) rename any non-standard executables so the names do not conflict with
-     standard executables, which must also be provided.
-
-     d) make other distribution arrangements with the author.
-
-3. You may distribute the software in object code or executable
-   form, provided that you do at least ONE of the following:
-
-     a) distribute the executables and library files of the software,
-     together with instructions (in the manual page or equivalent) on where
-     to get the original distribution.
-
-     b) accompany the distribution with the machine-readable source of the
-     software.
-
-     c) give non-standard executables non-standard names, with
-        instructions on where to get the original software distribution.
-
-     d) make other distribution arrangements with the author.
-
-4. You may modify and include the part of the software into any other
-   software (possibly commercial).  But some files in the distribution
-   are not written by the author, so that they are not under this terms.
-
-5. The scripts and library files supplied as input to or produced as
-   output from the software do not automatically fall under the
-   copyright of the software, but belong to whomever generated them,
-   and may be sold commercially, and may be aggregated with this
-   software.
-
-6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
-   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-   PURPOSE.
-
-
diff --git a/projects/mongrel_cluster/Manifest b/projects/mongrel_cluster/Manifest
deleted file mode 100644
index df7c427..0000000
--- a/projects/mongrel_cluster/Manifest
+++ /dev/null
@@ -1,12 +0,0 @@
-bin/mongrel_cluster_ctl
-CHANGELOG
-COPYING
-lib/mongrel_cluster/init.rb
-lib/mongrel_cluster/recipes.rb
-lib/mongrel_cluster/recipes_1.rb
-lib/mongrel_cluster/recipes_2.rb
-LICENSE
-Manifest
-README
-resources/defaults.yaml
-resources/mongrel_cluster
diff --git a/projects/mongrel_cluster/README b/projects/mongrel_cluster/README
deleted file mode 100644
index 561afc1..0000000
--- a/projects/mongrel_cluster/README
+++ /dev/null
@@ -1,56 +0,0 @@
-== Mongrel Cluster Plugin
-
-Tool to help start/stop/restart multiple mongrel servers to use behind a load balancer like Apache 2.2 (mod_proxy_balancer), Lighttpd, Pound, Pen or Balance. This plugin adds an option to specify a number of Mongrel servers to launch, a range of ports, and a configuration file for the cluster. Use "-h" to see command syntax.
-
-Configure cluster and write configuration file:
-  mongrel_rails cluster::configure  
-
-Start cluster:
-  mongrel_rails cluster::start
-
-Restart cluster:
-  mongrel_rails cluster::restart
-
-Stop cluster:
-  mongrel_rails cluster::stop
-
-== Capistrano Recipes
-
-Add to config/deploy.rb:
-  require 'mongrel_cluster/recipes'
-
-Variables:
-  mongrel_servers: Number of Mongrel servers to start.
-  mongrel_port: Starting port to bind to.
-  mongrel_address: Address to bind to.
-  mongrel_environment: Rails environment to run as.
-  mongrel_conf: Path to conf file. Defaults to /etc/mongrel_cluster/app_name.conf
-  mongrel_user: User to run mongrels in cluster as. Unset by default
-  mongrel_group: Group to run mongrels in cluster as. Unset by default.
-
-On Capistrano 2 you get then get the following tasks:
-
-  mongrel:cluster:configure Configure the cluster with variables.
-  mongrel:cluster:start: Start Mongrel processes on the app server.
-  mongrel:cluster:stop: Stop the Mongrel processes on the app server.
-  mongrel:cluster:restart: Restart the Mongrel processes on the app server by starting and stopping mongrel_cluster.
-  deploy:restart: Calls mongrel:cluster:restart to allow Mongrel to be used with the standard Capistrano deploy task.
-  deploy:start: Calls mongrel:cluster:start to allow Mongrel to be used with the standard Capistrano deploy task.
-  deploy:stop: Calls mongrel:cluster:stop to allow Mongrel to be used with the standard Capistrano deploy task.
-  
-On Capistrano 1 you get the same tasks, but without the namespace:  
-
-  configure_mongrel_cluster: Configure the cluster with variables.
-  start_mongrel_cluster: Start Mongrel processes on the app server.
-  stop_mongrel_cluster: Stop the Mongrel processes on the app server.
-  restart_mongrel_cluster: Restart the Mongrel processes on the app server by starting and stopping mongrel_cluster.
-  restart: Calls restart_mongrel_cluster to allow Mongrel to be used with the standard Capistrano deploy task.
-  spinner: Calls start_mongrel_cluster to allow Mongrel to be used with the standard Capistrano cold_deploy task.
-
-== Starting clusters at boot
-
-1. Create mongrel_cluster conf directory (/etc/mongrel_cluster).
-2. Assign ownership to your Capistrano user.
-3. Copy the init.d script from this gem's resouces directory /etc/init.d.
-4. chmod +x /etc/init.d/mongrel_cluster
-5. Add to init.d startup. On RHEL/CentOS use: /sbin/chkconfig --level 345 mongrel_cluster on
diff --git a/projects/mongrel_cluster/Rakefile b/projects/mongrel_cluster/Rakefile
deleted file mode 100644
index 2aad8f2..0000000
--- a/projects/mongrel_cluster/Rakefile
+++ /dev/null
@@ -1,29 +0,0 @@
-
-require 'echoe'
-
-Echoe.new("mongrel_cluster") do |p|
-  p.summary = "Mongrel plugin that provides commands and Capistrano tasks for managing multiple Mongrel processes."
-  p.project = "mongrel"
-  p.author="Bradley Taylor"
-  p.dependencies = ['gem_plugin >=0.2.3', 'mongrel >=1.0.2']
-  p.has_rdoc = false
-
-  p.need_tar_gz = false
-  p.need_tgz = true
-  p.require_signed = true
-  p.certificate_chain = ['~/p/configuration/gem_certificates/mongrel/mongrel-public_cert.pem',
-    '~/p/configuration/gem_certificates/evan_weaver-mongrel-public_cert.pem']    
-end
-
-# Is this still used?
-task :gem_source do
-  mkdir_p "pkg/gems"
-
-  FileList["**/*.gem"].each { |gem| mv gem, "pkg/gems" }
-  FileList["pkg/*.tgz"].each {|tgz| rm tgz }
-  rm_rf "pkg/#{name}-#{version}"
-
-  sh %{ generate_yaml_index.rb -d pkg }
-  sh %{ scp -r pkg/* #{ENV['SSH_USER']}@rubyforge.org:/var/www/gforge-projects/mongrel/releases/ }
-end
-
diff --git a/projects/mongrel_cluster/bin/mongrel_cluster_ctl b/projects/mongrel_cluster/bin/mongrel_cluster_ctl
deleted file mode 100755
index 380a18e..0000000
--- a/projects/mongrel_cluster/bin/mongrel_cluster_ctl
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/env ruby
-# Copyright (c) 2006 Bradley Taylor, bradley@fluxura.com
-
-require 'optparse'
-
-def run(command, verbose, clean=false)
-  Dir.chdir @options[:conf_path] do
-    confs =  Dir.glob("*.yml")
-    confs += Dir.glob("*.conf")
-    confs.each do |conf|
-      cmd = "mongrel_rails cluster::#{command} -C #{conf}"
-      cmd += " -v" if verbose
-      cmd += " --clean" if clean
-      puts cmd if verbose || command == "status"
-      output = `#{cmd}`
-      puts output if verbose || command == "status"
-      puts "mongrel_rails cluster::#{command} returned an error." unless $?.success?    
-    end
-  end  
-end
-
-@options = {}
-@options[:conf_path] = "/etc/mongrel_cluster"
-@options[:verbose] = false
-@options[:clean] = false
-
-OptionParser.new do |opts|
-  opts.banner = "Usage: #{$0} (start|stop|restart|status) [options]"
-
-  opts.on("-c", "--conf_path PATH", "Path to mongrel_cluster configuration files") { |value| @options[:conf_path] = value }
-  opts.on('-v', '--verbose', "Print all called commands and output.") { |value| @options[:verbose] = value }
-  opts.on('--clean', "Remove pid files if needed beforehand.") { |value| @options[:clean] = value }
-
-  if ARGV.empty?
-    puts opts
-    exit
-  else
-    @cmd = opts.parse!(ARGV)
-    if @cmd.nil?
-      puts opts
-      exit
-    end
-  end
-  
-end
-
-if @options[:conf_path] == nil && !File.directory?(@options[:conf_path])
-  puts "Invalid path to mongrel_cluster configuration files: #{@options[:conf_path]}"
-  exit
-end
-
-case @cmd[0]
-when "start":
-  puts "Starting all mongrel_clusters..."
-  run "start", @options[:verbose], @options[:clean]
-when "stop":
-  puts "Stopping all mongrel_clusters..."
-  run "stop", @options[:verbose], @options[:clean]
-when "restart":
-  puts "Restarting all mongrel_clusters..."
-  run "stop", @options[:verbose], @options[:clean]
-  run "start", @options[:verbose], @options[:clean]
-when "status":
-  puts "Checking all mongrel_clusters..."
-  run "status", @options[:verbose]
-else
- puts "Unknown command."
-end
-
-exit
diff --git a/projects/mongrel_cluster/lib/mongrel_cluster/init.rb b/projects/mongrel_cluster/lib/mongrel_cluster/init.rb
deleted file mode 100644
index 0f18fe9..0000000
--- a/projects/mongrel_cluster/lib/mongrel_cluster/init.rb
+++ /dev/null
@@ -1,362 +0,0 @@
-require 'gem_plugin'
-require 'mongrel'
-require 'yaml'
-
-module Cluster
-  module ExecBase
-    include Mongrel::Command::Base
-      
-    STATUS_OK = 0
-    STATUS_ERROR = 2
-    
-    def validate
-      valid_exists?(@config_file, "Configuration file does not exist. Run mongrel_rails cluster::configure.")
-      @valid
-    end
-      
-    def read_options
-      @options = {
-        "environment" => ENV['RAILS_ENV'] || "development",
-        "port" => 3000,
-        "pid_file" => "tmp/pids/mongrel.pid",
-        "log_file" => "log/mongrel.log",
-        "servers" => 2
-      }
-      conf = YAML.load_file(@config_file)
-      @options.merge! conf if conf
-        
-      process_pid_file @options["pid_file"]
-      process_log_file @options["log_file"]
-
-      start_port = end_port = @only
-      start_port ||=  @options["port"].to_i
-      end_port ||=  start_port + @options["servers"] - 1
-      @ports = (start_port..end_port).to_a
-    end
-
-    def process_pid_file(pid_file)
-      @pid_file_ext = File.extname(pid_file)
-      @pid_file_base = File.basename(pid_file, @pid_file_ext)
-      @pid_file_dir = File.dirname(pid_file)
-    end
-
-    def process_log_file(log_file)
-      @log_file_ext = File.extname(log_file)
-      @log_file_base = File.basename(log_file, @log_file_ext)
-      @log_file_dir = File.dirname(log_file)
-    end
-    
-    def port_pid_file(port)
-      pid_file = [@pid_file_base, port].join(".") + @pid_file_ext      
-      File.join(@pid_file_dir, pid_file)
-    end
-      
-    def port_log_file(port)
-      log_file = [@log_file_base, port].join(".") +  @log_file_ext      
-      File.join(@log_file_dir, log_file)
-    end
-      
-    def start
-      read_options
-      
-      argv = @options['mongrel_rails']
-      argv << "start"
-      argv << "-d"
-      argv << "-e #{@options['environment']}" if @options['environment']
-      argv << "-a #{@options['address']}"  if @options['address']
-      argv << "-c #{@options['cwd']}" if @options['cwd']
-      argv << "-o #{@options['timeout']}" if @options['timeout']
-      argv << "-t #{@options['throttle']}" if @options['throttle']
-      argv << "-m #{@options['mime_map']}" if @options['mime_map']
-      argv << "-r #{@options['docroot']}" if @options['docroot']
-      argv << "-n #{@options['num_procs']}" if @options['num_procs']
-      argv << "-B" if @options['debug']
-      argv << "-S #{@options['config_script']}" if @options['config_script']
-      argv << "--user #{@options['user']}" if @options['user']
-      argv << "--group #{@options['group']}" if @options['group']
-      argv << "--prefix #{@options['prefix']}" if @options['prefix']
-      cmd = argv.join " "
-      
-      @ports.each do |port|              
-        if @clean && pid_file_exists?(port) && !check_process(port)
-          pid_file = port_pid_file(port)        
-          log "missing process: removing #{pid_file}"
-          chdir_cwd do
-            File.unlink(pid_file)
-          end
-        end
-        
-        if pid_file_exists?(port) && check_process(port)
-          log "already started port #{port}"        
-          next
-        end
-
-        exec_cmd = cmd + " -p #{port} -P #{port_pid_file(port)}"
-        exec_cmd += " -l #{port_log_file(port)}"
-        log "starting port #{port}"          
-        log_verbose exec_cmd
-        output = `#{exec_cmd}`
-        log_error output unless $?.success?
-      end
-    end
-      
-    def stop
-      read_options
-    
-      argv = @options['mongrel_rails']
-      argv << "stop"
-      argv << "-c #{@options["cwd"]}" if @options["cwd"]
-      argv << "-f" if @force
-      cmd = argv.join " "
-
-      @ports.each do |port|
-        pid = check_process(port)        
-        if @clean && pid && !pid_file_exists?(port)      
-          log "missing pid_file: killing mongrel_rails port #{port}, pid #{pid}"
-          Process.kill("KILL", pid.to_i)  
-        end
-        
-        if !check_process(port)
-          log "already stopped port #{port}"                  
-          next      
-        end
-
-        exec_cmd = cmd + " -P #{port_pid_file(port)}"
-        log "stopping port #{port}"          
-        log_verbose exec_cmd
-        output = `#{exec_cmd}`
-        log_error output unless $?.success?
-        
-      end
-    end
-  
-    def status
-      read_options
-      
-      status = STATUS_OK
-    
-      @ports.each do |port|
-        pid = check_process(port)        
-        unless pid_file_exists?(port)        
-          log "missing pid_file: #{port_pid_file(port)}"  
-          status = STATUS_ERROR
-        else
-          log "found pid_file: #{port_pid_file(port)}"
-        end    
-        if pid
-          log "found mongrel_rails: port #{port}, pid #{pid}"
-        else
-          log "missing mongrel_rails: port #{port}"
-          status = STATUS_ERROR
-        end
-        puts ""
-      end
-
-      status
-    end
-
-    def pid_file_exists?(port)    
-      pid_file = port_pid_file(port)
-      exists = false
-      chdir_cwd do    
-        exists = File.exists?(pid_file)  
-      end
-      exists
-    end
-
-    def check_process(port)
-      if pid_file_exists?(port)
-        pid = read_pid(port)
-        ps_output = `ps -o #{cmd_name}= -p #{pid}`
-        pid = ps_output =~ /mongrel_rails/ ? pid : nil
-      else
-        pid = find_pid(port)
-      end
-      pid
-    end
-    
-    def cmd_name
-      RUBY_PLATFORM =~ /solaris|aix/i ? "args" : "command"
-    end
-        
-    def cmd_flags
-      RUBY_PLATFORM =~ /solaris|aix/i ? "-eo" : "-ewwo"
-    end
-    
-    def chdir_cwd
-      pwd = Dir.pwd
-      Dir.chdir(@options["cwd"]) if @options["cwd"]    
-      yield
-      Dir.chdir(pwd) if @options["cwd"]
-    end
-
-    def read_pid(port)
-      pid_file = port_pid_file(port)
-      pid = 0
-      chdir_cwd do    
-        pid = File.read(pid_file)
-      end
-      pid
-    end
-
-    def find_pid(port)
-      ps_cmd = "ps #{cmd_flags} pid,#{cmd_name}"
-      ps_output = `#{ps_cmd}`
-      ps_output.each do |line|
-        if line =~ /-P #{Regexp.escape(port_pid_file(port))} /
-          pid = line.split[0]
-          return pid
-        end
-      end
-      nil
-    end
-    
-    def log_error(message)
-      log(message)
-    end
-
-    def log_verbose(message)
-      log(message) if @verbose
-    end
-
-    def log(message)
-      puts message
-    end  
-  end
-  class Start < GemPlugin::Plugin "/commands"
-    include ExecBase
-    
-    def configure
-      options [
-        ['-C', '--config PATH', "Path to cluster configuration file", :@config_file, "config/mongrel_cluster.yml"],
-        ['-v', '--verbose', "Print all called commands and output.", :@verbose, false],
-        ['', '--clean', "Remove pid_file if needed before starting", :@clean, false],
-        ['', '--only PORT', "Port number of cluster member", :@only, nil]
-      ]
-    end
-
-    def run
-      start      
-    end
-  end
-  
-  class Stop < GemPlugin::Plugin "/commands"
-    include ExecBase
-
-    def configure
-      options [
-       ['-C', '--config PATH', "Path to cluster configuration file", :@config_file, "config/mongrel_cluster.yml"],
-       ['-f', '--force', "Force the shutdown.", :@force, false],
-       ['-v', '--verbose', "Print all called commands and output.", :@verbose, false],
-       ['', '--clean', "Remove orphaned process if needed before stopping", :@clean, false],
-       ['', '--only PORT', "Port number of cluster member", :@only, nil]
-      ]
-    end
-    
-    def run
-      stop
-    end  
-  end
-  
-  class Restart < GemPlugin::Plugin "/commands"
-    include ExecBase
-
-    def configure
-      options [
-        ['-C', '--config PATH', "Path to cluster configuration file", :@config_file, "config/mongrel_cluster.yml"],
-        ['-f', '--force', "Force the shutdown.", :@force, false],
-        ['-v', '--verbose', "Print all called commands and output.", :@verbose, false],
-        ['', '--clean', "Call stop and start with --clean", :@clean, false],        
-        ['', '--only PORT', "Port number of cluster member", :@only, nil]      
-      ]
-    end
-    
-    def run
-      stop
-      start
-    end
-    
-  end
-  
-  class Configure < GemPlugin::Plugin "/commands"
-    include ExecBase
-    
-    def configure
-      options [
-        ["-e", "--environment ENV", "Rails environment to run as", :@environment, nil],
-        ['-p', '--port PORT', "Starting port to bind to", :@port, 3000],
-        ['-a', '--address ADDR', "Address to bind to", :@address, nil],
-        ['-l', '--log FILE', "Where to write log messages", :@log_file, "log/mongrel.log"],
-        ['-P', '--pid FILE', "Where to write the PID", :@pid_file, "tmp/pids/mongrel.pid"],
-        ['-c', '--chdir PATH', "Change to dir before starting (will be expanded)", :@cwd, nil],
-        ['-o', '--timeout TIME', "Time to wait (in seconds) before killing a stalled thread", :@timeout, nil],
-        ['-t', '--throttle TIME', "Time to pause (in hundredths of a second) between accepting clients", :@throttle, nil],
-        ['-m', '--mime PATH', "A YAML file that lists additional MIME types", :@mime_map, nil],
-        ['-r', '--root PATH', "Set the document root (default 'public')", :@docroot, nil],
-        ['-n', '--num-procs INT', "Number of processor threads to use", :@num_procs, nil],
-        ['-B', '--debug', "Enable debugging mode", :@debug, nil],
-        ['-S', '--script PATH', "Load the given file as an extra config script.", :@config_script, nil],
-        ['-N', '--num-servers INT', "Number of Mongrel servers", :@servers, 2],
-        ['-C', '--config PATH', "Path to cluster configuration file", :@config_file, "config/mongrel_cluster.yml"],
-        ['', '--user USER', "User to run as", :@user, nil],
-        ['', '--group GROUP', "Group to run as", :@group, nil],
-        ['', '--mongrel_rails PATH', "Full path to mongrel_rails script", :@mongrel_rails, "mongrel_rails"],
-        ['', '--prefix PREFIX', "Rails prefix to use", :@prefix, nil]
-      ]
-    end
-
-    def validate
-      @servers = @servers.to_i
-      
-      valid?(@servers > 0, "Must give a valid number of servers")
-      valid_dir? File.dirname(@config_file), "Path to config file not valid: #{@config_file}"
-      
-      @valid
-    end
-
-    def run
-      @options = {
-        "port" => @port,
-        "servers" => @servers,
-        "pid_file" => @pid_file
-      }
-      
-      @options["log_file"] = @log_file if @log_file
-      @options["debug"] = @debug if @debug
-      @options["num_procs"] = @num_procs if @num_procs
-      @options["docroot"] = @docroot if @docroot
-      @options["address"] = @address if @address
-      @options["timeout"] = @timeout if @timeout
-      @options["throttle"] = @throttle if @throttle
-      @options["environment"] = @environment if @environment
-      @options["mime_map"] = @mime_map if @mime_map
-      @options["config_script"] = @config_script if @config_script
-      @options["cwd"] = @cwd if @cwd
-      @options["user"] = @user if @user
-      @options["group"] = @group if @group
-      @options["prefix"] = @prefix if @prefix
-      @options["mongrel_rails"] = @mongrel_rails if @mongrel_rails
-      
-      log "Writing configuration file to #{@config_file}."
-      File.open(@config_file,"w") {|f| f.write(@options.to_yaml)}
-    end  
-  end
-
-  class Status < GemPlugin::Plugin "/commands"
-    include ExecBase
-
-    def configure
-      options [
-        ['-C', '--config PATH', "Path to cluster configuration file", :@config_file, "config/mongrel_cluster.yml"],
-        ['-v', '--verbose', "Print all called commands and output.", :@verbose, false],
-        ['', '--only PORT', "Port number of cluster member", :@only, nil]      
-      ]
-    end
-    
-    def run
-      status
-    end
-
-  end
-end
-
diff --git a/projects/mongrel_cluster/lib/mongrel_cluster/recipes.rb b/projects/mongrel_cluster/lib/mongrel_cluster/recipes.rb
deleted file mode 100644
index 74ec468..0000000
--- a/projects/mongrel_cluster/lib/mongrel_cluster/recipes.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-
-if respond_to?(:namespace)
-  require 'mongrel_cluster/recipes_2' # Cap 2
-else  
-  require 'mongrel_cluster/recipes_1' # Cap 1
-end
diff --git a/projects/mongrel_cluster/lib/mongrel_cluster/recipes_1.rb b/projects/mongrel_cluster/lib/mongrel_cluster/recipes_1.rb
deleted file mode 100644
index 48651b2..0000000
--- a/projects/mongrel_cluster/lib/mongrel_cluster/recipes_1.rb
+++ /dev/null
@@ -1,104 +0,0 @@
-Capistrano.configuration(:must_exist).load do
-  set :mongrel_servers, 2
-  set :mongrel_port, 8000
-  set :mongrel_address, "127.0.0.1"
-  set :mongrel_environment, "production"
-  set :mongrel_conf, nil
-  set :mongrel_user, nil
-  set :mongrel_group, nil
-  set :mongrel_prefix, nil
-  set :mongrel_rails, 'mongrel_rails'
-  set :mongrel_clean, false
-  set :mongrel_pid_file, nil
-  set :mongrel_log_file, nil
-  set :mongrel_config_script, nil
-
-  desc <<-DESC
-  Configure Mongrel processes on the app server. This uses the :use_sudo
-  variable to determine whether to use sudo or not. By default, :use_sudo is
-  set to true.
-  DESC
-  task :configure_mongrel_cluster, :roles => :app do
-    set_mongrel_conf
-        
-    argv = []
-    argv << "#{mongrel_rails} cluster::configure"
-    argv << "-N #{mongrel_servers.to_s}"
-    argv << "-p #{mongrel_port.to_s}"
-    argv << "-e #{mongrel_environment}"
-    argv << "-a #{mongrel_address}"
-    argv << "-c #{current_path}"
-    argv << "-C #{mongrel_conf}"
-    argv << "-P #{mongrel_pid_file}" if mongrel_pid_file
-    argv << "-l #{mongrel_log_file}" if mongrel_log_file
-    argv << "--user #{mongrel_user}" if mongrel_user
-    argv << "--group #{mongrel_group}" if mongrel_group
-    argv << "--prefix #{mongrel_prefix}" if mongrel_prefix
-    argv << "-S #{mongrel_config_script}" if mongrel_config_script
-    cmd = argv.join " "
-    send(run_method, cmd)
-  end
-  
-  desc <<-DESC
-  Start Mongrel processes on the app server.  This uses the :use_sudo variable to determine whether to use sudo or not. By default, :use_sudo is
-  set to true.
-  DESC
-  task :start_mongrel_cluster , :roles => :app do
-    set_mongrel_conf
-    cmd = "#{mongrel_rails} cluster::start -C #{mongrel_conf}"
-    cmd += " --clean" if mongrel_clean    
-    send(run_method, cmd)
-  end
-  
-  desc <<-DESC
-  Restart the Mongrel processes on the app server by starting and stopping the cluster. This uses the :use_sudo
-  variable to determine whether to use sudo or not. By default, :use_sudo is set to true.
-  DESC
-  task :restart_mongrel_cluster , :roles => :app do
-    set_mongrel_conf
-    cmd = "#{mongrel_rails} cluster::restart -C #{mongrel_conf}"
-    cmd += " --clean" if mongrel_clean    
-    send(run_method, cmd)
-  end
-  
-  desc <<-DESC
-  Stop the Mongrel processes on the app server.  This uses the :use_sudo
-  variable to determine whether to use sudo or not. By default, :use_sudo is
-  set to true.
-  DESC
-  task :stop_mongrel_cluster , :roles => :app do
-    set_mongrel_conf
-    cmd = "#{mongrel_rails} cluster::stop -C #{mongrel_conf}"
-    cmd += " --clean" if mongrel_clean    
-    send(run_method, cmd)
-  end
-
-  desc <<-DESC
-  Check the status of the Mongrel processes on the app server.  This uses the :use_sudo
-  variable to determine whether to use sudo or not. By default, :use_sudo is
-  set to true.
-  DESC
-  task :status_mongrel_cluster , :roles => :app do
-    set_mongrel_conf
-    send(run_method, "#{mongrel_rails} cluster::status -C #{mongrel_conf}")
-  end
-  
-  desc <<-DESC
-  Restart the Mongrel processes on the app server by calling restart_mongrel_cluster.
-  DESC
-  task :restart, :roles => :app do
-    restart_mongrel_cluster
-  end
-  
-  desc <<-DESC
-  Start the Mongrel processes on the app server by calling start_mongrel_cluster.
-  DESC
-  task :spinner, :roles => :app do
-    start_mongrel_cluster
-  end
-  
-  def set_mongrel_conf
-    set :mongrel_conf, "/etc/mongrel_cluster/#{application}.yml" unless mongrel_conf
-  end
-
-end
diff --git a/projects/mongrel_cluster/lib/mongrel_cluster/recipes_2.rb b/projects/mongrel_cluster/lib/mongrel_cluster/recipes_2.rb
deleted file mode 100644
index 312ef5c..0000000
--- a/projects/mongrel_cluster/lib/mongrel_cluster/recipes_2.rb
+++ /dev/null
@@ -1,118 +0,0 @@
-Capistrano::Configuration.instance.load do
-  set :mongrel_servers, 2
-  set :mongrel_port, 8000
-  set :mongrel_address, "127.0.0.1"
-  set :mongrel_environment, "production"
-  set :mongrel_conf, nil
-  set :mongrel_user, nil
-  set :mongrel_group, nil
-  set :mongrel_prefix, nil
-  set :mongrel_rails, "mongrel_rails"
-  set :mongrel_clean, false
-  set :mongrel_pid_file, nil
-  set :mongrel_log_file, nil
-  set :mongrel_config_script, nil
-
-  namespace :mongrel do
-    namespace :cluster do
-      desc <<-DESC
-      Configure Mongrel processes on the app server. This uses the :use_sudo
-      variable to determine whether to use sudo or not. By default, :use_sudo is
-      set to true.
-      DESC
-      task :configure, :roles => :app do
-        set_conf
-        
-        argv = []
-        argv << "#{mongrel_rails} cluster::configure"
-        argv << "-N #{mongrel_servers.to_s}"
-        argv << "-p #{mongrel_port.to_s}"
-        argv << "-e #{mongrel_environment}"
-        argv << "-a #{mongrel_address}"
-        argv << "-c #{current_path}"
-        argv << "-C #{mongrel_conf}"
-        argv << "-P #{mongrel_pid_file}" if mongrel_pid_file
-        argv << "-l #{mongrel_log_file}" if mongrel_log_file
-        argv << "--user #{mongrel_user}" if mongrel_user
-        argv << "--group #{mongrel_group}" if mongrel_group
-        argv << "--prefix #{mongrel_prefix}" if mongrel_prefix
-        argv << "-S #{mongrel_config_script}" if mongrel_config_script
-        argv << "--mongrel_rails #{mongrel_rails}" if mongrel_rails        
-        cmd = argv.join " "
-        send(run_method, cmd)
-      end
-  
-      desc <<-DESC
-      Start Mongrel processes on the app server.  This uses the :use_sudo variable to determine whether to use sudo or not. By default, :use_sudo is
-      set to true.
-      DESC
-      task :start , :roles => :app do
-        set_conf
-        cmd = "#{mongrel_rails} cluster::start -C #{mongrel_conf}"
-        cmd += " --clean" if mongrel_clean    
-        send(run_method, cmd)
-      end
-  
-      desc <<-DESC
-      Restart the Mongrel processes on the app server by starting and stopping the cluster. This uses the :use_sudo
-      variable to determine whether to use sudo or not. By default, :use_sudo is set to true.
-      DESC
-      task :restart , :roles => :app do
-        set_conf
-        cmd = "#{mongrel_rails} cluster::restart -C #{mongrel_conf}"
-        cmd += " --clean" if mongrel_clean    
-        send(run_method, cmd)
-      end
-  
-      desc <<-DESC
-      Stop the Mongrel processes on the app server.  This uses the :use_sudo
-      variable to determine whether to use sudo or not. By default, :use_sudo is
-      set to true.
-      DESC
-      task :stop , :roles => :app do
-        set_conf
-        cmd = "#{mongrel_rails} cluster::stop -C #{mongrel_conf}"
-        cmd += " --clean" if mongrel_clean    
-        send(run_method, cmd)
-      end
-
-      desc <<-DESC
-      Check the status of the Mongrel processes on the app server.  This uses the :use_sudo
-      variable to determine whether to use sudo or not. By default, :use_sudo is
-      set to true.
-      DESC
-      task :status , :roles => :app do
-        set_conf
-        send(run_method, "#{mongrel_rails} cluster::status -C #{mongrel_conf}")
-      end
-  
-      def set_conf
-        set :mongrel_conf, "/etc/mongrel_cluster/#{application}.yml" unless mongrel_conf
-      end
-    end
-  end
-  
-  namespace :deploy do
-    desc <<-DESC
-    Restart the Mongrel processes on the app server by calling mongrel:cluster:restart.
-    DESC
-    task :restart, :roles => :app do
-      mongrel.cluster.restart
-    end
-  
-    desc <<-DESC
-    Start the Mongrel processes on the app server by calling mongrel:cluster:start.
-    DESC
-    task :start, :roles => :app do
-      mongrel.cluster.start
-    end
-    
-    desc <<-DESC
-    Stop the Mongrel processes on the app server by calling mongrel:cluster:stop.
-    DESC
-    task :stop, :roles => :app do
-      mongrel.cluster.stop
-    end
-  end
-
-end
diff --git a/projects/mongrel_cluster/resources/defaults.yaml b/projects/mongrel_cluster/resources/defaults.yaml
deleted file mode 100644
index 10d2a47..0000000
--- a/projects/mongrel_cluster/resources/defaults.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-:debug: false
diff --git a/projects/mongrel_cluster/resources/mongrel_cluster b/projects/mongrel_cluster/resources/mongrel_cluster
deleted file mode 100644
index 1dbb018..0000000
--- a/projects/mongrel_cluster/resources/mongrel_cluster
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2007 Bradley Taylor, bradley@railsmachine.com
-#
-# mongrel_cluster       Startup script for Mongrel clusters.
-#
-# chkconfig: - 85 15
-# description: mongrel_cluster manages multiple Mongrel processes for use \
-#              behind a load balancer.
-#              
-
-CONF_DIR=/etc/mongrel_cluster
-PID_DIR=/var/run/mongrel_cluster
-USER=mongrel
-
-RETVAL=0
-
-# Gracefully exit if the controller is missing.
-which mongrel_cluster_ctl >/dev/null || exit 0
-
-# Go no further if config directory is missing.
-[ -d "$CONF_DIR" ] || exit 0
-
-case "$1" in
-    start)
-      # Create pid directory
-      mkdir -p $PID_DIR
-      chown $USER:$USER $PID_DIR
-
-      mongrel_cluster_ctl start -c $CONF_DIR
-      RETVAL=$?
-  ;;
-    stop)
-      mongrel_cluster_ctl stop -c $CONF_DIR
-      RETVAL=$?
-  ;;
-    restart)
-      mongrel_cluster_ctl restart -c $CONF_DIR
-      RETVAL=$?
-  ;;
-    status)
-      mongrel_cluster_ctl status -c $CONF_DIR
-      RETVAL=$?
-  ;;
-    *)
-      echo "Usage: mongrel_cluster {start|stop|restart|status}"
-      exit 1
-  ;;
-esac      
-
-exit $RETVAL
diff --git a/projects/mongrel_config/CHANGELOG b/projects/mongrel_config/CHANGELOG
deleted file mode 100644
index 5a9c6f4..0000000
--- a/projects/mongrel_config/CHANGELOG
+++ /dev/null
@@ -1,2 +0,0 @@
-
-v0.3.1. Signed gem.
diff --git a/projects/mongrel_config/COPYING b/projects/mongrel_config/COPYING
deleted file mode 100644
index b1e3f5a..0000000
--- a/projects/mongrel_config/COPYING
+++ /dev/null
@@ -1,504 +0,0 @@
-                  GNU LESSER GENERAL PUBLIC LICENSE
-                       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-                            Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-                  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-  
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-                            NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-                     END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
-
diff --git a/projects/mongrel_config/LICENSE b/projects/mongrel_config/LICENSE
deleted file mode 100644
index e5a926e..0000000
--- a/projects/mongrel_config/LICENSE
+++ /dev/null
@@ -1,55 +0,0 @@
-Mongrel Web Server (Mongrel) is copyrighted free software by Zed A. Shaw
-<zedshaw at zedshaw dot com> and contributors. You can redistribute it
-and/or modify it under either the terms of the GPL2 or the conditions below:
-
-1. You may make and give away verbatim copies of the source form of the
-   software without restriction, provided that you duplicate all of the
-   original copyright notices and associated disclaimers.
-
-2. You may modify your copy of the software in any way, provided that
-   you do at least ONE of the following:
-
-     a) place your modifications in the Public Domain or otherwise make them
-     Freely Available, such as by posting said modifications to Usenet or an
-     equivalent medium, or by allowing the author to include your
-     modifications in the software.
-
-     b) use the modified software only within your corporation or
-        organization.
-
-     c) rename any non-standard executables so the names do not conflict with
-     standard executables, which must also be provided.
-
-     d) make other distribution arrangements with the author.
-
-3. You may distribute the software in object code or executable
-   form, provided that you do at least ONE of the following:
-
-     a) distribute the executables and library files of the software,
-     together with instructions (in the manual page or equivalent) on where
-     to get the original distribution.
-
-     b) accompany the distribution with the machine-readable source of the
-     software.
-
-     c) give non-standard executables non-standard names, with
-        instructions on where to get the original software distribution.
-
-     d) make other distribution arrangements with the author.
-
-4. You may modify and include the part of the software into any other
-   software (possibly commercial).  But some files in the distribution
-   are not written by the author, so that they are not under this terms.
-
-5. The scripts and library files supplied as input to or produced as
-   output from the software do not automatically fall under the
-   copyright of the software, but belong to whomever generated them,
-   and may be sold commercially, and may be aggregated with this
-   software.
-
-6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
-   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-   PURPOSE.
-
-
diff --git a/projects/mongrel_config/Manifest b/projects/mongrel_config/Manifest
deleted file mode 100644
index c0b57b8..0000000
--- a/projects/mongrel_config/Manifest
+++ /dev/null
@@ -1,21 +0,0 @@
-test/test_config.rb
-resources/style.css
-resources/index_win32.html
-resources/index.html
-resources/images/topbar.jpg
-resources/images/top.jpg
-resources/images/middle.jpg
-resources/images/bottom_orig.gif
-resources/images/bottom.gif
-resources/images/0171_new_page.png
-resources/images/0170_bubble.png
-resources/defaults.yaml
-README
-Manifest
-LICENSE
-lib/mongrel_config/win32_app.rb
-lib/mongrel_config/win32.rb
-lib/mongrel_config/init.rb
-lib/mongrel_config/app.rb
-COPYING
-CHANGELOG
diff --git a/projects/mongrel_config/README b/projects/mongrel_config/README
deleted file mode 100644
index df29f2e..0000000
--- a/projects/mongrel_config/README
+++ /dev/null
@@ -1,7 +0,0 @@
-= Mongrel Config Plugin
-
-This plugin uses the Camping micro-framework to implement a
-simple config tool for any Mongrel Rails application.
-Doesn't do too much right now but will be a littl more
-advanced later.
-
diff --git a/projects/mongrel_config/Rakefile b/projects/mongrel_config/Rakefile
deleted file mode 100644
index 2b1095c..0000000
--- a/projects/mongrel_config/Rakefile
+++ /dev/null
@@ -1,16 +0,0 @@
-
-require 'echoe'
-
-Echoe.new("mongrel_config") do |p|
-  p.summary = "Mongrel plugin that gives you web based config tool using Camping"
-  p.project = "mongrel"
-  p.test_pattern = "test/test_config.rb"
-  p.author="Zed A. Shaw"
-  p.dependencies = ['mongrel >=1.0.2', 'gem_plugin >=0.2.3', 'camping >=1.5']
-  
-  p.need_tar_gz = false
-  p.need_tgz = true
-  p.certificate_chain = ['~/p/configuration/gem_certificates/mongrel/mongrel-public_cert.pem',
-    '~/p/configuration/gem_certificates/evan_weaver-mongrel-public_cert.pem']    
-  p.require_signed = true
-end
diff --git a/projects/mongrel_config/lib/mongrel_config/app.rb b/projects/mongrel_config/lib/mongrel_config/app.rb
deleted file mode 100644
index b1a182a..0000000
--- a/projects/mongrel_config/lib/mongrel_config/app.rb
+++ /dev/null
@@ -1,158 +0,0 @@
-require 'erb'
-require 'camping'
-require 'mongrel/camping'
-
-
-Camping.goes :Configure
-
-module Configure::Controllers
-  class Index < R '/'
-    def get
-      render :show
-    end
-  end
-
-  class Start < R '/start'
-    def get      
-      render :start
-    end
-
-    def post
-      @results = `mongrel_rails start -d -p #{input.port} -e #{input.env} -n #{input.num_procs} -a #{input.address}`
-      render :start_done
-    end
-  end
-
-  class Kill < R '/kill/(\w+)'
-
-    def get(signal)
-      if _running?
-        @signal = signal.upcase
-        pid = open($PID_FILE) {|f| f.read }
-        begin
-          Process.kill(@signal, pid.to_i)
-          @results = "Mongrel sent PID #{pid} signal #{@signal}."
-        rescue
-          puts "ERROR: #$!"
-          @results = "Failed to signal the Mongrel process.  Maybe it is not running?<p>#$!</p>"
-        end
-      else
-        @results = "Mongrel does not seem to be running.  Maybe delete the pid file #{$PID_FILE} or start again."
-      end
-      
-      render :kill
-    end
-  end
-
-
-  class Stop < R '/stop'
-    def get
-      render :stop
-    end
-  end
-
-  class Logs < R '/logs'
-    def get
-      @log_files = Dir.glob("log/**/*")
-      render :logs
-    end
-  end
-
-end
-
-
-module Configure::Views
-  def layout
-    body_content = yield
-    currently_running = _running?
-    pid = _pid
-    open(GemPlugin::Manager.instance.resource("mongrel_config", "/index.html")) do |f|
-      template = ERB.new(f.read)
-      template.result(binding)
-    end
-  end
-
-  def show
-    div do
-      h2 { "Status" }
-      if _running?
-        p { "Currently running with PID #{_pid}." }
-      else
-        p { "Mongrel is not running." }
-      end
-    end
-  end
-
-  def start
-    div do
-      form :action => "/start", :method => "POST" do
-        p { span { "Port:" }; input :name => "port", :value => "4000" }
-        p { span { "Environment:" }; input :name => "env", :value => "development" }
-        p { span { "Address:" }; input :name => "address", :value => "0.0.0.0" }
-        input :type => "submit", :value => "START"
-      end
-    end
-  end
-
-  def start_done
-    div do
-      p { @results }
-    end
-  end
-
-  def kill
-    div do
-      p { @results }
-      
-      case @signal
-        when "HUP":
-          p { "A reload (HUP) does not stop the process, but may not be complete." }
-        when "TERM":
-          p { "Stopped with TERM signal.  The process should exit shortly, but only after processing pending requests." }
-        when "USR2":
-          p { "Complete restart (USR2) may take a little while.  Check status in a few seconds or read logs." }
-        when "KILL":
-          p { "Process was violently stopped (KILL) so pending requests will be lost." }
-        end
-    end
-  end
-
-  def stop
-    if _running?
-      ul do
-        li { a "Stop (TERM)", :href => "/kill/term" }
-        li { a "Reload (HUP)", :href => "/kill/hup" }
-        li { a "Restart (USR2)", :href => "/kill/usr2" }
-        li { a "Kill (KILL)", :href => "/kill/kill" }
-      end
-    else
-      p { "Mongrel does not appear to be running (no PID file at #$PID_FILE)." }
-    end
-  end
-
-  def logs
-    div do
-      h2 { "Logs" }
-      table do
-        tr do
-          th { "File"}; th { "Bytes" }; th { "Last Modified" }
-        end
-        @log_files.each do |file|
-          tr do
-            td { a file, :href => "../#{file}" }
-            td { File.size file }
-            td { File.mtime file }
-          end
-        end
-      end
-    end
-  end
-  
-  def _running?
-    File.exist? $PID_FILE
-  end
-
-  def _pid
-    open($PID_FILE) {|f| f.read } if _running?
-  end
-end
diff --git a/projects/mongrel_config/lib/mongrel_config/init.rb b/projects/mongrel_config/lib/mongrel_config/init.rb
deleted file mode 100644
index 623ea03..0000000
--- a/projects/mongrel_config/lib/mongrel_config/init.rb
+++ /dev/null
@@ -1,75 +0,0 @@
-require 'rubygems'
-require 'gem_plugin'
-require 'mongrel'
-
-
-class ConfigTool < GemPlugin::Plugin "/commands"
-  include Mongrel::Command::Base
-
-  def configure
-    if RUBY_PLATFORM =~ /mswin/
-      options [
-        ['-h', '--host ADDR', "Host to bind to for server", :@host, "0.0.0.0"],
-        ['-p', '--port NUMBER', "Port to bind to", :@port, "3001"],
-        ['-u', '--uri URI', "Where to put your config tool", :@uri, "/config"],
-        ['-R', '--mongrel PATH', "Path to mongrel_rails_service", :@mongrel_script, "c:\\ruby\\bin\\mongrel_rails_service"]
-      ]
-    else
-      options [
-        ['-c', '--chdir PATH', "Change to dir before starting (will be expanded)", :@cwd, Dir.pwd],
-        ['-P', '--pid FILE', "Where to write the PID", :@pid_file, "log/mongrel.pid"],
-        ['-h', '--host ADDR', "Host to bind to for server", :@host, "0.0.0.0"],
-        ['-p', '--port NUMBER', "Port to bind to", :@port, "3001"],
-        ['-u', '--uri URI', "Where to put your config tool", :@uri, "/config"]
-      ]
-    end
-  end
-  
-  def validate
-      valid?(@uri, "Must give a uri")
-      valid?(@port && @port.to_i > 0, "Must give a valid port")
-      valid?(@host, "Host IP to bind must be given")
-      
-    if RUBY_PLATFORM !~ /mswin/    
-      valid_dir? @cwd, "Cannot change to a directory that doesn't exist"
-      Dir.chdir @cwd
-      valid_dir? "log", "Log directory does not exist"
-    end
-
-    return @valid
-  end
-
-
-  def run
-    # must require this here since rails and camping don't like eachother
-    if RUBY_PLATFORM =~ /mswin/
-      require 'mongrel_config/win32_app'
-      $mongrel_rails_service = @mongrel_script
-    else
-      require 'mongrel_config/app'
-    end
-
-    resources = GemPlugin::Manager.instance.resource "mongrel_config", "/"
-    $PID_FILE = @pid_file
-
-    $server = Mongrel::Camping::start(@host,@port,@uri,Configure)
-
-    puts "** Configure is running at http://#{@host}:#{@port}#{@uri}"
-    if RUBY_PLATFORM !~ /mswin/
-      trap("INT") {
-        $server.stop
-      }
-      puts "Use CTRL-C to quit."
-    else
-      puts "Use CTRL-Pause/Break to quit."
-    end
-
-    # add our log directory
-    $server.register("/log", Mongrel::DirHandler.new("log"))
-    $server.register("/config/resources", Mongrel::DirHandler.new(resources))
-
-    $server.acceptor.join
-  end
-end
-
-
diff --git a/projects/mongrel_config/lib/mongrel_config/win32.rb b/projects/mongrel_config/lib/mongrel_config/win32.rb
deleted file mode 100644
index 4cdf605..0000000
--- a/projects/mongrel_config/lib/mongrel_config/win32.rb
+++ /dev/null
@@ -1,85 +0,0 @@
-require 'win32/service'
-
-
-# Simply abstracts the common stuff that the config tool needs to do
-# when dealing with Win32.  It is a very thin wrapper which may expand
-# later.
-module W32Support
-
-  # Lists all of the services that have "mongrel" in the binary_path_name
-  # of the service.  This detects the mongrel services.
-  def W32Support.list
-    Win32::Service.services.select {|s| s.binary_path_name =~ /mongrel/ }
-  end
-
-  # Just gets the display name of the service.
-  def W32Support.display(name)
-    Win32::Service.getdisplayname(name)
-  end
-
-  # Performs one operations (like :start or :start) which need
-  # to be "monitored" until they're done.  The wait_for parameter
-  # should be a regex for the content of the status like /running/
-  # or /stopped/
-  def W32Support.do_and_wait(service_name, operation, wait_for)
-    status = W32Support.status(service_name)
-    if status =~ wait_for
-      # already running call the block once and leave
-      yield status
-    else
-      # start trying to start it
-      Win32::Service.send(operation, service_name)
-      status = W32Support.status(service_name)
-      while status !~ wait_for
-        yield status
-        status = W32Support.status(service_name)
-      end
-
-      # do one last yield so they know it started
-      yield status
-    end
-  end
-
-  # Starts the requested service and calls a passed in block
-  # until the service is done.  You should sleep for a short
-  # period until it's done or there's an exception.
-  def W32Support.start(service_name)
-    W32Support.do_and_wait(service_name, :start, /running/) do |status|
-      yield status
-    end
-  end
-
-
-  # Stops the service.  Just like W32Support.start is will call
-  # a block while it checks for the service to actually stop.
-  def W32Support.stop(service_name)
-    W32Support.do_and_wait(service_name, :stop, /stopped/) do |status|
-      yield status
-    end
-  end
-
-
-  # Returns the current_state field of the service.
-  def W32Support.status(service_name)
-    Win32::Service.status(service_name).current_state
-  end
-  
-
-  # Deletes the service from the system.  It first tries to stop
-  # the service, and if you pass in a block it will call it while
-  # the service is being stopped.
-  def W32Support.delete(service_name)
-    begin
-      W32Support.stop(service_name) do |status|
-        yield status if block_given?
-      end
-    rescue
-    end
-
-    begin
-      Win32::Service.delete(service_name)
-    rescue
-    end
-  end
-
-end
diff --git a/projects/mongrel_config/lib/mongrel_config/win32_app.rb b/projects/mongrel_config/lib/mongrel_config/win32_app.rb
deleted file mode 100644
index d4e15b2..0000000
--- a/projects/mongrel_config/lib/mongrel_config/win32_app.rb
+++ /dev/null
@@ -1,251 +0,0 @@
-require 'erb'
-require 'camping'
-require 'mongrel/camping'
-require 'yaml'
-require 'thread'
-
-Camping.goes :Configure
-
-require 'mongrel_config/win32'
-
-$service_group = ThreadGroup.new
-$service_logs = ""
-
-module Configure
-  module Controllers
-    class Index < R '/'
-      def get
-        @services = W32Support.list
-        render :list
-      end
-    end
-    
-    class Info < R '/info/(\w+)'
-      def get(name)
-        @services = W32Support.list.select {|s| s.service_name == name }
-        render :info
-      end
-    end
-    
-    class Start < R '/start/(\w+)'
-      def get(service)
-        runner = Thread.new do
-          W32Support.start(service) do |status|
-            $service_logs << "Starting #{service}: #{status}\n"
-            sleep 1
-          end
-        end
-
-        $service_group.add(runner)
-
-        redirect Index
-      end
-    end    
-    
-    class Stop < R '/stop/(\w+)'
-      def get(service)
-        runner = Thread.new do
-          W32Support.stop(service) do |status|
-            $service_logs << "Starting #{service}: #{status}\n"
-            sleep 1
-          end
-        end
-
-        $service_group.add(runner)
-        redirect Index
-      end
-    end
-    
-    # eventually this will also let you see a particular service's logs
-    class Logs < R '/logs'
-      def get
-        render :service_logs
-      end
-    end
-
-    class ClearLogs < R '/clear_logs'
-      def get
-        $service_logs = ""
-        $service_logs << "#{Time.now}: CLEARED"
-
-        redirect Logs
-      end
-    end
-
-    class Install < R '/install'
-      def get
-        render :install_form
-      end
-
-      def post
-        options = []
-        if bad?(input.service_name) or bad?(input.root) or bad?(input.environment) or bad?(input.address) or bad?(input.port)
-          @result = "ERROR: You must fill out all mandatory (*) fields."
-          render :install_result
-        else
-          options << ["-n", input.service_name]
-          options << ["-r", '"' + input.root + '"']
-          options << ["-e", input.environment]
-          options << ["-b", input.address]
-          options << ["-p", input.port]
-          options << ["-d", input.display_name] if good? input.display_name
-          options << ["-m", '"' + input.mime + '"'] if good? input.mime
-          options << ["-P", input.num_procs] if good? input.num_procs
-          options << ["-t", input.timeout] if good? input.timeout
-          options << ["-c", input.cpu] if good? input.cpu
-          
-          begin
-            @result = `ruby #$mongrel_rails_service install #{options.join(' ')}`
-            $service_logs << @result
-          rescue
-            @result = "Failed to start #{input.service_name}: #$!"
-            $service_logs << @result
-          end
-          
-          render :install_result
-        end
-      end
-
-      def good?(field)
-        field and not field.strip.empty?
-      end
-      
-      def bad?(field)
-        not good? field
-      end
-    end
-
-
-    class Delete < R '/delete/(\w+)'
-      def get(name)
-        W32Support.delete(name)
-        $service_logs << "Deleted #{name}\n"
-        redirect Index
-      end
-    end
-  end
-  
-  
-  module Views
-    def layout
-      links = [
-        ["/config", "Status"],
-        ["/config/install", "Install"],
-        ["/config/logs", "Logs"]
-        ]
-      body_content = yield
-      currently_running = _running_procs
-
-      open(GemPlugin::Manager.instance.resource("mongrel_config", "/index_win32.html")) do |f|
-        template = ERB.new(f.read)
-        self << template.result(binding)
-      end
-    end
-    
-
-    def list
-      div :id=>"viewport" do
-        table do
-          tr { th { "Service"}; th { "Status"}; th { "Control" }; th { "Delete" } }
-          @services.each do |s|
-            status = W32Support.status(s.service_name)
-            tr {
-              td { a(s.service_name, :href => "/info/#{s.service_name}") }
-              td { status.capitalize }
-              td {
-                if status =~ /stopped/
-                  a("start",:href => "/start/#{s.service_name}")
-                elsif status =~ /running/
-                  a("stop",:href => "/stop/#{s.service_name}")
-                else
-                  b { "in progress" }
-                end
-              }
-              td {
-                a("delete!",:href => "/delete/#{s.service_name}",
-                  :onclick=>"return confirm('Delete #{s.service_name}?') == '1'")
-              }
-            }
-          end
-        end
-      end
-    end
-    
-
-    def info
-      div :id=>"viewport" do
-        @services.each do |s|
-        
-          h2 { "#{s.service_name} service information" }
-          table do
-            tr { th {"Attribute"}; th {"Value"} }
-            
-            s.each_pair do |memb,obj|
-              name = memb.to_s.tr("_"," ").capitalize
-              tr {
-                td { b { "#{name}: " } }
-                td { obj.inspect }
-              }
-            end
-          end
-        end
-      end
-    end
-
-    def service_logs
-      h2 { "Latest Service Activity Logs" }
-      a("[clear logs]", :href => "/clear_logs")
-
-      div :id=>"viewport" do
-        pre :style=>"font-size: 10pt;" do
-          self << $service_logs
-        end
-      end
-    end
-
-    def install_form
-      div do
-        h2 { "Install New Mongrel Service" }
-        p { "Items with an * are mandatory.  Leave an item blank to not specify it." }
-        form :action=>"/install", :method=>"POST" do
-          b { "* Service Name: "}; input :name => "service_name"; br
-          b { "* Root: "}; input :name => "root"; br
-          b { "* Environment: "}; input :name => "environment", :value => "development"; br
-          b { "*Address: "}; input :name => "address", :value => "0.0.0.0"; br
-          b { "*Port: "}; input :name => "port", :value => "4000", :size => 6; br
-          b { "Display Name: "}; input :name => "display_name"; br
-          b { "MIME Map File: "};  input :name => "mime"; br
-          b { "Number Processor Threads: "}; input :name => "num_procs", :size => 3; br
-          b { "Request Timeout: "}; input :name => "timeout", :size => 3; br
-          b { "Assigned CPU: " }; input :name => "cpu", :size => 2; br
-
-          p { input :type=>"submit", :value => "INSTALL" }
-        end
-      end
-    end
-
-
-    def install_result
-      div :id=>"viewport" do
-        h2 { "Install Results"}
-        pre do
-          self << @result
-        end
-      end
-    end
-
-    def _running_procs
-      running = []
-      W32Support.list.each {|s| running << s.service_name if s.current_state =~ /running/}
-      running
-    end
-    
-  end
-end
-
-
-
-
-
-
-
diff --git a/projects/mongrel_config/resources/defaults.yaml b/projects/mongrel_config/resources/defaults.yaml
deleted file mode 100644
index 10d2a47..0000000
--- a/projects/mongrel_config/resources/defaults.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-:debug: false
diff --git a/projects/mongrel_config/resources/images/0170_bubble.png b/projects/mongrel_config/resources/images/0170_bubble.png
deleted file mode 100644
index 57a289e..0000000
--- a/projects/mongrel_config/resources/images/0170_bubble.png
+++ /dev/null
Binary files differ
diff --git a/projects/mongrel_config/resources/images/0171_new_page.png b/projects/mongrel_config/resources/images/0171_new_page.png
deleted file mode 100644
index 929d499..0000000
--- a/projects/mongrel_config/resources/images/0171_new_page.png
+++ /dev/null
Binary files differ
diff --git a/projects/mongrel_config/resources/images/bottom.gif b/projects/mongrel_config/resources/images/bottom.gif
deleted file mode 100644
index 8d65a26..0000000
--- a/projects/mongrel_config/resources/images/bottom.gif
+++ /dev/null
Binary files differ
diff --git a/projects/mongrel_config/resources/images/bottom_orig.gif b/projects/mongrel_config/resources/images/bottom_orig.gif
deleted file mode 100644
index a2cfcfc..0000000
--- a/projects/mongrel_config/resources/images/bottom_orig.gif
+++ /dev/null
Binary files differ
diff --git a/projects/mongrel_config/resources/images/middle.jpg b/projects/mongrel_config/resources/images/middle.jpg
deleted file mode 100644
index 447b1a2..0000000
--- a/projects/mongrel_config/resources/images/middle.jpg
+++ /dev/null
Binary files differ
diff --git a/projects/mongrel_config/resources/images/top.jpg b/projects/mongrel_config/resources/images/top.jpg
deleted file mode 100644
index ee2327d..0000000
--- a/projects/mongrel_config/resources/images/top.jpg
+++ /dev/null
Binary files differ
diff --git a/projects/mongrel_config/resources/images/topbar.jpg b/projects/mongrel_config/resources/images/topbar.jpg
deleted file mode 100644
index 83269b0..0000000
--- a/projects/mongrel_config/resources/images/topbar.jpg
+++ /dev/null
Binary files differ
diff --git a/projects/mongrel_config/resources/index.html b/projects/mongrel_config/resources/index.html
deleted file mode 100644
index a0700f8..0000000
--- a/projects/mongrel_config/resources/index.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
-<title>Mongrel Config Tool</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<link href="/config/resources/style.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-<div id="container">
-  <div id="top">
-    <div id="title">Mongrel Config Tool</div>
-  </div>
-  <div id="middle">
-          <div id="nav">
-        <ul>    
-                 <li><a href="/config">Status</a></li>
-              <li><a href="/config/start">Start</a></li>
-              <li><a href="/config/stop">Stop</a></li>
-              <li><a href="/config/logs">Logs</a></li>
-        </ul>
-      </div>
-          <div id="content">
-          <div id="side">
-            <% if currently_running %>
-            <strong>Status</strong> <br />
-            <br />
-            Mongrel is running with PID <%= pid %>.
-            <% else %>
-            <strong>Status</strong> <br />
-            <br />
-            Mongrel is not running.
-            <% end %>
-                <br /><br />
-                <br />
-          <strong>Documentation</strong><br />
-        <br />
-        <a href="http://mongrel.rubyforge.org">Mongrel Home</a> <br />
-        <br />
-
-        <a href="http://mongrel.rubyforge.org/news.html">News</a><br />
-        <br />
-
-        <a href="http://mongrel.rubyforge.org/docs/started.html">Getting Started</a> <br />
-        <br />
-
-        <a href="http://mongrel.rubyforge.org/docs/win32.html">Win32 Guide</a><br />
-        <br />
-
-        <a href="http://mongrel.rubyforge.org/docs/lighttpd.html">Lighttpd Guide</a><br />
-        <br />
-
-        <a href="http://mongrel.rubyforge.org/rdoc/index.html">Mongrel API</a><br />
-        <br />
-
-        <a href="http://api.rubyonrails.org/">Ruby On Rails API</a><br />
-        <br />
-
-        <br /><br />
-      </div>
-
-      <%= body_content %>
-
-      </div>
-        </div>
-          </div>
-          
-  <div id="bottom">&nbsp;</div>
-  
-<div id="footertext">Copyright 2006 &copy; Zed A. Shaw &nbsp; | &nbsp; Design by Kenneth Barbour.</div>
-</body>
-</html>
diff --git a/projects/mongrel_config/resources/index_win32.html b/projects/mongrel_config/resources/index_win32.html
deleted file mode 100644
index bf8aa12..0000000
--- a/projects/mongrel_config/resources/index_win32.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
-<title>Mongrel Config Tool</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<link href="/config/resources/style.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-<div id="container">
-  <div id="top">
-    <div id="title">Mongrel Config Tool</div>
-  </div>
-  <div id="middle">
-          <div id="nav">
-        <ul>
-              <% links.each do |uri,text| %>
-                 <li><a href="<%= uri %>"><%= text %></a></li>
-                <%end%>
-        </ul>
-      </div>
-          <div id="content">
-          <div id="side">
-            <% if currently_running.length > 0 %>
-            <strong>Running Services</strong> <br />
-            <br />
-                <%= currently_running.join(",") %>
-            <% else %>
-            <strong>No services running.</strong><br />
-            <% end %>
-                <br /><br />
-                <br />
-          <strong>Documentation</strong><br />
-        <br />
-        <a href="http://mongrel.rubyforge.org">Mongrel Home</a> <br />
-        <br />
-
-        <a href="http://mongrel.rubyforge.org/news.html">News</a><br />
-        <br />
-
-        <a href="http://mongrel.rubyforge.org/docs/started.html">Getting Started</a> <br />
-        <br />
-
-        <a href="http://mongrel.rubyforge.org/docs/win32.html">Win32 Guide</a><br />
-        <br />
-
-        <a href="http://mongrel.rubyforge.org/docs/lighttpd.html">Lighttpd Guide</a><br />
-        <br />
-
-        <a href="http://mongrel.rubyforge.org/rdoc/index.html">Mongrel API</a><br />
-        <br />
-
-        <a href="http://api.rubyonrails.org/">Ruby On Rails API</a><br />
-        <br />
-
-        <br /><br />
-      </div>
-
-      <%= body_content %>
-
-      </div>
-        </div>
-          </div>
-          
-  <div id="bottom">&nbsp;</div>
-  
-<div id="footertext">Copyright 2006 &copy; Zed A. Shaw &nbsp; | &nbsp; Design by Kenneth Barbour.</div>
-</body>
-</html>
diff --git a/projects/mongrel_config/resources/style.css b/projects/mongrel_config/resources/style.css
deleted file mode 100644
index c6354ce..0000000
--- a/projects/mongrel_config/resources/style.css
+++ /dev/null
@@ -1,170 +0,0 @@
-/* CSS Document */
-body {
-        margin: 25px auto 0px auto;
-        background-image: url(/config/resources/images/top.jpg);
-        background-repeat: repeat-x;
-        background-position: top;
-        font-family: "Lucida Grande", Verdana, Halvetica, sans-serif;
-        text-align: center;
-}
-a:hover {
-        color: #990000;
-        text-decoration: underline;
-}
-a {
-        color: #990000;
-        text-decoration: none;
-}
-#container {
-        font-weight: normal;
-        margin: 0px auto 0px auto;
-        width: 686px;
-        text-align: center;
-
-}
-#main {
-        padding-top: 50px;
-        padding-bottom: 50px;
-        border: 1px solid #CC0000;
-        height: auto;
-}
-#title {
-        font-family: Georgia, "Times New Roman", Times, serif;
-        font-size: 36px;
-        color: #FFF;
-        font-weight: normal;
-        font-size:36px;
-        text-align: center;
-        color: #FFFFFF;
-        padding-top: 28px;
-}
-#top {
-        margin: 0px auto;
-        width: 686px;
-        height: 96px;
-        background: url(/config/resources/images/topbar.jpg) no-repeat
-}
-#middle {
-           background: url(/config/resources/images/middle.jpg) no-repeat;
-        background-repeat: repeat-y;
-        margin: -2px auto 0px auto;
-}
-#bottom {
-        margin: -100px auto 0px;
-        width: 686px;
-        height: 106px;
-        background: url(/config/resources/images/bottom.gif) no-repeat;
-        clear: center;
-
-}
-#nav {
-        width: 455px;
-        padding: 20px 30px 10px;
-        margin: 0px auto;
-        color: #999;
-        font-weight: normal;
-        font-size: 11px;
-        text-align: center;
-
-}
-#nav li {
-        list-style: none;
-        display: inline;
-        margin-right: 20px;
-}
-#nav a {
-        font-size: 10px;
-        font-weight: bold;
-        color: #999;
-        text-decoration: none;
-}
-#nav a:hover {
-        color: #990000;
-        text-decoration: underline;
-}
-#content {
-        padding: 0px 68px 1px 68px;
-        margin: 0px auto 0px auto;
-        text-align: left;
-        height: 370px;
-}
-#side {
-    margin: 30px auto 0px auto;
-        width: 110px;
-        border-left: 1px dotted #C4D0D7;
-        padding: 0px 10px 0px 20px;
-        color: #999;
-        float: right;
-        font-size: 70%;
-}
-#content h2 {
-        color: #990000;
-        font-weight: bolder;
-        font-size: 14px;
-        padding: 0px 135px 0px 10px;
-}
-#content h2        a:hover{
-        color: #990000;
-        text-decoration: underline;
-}
-#content h2 a{
-        text-decoration: none;
-}
-#content h3 {
-        color: #000000;
-        font-size: 10px;
-        letter-spacing: .3em;
-        padding: 0px 135px 0px 10px;
-        text-decoration: underline;
-
-}
-#content p {
-        padding: 0px 170px 0px 10px;
-        font-size: 70%;
-        line-height: 1.7em;
-        margin: 0px 0px 1.7em 0px;
-        vertical-align: top;
-        color: #666666;
-
-}
-#footertext {
-        font-size: 10px;
-        font-weight: bold;
-        margin: 20px auto 0px;
-        height: 20px;
-        width: 686px;
-        height: 31px;
-        text-align: center;
-        color: #888;
-}
-#footertext a {
-        font-size: 10px;
-        font-weight: bold;
-        color: #999;
-        text-decoration: none;
-}
-#footertext a:hover {
-        text-decoration: underline;
-}
-
-b { font-size: 10pt;  }
-
-#viewport {
-  overflow: auto; width: 400px; height: 320px;
-}
-
-table {
-  border-collapse: collapsed;
-}
-
-td {
-  font-size: 11px;
-  padding: 5px;
-}
-
-th {
-  border: 1px #990000 solid;
-  font-size: 12px;
-  background-color: #955;
-  color: #eeeeee;
-} \ No newline at end of file
diff --git a/projects/mongrel_config/test/test_config.rb b/projects/mongrel_config/test/test_config.rb
deleted file mode 100644
index f7501b3..0000000
--- a/projects/mongrel_config/test/test_config.rb
+++ /dev/null
@@ -1,53 +0,0 @@
-require 'test/unit'
-require 'mongrel_config/init'
-
-class CommandTest < Test::Unit::TestCase
-  def setup
-    @pmgr = GemPlugin::Manager.instance
-  end
-
-  def test_command_loaded
-    assert @pmgr.create("/commands/configtool", "configtool not loaded")
-  end
-
-end
-
-
-# these are only run if we're running on windows
-if RUBY_PLATFORM =~ /mswin/
-  require 'mongrel_config/win32'
-
-  class Win32Test < Test::Unit::TestCase
-    
-    def test_list
-      svcs = W32Support.list
-      assert svcs.length > 0, "No services returned.  Make sure you have one mongrel installed."
-    end
-
-    def test_display_name
-      svcs = W32Support.list
-      svcs.each { |s| W32Support.display(s.service_name) }
-    end
-
-    def test_start_stop
-      svcs = W32Support.list
-      svcs.each { |s|
-        puts "Starting #{W32Support.display(s.service_name)} (might take a while)"
-        i = 1
-        W32Support.start(s.service_name) do |status|
-          print "Starting #{s.service_name}: #{status} (#{i} seconds)\r"
-          sleep 1
-          i += 1
-        end
-
-        W32Support.stop(s.service_name) do |status|
-          puts "Stopping #{s.service_name}: #{status}"
-          sleep 1
-        end
-      }
-    end
-
-  end
-end
-
-  
diff --git a/projects/mongrel_console/CHANGELOG b/projects/mongrel_console/CHANGELOG
deleted file mode 100644
index edd1d97..0000000
--- a/projects/mongrel_console/CHANGELOG
+++ /dev/null
@@ -1,2 +0,0 @@
-
-v0.2.1. Signed gem.
diff --git a/projects/mongrel_console/COPYING b/projects/mongrel_console/COPYING
deleted file mode 100644
index bff74f4..0000000
--- a/projects/mongrel_console/COPYING
+++ /dev/null
@@ -1 +0,0 @@
-No copying restrictions/license given. \ No newline at end of file
diff --git a/projects/mongrel_console/LICENSE b/projects/mongrel_console/LICENSE
deleted file mode 100644
index e5a926e..0000000
--- a/projects/mongrel_console/LICENSE
+++ /dev/null
@@ -1,55 +0,0 @@
-Mongrel Web Server (Mongrel) is copyrighted free software by Zed A. Shaw
-<zedshaw at zedshaw dot com> and contributors. You can redistribute it
-and/or modify it under either the terms of the GPL2 or the conditions below:
-
-1. You may make and give away verbatim copies of the source form of the
-   software without restriction, provided that you duplicate all of the
-   original copyright notices and associated disclaimers.
-
-2. You may modify your copy of the software in any way, provided that
-   you do at least ONE of the following:
-
-     a) place your modifications in the Public Domain or otherwise make them
-     Freely Available, such as by posting said modifications to Usenet or an
-     equivalent medium, or by allowing the author to include your
-     modifications in the software.
-
-     b) use the modified software only within your corporation or
-        organization.
-
-     c) rename any non-standard executables so the names do not conflict with
-     standard executables, which must also be provided.
-
-     d) make other distribution arrangements with the author.
-
-3. You may distribute the software in object code or executable
-   form, provided that you do at least ONE of the following:
-
-     a) distribute the executables and library files of the software,
-     together with instructions (in the manual page or equivalent) on where
-     to get the original distribution.
-
-     b) accompany the distribution with the machine-readable source of the
-     software.
-
-     c) give non-standard executables non-standard names, with
-        instructions on where to get the original software distribution.
-
-     d) make other distribution arrangements with the author.
-
-4. You may modify and include the part of the software into any other
-   software (possibly commercial).  But some files in the distribution
-   are not written by the author, so that they are not under this terms.
-
-5. The scripts and library files supplied as input to or produced as
-   output from the software do not automatically fall under the
-   copyright of the software, but belong to whomever generated them,
-   and may be sold commercially, and may be aggregated with this
-   software.
-
-6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
-   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-   PURPOSE.
-
-
diff --git a/projects/mongrel_console/Manifest b/projects/mongrel_console/Manifest
deleted file mode 100644
index b2f9e38..0000000
--- a/projects/mongrel_console/Manifest
+++ /dev/null
@@ -1,8 +0,0 @@
-resources/defaults.yaml
-README
-Manifest
-LICENSE
-lib/mongrel_console/init.rb
-lib/mongrel_console/console.rb
-COPYING
-CHANGELOG
diff --git a/projects/mongrel_console/README b/projects/mongrel_console/README
deleted file mode 100644
index 1c94355..0000000
--- a/projects/mongrel_console/README
+++ /dev/null
@@ -1,5 +0,0 @@
-== Mongrel_console GemPlugin
-
-You should document your project here.
-
-
diff --git a/projects/mongrel_console/Rakefile b/projects/mongrel_console/Rakefile
deleted file mode 100644
index 7dc2844..0000000
--- a/projects/mongrel_console/Rakefile
+++ /dev/null
@@ -1,15 +0,0 @@
-
-require 'echoe'
-
-Echoe.new("mongrel_console") do |p|
-  p.summary = "Provides a combined Mongrel and Rails IRB console."
-  p.project = "mongrel"
-  p.author="Zed A. Shaw"
-  p.dependencies = ['gem_plugin >=0.2.3', 'mongrel >=1.0.2']
-
-  p.need_tar_gz = false
-  p.need_tgz = true
-  p.certificate_chain = ['~/p/configuration/gem_certificates/mongrel/mongrel-public_cert.pem',
-    '~/p/configuration/gem_certificates/evan_weaver-mongrel-public_cert.pem']    
-  p.require_signed = true
-end
diff --git a/projects/mongrel_console/lib/mongrel_console/console.rb b/projects/mongrel_console/lib/mongrel_console/console.rb
deleted file mode 100644
index 9b3952b..0000000
--- a/projects/mongrel_console/lib/mongrel_console/console.rb
+++ /dev/null
@@ -1,83 +0,0 @@
-require "irb"
-begin
-  require "irb/completion"
-rescue
-  STDERR.puts "Problem lading irb/completion: #$!"
-end
-require 'rubygems'
-require 'yaml'
-require 'mongrel/rails'
-require 'config/environment'
-require 'dispatcher'
-require 'mongrel/debug'
-require 'net/http'
-
-class MongrelConsoleRunner
-
-  def initialize
-    @port = 3000
-    @env = "development"
-  end
-
-  def tail(file="log/#{@env}.log")
-    STDERR.puts "Tailing #{file}.  CTRL-C to stop it."
-
-    cursor = File.size(file)
-    last_checked = Time.now
-    tail_thread = Thread.new do
-      File.open(file, 'r') do |f|
-        loop do
-          if f.mtime > last_checked
-            f.seek cursor
-            last_checked = f.mtime
-            contents = f.read
-            cursor += contents.length
-            print contents
-          end
-          sleep 1
-        end
-      end
-    end
-
-    trap("INT") { tail_thread.kill }
-    tail_thread.join
-    nil
-  end
-
-  def start(port=@port, env=@env)
-    `mongrel_rails start #{port} #{env} -d`
-  end
-
-  def stop
-    `mongrel_rails stop`
-  end
-
-  def restart(port=@port, env=@env)
-    stop
-    start(port, env)
-  end
-
-  def status
-    if File.exist? "log/mongrel.pid"
-      pid = open("log/mongrel.pid") {|f| f.read.to_i }
-      puts "Running on port #@port in env #@env with PID #{pid}"
-    else
-      puts "Mongrel not running."
-    end
-  end
-
-  def get(url="/")
-    Net::HTTP.get("localhost", url, @port)
-  end
-end
-
-
-$mongrel = MongrelConsoleRunner.new
-puts "Starting console.  mongrel.[start | stop | restart | status | tail | get]"
-$mongrel.status
-
-def self.mongrel
-  $mongrel
-end
-
-IRB.start(__FILE__)
diff --git a/projects/mongrel_console/lib/mongrel_console/init.rb b/projects/mongrel_console/lib/mongrel_console/init.rb
deleted file mode 100644
index 7ed60cd..0000000
--- a/projects/mongrel_console/lib/mongrel_console/init.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-require 'rubygems'
-require 'gem_plugin'
-require 'mongrel'
-
-class Console < GemPlugin::Plugin "/commands"
-  include Mongrel::Command::Base
-
-  def configure
-    options [
-      ['-c', '--chdir DIR', "Change to directory before running", :@dir, "."]
-    ]
-  end
-
-  def validate
-    valid_dir? @dir, "Directory is not valid"
-    return @valid
-  end
-
-  def run
-    begin
-      Dir.chdir @dir
-      load File.join(File.dirname(__FILE__), "console.rb")
-    rescue Object
-      STDERR.puts "Cannot run the console script: #$!"
-    end
-  end
-end
diff --git a/projects/mongrel_console/resources/defaults.yaml b/projects/mongrel_console/resources/defaults.yaml
deleted file mode 100644
index 10d2a47..0000000
--- a/projects/mongrel_console/resources/defaults.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-:debug: false
diff --git a/projects/mongrel_experimental/CHANGELOG b/projects/mongrel_experimental/CHANGELOG
deleted file mode 100644
index abefe87..0000000
--- a/projects/mongrel_experimental/CHANGELOG
+++ /dev/null
@@ -1,2 +0,0 @@
-
-v1.1. First release.
diff --git a/projects/mongrel_experimental/COPYING b/projects/mongrel_experimental/COPYING
deleted file mode 100644
index b1e3f5a..0000000
--- a/projects/mongrel_experimental/COPYING
+++ /dev/null
@@ -1,504 +0,0 @@
-                  GNU LESSER GENERAL PUBLIC LICENSE
-                       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-                            Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-                  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-  
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-                            NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-                     END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
-
diff --git a/projects/mongrel_experimental/LICENSE b/projects/mongrel_experimental/LICENSE
deleted file mode 100644
index e5a926e..0000000
--- a/projects/mongrel_experimental/LICENSE
+++ /dev/null
@@ -1,55 +0,0 @@
-Mongrel Web Server (Mongrel) is copyrighted free software by Zed A. Shaw
-<zedshaw at zedshaw dot com> and contributors. You can redistribute it
-and/or modify it under either the terms of the GPL2 or the conditions below:
-
-1. You may make and give away verbatim copies of the source form of the
-   software without restriction, provided that you duplicate all of the
-   original copyright notices and associated disclaimers.
-
-2. You may modify your copy of the software in any way, provided that
-   you do at least ONE of the following:
-
-     a) place your modifications in the Public Domain or otherwise make them
-     Freely Available, such as by posting said modifications to Usenet or an
-     equivalent medium, or by allowing the author to include your
-     modifications in the software.
-
-     b) use the modified software only within your corporation or
-        organization.
-
-     c) rename any non-standard executables so the names do not conflict with
-     standard executables, which must also be provided.
-
-     d) make other distribution arrangements with the author.
-
-3. You may distribute the software in object code or executable
-   form, provided that you do at least ONE of the following:
-
-     a) distribute the executables and library files of the software,
-     together with instructions (in the manual page or equivalent) on where
-     to get the original distribution.
-
-     b) accompany the distribution with the machine-readable source of the
-     software.
-
-     c) give non-standard executables non-standard names, with
-        instructions on where to get the original software distribution.
-
-     d) make other distribution arrangements with the author.
-
-4. You may modify and include the part of the software into any other
-   software (possibly commercial).  But some files in the distribution
-   are not written by the author, so that they are not under this terms.
-
-5. The scripts and library files supplied as input to or produced as
-   output from the software do not automatically fall under the
-   copyright of the software, but belong to whomever generated them,
-   and may be sold commercially, and may be aggregated with this
-   software.
-
-6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
-   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-   PURPOSE.
-
-
diff --git a/projects/mongrel_experimental/Manifest b/projects/mongrel_experimental/Manifest
deleted file mode 100644
index 43bfdff..0000000
--- a/projects/mongrel_experimental/Manifest
+++ /dev/null
@@ -1,17 +0,0 @@
-CHANGELOG
-COPYING
-ext/uri_classifier/ext_help.h
-ext/uri_classifier/extconf.rb
-ext/uri_classifier/tst.h
-ext/uri_classifier/tst_cleanup.c
-ext/uri_classifier/tst_delete.c
-ext/uri_classifier/tst_grow_node_free_list.c
-ext/uri_classifier/tst_init.c
-ext/uri_classifier/tst_insert.c
-ext/uri_classifier/tst_search.c
-ext/uri_classifier/uri_classifier.c
-lib/mongrel_experimental.rb
-LICENSE
-Manifest
-README
-test/test_uriclassifier.rb
diff --git a/projects/mongrel_experimental/README b/projects/mongrel_experimental/README
deleted file mode 100644
index 49102d2..0000000
--- a/projects/mongrel_experimental/README
+++ /dev/null
@@ -1,3 +0,0 @@
-= Mongrel Experimental
-
-
diff --git a/projects/mongrel_experimental/Rakefile b/projects/mongrel_experimental/Rakefile
deleted file mode 100644
index 5bc3b41..0000000
--- a/projects/mongrel_experimental/Rakefile
+++ /dev/null
@@ -1,15 +0,0 @@
-
-require 'echoe'
-
-Echoe.new("mongrel_experimental") do |p|
-  p.summary = "Backports and experimental features for Mongrel."
-  p.project = "mongrel"
-  p.author="The Mongrel Team"
-  p.dependencies = ['mongrel =1.1']
-  
-  p.need_tar_gz = false
-  p.need_tgz = true
-  p.certificate_chain = ['~/p/configuration/gem_certificates/mongrel/mongrel-public_cert.pem',
-    '~/p/configuration/gem_certificates/evan_weaver-mongrel-public_cert.pem']    
-  p.require_signed = true
-end
diff --git a/projects/mongrel_experimental/ext/uri_classifier/ext_help.h b/projects/mongrel_experimental/ext/uri_classifier/ext_help.h
deleted file mode 100644
index 8b4d754..0000000
--- a/projects/mongrel_experimental/ext/uri_classifier/ext_help.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef ext_help_h
-#define ext_help_h
-
-#define RAISE_NOT_NULL(T) if(T == NULL) rb_raise(rb_eArgError, "NULL found for " # T " when shouldn't be.");
-#define DATA_GET(from,type,name) Data_Get_Struct(from,type,name); RAISE_NOT_NULL(name);
-#define REQUIRE_TYPE(V, T) if(TYPE(V) != T) rb_raise(rb_eTypeError, "Wrong argument type for " # V " required " # T);
-
-#ifdef DEBUG
-#define TRACE()  fprintf(stderr, "> %s:%d:%s\n", __FILE__, __LINE__, __FUNCTION__)
-#else
-#define TRACE()
-#endif
-
-#endif
diff --git a/projects/mongrel_experimental/ext/uri_classifier/extconf.rb b/projects/mongrel_experimental/ext/uri_classifier/extconf.rb
deleted file mode 100644
index 06b1cd0..0000000
--- a/projects/mongrel_experimental/ext/uri_classifier/extconf.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-require 'mkmf'
-
-dir_config("uri_classifier")
-have_library("c", "main")
-create_makefile("uri_classifier")
diff --git a/projects/mongrel_experimental/ext/uri_classifier/tst.h b/projects/mongrel_experimental/ext/uri_classifier/tst.h
deleted file mode 100644
index 3a58a65..0000000
--- a/projects/mongrel_experimental/ext/uri_classifier/tst.h
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-struct node
-{
-   unsigned char value;
-   struct node *left;
-   struct node *middle;
-   struct node *right;
-};
-
-struct tst
-{
-   int node_line_width;
-   struct node_lines *node_lines;
-   struct node *free_list;
-   struct node *head[127];
-};
-
-struct node_lines
-{
-   struct node *node_line;
-   struct node_lines *next;
-};
-
-enum tst_constants
-{
-   TST_OK, TST_ERROR, TST_NULL_KEY, TST_DUPLICATE_KEY, TST_REPLACE, TST_LONGEST_MATCH
-};
-
-struct tst *tst_init(int node_line_width);
-
-int tst_insert(unsigned char *key, void *data, struct tst *tst, int option, void **exist_ptr);
-
-void *tst_search(const unsigned char *key, struct tst *tst, int option, unsigned int *match_len);
-
-void *tst_delete(unsigned char *key, struct tst *tst);
-
-void tst_cleanup(struct tst *tst);
-
-
diff --git a/projects/mongrel_experimental/ext/uri_classifier/tst_cleanup.c b/projects/mongrel_experimental/ext/uri_classifier/tst_cleanup.c
deleted file mode 100644
index a85491d..0000000
--- a/projects/mongrel_experimental/ext/uri_classifier/tst_cleanup.c
+++ /dev/null
@@ -1,23 +0,0 @@
-
-#include "tst.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-void tst_cleanup(struct tst *tst)
-{
-   struct node_lines *current_line;
-   struct node_lines *next_line;
-
-   next_line = tst->node_lines;
-
-   do
-   {
-      current_line = next_line;
-      next_line = current_line->next;
-      free(current_line->node_line);
-      free(current_line);
-   }
-   while(next_line != NULL);
-
-   free(tst);
-}
diff --git a/projects/mongrel_experimental/ext/uri_classifier/tst_delete.c b/projects/mongrel_experimental/ext/uri_classifier/tst_delete.c
deleted file mode 100644
index cb18f16..0000000
--- a/projects/mongrel_experimental/ext/uri_classifier/tst_delete.c
+++ /dev/null
@@ -1,146 +0,0 @@
-
-#include "tst.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-void *tst_delete(unsigned char *key, struct tst *tst)
-{
-   struct node *current_node;
-   struct node *current_node_parent;
-   struct node *last_branch;
-   struct node *last_branch_parent;
-   struct node *next_node;
-   struct node *last_branch_replacement;
-   struct node *last_branch_dangling_child;
-   int key_index;
-
-  
-   if(key[0] == 0)
-      return NULL;
-   if(tst->head[(int)key[0]] == NULL)
-      return NULL;
-  
-   last_branch = NULL;
-   last_branch_parent = NULL;
-   current_node = tst->head[(int)key[0]];
-   current_node_parent = NULL;
-   key_index = 1;
-   while(current_node != NULL)
-   {
-      if(key[key_index] == current_node->value)
-      {
-        
-         if( (current_node->left != NULL) || (current_node->right != NULL) )
-         {
-            last_branch = current_node;
-            last_branch_parent = current_node_parent;
-         }
-         if(key[key_index] == 0)
-            break;
-         else
-         {
-            current_node_parent = current_node;
-            current_node = current_node->middle;
-            key_index++;
-            continue;
-         }
-      }
-      else if( ((current_node->value == 0) && (key[key_index] < 64)) ||
-         ((current_node->value != 0) && (key[key_index] <
-         current_node->value)) )
-      {
-         last_branch_parent = current_node;
-         current_node_parent = current_node;
-         current_node = current_node->left;
-         last_branch = current_node;
-         continue;
-      }
-      else
-      {
-         last_branch_parent = current_node;
-         current_node_parent = current_node;
-         current_node = current_node->right;
-         last_branch = current_node;
-         continue;
-      }
-  
-   }
-   if(current_node == NULL)
-      return NULL;
-  
-   if(last_branch == NULL)
-   {
-      
-         next_node = tst->head[(int)key[0]];
-         tst->head[(int)key[0]] = NULL;
-   }
-   else if( (last_branch->left == NULL) && (last_branch->right == NULL) )
-   {
-      
-      if(last_branch_parent->left == last_branch)
-         last_branch_parent->left = NULL;
-      else
-         last_branch_parent->right = NULL;
-      
-      next_node = last_branch;
-   }
-   else
-   {
-      
-      if( (last_branch->left != NULL) && (last_branch->right != NULL) )
-      {
-         last_branch_replacement = last_branch->right;
-         last_branch_dangling_child = last_branch->left;
-      }
-      else if(last_branch->right != NULL)
-      {
-         last_branch_replacement = last_branch->right;
-         last_branch_dangling_child = NULL;
-      }
-      else
-      {
-         last_branch_replacement = last_branch->left;
-         last_branch_dangling_child = NULL;
-      }
-      
-      if(last_branch_parent == NULL)
-         tst->head[(int)key[0]]=last_branch_replacement;
-      else
-      {
-         if (last_branch_parent->left == last_branch)
-            last_branch_parent->left = last_branch_replacement;
-         else if (last_branch_parent->right == last_branch)
-            last_branch_parent->right = last_branch_replacement;
-         else
-            last_branch_parent->middle = last_branch_replacement;
-      }
-      
-      if(last_branch_dangling_child != NULL)
-      {
-         current_node = last_branch_replacement;
-      
-         while (current_node->left != NULL)
-            current_node = current_node->left;
-      
-         current_node->left = last_branch_dangling_child;
-      }
-      
-      next_node = last_branch;
-   }
-  
-   do
-   {
-      current_node = next_node;
-      next_node = current_node->middle;
-      
-      current_node->left = NULL;
-      current_node->right = NULL;
-      current_node->middle = tst->free_list;
-      tst->free_list = current_node;
-   }
-   while(current_node->value != 0);
-  
-   return next_node;
-  
-}
-
diff --git a/projects/mongrel_experimental/ext/uri_classifier/tst_grow_node_free_list.c b/projects/mongrel_experimental/ext/uri_classifier/tst_grow_node_free_list.c
deleted file mode 100644
index da21333..0000000
--- a/projects/mongrel_experimental/ext/uri_classifier/tst_grow_node_free_list.c
+++ /dev/null
@@ -1,38 +0,0 @@
-
-#include "tst.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-int tst_grow_node_free_list(struct tst *tst)
-{
-   struct node *current_node;
-   struct node_lines *new_line;
-   int i;
-
-  
-   if((new_line = (struct node_lines *) malloc(sizeof(struct node_lines))) == NULL)
-      return TST_ERROR;
-  
-   if((new_line->node_line = (struct node *)
-   calloc(tst->node_line_width, sizeof(struct node))) == NULL)
-   {
-      free(new_line);
-      return TST_ERROR;
-   }
-   else
-   {
-      new_line->next = tst->node_lines;
-      tst->node_lines = new_line;
-   }
-  
-   current_node = tst->node_lines->node_line;
-   tst->free_list = current_node;
-   for (i = 1; i < tst->node_line_width; i++)
-   {
-      current_node->middle = &(tst->node_lines->node_line[i]);
-      current_node = current_node->middle;
-   }
-   current_node->middle = NULL;
-   return 1;
-}
-
diff --git a/projects/mongrel_experimental/ext/uri_classifier/tst_init.c b/projects/mongrel_experimental/ext/uri_classifier/tst_init.c
deleted file mode 100644
index 259734a..0000000
--- a/projects/mongrel_experimental/ext/uri_classifier/tst_init.c
+++ /dev/null
@@ -1,41 +0,0 @@
-
-#include "tst.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-struct tst *tst_init(int width)
-{
-   struct tst *tst;
-   struct node *current_node;
-   int i;
-
-
-if((tst = (struct tst *) calloc(1, sizeof(struct tst))) == NULL)
-   return NULL;
-
-if ((tst->node_lines = (struct node_lines *) calloc(1, sizeof(struct node_lines))) == NULL)
-{
-   free(tst);
-   return NULL;
-}
-
-tst->node_line_width = width;
-tst->node_lines->next = NULL;
-if ((tst->node_lines->node_line = (struct node *) calloc(width, sizeof(struct node))) == NULL)
-{
-   free(tst->node_lines);
-   free(tst);
-   return NULL;
-}
-
-current_node = tst->node_lines->node_line;
-tst->free_list = current_node;
-for (i = 1; i < width; i++)
-{
-   current_node->middle = &(tst->node_lines->node_line[i]);
-   current_node = current_node->middle;
-}
-current_node->middle = NULL;
-return tst;
-}
-
diff --git a/projects/mongrel_experimental/ext/uri_classifier/tst_insert.c b/projects/mongrel_experimental/ext/uri_classifier/tst_insert.c
deleted file mode 100644
index de50f4a..0000000
--- a/projects/mongrel_experimental/ext/uri_classifier/tst_insert.c
+++ /dev/null
@@ -1,218 +0,0 @@
-
-#include "tst.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-int tst_grow_node_free_list(struct tst *tst);
-int tst_insert(unsigned char *key, void *data, struct tst *tst, int option, void **exist_ptr)
-{
-   struct node *current_node;
-   struct node *new_node_tree_begin = NULL;
-   struct node *new_node;
-   int key_index;
-   int perform_loop = 1;
-  
-   if (key == NULL)
-      return TST_NULL_KEY;
-  
-   if(key[0] == 0)
-      return TST_NULL_KEY;
-  
-   if(tst->head[(int)key[0]] == NULL)
-   {
-      
-      if(tst->free_list == NULL)
-      {
-         if(tst_grow_node_free_list(tst) != 1)
-            return TST_ERROR;
-      }
-      tst->head[(int)key[0]] = tst->free_list;
-      
-      tst->free_list = tst->free_list->middle;
-      current_node = tst->head[(int)key[0]];
-      current_node->value = key[1];
-      if(key[1] == 0)
-      {
-         current_node->middle = data;
-         return TST_OK;
-      }
-      else
-         perform_loop = 0;
-   }
-  
-   current_node = tst->head[(int)key[0]];
-   key_index = 1;
-   while(perform_loop == 1)
-   {
-      if(key[key_index] == current_node->value)
-      {
-        
-         if(key[key_index] == 0)
-         {
-            if (option == TST_REPLACE)
-            {
-               if (exist_ptr != NULL)
-                  *exist_ptr = current_node->middle;
-        
-               current_node->middle = data;
-               return TST_OK;
-            }
-            else
-            {
-               if (exist_ptr != NULL)
-                  *exist_ptr = current_node->middle;
-               return TST_DUPLICATE_KEY;
-            }
-         }
-         else
-         {
-            if(current_node->middle == NULL)
-            {
-              
-               if(tst->free_list == NULL)
-               {
-                  if(tst_grow_node_free_list(tst) != 1)
-                     return TST_ERROR;
-               }
-               current_node->middle = tst->free_list;
-              
-               tst->free_list = tst->free_list->middle;
-               new_node_tree_begin = current_node;
-               current_node = current_node->middle;
-               current_node->value = key[key_index];
-               break;
-            }
-            else
-            {
-               current_node = current_node->middle;
-               key_index++;
-               continue;
-            }
-         }
-      }
-      if(key[key_index] == 0)
-      {
-               if(tst->free_list == NULL)
-         {
-             if(tst_grow_node_free_list(tst) != 1)
-                 return TST_ERROR;
-         }
-         new_node = tst->free_list;
-         tst->free_list = tst->free_list->middle;
-
-         memcpy((void*)new_node, (void*)current_node, sizeof(struct node));
-         current_node->value = 0;
-         if(new_node->value < 64)
-         {
-            current_node->left = new_node;
-            current_node->right = '\0';
-         }
-         else
-         {
-            current_node->left = '\0';
-            current_node->right = new_node;
-         }
-
-         current_node->middle = data;
-         return TST_OK;
-      }
-
-      if( ((current_node->value == 0) && (key[key_index] < 64)) ||
-         ((current_node->value != 0) && (key[key_index] <
-         current_node->value)) )
-      {
-        
-         if (current_node->left == NULL)
-         {
-            
-            if(tst->free_list == NULL)
-            {
-               if(tst_grow_node_free_list(tst) != 1)
-                  return TST_ERROR;
-            }
-            current_node->left = tst->free_list;
-            
-            tst->free_list = tst->free_list->middle;
-            new_node_tree_begin = current_node;
-            current_node = current_node->left;
-            current_node->value = key[key_index];
-            if(key[key_index] == 0)
-            {
-               current_node->middle = data;
-               return TST_OK;
-            }
-            else
-               break;
-         }
-         else
-         {
-            current_node = current_node->left;
-            continue;
-         }
-      }
-      else
-      {
-        
-         if (current_node->right == NULL)
-         {
-            
-            if(tst->free_list == NULL)
-            {
-               if(tst_grow_node_free_list(tst) != 1)
-                  return TST_ERROR;
-            }
-            current_node->right = tst->free_list;
-            
-            tst->free_list = tst->free_list->middle;
-            new_node_tree_begin = current_node;
-            current_node = current_node->right;
-            current_node->value = key[key_index];
-            break;
-         }
-         else
-         {
-            current_node = current_node->right;
-            continue;
-         }
-      }
-   }
-  
-   do
-   {
-      key_index++;
-  
-      if(tst->free_list == NULL)
-      {
-         if(tst_grow_node_free_list(tst) != 1)
-         {
-            current_node = new_node_tree_begin->middle;
-  
-            while (current_node->middle != NULL)
-               current_node = current_node->middle;
-  
-            current_node->middle = tst->free_list;
-            tst->free_list = new_node_tree_begin->middle;
-            new_node_tree_begin->middle = NULL;
-  
-            return TST_ERROR;
-         }
-      }
-  
-      
-      if(tst->free_list == NULL)
-      {
-         if(tst_grow_node_free_list(tst) != 1)
-            return TST_ERROR;
-      }
-      current_node->middle = tst->free_list;
-      
-      tst->free_list = tst->free_list->middle;
-      current_node = current_node->middle;
-      current_node->value = key[key_index];
-   } while(key[key_index] !=0);
-  
-   current_node->middle = data;
-   return TST_OK;
-}
-
diff --git a/projects/mongrel_experimental/ext/uri_classifier/tst_search.c b/projects/mongrel_experimental/ext/uri_classifier/tst_search.c
deleted file mode 100644
index 176f953..0000000
--- a/projects/mongrel_experimental/ext/uri_classifier/tst_search.c
+++ /dev/null
@@ -1,73 +0,0 @@
-
-#include "tst.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-
-
-void *tst_search(const unsigned char *key, struct tst *tst, int option,
-                 unsigned int *match_len)
-{
-    struct node *current_node;
-    struct node *longest_match = NULL;
-    unsigned int longest_match_len = 0;
-    int key_index;
-
-    assert(key != NULL && "key can't be NULL");
-    assert(tst != NULL && "tst can't be NULL");
-
-    if (key[0] == 0)
-        return NULL;
-
-    if (tst->head[(int) key[0]] == NULL)
-        return NULL;
-
-    if (match_len)
-        *match_len = 0;
-
-    current_node = tst->head[(int) key[0]];
-    key_index = 1;
-
-    while (current_node != NULL) {
-        if (key[key_index] == current_node->value) {
-            if (current_node->value == 0) {
-                if (match_len)
-                    *match_len = key_index;
-                return current_node->middle;
-            } else {
-                current_node = current_node->middle;
-                key_index++;
-                continue;
-            }
-        } else {
-            if (current_node->value == 0) {
-                if (option & TST_LONGEST_MATCH) {
-                    longest_match = current_node->middle;
-                    longest_match_len = key_index;
-                }
-
-                if (key[key_index] < 64) {
-                    current_node = current_node->left;
-                    continue;
-                } else {
-                    current_node = current_node->right;
-                    continue;
-                }
-            } else {
-                if (key[key_index] < current_node->value) {
-                    current_node = current_node->left;
-                    continue;
-                } else {
-                    current_node = current_node->right;
-                    continue;
-                }
-            }
-        }
-    }
-
-    if (match_len)
-        *match_len = longest_match_len;
-
-    return longest_match;
-
-}
diff --git a/projects/mongrel_experimental/ext/uri_classifier/uri_classifier.c b/projects/mongrel_experimental/ext/uri_classifier/uri_classifier.c
deleted file mode 100644
index 05603fd..0000000
--- a/projects/mongrel_experimental/ext/uri_classifier/uri_classifier.c
+++ /dev/null
@@ -1,216 +0,0 @@
-/**
- * Copyright (c) 2005 Zed A. Shaw
- * You can redistribute it and/or modify it under the same terms as Ruby.
- */
-#include "ruby.h"
-#include "ext_help.h"
-#include <assert.h>
-#include <string.h>
-#include <ctype.h>
-#include "tst.h"
-
-static VALUE mMongrel;
-static VALUE cURIClassifier;
-
-#define id_handler_map rb_intern("@handler_map")
-
-#define TRIE_INCREASE 30
-
-void URIClassifier_free(void *data)
-{
-  TRACE();
-
-  if(data) {
-    tst_cleanup((struct tst *)data);
-  }
-}
-
-VALUE URIClassifier_alloc(VALUE klass)
-{
-  VALUE obj;
-  struct tst *tst = tst_init(TRIE_INCREASE);
-  TRACE();
-  assert(tst && "failed to initialize trie structure");
-
-  obj = Data_Wrap_Struct(klass, NULL, URIClassifier_free, tst);
-
-  return obj;
-}
-
-/**
- * call-seq:
- *    URIClassifier.new -> URIClassifier
- *
- * Initializes a new URIClassifier object that you can use to associate URI sequences
- * with objects.  You can actually use it with any string sequence and any objects,
- * but it's mostly used with URIs.
- *
- * It uses TST from http://www.octavian.org/cs/software.html to build an ternary search
- * trie to hold all of the URIs.  It uses this to do an initial search for the a URI
- * prefix, and then to break the URI into SCRIPT_NAME and PATH_INFO portions.  It actually
- * will do two searches most of the time in order to find the right handler for the
- * registered prefix portion.
- *
- */
-VALUE URIClassifier_init(VALUE self)
-{
-  VALUE hash;
-
-  /* we create an internal hash to protect stuff from the GC */
-  hash = rb_hash_new();
-  rb_ivar_set(self, id_handler_map, hash);
-
-  return self;
-}
-
-
-/**
- * call-seq:
- *    uc.register("/someuri", SampleHandler.new) -> nil
- *
- * Registers the SampleHandler (one for all requests) with the "/someuri".
- * When URIClassifier::resolve is called with "/someuri" it'll return
- * SampleHandler immediately.  When called with "/someuri/iwant" it'll also
- * return SomeHandler immediatly, with no additional searches, but it will
- * return path info with "/iwant".
- *
- * You actually can reuse this class to register nearly anything and
- * quickly resolve it.  This could be used for caching, fast mapping, etc.
- * The downside is it uses much more memory than a Hash, but it can be
- * a lot faster.  It's main advantage is that it works on prefixes, which
- * is damn hard to get right with a Hash.
- */
-VALUE URIClassifier_register(VALUE self, VALUE uri, VALUE handler)
-{
-  int rc = 0;
-  void *ptr = NULL;
-  struct tst *tst = NULL;
-  DATA_GET(self, struct tst, tst);
-
-  rc = tst_insert((unsigned char *)StringValueCStr(uri), (void *)handler , tst, 0, &ptr);
-
-  if(rc == TST_DUPLICATE_KEY) {
-    rb_raise(rb_eStandardError, "Handler already registered with that name");
-  } else if(rc == TST_ERROR) {
-    rb_raise(rb_eStandardError, "Memory error registering handler");
-  } else if(rc == TST_NULL_KEY) {
-    rb_raise(rb_eStandardError, "URI was empty");
-  }
-
-  rb_hash_aset(rb_ivar_get(self, id_handler_map), uri, handler);
-
-  return Qnil;
-}
-
-
-/**
- * call-seq:
- *    uc.unregister("/someuri")
- *
- * Yep, just removes this uri and it's handler from the trie.
- */
-VALUE URIClassifier_unregister(VALUE self, VALUE uri)
-{
-  void *handler = NULL;
-  struct tst *tst = NULL;
-  DATA_GET(self, struct tst, tst);
-
-  handler = tst_delete((unsigned char *)StringValueCStr(uri), tst);
-
-  if(handler) {
-    rb_hash_delete(rb_ivar_get(self, id_handler_map), uri);
-
-    return (VALUE)handler;
-  } else {
-    return Qnil;
-  }
-}
-
-
-/**
- * call-seq:
- *    uc.resolve("/someuri") -> "/someuri", "", handler
- *    uc.resolve("/someuri/pathinfo") -> "/someuri", "/pathinfo", handler
- *    uc.resolve("/notfound/orhere") -> nil, nil, nil
- *    uc.resolve("/") -> "/", "/", handler  # if uc.register("/", handler)
- *    uc.resolve("/path/from/root") -> "/", "/path/from/root", handler  # if uc.register("/", handler)
- *
- * Attempts to resolve either the whole URI or at the longest prefix, returning
- * the prefix (as script_info), path (as path_info), and registered handler
- * (usually an HttpHandler).  If it doesn't find a handler registered at the longest
- * match then it returns nil,nil,nil.
- *
- * Because the resolver uses a trie you are able to register a handler at *any* character
- * in the URI and it will be handled as long as it's the longest prefix.  So, if you
- * registered handler #1 at "/something/lik", and #2 at "/something/like/that", then a
- * a search for "/something/like" would give you #1.  A search for "/something/like/that/too"
- * would give you #2.
- *
- * This is very powerful since it means you can also attach handlers to parts of the ;
- * (semi-colon) separated path params, any part of the path, use off chars, anything really.
- * It also means that it's very efficient to do this only taking as long as the URI has
- * characters.
- *
- * A slight modification to the CGI 1.2 standard is given for handlers registered to "/".
- * CGI expects all CGI scripts to be at some script path, so it doesn't really say anything
- * about a script that handles the root.  To make this work, the resolver will detect that
- * the requested handler is at "/", and return that for script_name, and then simply return
- * the full URI back as path_info.
- *
- * It expects strings with no embedded '\0' characters.  Don't try other string-like stuff yet.
- */
-VALUE URIClassifier_resolve(VALUE self, VALUE uri)
-{
-  void *handler = NULL;
-  int pref_len = 0;
-  struct tst *tst = NULL;
-  VALUE result;
-  unsigned char *uri_str = NULL;
-
-  DATA_GET(self, struct tst, tst);
-  uri_str = (unsigned char *)StringValueCStr(uri);
-
-  handler = tst_search(uri_str, tst, TST_LONGEST_MATCH, &pref_len);
-
-  /* setup for multiple return values */
-  result = rb_ary_new();
-
-  if(handler) {
-    rb_ary_push(result, rb_str_substr (uri, 0, pref_len));
-    /* compensate for a script_name="/" where we need to add the "/" to path_info to keep it consistent */
-    if(pref_len == 1 && uri_str[0] == '/') {
-      /* matches the root URI so we have to use the whole URI as the path_info */
-      rb_ary_push(result, uri);
-    } else {
-      /* matches a script so process like normal */
-      rb_ary_push(result, rb_str_substr(uri, pref_len, RSTRING(uri)->len));
-    }
-
-    rb_ary_push(result, (VALUE)handler);
-  } else {
-    /* not found so push back nothing */
-    rb_ary_push(result, Qnil);
-    rb_ary_push(result, Qnil);
-    rb_ary_push(result, Qnil);
-  }
-
-  return result;
-}
-
-VALUE URIClassifier_uris(VALUE self) {
-  return rb_funcall(rb_ivar_get(self, id_handler_map), rb_intern("keys"), 0);
-}
-
-void Init_uri_classifier()
-{
-
-  mMongrel = rb_define_module("Mongrel");
-
-  cURIClassifier = rb_define_class_under(mMongrel, "URIClassifier", rb_cObject);
-  rb_define_alloc_func(cURIClassifier, URIClassifier_alloc);
-  rb_define_method(cURIClassifier, "initialize", URIClassifier_init, 0);
-  rb_define_method(cURIClassifier, "register", URIClassifier_register, 2);
-  rb_define_method(cURIClassifier, "unregister", URIClassifier_unregister, 1);
-  rb_define_method(cURIClassifier, "resolve", URIClassifier_resolve, 1);
-  rb_define_method(cURIClassifier, "uris", URIClassifier_uris, 0);
-}
diff --git a/projects/mongrel_experimental/lib/mongrel_experimental.rb b/projects/mongrel_experimental/lib/mongrel_experimental.rb
deleted file mode 100644
index 1825fe1..0000000
--- a/projects/mongrel_experimental/lib/mongrel_experimental.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-
-require 'uri_classifier'
-STDERR.puts "** Mongrel_experimental loaded"
diff --git a/projects/mongrel_experimental/test/test_uriclassifier.rb b/projects/mongrel_experimental/test/test_uriclassifier.rb
deleted file mode 100644
index b83eac4..0000000
--- a/projects/mongrel_experimental/test/test_uriclassifier.rb
+++ /dev/null
@@ -1,262 +0,0 @@
-# Copyright (c) 2005 Zed A. Shaw
-# You can redistribute it and/or modify it under the same terms as Ruby.
-#
-# Additional work donated by contributors.  See http://mongrel.rubyforge.org/attributions.html
-# for more information.
-
-require 'lib/uri_classifier'
-require 'test/unit'
-
-include Mongrel
-
-class URIClassifierTest < Test::Unit::TestCase
-
-  def test_uri_finding
-    uri_classifier = URIClassifier.new
-    uri_classifier.register("/test", 1)
-    
-    script_name, path_info, value = uri_classifier.resolve("/test")
-    assert_equal 1, value
-    assert_equal "/test", script_name
-  end
-  
-  def test_root_handler_only
-    uri_classifier = URIClassifier.new
-    uri_classifier.register("/", 1)
-    
-    script_name, path_info, value = uri_classifier.resolve("/test")
-    assert_equal 1, value
-    assert_equal "/", script_name
-    assert_equal "/test", path_info
-  end
-
-  def test_uri_prefix_ops
-    test = "/pre/fix/test"
-    prefix = "/pre"
-
-    uri_classifier = URIClassifier.new
-    uri_classifier.register(prefix,1)
-
-    script_name, path_info, value = uri_classifier.resolve(prefix)
-    script_name, path_info, value = uri_classifier.resolve(test)
-    assert_equal 1, value
-    assert_equal prefix, script_name
-    assert_equal test[script_name.length .. -1], path_info
-
-    assert uri_classifier.inspect
-    assert_equal prefix, uri_classifier.uris[0]
-  end
-
-  def test_not_finding
-    test = "/cant/find/me"
-    uri_classifier = URIClassifier.new
-    uri_classifier.register(test, 1)
-
-    script_name, path_info, value = uri_classifier.resolve("/nope/not/here")
-    assert_nil script_name
-    assert_nil path_info
-    assert_nil value
-  end
-
-  def test_exceptions
-    uri_classifier = URIClassifier.new
-
-    uri_classifier.register("/test", 1)
-    
-    failed = false
-    begin
-      uri_classifier.register("/test", 1)
-    rescue => e
-      failed = true
-    end
-
-    assert failed
-
-    failed = false
-    begin
-      uri_classifier.register("", 1)
-    rescue => e
-      failed = true
-    end
-
-    assert failed
-  end
-
-
-  def test_register_unregister
-    uri_classifier = URIClassifier.new
-    
-    100.times do
-      uri_classifier.register("/stuff", 1)
-      value = uri_classifier.unregister("/stuff")
-      assert_equal 1, value
-    end
-
-    uri_classifier.register("/things",1)
-    script_name, path_info, value = uri_classifier.resolve("/things")
-    assert_equal 1, value
-
-    uri_classifier.unregister("/things")
-    script_name, path_info, value = uri_classifier.resolve("/things")
-    assert_nil value
-
-  end
-
-
-  def test_uri_branching
-    uri_classifier = URIClassifier.new
-    uri_classifier.register("/test", 1)
-    uri_classifier.register("/test/this",2)
-  
-    script_name, path_info, handler = uri_classifier.resolve("/test")
-    script_name, path_info, handler = uri_classifier.resolve("/test/that")
-    assert_equal "/test", script_name, "failed to properly find script off branch portion of uri"
-    assert_equal "/that", path_info
-    assert_equal 1, handler, "wrong result for branching uri"
-  end
-
-  def test_all_prefixing
-    tests = ["/test","/test/that","/test/this"]
-    uri = "/test/this/that"
-    uri_classifier = URIClassifier.new
-    
-    current = ""
-    uri.each_byte do |c|
-      current << c.chr
-      uri_classifier.register(current, c)
-    end
-    
-
-    # Try to resolve everything with no asserts as a fuzzing
-    tests.each do |prefix|
-      current = ""
-      prefix.each_byte do |c|
-        current << c.chr
-        script_name, path_info, handler = uri_classifier.resolve(current)
-        assert script_name
-        assert path_info
-        assert handler
-      end
-    end
-
-    # Assert that we find stuff
-    tests.each do |t|
-      script_name, path_info, handler = uri_classifier.resolve(t)
-      assert handler
-    end
-
-    # Assert we don't find stuff
-    script_name, path_info, handler = uri_classifier.resolve("chicken")
-    assert_nil handler
-    assert_nil script_name
-    assert_nil path_info
-  end
-
-
-  # Verifies that a root mounted ("/") handler resolves
-  # such that path info matches the original URI.
-  # This is needed to accommodate real usage of handlers.
-  def test_root_mounted
-    uri_classifier = URIClassifier.new
-    root = "/"
-    path = "/this/is/a/test"
-
-    uri_classifier.register(root, 1)
-
-    script_name, path_info, handler = uri_classifier.resolve(root)
-    assert_equal 1, handler
-    assert_equal root, path_info
-    assert_equal root, script_name
-
-    script_name, path_info, handler = uri_classifier.resolve(path)
-    assert_equal path, path_info
-    assert_equal root, script_name
-    assert_equal 1, handler
-  end
-
-  # Verifies that a root mounted ("/") handler
-  # is the default point, doesn't matter the order we use
-  # to register the URIs
-  def test_classifier_order
-    tests = ["/before", "/way_past"]
-    root = "/"
-    path = "/path"
-
-    uri_classifier = URIClassifier.new
-    uri_classifier.register(path, 1)
-    uri_classifier.register(root, 2)
-
-    tests.each do |uri|
-      script_name, path_info, handler = uri_classifier.resolve(uri)
-      assert_equal root, script_name, "#{uri} did not resolve to #{root}"
-      assert_equal uri, path_info
-      assert_equal 2, handler
-    end
-  end
-  
-  if ENV['BENCHMARK']
-    # Eventually we will have a suite of benchmarks instead of lamely installing a test
-    
-    def test_benchmark    
-
-      # This URI set should favor a TST. Both versions increase linearly until you hit 14
-      # URIs, then the TST flattens out.
-      @uris = %w(
-        /
-        /dag /dig /digbark /dog /dogbark /dog/bark /dug /dugbarking /puppy
-        /c /cat /cat/tree /cat/tree/mulberry /cats /cot /cot/tree/mulberry /kitty /kittycat
-#        /eag /eig /eigbark /eog /eogbark /eog/bark /eug /eugbarking /iuppy
-#        /f /fat /fat/tree /fat/tree/mulberry /fats /fot /fot/tree/mulberry /jitty /jittyfat
-#        /gag /gig /gigbark /gog /gogbark /gog/bark /gug /gugbarking /kuppy
-#        /h /hat /hat/tree /hat/tree/mulberry /hats /hot /hot/tree/mulberry /litty /littyhat
-#        /ceag /ceig /ceigbark /ceog /ceogbark /ceog/cbark /ceug /ceugbarking /ciuppy
-#        /cf /cfat /cfat/ctree /cfat/ctree/cmulberry /cfats /cfot /cfot/ctree/cmulberry /cjitty /cjittyfat
-#        /cgag /cgig /cgigbark /cgog /cgogbark /cgog/cbark /cgug /cgugbarking /ckuppy
-#        /ch /chat /chat/ctree /chat/ctree/cmulberry /chats /chot /chot/ctree/cmulberry /citty /cittyhat
-      )
-      
-      @requests = %w(
-        /
-        /dig
-        /digging
-        /dogging
-        /dogbarking/
-        /puppy/barking
-        /c
-        /cat
-        /cat/shrub
-        /cat/tree
-        /cat/tree/maple
-        /cat/tree/mulberry/tree
-        /cat/tree/oak
-        /cats/
-        /cats/tree
-        /cod
-        /zebra
-      )
-    
-      @classifier = URIClassifier.new
-      @uris.each do |uri|
-        @classifier.register(uri, 1)
-      end
-      
-      puts "#{@uris.size} URIs / #{@requests.size * 10000} requests"
-  
-      Benchmark.bm do |x|
-        x.report do
-  #        require 'ruby-prof'
-  #        profile = RubyProf.profile do
-            10000.times do
-              @requests.each do |request|
-                @classifier.resolve(request)
-              end
-            end
-  #        end
-  #        File.open("profile.html", 'w') { |file| RubyProf::GraphHtmlPrinter.new(profile).print(file, 0) }
-        end
-      end          
-    end
-  end
-  
-end
-
diff --git a/projects/mongrel_service/CHANGELOG b/projects/mongrel_service/CHANGELOG
deleted file mode 100644
index 074c87a..0000000
--- a/projects/mongrel_service/CHANGELOG
+++ /dev/null
@@ -1,41 +0,0 @@
-* 0.3.5 *
-
-    * Wait longer for child process terminate properly (max 20 seconds). Imported
-    tests from RubyServices project. (Closes #18).
-    * Updated ServiceFB to work with FB > 0.18.
-
-* 0.3.4 *
-    
-    * Strict Gem dependencies for mongrel_service. This version is compatible
-      only with mongrel 1.0.x, 1.1.x and with win32-service 0.5.x.
-    
-    * Fixed issues realted to Win32::Service and gem_plugin being registered with
-      different names due win32-service changes.
-    
-* 0.3.3 *
-    
-    * Properly display package/gem version for mongrel_service. Closes #13823.
-    
-    * Updated ServiceFB to r80 to solve issue when compiling with FB > 0.17.
-    
-* 0.3.2 *
-    
-    * Solved detection of parent process at ServiceFB level
-      (solves the x64 Windows issues).
-    
-    * Upgraded to ServiceFB 'trunk' (but pistoned it, just in case).
-    
-    * Fixed problems with ruby installations outside PATH or inside folders with spaces.
-    
-    * Activate FB pedantic warnings by default (is really useful).
-    
-* 0.3.1 *
-    
-    * Single Service (SingleMongrel) object type implemented.
-    
-    * Updated Rakefile to reflect the new building steps.
-    
-    * Removed SendSignal, too hackish for my taste, replaced with complete FB solution.
-    
-    * Added basic Process monitoring and re-spawning.
-     \ No newline at end of file
diff --git a/projects/mongrel_service/COPYING b/projects/mongrel_service/COPYING
deleted file mode 100644
index 789d76e..0000000
--- a/projects/mongrel_service/COPYING
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2006 Luis Lavena, luislavena@gmail.com
-
-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 OR COPYRIGHT HOLDERS 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/projects/mongrel_service/LICENSE b/projects/mongrel_service/LICENSE
deleted file mode 100644
index e5a926e..0000000
--- a/projects/mongrel_service/LICENSE
+++ /dev/null
@@ -1,55 +0,0 @@
-Mongrel Web Server (Mongrel) is copyrighted free software by Zed A. Shaw
-<zedshaw at zedshaw dot com> and contributors. You can redistribute it
-and/or modify it under either the terms of the GPL2 or the conditions below:
-
-1. You may make and give away verbatim copies of the source form of the
-   software without restriction, provided that you duplicate all of the
-   original copyright notices and associated disclaimers.
-
-2. You may modify your copy of the software in any way, provided that
-   you do at least ONE of the following:
-
-     a) place your modifications in the Public Domain or otherwise make them
-     Freely Available, such as by posting said modifications to Usenet or an
-     equivalent medium, or by allowing the author to include your
-     modifications in the software.
-
-     b) use the modified software only within your corporation or
-        organization.
-
-     c) rename any non-standard executables so the names do not conflict with
-     standard executables, which must also be provided.
-
-     d) make other distribution arrangements with the author.
-
-3. You may distribute the software in object code or executable
-   form, provided that you do at least ONE of the following:
-
-     a) distribute the executables and library files of the software,
-     together with instructions (in the manual page or equivalent) on where
-     to get the original distribution.
-
-     b) accompany the distribution with the machine-readable source of the
-     software.
-
-     c) give non-standard executables non-standard names, with
-        instructions on where to get the original software distribution.
-
-     d) make other distribution arrangements with the author.
-
-4. You may modify and include the part of the software into any other
-   software (possibly commercial).  But some files in the distribution
-   are not written by the author, so that they are not under this terms.
-
-5. The scripts and library files supplied as input to or produced as
-   output from the software do not automatically fall under the
-   copyright of the software, but belong to whomever generated them,
-   and may be sold commercially, and may be aggregated with this
-   software.
-
-6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
-   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-   PURPOSE.
-
-
diff --git a/projects/mongrel_service/Manifest b/projects/mongrel_service/Manifest
deleted file mode 100644
index d5351fa..0000000
--- a/projects/mongrel_service/Manifest
+++ /dev/null
@@ -1,21 +0,0 @@
-bin/mongrel_service.exe
-tools/freebasic.rb
-TODO
-resources/defaults.yaml
-README
-native/mongrel_service.bi
-native/mongrel_service.bas
-native/console_process.bi
-native/console_process.bas
-native/_debug.bi
-LICENSE
-lib/ServiceFB/ServiceFB_Utils.bi
-lib/ServiceFB/ServiceFB_Utils.bas
-lib/ServiceFB/ServiceFB.bi
-lib/ServiceFB/ServiceFB.bas
-lib/ServiceFB/_utils_internals.bi
-lib/ServiceFB/_internals.bi
-lib/mongrel_service/init.rb
-COPYING
-CHANGELOG
-Manifest
diff --git a/projects/mongrel_service/README b/projects/mongrel_service/README
deleted file mode 100644
index 45bf9c8..0000000
--- a/projects/mongrel_service/README
+++ /dev/null
@@ -1,11 +0,0 @@
-== Mongrel Native Win32 Service Plugin
-
-This plugin offer native win32 services for rails. This replace mongrel_rails_service.
-It will work like before, with this this syntax when calling mongrel_rails:
-
-service::install
-service::remove
-service::update
-
-= Author:
-  Luis Lavena
diff --git a/projects/mongrel_service/Rakefile b/projects/mongrel_service/Rakefile
deleted file mode 100644
index efc9810..0000000
--- a/projects/mongrel_service/Rakefile
+++ /dev/null
@@ -1,138 +0,0 @@
-
-require 'rubygems'
-gem 'echoe', '>=2.7.11'
-require 'echoe'
-require 'tools/freebasic'
-
-# Task :package needs compile before doing the gem stuff.
-# (weird behavior of Rake?)
-task :package => [:compile]
-
-echoe_spec = Echoe.new("mongrel_service") do |p|
-  p.summary = "Mongrel Native Win32 Service Plugin for Rails"
-  p.summary += " (debug build)" unless ENV['RELEASE']
-  p.description = "This plugin offer native win32 services for rails, powered by Mongrel."
-  p.author = "Luis Lavena"
-  p.email = "luislavena@gmail.com"
-  p.platform = Gem::Platform::CURRENT
-  p.dependencies = [['gem_plugin', '>=0.2.3', '<0.3.0'],
-                    ['mongrel', '>=1.0.2', '<1.2.0'],
-                    ['win32-service', '>=0.5.2', '<0.6.0']]
-
-  p.executable_pattern = ""
-  
-  p.need_tar_gz = false
-  p.need_zip = true
-  p.certificate_chain = [
-    '~/projects/gem_certificates/mongrel-public_cert.pem',
-    '~/projects/gem_certificates/luislavena-mongrel-public_cert.pem'
-  ]
-  p.require_signed = true
-end
-
-desc "Compile native code"
-task :compile => [:native_lib, :native_service]
-
-# global options shared by all the project in this Rakefile
-OPTIONS = {
-  :debug => false,
-  :profile => false,
-  :errorchecking => :ex,
-  :mt => true,
-  :pedantic => true }
-
-OPTIONS[:debug] = true if ENV['DEBUG']
-OPTIONS[:profile] = true if ENV['PROFILE']
-OPTIONS[:errorchecking] = :exx if ENV['EXX']
-OPTIONS[:pedantic] = false if ENV['NOPEDANTIC']
-
-# ServiceFB namespace (lib)
-namespace :lib do
-  project_task 'servicefb' do
-    lib       'ServiceFB'
-    build_to  'lib'
-
-    define    'SERVICEFB_DEBUG_LOG' unless ENV['RELEASE']
-    source    'lib/ServiceFB/ServiceFB.bas'
-    
-    option    OPTIONS
-  end
-  
-  project_task 'servicefb_utils' do
-    lib       'ServiceFB_Utils'
-    build_to  'lib'
-
-    define    'SERVICEFB_DEBUG_LOG' unless ENV['RELEASE']
-    source    'lib/ServiceFB/ServiceFB_Utils.bas'
-    
-    option    OPTIONS
-  end
-end
-
-# add lib namespace to global tasks
-#include_projects_of :lib
-task :native_lib => "lib:build"
-task :clean => "lib:clobber"
-
-# mongrel_service (native)
-namespace :native do
-  project_task  'mongrel_service' do
-    executable  'mongrel_service'
-    build_to    'bin'
-    
-    define      'DEBUG_LOG' unless ENV['RELEASE']
-    define      "GEM_VERSION=#{echoe_spec.version}"
-    
-    main        'native/mongrel_service.bas'
-    source      'native/console_process.bas'
-    
-    lib_path    'lib'
-    library     'ServiceFB', 'ServiceFB_Utils'
-    library     'user32', 'advapi32', 'psapi'
-    
-    option      OPTIONS
-  end
-end
-
-#include_projects_of :native
-task :native_service => "native:build"
-task :clean => "native:clobber"
-
-project_task :mock_process do
-  executable  :mock_process
-  build_to    'tests'
-  
-  main        'tests/fixtures/mock_process.bas'
-  
-  option      OPTIONS
-end
-
-task "all_tests:build" => "lib:build"
-project_task :all_tests do
-  executable  :all_tests
-  build_to    'tests'
-  
-  search_path 'src', 'lib', 'native'
-  lib_path    'lib'
-  
-  main        'tests/all_tests.bas'
-  
-  # this temporally fix the inverse namespace ctors of FB
-  source      Dir.glob("tests/test_*.bas").reverse
-  
-  library     'testly'
-  
-  source      'native/console_process.bas'
-  
-  option      OPTIONS
-end
-
-desc "Run all the internal tests for the library"
-task "all_tests:run" => ["mock_process:build", "all_tests:build"] do
-  Dir.chdir('tests') do
-    sh %{all_tests}
-  end
-end
-
-desc "Run all the test for this project"
-task :test => "all_tests:run"
diff --git a/projects/mongrel_service/TODO b/projects/mongrel_service/TODO
deleted file mode 100644
index e39b38c..0000000
--- a/projects/mongrel_service/TODO
+++ /dev/null
@@ -1,19 +0,0 @@
-Legend:
-[ ] not done
-[X] done
-[+] in progess
-
-### General
-[ ] Add more documentation about services and requirements
-[ ] Add process monitoring.
-
-### Dependencies
-[+] Remove win32/service extension dependency (instead of relying in the non-official 0.5.0 one).
-  [ ] Add service management (from ServiceFB) to install and remove services.
-    
-### SingleMongrel
-[+] Sanitize SingleMongrel and document the functions.
-
-### ClusterMongrel
-[ ] Parse mongrel_cluster configuration file (yaml) looking for port information
-  [ ] Reimplent SingleMongrel for ClusterMongrel, splitting source files for better organization.
diff --git a/projects/mongrel_service/lib/ServiceFB/ServiceFB.bas b/projects/mongrel_service/lib/ServiceFB/ServiceFB.bas
deleted file mode 100644
index 8364867..0000000
--- a/projects/mongrel_service/lib/ServiceFB/ServiceFB.bas
+++ /dev/null
@@ -1,650 +0,0 @@
-'#--
-'# Copyright (c) 2006-2007 Luis Lavena, Multimedia systems
-'#
-'# This source code is released under the MIT License.
-'# See MIT-LICENSE file for details
-'#++
-
-#include once "ServiceFB.bi"
-#include once "_internals.bi"
-
-namespace fb
-namespace svc
-    '# I started this as simple, unique service served from one process
-    '# but the idea of share the same process space (and reduce resources use) was good.
-    '# to do that, I needed a references table (similar to service_table, but we will
-    '# hold the ServiceProcess registered by ServiceHost (the multi services host).
-    '# also, I needed a locking mechanism to avoid problems of two calls changing the table
-    '# at the same time.
-    dim shared _svc_references as ServiceProcess ptr ptr
-    dim shared _svc_references_count as integer
-    dim shared _svc_references_lock as any ptr
-    
-    
-    '#####################
-    '# ServiceProcess
-    '# ctor()
-    constructor ServiceProcess()
-        constructor("NewServiceProcess")
-    end constructor
-    
-    
-    '# ctor(name)
-    constructor ServiceProcess(byref new_name as string)
-        _dprint("ServiceProcess(new_name)")
-        '# assign the service name
-        this.name = new_name
-
-        '# initialize the status structure
-        with this._svcStatus
-            .dwServiceType = SERVICE_WIN32_OWN_PROCESS
-            .dwCurrentState = SERVICE_STOPPED
-            .dwControlsAccepted = (SERVICE_ACCEPT_STOP or SERVICE_ACCEPT_SHUTDOWN)
-            .dwWin32ExitCode = NO_ERROR
-            .dwServiceSpecificExitCode = NO_ERROR
-            .dwCheckPoint = 0
-            .dwWaitHint = 0
-        end with
-        
-        '# use a state placeholder
-        this.state = this._svcStatus.dwCurrentState
-        
-        '# disable shared process by default
-        this.shared_process = FALSE
-        
-        '# create the stop event
-        this._svcStopEvent = CreateEvent( 0, FALSE, FALSE, 0 )
-        _dprint("ServiceProcess(new_name) done")
-    end constructor
-    
-    
-    '# dtor()
-    destructor ServiceProcess()
-        _dprint("ServiceProcess() destructor")
-        '# safe to destroy it. anyway, just checking
-        with this
-            .onInit = 0
-            .onStart = 0
-            .onStop = 0
-            .onPause = 0
-            .onContinue = 0
-            ._threadHandle = 0
-            CloseHandle(._svcStopEvent)
-        end with
-        _dprint("ServiceProcess() destructor done")
-    end destructor
-    
-    
-    '# for single process, here I create the references table and then
-    '# delegate control to _run() which will call the service control dispatcher
-    sub ServiceProcess.Run()
-        _dprint("ServiceProcess.Run()")
-        
-        '# add the unique reference
-        _add_to_references(this)
-        
-        '# delegate control to _run()
-        _run()
-        
-        _dprint("ServiceProcess.Run() done")
-    end sub
-    
-    
-    '# I use this method to simplify changing the service state
-    '# notification to the service manager.
-    '# is needed to set dwControlsAccepted = 0 if state is SERVICE_*_PENDING
-    '# also, StillAlive() call it to set the checkpoint and waithint
-    '# to avoid SCM shut us down.
-    '# is not for the the end-user (*you*) to access it, but implemented in this
-    '# way to reduce needed to pass the right service reference each time
-    sub ServiceProcess.UpdateState(byval state as DWORD, byval checkpoint as integer = 0, byval waithint as integer = 0)
-        _dprint("ServiceProcess.UpdateState()")
-        '# set the state
-        select case state
-            '# if the service is starting or stopping, I must disable the option to accept
-            '# other controls form SCM.
-            case SERVICE_START_PENDING, SERVICE_STOP_PENDING:
-                this._svcStatus.dwControlsAccepted = 0
-            
-            '# in this case, running or paused, stop and shutdown must be available
-            '# also, we must check here if our service is capable of pause/continue ç
-            '# functionality and allow them (or not).
-            case SERVICE_RUNNING, SERVICE_PAUSED:
-                this._svcStatus.dwControlsAccepted = (SERVICE_ACCEPT_STOP or SERVICE_ACCEPT_SHUTDOWN)
-                
-                '# from start, the service accept stop and shutdown (see ctor(name)).
-                '# configure the accepted controls.
-                '# Pause and Continue only will be enabled if you setup onPause and onContinue
-                if not (this.onPause = 0) and _
-                    not (this.onContinue = 0) then
-                    this._svcStatus.dwControlsAccepted or= SERVICE_ACCEPT_PAUSE_CONTINUE
-                end if
-                
-        end select
-        
-        '# set the structure status
-        '# also the property
-        this._svcStatus.dwCurrentState = state
-        this.state = state
-        
-        '# set checkpoint and waithint
-        this._svcStatus.dwCheckPoint = checkpoint
-        this._svcStatus.dwWaitHint = waithint
-        
-        '# call the API
-        '# only we will call is _svcHandle is valid
-        '# this will allow use of UpdateState (and StillAlive) from console
-        if not (this._svcHandle = 0) then
-            _dprint("SetServiceStatus() API")
-            SetServiceStatus(this._svcHandle, @this._svcStatus)
-        end if
-        _dprint("ServiceProcess.UpdateState() done")
-    end sub
-    
-    
-    '# use StillAlive() method when performing lengthly tasks during onInit or onStop
-    '# (if they take too much time).
-    '# by default we set a wait hint gap of 10 seconds, but you could specify how many
-    '# you could specify how many seconds more will require your *work*
-    sub ServiceProcess.StillAlive(byval waithint as integer = 10)
-        dim as integer checkpoint
-
-        _dprint("ServiceProcess.StillAlive()")
-        '# start or stop pending?
-        if (this._svcStatus.dwCurrentState = SERVICE_START_PENDING) or _
-            (this._svcStatus.dwCurrentState = SERVICE_STOP_PENDING) then
-                with this
-                    checkpoint = this._svcStatus.dwCheckPoint
-                    checkpoint += 1
-                    .UpdateState(._svcStatus.dwCurrentState, checkpoint, (waithint * 1000))
-                end with
-        end if
-        _dprint("ServiceProcess.StillAlive() done")
-    end sub
-    
-    
-    '# call_onStart() is a wrapper around the new limitation of threadcreate
-    '# sub used as pointers in threadcreate must conform the signature
-    sub ServiceProcess.call_onStart(byval any_service as any ptr)
-        var service = cast(ServiceProcess ptr, any_service)
-        service->onStart(*service)
-    end sub
-    
-    '#####################
-    '# ServiceHost
-    '# ctor()
-    '# currently isn't needed, why I defined it?
-    constructor ServiceHost()
-        _dprint("ServiceHost()")
-        _dprint("ServiceHost() done")
-    end constructor
-    
-    
-    '# dtor()
-    '# currently isn't needed, why I defined it?
-    destructor ServiceHost()
-        _dprint("ServiceHost() destructor")
-        _dprint("ServiceHost() destructor done")
-    end destructor
-    
-    
-    '# using Add() will register an already initialized service into the references
-    '# table, which will be used later to launch and control the different services
-    '# we should be careful when handling references, so for that reference_lock is
-    '# provided ;-)
-    sub ServiceHost.Add(byref service as ServiceProcess)
-        _dprint("ServiceHost.Add()")
-        
-        '# add the service reference to the references table
-        '# get the new count as result, so
-        '# increment the local counter
-        this.count = _add_to_references(service)
-        
-        _dprint("ServiceHost.Add() done")
-    end sub
-    
-    
-    '# ServiceHost.Run() is just a placeholder, it delegates control to _run()
-    '# pretty simple, but still must be present to simplify user interaction.
-    sub ServiceHost.Run()
-        _dprint("ServiceHost.Run()")
-        
-        '# the longest, hard coded function in the world!
-        '# just kidding
-        _run()
-        
-        _dprint("ServiceHost.Run() done")
-    end sub
-    
-    
-    '# the purpose of this sub is provide a generic service creation and running
-    '# this is be called from exisitng ServiceProcess and ServiceHost.
-    '# this construct the SERVICE_TABLE_ENTRY based on the the references table,
-    '# which will be sent to StartServiceCtrlDispatcher()
-    private sub _run()
-        dim ServiceTable(_svc_references_count) as SERVICE_TABLE_ENTRY
-        dim idx as integer
-        
-        _dprint("_run()")
-        
-        _dprint("creating service table for " + str(_svc_references_count) + " services")
-        for idx = 0 to (_svc_references_count - 1)
-            '# we take the service name from the references and set as ServiceMain the same
-            '# _main() routine for all the services
-            ServiceTable(idx) = type<SERVICE_TABLE_ENTRY>(strptr(_svc_references[idx]->name), @_main)
-            _dprint(str(idx) + ": " + _svc_references[idx]->name)
-        next idx
-        '# last member of the table must be null
-        ServiceTable(_svc_references_count) = type<SERVICE_TABLE_ENTRY>(0, 0)
-        _dprint("service table created")
-        
-        '# start the dispatcher
-        _dprint("start service dispatcher")
-        StartServiceCtrlDispatcher( @ServiceTable(0) )
-        
-        _dprint("_run() done")
-    end sub
-    
-    
-    '# this sub is fired by StartServiceCtrlDispatcher in another thread.
-    '# because it is a global _main for all the services in the table, looking up
-    '# in the references for the right service is needed prior registering its
-    '# control handler.
-    private sub _main(byval argc as DWORD, byval argv as LPSTR ptr)
-        dim success as integer
-        dim service as ServiceProcess ptr
-        dim run_mode as string
-        dim service_name as string
-        dim commandline as string
-        dim param_line as string
-        dim temp as string
-        
-        _dprint("_main()")
-        
-        '# debug dump of argc and argv
-        dim idx as integer = 0
-        for idx = 0 to (argc - 1)
-            _dprint(str(idx) + ": " + *argv[idx])
-        next idx
-        
-        '# retrieve all the information (mode, service name and command line
-        _build_commandline(run_mode, service_name, commandline)
-        service = _find_in_references(service_name)
-        
-        '# build parameter line (passed from SCM)
-        if (argc > 1) then
-            param_line = ""
-            for idx = 1 to (argc - 1)
-                temp = *argv[idx]
-                if (instr(temp, chr(32)) > 0) then
-                    param_line += """" + temp + """"
-                else
-                    param_line += temp
-                end if
-                param_line += " "
-            next idx
-        end if
-        
-        '# parameters passed using SCM have priority over ImagePath ones
-        if not (len(param_line) = 0) then
-            commandline = param_line
-        end if
-        
-        '# a philosofical question: to run or not to run?
-        if not (service = 0) then
-            _dprint("got a valid service reference")
-            _dprint("real service name: " + service->name)
-            
-            '# pass to the service the commandline
-            _dprint("passing service commandline: " + commandline)
-            service->commandline = commandline
-            
-            '# ok, its a service!, its alive!
-            '# register his ControlHandlerEx
-            _dprint("register control handler ex")
-            service->_svcHandle = RegisterServiceCtrlHandlerEx(strptr(service_name), @_control_ex, cast(LPVOID, service))
-            
-            '# check if evething is done right
-            if not (service->_svcHandle = 0) then
-                '# now, we are a single service or a bunch, like the bradys?
-                if (_svc_references_count > 1) then
-                    '# determine if we share or not the process
-                    if (service->shared_process = FALSE) then
-                        service->_svcStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS
-                    else
-                        '# this mean we will be sharing... hope neighbors don't crash the house!
-                        service->_svcStatus.dwServiceType = SERVICE_WIN32_SHARE_PROCESS
-                    end if
-                else
-                    '# ok, we have a full house (ehem, process) for us only!
-                    service->_svcStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS
-                end if
-                
-                '# START_PENDING
-                _dprint("service start pending")
-                service->UpdateState(SERVICE_START_PENDING)
-                
-                '# now delegate to the long running initialization if it exist.
-                if not (service->onInit = 0) then
-                    _dprint("pass control to lengthly initialization")
-                    success = service->onInit(*service)
-                else
-                    '# if no onInit was defined (maybe you don't need it?)
-                    '# we should simulate it was successful to proceed
-                    success = (-1)
-                end if
-                _dprint("onInit result: " + str(success))
-                
-                '# check if everything is ok
-                '# if onInit showed problems, 0 was returned and service must not continue
-                if not (success = 0) then
-                    '# SERVICE_RUNNING
-                    '# we must launch the onStart as thread, but first setting state as running
-                    service->UpdateState(SERVICE_RUNNING)
-                    if not (service->onStart = 0) then
-                        _dprint("dispatch onStart() as new thread")
-                        service->_threadHandle = threadcreate(@ServiceProcess.call_onStart, service)
-                        '# my guess? was a hit!
-                    end if
-                    
-                    '# now that we are out of onStart thread, check if actually hit the stop sign
-                    _dprint("waiting for stop signal")
-                    do
-                        '# do nothing ...
-                        '# but not too often!
-                    loop while (WaitForSingleObject(service->_svcStopEvent, 100) = WAIT_TIMEOUT)
-                    
-                    '# now, wait for the thread (anyway, I hope it will be checking this.state, right?)
-                    '# we should do this, or actualy jump and wait for StopEvent?
-                    _dprint("waiting for onStart() thread to finish")
-                    threadwait(service->_threadHandle)
-                end if
-                
-                '# if we reach here, that means the service is not running, and the onStop was performed
-                '# so no more chat, stop it one and for all!
-                '# set SERVICE_STOPPED (just checking)
-                _dprint("service stopped")
-                service->UpdateState(SERVICE_STOPPED)
-            end if
-            
-            '# ok, we are done!
-        end if
-        
-        _dprint("_main() done")
-    end sub
-    
-    
-    '# this sub is used by _main when registering the ControlHandler for this service
-    '# (as callback from service manager).
-    '# we process each control codes and perform the actions using the pseudo-events (callbacks)
-    '# also we use lpContext to get the right reference when _main registered the control handler.
-    private function _control_ex(byval dwControl as DWORD, byval dwEventType as DWORD, byval lpEventData as LPVOID, byval lpContext as LPVOID) as DWORD
-        dim result as DWORD
-        dim service as ServiceProcess ptr
-        
-        _dprint("_control_ex()")
-        
-        '# we get a reference form the context
-        service = cast(ServiceProcess ptr, lpContext)
-        
-        '# show if the service reference is valid?
-        _dprint("service name: " + service->name)
-        
-        select case dwControl
-            case SERVICE_CONTROL_INTERROGATE:
-                '# we are running, so what we should do here?
-                _dprint("interrogation signal received")
-                '# in case we get a interrogation, we always should answer this way.
-                result = NO_ERROR
-                
-            case SERVICE_CONTROL_SHUTDOWN, SERVICE_CONTROL_STOP:
-                _dprint("stop signal received")
-                '# ok, service manager requested us to stop.
-                '# we must call onStop if was defined.
-                service->UpdateState(SERVICE_STOP_PENDING)
-                if not (service->onStop = 0) then
-                    _dprint("pass control to onStop()")
-                    service->onStop(*service)
-                end if
-                '# now signal the stop event so _main could take care of the rest.
-                _dprint("signal stop event")
-                SetEvent(service->_svcStopEvent)
-                
-            case SERVICE_CONTROL_PAUSE:
-                _dprint("pause signal received")
-                '# we must check if we could answer to the request.
-                if not (service->onPause = 0) and _
-                    not (service->onContinue = 0) then
-                    
-                    '# just to be sure
-                    if not (service->onPause = 0) then
-                        service->UpdateState(SERVICE_PAUSE_PENDING)
-                        
-                        _dprint("pass control to onPause()")
-                        service->onPause(*service)
-                        
-                        service->UpdateState(SERVICE_PAUSED)
-                        _dprint("service paused")
-                    end if
-                    result = NO_ERROR
-                    
-                else
-                    '# ok, our service didn't support pause or continue
-                    '# tell the service manager about that!
-                    result = ERROR_CALL_NOT_IMPLEMENTED
-                end if
-                
-            case SERVICE_CONTROL_CONTINUE:
-                _dprint("continue signal received")
-                '# we should resume from a paused state
-                '# we must check if we could answer to the request.
-                if not (service->onPause = 0) and _
-                    not (service->onContinue = 0) then
-                    
-                    '# just to be sure
-                    if not (service->onPause = 0) then
-                        service->UpdateState(SERVICE_CONTINUE_PENDING)
-                        
-                        _dprint("pass control to onContinue()")
-                        service->onContinue(*service)
-                        
-                        service->UpdateState(SERVICE_RUNNING)
-                        _dprint("service running")
-                    end if
-                    result = NO_ERROR
-                    
-                else
-                    '# ok, our service didn't support pause or continue
-                    '# tell the service manager about that!
-                    result = ERROR_CALL_NOT_IMPLEMENTED
-                end if
-                
-            case else:
-                result = NO_ERROR
-        end select
-        
-        _dprint("_control_ex() done")
-        return result
-    end function
-    
-    
-    '# add_to_references is a helper used to reduce code duplication (DRY).
-    '# here is used a lock around _svc_references to avoid two threads try change the
-    '# reference count (just in case).
-    function _add_to_references(byref service as ServiceProcess) as integer
-        _dprint("_add_to_references()")
-        
-        '# get a lock before even think touch references!
-        mutexlock(_svc_references_lock)
-        
-        '# now, reallocate space
-        _svc_references_count += 1
-        _svc_references = reallocate(_svc_references, sizeof(ServiceProcess ptr) * _svc_references_count)
-        
-        '# put the reference of this service into the table
-        _svc_references[(_svc_references_count - 1)] = @service
-        
-        '# ok, done, unlock our weapons! ;-)
-        mutexunlock(_svc_references_lock)
-        
-        _dprint("_add_to_references() done")
-        '# return the new references count
-        return _svc_references_count
-    end function
-    
-    
-    '# find_in_references is used by _main to lookup for the specified service in
-    '# references table.
-    function _find_in_references(byref service_name as string) as ServiceProcess ptr
-        dim result as ServiceProcess ptr
-        dim item as ServiceProcess ptr
-        dim idx as integer
-        
-        _dprint("_find_in_references()")
-        
-        '# we start with a pesimistic idea ;-)
-        result = 0
-        
-        for idx = 0 to (_svc_references_count - 1)
-            '# hold a reference to the item
-            item = _svc_references[idx]
-            
-            '# compare if we have a match
-            if (service_name = item->name) then
-                result = item
-                exit for
-            end if
-        next idx
-        
-        _dprint("_find_in_references() done")
-        '# return the found (or not) reference
-        return result
-    end function
-    
-    
-    '# namespace constructor
-    '# first we must create the mutex to be used with references
-    private sub _initialize() constructor
-        _dprint("_initialize() constructor")
-        '# we do this in case was already defined... don't know the situation,
-        '# just to be sure
-        if (_svc_references_lock = 0) then
-            _svc_references_lock = mutexcreate()
-            
-            '# also initialize our count :-)
-            _svc_references_count = 0
-        end if
-        
-        _dprint("_initialize() constructor done")
-    end sub
-    
-    
-    '# namespace destructor
-    private sub _terminate() destructor
-        _dprint("_terminate() destructor")
-        '# to avoid removing everything, we must lock to the references
-        mutexlock(_svc_references_lock)
-        
-        '# destroy our refernces allocated memory!
-        deallocate(_svc_references)
-        
-        '# unlock the mutex and destroy it too.
-        mutexunlock(_svc_references_lock)
-        mutexdestroy(_svc_references_lock)
-        
-        _dprint("_terminate() destructor done")
-    end sub
-    
-    
-    '# command line builder (helper)
-    '# this is used to gather information about:
-    '# mode (if present)
-    '# valid service name (after lookup in the table)
-    '# command line to be passed to service
-    sub _build_commandline(byref mode as string, byref service_name as string, byref commandline as string)
-        dim result_mode as string
-        dim result_name as string
-        dim result_cmdline as string
-        dim service as ServiceProcess ptr
-        dim idx as integer
-        dim temp as string
-        
-        idx = 1
-        '# first, determine if mode is pressent in commandline, must me command(1)
-        temp = lcase(command(idx))
-        
-        if (temp = "console") or _
-            (temp = "manage") then
-            result_mode = temp
-            idx += 1
-        end if
-        
-        '# now, check if service name is present
-        temp = command(idx)
-        
-        '# its present?
-        if (len(temp) > 0) then
-            '# lookup in references table
-            service = _find_in_references(temp)
-            if not (service = 0) then
-                '# was found, so must be valid
-                result_name = temp
-                '# adjust start index for cmdline
-                idx += 1
-            end if
-        end if
-
-        '# is service valid?
-        '# its really needed?
-        if (service = 0) then
-            if (_svc_references_count = 1) then
-                '# no, get the first one
-                service = _svc_references[0]
-                result_name = service->name
-                '# adjust start index for cmdline
-            else
-                '# this is needed!
-                result_name = ""
-            end if
-        end if
-        
-        result_cmdline = ""
-        
-        temp = command(idx)
-        do while (len(temp) > 0)
-            if (instr(temp, chr(32)) > 0) then
-                '# properly quote parameters with spaces
-                result_cmdline += """" + temp + """"
-            else
-                result_cmdline += temp
-            end if
-            result_cmdline += " "
-            idx += 1
-            
-            temp = command(idx)
-        loop
-        
-        '# now, return the results
-        mode = result_mode
-        service_name = result_name
-        commandline = result_cmdline
-    end sub
-    
-    
-    '# ### DEBUG ###
-    '# just for debuging purposes
-    '# (will be removed in the future when Loggers get implemented)
-#ifdef SERVICEFB_DEBUG_LOG
-    sub _dprint(byref message as string)
-        dim handle as integer
-        
-        handle = freefile
-        open EXEPATH + "\servicefb.log" for append as #handle
-        
-        print #handle, message
-        
-        close #handle
-    end sub
-#endif
-end namespace   '# fb.svc
-end namespace   '# fb
diff --git a/projects/mongrel_service/lib/ServiceFB/ServiceFB.bi b/projects/mongrel_service/lib/ServiceFB/ServiceFB.bi
deleted file mode 100644
index dc0acec..0000000
--- a/projects/mongrel_service/lib/ServiceFB/ServiceFB.bi
+++ /dev/null
@@ -1,109 +0,0 @@
-'#--
-'# Copyright (c) 2006-2007 Luis Lavena, Multimedia systems
-'#
-'# This source code is released under the MIT License.
-'# See MIT-LICENSE file for details
-'#++
-
-#if __FB_VERSION__ < "0.17"
-#error ServiceFB is designed to compile with FreeBASIC version "0.17"
-#else
-
-#ifndef __FB_WIN32__
-#error Platform unsupported. Compiling ServiceFB requires Windows platform.
-#else
-
-#ifndef __ServiceFB_bi__
-#define __ServiceFB_bi__
-
-#include once "windows.bi"
-#inclib "advapi32"
-
-namespace fb
-namespace svc   '# fb.svc
-#ifdef SERVICEFB_DEBUG_LOG
-    '# debug print
-    declare sub _dprint(byref as string)
-#else
-    #define _dprint(message)
-#endif
-    
-    '# service states used by end user with 'state' property
-    enum ServiceStateEnum
-        Running = SERVICE_RUNNING
-        Paused = SERVICE_PAUSED
-        Stopped = SERVICE_STOPPED
-    end enum
-    
-    
-    '# ServiceProcess type (object)
-    '# use this to create new services and reference the on*() methods to perform the related
-    '# tasks.
-    type ServiceProcess
-        '# ctor/dtor
-        declare constructor()
-        declare constructor(byref as string)
-        declare destructor()
-        
-        '# methods (public)
-        declare sub Run()
-        declare sub StillAlive(byval as integer = 10)
-        
-        '# helper methods (private)
-        declare sub UpdateState(byval as DWORD, byval as integer = 0, byval as integer = 0)
-        
-        '# pseudo-events
-        '# for onInit you should return FALSE (0) in case you want to abort
-        '# service initialization.
-        '# If everything was ok, then return TRUE (-1)
-        onInit          as function(byref as ServiceProcess) as integer
-        onStart         as sub(byref as ServiceProcess)
-        onStop          as sub(byref as ServiceProcess)
-        onPause         as sub(byref as ServiceProcess)
-        onContinue      as sub(byref as ServiceProcess)
-        
-        '# call_* are used to avoid the warning arround ThreadCreate
-        declare static sub call_onStart(byval as any ptr)
-        
-        '# properties (public)
-        name            as string
-        description     as string
-        state           as ServiceStateEnum
-        commandline     as string                   '# TODO
-        shared_process  as integer
-        
-        '# properties (private)
-        _svcStatus      as SERVICE_STATUS
-        _svcHandle      as SERVICE_STATUS_HANDLE
-        _svcStopEvent   as HANDLE
-        _threadHandle   as any ptr
-    end type
-    
-    
-    '# ServiceHost type (object)
-    '# use this, beside ServiceProcess, to manage the registration and running of
-    '# several services sharing the same process.
-    '# NOTE: ServiceHost.Run() and ServiceProcess.Run() are mutually exclusive, that
-    '# means don't mix single service with multiple service in the same program!
-    type ServiceHost
-        '# ctor/dtor()
-        declare constructor()
-        declare destructor()
-        
-        '# methods (public)
-        declare sub Add(byref as ServiceProcess)
-        declare sub Run()
-        
-        '# properties (public)
-        count           as integer
-    end type
-end namespace   '# fb.svc
-end namespace   '# fb
-
-#ifdef SERVICEFB_INCLUDE_UTILS
-#include once "ServiceFB_Utils.bi"
-#endif
-
-#endif '# __ServiceFB_bi__
-#endif '# __FB_WIN32__
-#endif '# __FB_VERSION__ \ No newline at end of file
diff --git a/projects/mongrel_service/lib/ServiceFB/ServiceFB_Utils.bas b/projects/mongrel_service/lib/ServiceFB/ServiceFB_Utils.bas
deleted file mode 100644
index c8a77a3..0000000
--- a/projects/mongrel_service/lib/ServiceFB/ServiceFB_Utils.bas
+++ /dev/null
@@ -1,493 +0,0 @@
-'#--
-'# Copyright (c) 2006-2007 Luis Lavena, Multimedia systems
-'#
-'# This source code is released under the MIT License.
-'# See MIT-LICENSE file for details
-'#++
-
-#include once "ServiceFB.bi"
-#include once "_internals.bi"
-#include once "ServiceFB_Utils.bi"
-#include once "_utils_internals.bi"
-
-namespace fb
-namespace svc
-namespace utils   '# fb.svc.utils
-    '# private (internals) for ServiceProcess.Console()
-    dim shared _svc_stop_signal as any ptr
-    dim shared _svc_stop_mutex as any ptr
-    dim shared _svc_stopped as BOOL
-    dim shared _svc_in_console as ServiceProcess ptr
-    dim shared _svc_in_console_stop_flag as BOOL
-    
-    '#####################
-    '# ServiceController
-    '# ctor()
-    constructor ServiceController()
-        with this
-            .product = "My Product"
-            .version = "v0.1"
-            .copyright = "my copyright goes here."
-        end with
-    end constructor
-    
-    
-    '# ctor(product)
-    constructor ServiceController(byref new_product as string)
-        this.product = new_product
-    end constructor
-    
-    
-    '# ctor(product, version)
-    constructor ServiceController(byref new_product as string, byref new_version as string)
-        constructor(new_product)
-        this.version = new_version
-    end constructor
-    
-    
-    '# ctor(product, version, copyright)
-    constructor ServiceController(byref new_product as string, byref new_version as string, byref new_copyright as string)
-        constructor(new_product, new_version)
-        this.copyright = new_copyright
-    end constructor
-    
-    
-    '# dtor()
-    destructor ServiceController()
-    end destructor
-    
-    
-    '# Banner() will display in the console, information regarding your program
-    '# using this formatting:
-    '# 'Product', 'Version'
-    '# 'Copyright'
-    sub ServiceController.Banner()
-        '# display Product and Version
-        print this.product; ", "; this.version
-        print this.copyright
-        print ""
-        '# leave a empty line between banner (header) and other info
-    end sub
-    
-    
-    '# RunMode() provide a simple way to get (*you*) from where this process was started
-    '# and do the corresponding action.
-    function ServiceController.RunMode() as ServiceRunMode
-        dim result as ServiceRunMode
-        dim currPID as DWORD
-        dim parent_pid as uinteger
-        dim parent_name as string
-        dim start_mode as string
-        
-        _dprint("ServiceController.RunMode()")
-        
-        '# get this process PID
-        currPID = GetCurrentProcessId()
-        _dprint("CurrentPID: " + str(currPID))
-        
-        '# get the parent PID
-        parent_pid = _parent_pid(currPID)
-        _dprint("ParentPID: " + str(parent_pid))
-        
-        '# now the the name
-        parent_name = _process_name(parent_pid)
-        if (parent_name = "<unknown>") then
-          parent_name = _process_name_dyn_psapi(parent_pid)
-        end if
-        _dprint("Parent Name: " + parent_name)
-        
-        '# this process started as service?
-        '# that means his parent is services.exe
-        if (parent_name = "services.exe") then
-            result = RunAsService
-        else
-            '# ok, it didn't start as service, analyze command line then
-            start_mode = lcase(trim(command(1)))
-            if (start_mode = "manage") then
-                '# start ServiceController.Manage()
-                result = RunAsManager
-            elseif (start_mode = "console") then
-                '# start ServiceController.Console()
-                result = RunAsConsole
-            else
-                '# ok, the first paramenter in the commandline didn't work,
-                '# report back so we could send the banner!
-                result = RunAsUnknown
-            end if
-        end if
-        
-        _dprint("ServiceController.RunMode() done")
-        return result
-    end function
-    
-    
-    '# Manage will offer the user (end-user) option in the commandline to
-    '# install, remove, start, stop and query the status of the installed service
-    '# use Manage() when you code a multi-services (ServiceHost) based programs
-    '# for single services, use Manage(service)
-    sub ServiceController.Manage()
-    end sub
-    
-    
-    '# this is used when you want management capabilities for your service
-    '# use this for single services, or call Manage() for multi services
-    sub ServiceController.Manage(byref service as ServiceProcess)
-    end sub
-    
-    
-    '# this offer the user a way to test/debug your service or run it like a normal
-    '# program, from the command line
-    '# will let you SHUTDOWN the service using CTRL+C
-    '# use this for multi-services (ServiceHost) based programs
-    sub ServiceController.Console()
-        dim working_thread as any ptr
-        dim run_mode as string
-        dim service_name as string
-        dim service as ServiceProcess ptr
-        dim commandline as string
-        dim success as integer
-        
-        _dprint("ServiceController.Console()")
-        
-        '# show the controller banner
-        this.Banner()
-        
-        '# determine how many service exist in references
-        if (_svc_references_count > 0) then
-            _build_commandline(run_mode, service_name, commandline)
-            service = _find_in_references(service_name)
-            
-            if (service = 0) then
-                '# no valid service reference, list available services
-                _list_references()
-            else
-                '# build the command line, excluding 'console' and service_name
-                service->commandline = commandline
-                
-                '# got a service reference
-                '# also, set the global handler that will be used by _control_handler
-                _svc_in_console = service
-                
-                '# create the signal used to stop the service thread.
-                _svc_stop_signal = condcreate()
-                _svc_stop_mutex = mutexcreate()
-                
-                '# register the Console Handler
-                SetConsoleCtrlHandler(@_console_handler, TRUE)
-                
-                print "Starting service '"; service_name; "' in console mode, please wait..."
-                
-                '# onInit should be started inline,
-                '# and its result validated!
-                if not (service->onInit = 0) then
-                    success = service->onInit(*service)
-                end if
-                
-                '# only continue if success
-                if not (success = 0) then
-                    '# now set service.state to running
-                    service->state = Running
-                    
-                    '# now, fire the main loop (onStart)
-                    if not (service->onStart = 0) then
-                        '# create the thread
-                        working_thread = threadcreate(@ServiceProcess.call_onStart, service)
-                        if (working_thread = 0) then
-                            print "Failed to create working thread."
-                        end if
-                    end if
-                    
-                    print "Service is in running state."
-                    print "Press Ctrl-C to stop it."
-                
-                    '# now that onStart is running, must monitor the stop_signal
-                    '# in case it arrives, the service state must change to exit the
-                    '# working thread.
-                    mutexlock(_svc_stop_mutex)
-                    do while (_svc_stopped = FALSE)
-                        condwait(_svc_stop_signal, _svc_stop_mutex)
-                    loop
-                    mutexunlock(_svc_stop_mutex)
-                    
-                    print "Stop signal received, stopping..."
-                    
-                    '# received the signal, so set state = Stopped
-                    service->state = Stopped
-                    
-                    print "Waiting for onStart() to exit..."
-                    
-                    '# now wait for the thread to terminate
-                    if not (working_thread = 0) then
-                        threadwait(working_thread)
-                    end if
-                    
-                else
-                    print "Error starting the service, onInit() failed."
-                end if
-                
-                print "Service stopped, doing cleanup."
-                
-                '# remove the console handler
-                SetConsoleCtrlHandler(@_console_handler, FALSE)
-                
-                '# now that service was stopped, destroy the references.
-                conddestroy(_svc_stop_signal)
-                mutexdestroy(_svc_stop_mutex)
-                print "Done."
-            end if
-        else
-            print "ERROR: No services could be served by this program. Exiting."
-        end if
-        
-        _dprint("ServiceController.Console() done")
-    end sub
-    
-    
-    '# this offer the user a way to test/debug your service or run it like a normal
-    '# program, from the command line
-    '# will let you SHUTDOWN the service using CTRL+C
-    '# use this for single-services
-    sub ServiceController.Console(byref service as ServiceProcess)
-        
-        _dprint("ServiceController.RunMode(service)")
-        
-        '# register the service in the references table
-        _add_to_references(service)
-        
-        _dprint("delegate to Console()")
-        '# now delegate control to Console()
-        this.Console()
-        
-        _dprint("ServiceController.Console(service) done")
-    end sub
-    
-    
-    '# console_handler is used to get feedback form keyboard and allow
-    '# shutdown of service using Ctrl+C / Ctrl+Break from keyboard
-    function _console_handler(byval dwCtrlType as DWORD) as BOOL
-        dim result as BOOL
-        dim service as ServiceProcess ptr
-        
-        _dprint("_console_handler()")
-        
-        '# get the reference from svc_in_console
-        service = _svc_in_console
-        
-        '# we default processing of the message to false
-        result = FALSE
-        
-        '# avoid recursion problems
-        if (_svc_in_console_stop_flag = FALSE) then
-            _dprint("no previous signaled, process event")
-            '# all the CtrlType events listed will raise the onStop
-            '# of the service
-            '# here also will be raised the _svc_stop_signal
-            select case dwCtrlType
-                case CTRL_C_EVENT, CTRL_CLOSE_EVENT, CTRL_BREAK_EVENT, CTRL_LOGOFF_EVENT, CTRL_SHUTDOWN_EVENT:
-                    _dprint("got supported CTRL_*_EVENT")
-                    '# avoid recursion problems
-                    _svc_in_console_stop_flag = TRUE
-                    _dprint("set signaled to TRUE")
-                    
-                    '# the service defined onStop?
-                    if not (service->onStop = 0) then
-                        _dprint("pass control to onStop()")
-                        service->onStop(*service)
-                    end if
-                    
-                    '# now fire the signal
-                    _dprint("fire stop signal")
-                    mutexlock(_svc_stop_mutex)
-                    condsignal(_svc_stop_signal)
-                    result = TRUE
-                    _svc_in_console_stop_flag = FALSE
-                    _svc_stopped = TRUE
-                    mutexunlock(_svc_stop_mutex)
-                    
-                case else:
-                    _dprint("unsupported CTRL EVENT")
-                    result = FALSE
-            end select
-        else
-            _dprint("already running onStop(), do not pass the message to other message handlers!")
-            result = TRUE
-        end if
-        
-        _dprint("_console_handler() done")
-        return result
-    end function
-    
-    
-    '# helper private subs used to list the services and their descriptions
-    '# in _svc_references
-    private sub _list_references()
-        dim item as ServiceProcess ptr
-        dim idx as integer
-        
-        print "Available services in this program:"
-        
-        for idx = 0 to (_svc_references_count - 1)
-            item = _svc_references[idx]
-            
-            print space(2);
-            print trim(item->name), , trim(item->description)
-        next idx
-        
-    end sub
-    
-    
-    '# TODO: SimpleLogger
-    '# TODO: EventLogger
-    
-    
-    '#####################
-    '# private (internals)
-    '# _parent_pid is used to retrieve, based on the PID you passed by, the one of the parent
-    '# that launched that process.
-    '# on fail, it will return 0
-    '# Thanks to MichaelW (FreeBASIC forums) for his help about this.
-    private function _parent_pid(byval PID as uinteger) as uinteger
-        dim as uinteger result
-        dim as HANDLE hProcessSnap
-        dim as PROCESSENTRY32 pe32
-        
-        '# initialize result, 0 = fail, other number, ParentPID
-        result = 0
-        
-        hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0)
-        if not (hProcessSnap = INVALID_HANDLE_VALUE) then
-            pe32.dwSize = sizeof(PROCESSENTRY32)
-            if (Process32First(hProcessSnap, @pe32) = TRUE) then
-                do
-                    if (pe32.th32ProcessID = PID) then
-                        result = pe32.th32ParentProcessID
-                        exit do
-                    end if
-                loop while not (Process32Next(hProcessSnap, @pe32) = 0)
-            end if
-        end if
-        
-        CloseHandle(hProcessSnap)
-        return result
-    end function
-    
-    
-    '# _process_name is used to retrieve the name (ImageName, BaseModule, whatever) of the PID you
-    '# pass to it. if no module name was found, it should return <unknown>
-    private function _process_name(byval PID as uinteger) as string
-        dim result as string
-        dim hProcess as HANDLE
-        dim hMod as HMODULE
-        dim cbNeeded as DWORD
-        
-        '# assign "<unknown>" to process name, allocate MAX_PATH (260 bytes)
-        result = "<unknown>"
-        result += space(MAX_PATH - len(result))
-    
-        '# get a handle to the Process
-        hProcess = OpenProcess(PROCESS_QUERY_INFORMATION or PROCESS_VM_READ, FALSE, PID)
-        
-        '# if valid, get the process name
-        if not (hProcess = NULL) then
-            '# success getting Process modules
-            if not (EnumProcessModules(hProcess, @hMod, sizeof(hMod), @cbNeeded) = 0) then
-                result = space(cbNeeded)
-                GetModuleBaseName(hProcess, hMod, strptr(result), len(result))
-            end if
-        end if
-        
-        CloseHandle(hProcess)
-        
-        '# return a trimmed result
-        result = trim(result)
-        return result
-    end function
-    
-    '# _process_name_dyn_psapi is a workaround for some issues with x64 versions of Windows.
-    '# by default, 32bits process can't query information from 64bits modules.
-    private function _process_name_dyn_psapi(byval PID as uinteger) as string
-        dim result as string
-        dim chop as uinteger
-        dim zresult as zstring * MAX_PATH
-        dim hLib as any ptr
-        dim hProcess as HANDLE
-        dim cbNeeded as DWORD
-        dim GetProcessImageFileName as function (byval as HANDLE, byval as LPTSTR, byval as DWORD) as DWORD
-      
-        '# assign "<unknown>" to process name, allocate MAX_PATH (260 bytes)
-        zresult = "<unknown>" + chr(0)
-    
-        '# get dynlib
-        hLib = dylibload("psapi.dll")
-        if not (hlib = 0) then
-            GetProcessImageFileName = dylibsymbol(hlib, "GetProcessImageFileNameA")
-            if not (GetProcessImageFileName = 0) then
-                '# get a handle to the Process
-                hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, PID)
-                
-                '# if valid, get the process name
-                if not (hProcess = NULL) then
-                    cbNeeded = sizeof(zresult)
-                    if (GetProcessImageFileName(hProcess, @zresult, cbNeeded) = 0) then
-                        _dprint("Error with GetProcessImageFileName")
-                        _dprint("GetLastError: " + str(GetLastError()) + _show_error())
-                    else
-                        result = zresult
-                        chop = InStrRev(0, result, "\")
-                        if (chop > 0) then
-                          result = mid(result, chop + 1, (len(result) - chop))
-                        end if
-                    end if
-                else
-                    _dprint("Error with OpenProcess")
-                    _dprint("GetLastError: " + str(GetLastError()) + _show_error())
-                end if
-                
-                CloseHandle(hProcess)
-            else
-                _dprint("Unable to get a reference to dynamic symbol GetProcessImageFileNameA.")
-            end if
-        else
-            _dprint("Unable to dynamic load psapi.dll")
-        end if
-        
-        '# return a trimmed result
-        'result = trim(result)
-        return result
-    end function
-    
-    private function _show_error() as string
-        dim buffer as string * 1024
-        dim p as integer
-        
-        FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM,_
-                       0,_
-                       GetLastError(),_
-                       0,_
-                       strptr(buffer),_
-                       1024,_
-                       0 )
-        buffer = rtrim(buffer)
-        p = instr(buffer, chr(13))
-        if p then buffer = left(buffer, p - 1)
-        
-        return buffer
-    end function
-    
-    private function InStrRev(byval start as uinteger = 0, byref src as string, byref search as string) as uinteger
-        dim lensearch as uinteger = len(search)
-        dim as uinteger b, a = 0, exit_loop = 0
-        
-        do
-            b = a
-            a += 1
-            a = instr(a, src, search)
-            if start >= lensearch then if a + lensearch > start then exit_loop = 1
-        loop while (a > 0) and (exit_loop = 0)
-        
-        return b
-    end function
-
-end namespace     '# fb.svc.utils
-end namespace     '# fb.svc
-end namespace     '# fb
diff --git a/projects/mongrel_service/lib/ServiceFB/ServiceFB_Utils.bi b/projects/mongrel_service/lib/ServiceFB/ServiceFB_Utils.bi
deleted file mode 100644
index 8ae1f28..0000000
--- a/projects/mongrel_service/lib/ServiceFB/ServiceFB_Utils.bi
+++ /dev/null
@@ -1,70 +0,0 @@
-'#--
-'# Copyright (c) 2006-2007 Luis Lavena, Multimedia systems
-'#
-'# This source code is released under the MIT License.
-'# See MIT-LICENSE file for details
-'#++
-
-#if __FB_VERSION__ < "0.17"
-#error ServiceFB is designed to compile with FreeBASIC version "0.17"
-#else
-
-#ifndef __FB_WIN32__
-#error Platform unsupported. Compiling ServiceFB requires Windows platform.
-#else
-
-#ifndef __ServiceFB_Utils_bi__
-#define __ServiceFB_Utils_bi__
-
-#include once "win/psapi.bi"
-#include once "win/tlhelp32.bi"
-
-namespace fb
-namespace svc
-namespace utils   '# fb.svc.utils
-    '# use this to determine (using select case maybe?) the
-    '# mode which the service was invoked.
-    enum ServiceRunMode
-        RunAsUnknown = 0
-        RunAsService
-        RunAsManager
-        RunAsConsole
-    end enum
-    
-    
-    '# ServiceController type (object)
-    '# this is a helper object in case you want to implement
-    '# console mode (command line testing/debugging) and management (install/remove/control)
-    '# to your services, all from the same executable
-    type ServiceController
-        '# ctor/dtor()
-        declare constructor()
-        declare constructor(byref as string)
-        declare constructor(byref as string, byref as string)
-        declare constructor(byref as string, byref as string, byref as string)
-        declare destructor()
-        
-        '# methods (public)
-        declare sub Banner()
-        declare function RunMode() as ServiceRunMode
-        declare sub Manage()
-        declare sub Manage(byref as ServiceProcess)
-        declare sub Console()
-        declare sub Console(byref as ServiceProcess)
-        
-        '# properties (public)
-        '# use these properties for shwoing information on console/manager mode
-        '# as banner.
-        '# Product, version
-        '# copyright
-        product     as string
-        version     as string
-        copyright   as string
-    end type
-end namespace     '# fb.svc.utils
-end namespace     '# fb.svc
-end namespace     '# fb
-
-#endif '# __ServiceFB_bi__
-#endif '# __FB_WIN32__
-#endif '# __FB_VERSION__ \ No newline at end of file
diff --git a/projects/mongrel_service/lib/ServiceFB/_internals.bi b/projects/mongrel_service/lib/ServiceFB/_internals.bi
deleted file mode 100644
index 55ea882..0000000
--- a/projects/mongrel_service/lib/ServiceFB/_internals.bi
+++ /dev/null
@@ -1,50 +0,0 @@
-'#--
-'# Copyright (c) 2006-2007 Luis Lavena, Multimedia systems
-'#
-'# This source code is released under the MIT License.
-'# See MIT-LICENSE file for details
-'#++
-
-'##################################################################
-'#
-'# DO NOT INCLUDE THIS FILE DIRECTLY!
-'# it is used internaly by ServiceFB
-'# use ServiceFB.bi instead
-'#
-'##################################################################
-
-namespace fb
-namespace svc
-    '# now due references locking, I needed a constructor and destructor for
-    '# the namespace to garantee everything is cleaned up on termination of the process
-    declare sub _initialize() constructor
-    declare sub _terminate() destructor
-    
-    '# global service procedures (private)
-    declare sub _main(byval as DWORD, byval as LPSTR ptr)
-    declare function _control_ex(byval as DWORD, byval as DWORD, byval as LPVOID, byval as LPVOID) as DWORD
-    declare sub _run()
-    
-    '# global references helper
-    declare function _add_to_references(byref as ServiceProcess) as integer
-    declare function _find_in_references(byref as string) as ServiceProcess ptr
-    
-    '# command line builder (helper)
-    '# this is used to gather information about:
-    '# mode (if present)
-    '# valid service name (after lookup in the table)
-    '# command line to be passed to service
-    declare sub _build_commandline(byref as string, byref as string, byref as string)
-    
-    '# I started this as simple, unique service served from one process
-    '# but the idea of share the same process space (and reduce resources use) was good.
-    '# to do that, I needed a references table (similar to service_table, but we will
-    '# hold the ServiceProcess registered by ServiceHost (the multi services host).
-    '# also, I needed a locking mechanism to avoid problems of two calls changing the table
-    '# at the same time.
-    extern _svc_references as ServiceProcess ptr ptr
-    extern _svc_references_count as integer
-    extern _svc_references_lock as any ptr
-end namespace   '# fb.svc
-end namespace   '# fb
-
diff --git a/projects/mongrel_service/lib/ServiceFB/_utils_internals.bi b/projects/mongrel_service/lib/ServiceFB/_utils_internals.bi
deleted file mode 100644
index fab00f0..0000000
--- a/projects/mongrel_service/lib/ServiceFB/_utils_internals.bi
+++ /dev/null
@@ -1,51 +0,0 @@
-'#--
-'# Copyright (c) 2006-2007 Luis Lavena, Multimedia systems
-'#
-'# This source code is released under the MIT License.
-'# See MIT-LICENSE file for details
-'#++
-
-'##################################################################
-'#
-'# DO NOT INCLUDE THIS FILE DIRECTLY!
-'# it is used internaly by ServiceFB
-'# use ServiceFB_Utils.bi instead
-'#
-'##################################################################
-
-namespace fb
-namespace svc
-namespace utils   '# fb.svc.utils
-    '# console_handler is used to get feedback form keyboard and allow
-    '# shutdown of service using Ctrl+C / Ctrl+Break from keyboard
-    declare function _console_handler(byval as DWORD) as BOOL
-    
-    '# helper private subs used to list the services and their descriptions
-    '# in _svc_references
-    declare sub _list_references()
-    
-    '# internals functions used to get Parent PID and Process Name
-    '# using this we automatically determine if the service was started by SCM
-    '# or by the user, from commandline or from explorer
-    declare function _parent_pid(byval as uinteger) as uinteger
-    declare function _process_name(byval as uinteger) as string
-    declare function _process_name_dyn_psapi(byval as uinteger) as string
-    declare function _show_error() as string
-    
-    '# InStrRev (authored by ikkejw @ freebasic forums)
-    '# http://www.freebasic.net/forum/viewtopic.php?p=49315#49315
-    declare function InStrRev(byval as uinteger = 0, byref as string, byref as string) as uinteger
-    
-    '# use a signal (condition) in the console mode to know
-    '# when the service should be stopped.
-    '# the Console() main loop will wait for it, and the console_handler
-    '# will raise in case Ctrl+C / Ctrl+Break or other events are
-    '# received.
-    extern _svc_stop_signal as any ptr
-    extern _svc_stop_mutex as any ptr
-    extern _svc_stopped as BOOL
-    extern _svc_in_console as ServiceProcess ptr
-    extern _svc_in_console_stop_flag as BOOL
-end namespace     '# fb.svc.utils
-end namespace     '# fb.svc
-end namespace     '# fb
diff --git a/projects/mongrel_service/lib/mongrel_service/init.rb b/projects/mongrel_service/lib/mongrel_service/init.rb
deleted file mode 100644
index f1475f0..0000000
--- a/projects/mongrel_service/lib/mongrel_service/init.rb
+++ /dev/null
@@ -1,211 +0,0 @@
-require 'gem_plugin'
-require 'mongrel'
-require 'mongrel/rails'
-require 'rbconfig'
-require 'fileutils'
-
-module Service
-  class Install < GemPlugin::Plugin "/commands"
-    include Mongrel::Command::Base
-  
-    def configure
-        options [
-          ['-N', '--name SVC_NAME', "Required name for the service to be registered/installed.", :@svc_name, nil],
-          ['-D', '--display SVC_DISPLAY', "Adjust the display name of the service.", :@svc_display, nil],
-          ["-e", "--environment ENV", "Rails environment to run as", :@environment, ENV['RAILS_ENV'] || "development"],
-          ['-p', '--port PORT', "Which port to bind to", :@port, 3000],
-          ['-a', '--address ADDR', "Address to bind to", :@address, "0.0.0.0"],
-          ['-l', '--log FILE', "Where to write log messages", :@log_file, "log/mongrel.log"],
-          ['-P', '--pid FILE', "Where to write the PID", :@pid_file, "log/mongrel.pid"],
-          ['-n', '--num-procs INT', "Number of processors active before clients denied", :@num_procs, 1024],
-          ['-t', '--timeout TIME', "Timeout all requests after 100th seconds time", :@timeout, 0],
-          ['-m', '--mime PATH', "A YAML file that lists additional MIME types", :@mime_map, nil],
-          ['-c', '--chdir PATH', "Change to dir before starting (will be expanded)", :@cwd, Dir.pwd],
-          ['-r', '--root PATH', "Set the document root (default 'public')", :@docroot, "public"],
-          ['-B', '--debug', "Enable debugging mode", :@debug, false],
-          ['-C', '--config PATH', "Use a config file", :@config_file, nil],
-          ['-S', '--script PATH', "Load the given file as an extra config script.", :@config_script, nil],
-          ['', '--prefix PATH', "URL prefix for Rails app", :@prefix, nil]
-        ]
-    end
-    
-    # When we validate the options, we need to make sure the --root is actually RAILS_ROOT
-    # of the rails application we wanted to serve, because later "as service" no error
-    # show to trace this.
-    def validate
-      # TODO: investigate why Win32::Service interfere with gem_plugin
-      gem 'win32-service', '>= 0.5.2', '< 0.6.0'
-      require 'win32/service'
-
-      @cwd = File.expand_path(@cwd)
-      valid_dir? @cwd, "Invalid path to change to: #@cwd"
-  
-      # change there to start, then we'll have to come back after daemonize
-      Dir.chdir(@cwd)
-  
-      # start with the premise of app really exist.
-      app_exist = true
-      %w{app config log}.each do |path|
-        if !File.directory?(File.join(@cwd, path))
-          app_exist = false
-          break
-        end
-      end
-
-      valid?(@prefix[0].chr == "/" && @prefix[-1].chr != "/", "Prefix must begin with / and not end in /") if @prefix
-
-      valid? app_exist == true, "The path you specified isn't a valid Rails application."
-
-      valid_dir? File.dirname(@log_file), "Path to log file not valid: #@log_file"
-      valid_dir? File.dirname(@pid_file), "Path to pid file not valid: #@pid_file"
-      valid_dir? @docroot, "Path to docroot not valid: #@docroot"
-      valid_exists? @mime_map, "MIME mapping file does not exist: #@mime_map" if @mime_map
-      valid_exists? @config_file, "Config file not there: #@config_file" if @config_file
-
-      # We should validate service existance here, right Zed?
-      begin
-        valid? !Win32::Service.exists?(@svc_name), "The service already exist, please remove it first."
-      rescue
-      end
-
-      valid? @svc_name != nil, "A service name is mandatory."
-      
-      # default service display to service name
-      @svc_display = @svc_name if !@svc_display
-
-      return @valid
-    end
-    
-    def run
-      gem 'win32-service', '>= 0.5.2', '< 0.6.0'
-      require 'win32/service'
-
-      # check if mongrel_service.exe is in ruby bindir.
-      gem_root = File.join(File.dirname(__FILE__), "..", "..")
-      gem_executable = File.join(gem_root, "bin/mongrel_service.exe")
-      bindir_executable = File.join(Config::CONFIG['bindir'], '/mongrel_service.exe')
-      
-      unless File.exist?(bindir_executable)
-        STDERR.puts "** Copying native mongrel_service executable..."
-        FileUtils.cp gem_executable, bindir_executable rescue nil
-      end
-      
-      unless FileUtils.compare_file(bindir_executable, gem_executable)
-        STDERR.puts "** Updating native mongrel_service executable..."
-        FileUtils.rm_f bindir_executable rescue nil
-        FileUtils.cp gem_executable, bindir_executable rescue nil
-      end
-      
-      # build the command line
-      argv = []
-      
-      # start using the native executable
-      argv << '"' + bindir_executable + '"'
-      
-      # use the 'single' service for now
-      argv << "single"
-      
-      # command line setting override config file settings
-      @options = { :host => @address,  :port => @port, :cwd => @cwd,
-        :log_file => @log_file, :pid_file => @pid_file, :environment => @environment,
-        :docroot => @docroot, :mime_map => @mime_map,
-        :debug => @debug, :includes => ["mongrel"], :config_script => @config_script,
-        :num_procs => @num_procs, :timeout => @timeout, :cpu => @cpu, :prefix => @prefix
-      }
-      
-      # if we are using a config file, pass -c and -C to the service instead of each start parameter.
-      if @config_file
-        STDERR.puts "** Using #{@config_file} instead of command line parameters."
-        conf = YAML.load_file(@config_file)
-        
-        # add the root folder (-c)
-        argv << "-c \"#{conf[:cwd]}\""
-        
-        # use the config file
-        argv << "-C \"#{@config_file}\""
-
-      else
-        # use the command line instead
-        # now the options
-        argv << "-e #{@options[:environment]}" if @options[:environment]
-        argv << "-p #{@options[:port]}"
-        argv << "-a #{@options[:host]}"  if @options[:host]
-        argv << "-l \"#{@options[:log_file]}\"" if @options[:log_file]
-        argv << "-P \"#{@options[:pid_file]}\""
-        argv << "-c \"#{@options[:cwd]}\"" if @options[:cwd]
-        argv << "-t #{@options[:timeout]}" if @options[:timeout]
-        argv << "-m \"#{@options[:mime_map]}\"" if @options[:mime_map]
-        argv << "-r \"#{@options[:docroot]}\"" if @options[:docroot]
-        argv << "-n #{@options[:num_procs]}" if @options[:num_procs]
-        argv << "-B" if @options[:debug]
-        argv << "-S \"#{@options[:config_script]}\"" if @options[:config_script]
-        argv << "-u #{@options[:cpu.to_i]}" if @options[:cpu]
-        argv << "--prefix \"#{@options[:prefix]}\"" if @options[:prefix]
-      end
-
-      svc = Win32::Service.new
-      begin
-        svc.create_service{ |s|
-          s.service_name     = @svc_name
-          s.display_name     = @svc_display
-          s.binary_path_name = argv.join ' '
-          s.dependencies     = []
-          s.service_type     = Win32::Service::WIN32_OWN_PROCESS
-        }
-        puts "Mongrel service '#{@svc_display}' installed as '#{@svc_name}'."
-      rescue Win32::ServiceError => err
-        puts "There was a problem installing the service:"
-        puts err
-      end
-      svc.close
-    end
-  end
-
-  module ServiceValidation
-    def configure
-      options [
-        ['-N', '--name SVC_NAME', "Required name for the service to be registered/installed.", :@svc_name, nil],
-      ]
-    end
-    
-    def validate
-      valid? @svc_name != nil, "A service name is mandatory."
-
-      gem 'win32-service', '>= 0.5.2', '< 0.6.0'
-      require 'win32/service'
-      
-      # Validate that the service exists
-      begin
-        valid? Win32::Service.exists?(@svc_name), "There is no service with that name, cannot proceed."
-        Win32::Service.open(@svc_name) do |svc|
-          valid? svc.binary_path_name.include?("mongrel_service"), "The service specified isn't a Mongrel service."
-        end
-      rescue
-      end
-      
-      return @valid
-    end
-  end
-  
-  class Remove < GemPlugin::Plugin "/commands"
-    include Mongrel::Command::Base
-    include ServiceValidation
-    
-    def run
-      gem 'win32-service', '>= 0.5.2', '< 0.6.0'
-      require 'win32/service'
-
-      display_name = Win32::Service.getdisplayname(@svc_name)
-      
-      begin
-        Win32::Service.stop(@svc_name)
-      rescue
-      end
-      begin
-        Win32::Service.delete(@svc_name)
-      rescue
-      end
-      puts "#{display_name} service removed."
-    end
-  end
-end
diff --git a/projects/mongrel_service/native/_debug.bi b/projects/mongrel_service/native/_debug.bi
deleted file mode 100644
index 277de2e..0000000
--- a/projects/mongrel_service/native/_debug.bi
+++ /dev/null
@@ -1,59 +0,0 @@
-'##################################################################
-'#
-'# mongrel_service: Win32 native implementation for mongrel
-'#                  (using ServiceFB and FreeBASIC)
-'#
-'# Copyright (c) 2006 Multimedia systems
-'# (c) and code by Luis Lavena
-'#
-'#  mongrel_service (native) and mongrel_service gem_pluing are licensed
-'#  in the same terms as mongrel, please review the mongrel license at
-'#  http://mongrel.rubyforge.org/license.html
-'#  
-'##################################################################
-
-'##################################################################
-'# Requirements:
-'# - FreeBASIC 0.17, Win32 CVS Build (as for November 09, 2006).
-'#
-'##################################################################
-
-#ifndef __Debug_bi__
-#define __Debug_bi__
-
-#ifdef DEBUG_LOG
-    #include once "vbcompat.bi"
-    #ifndef DEBUG_LOG_FILE
-        #define DEBUG_LOG_FILE EXEPATH + "\debug.log"
-    #endif
-
-    '# this procedure is only used for debugging purposed, will be removed from
-    '# final compilation
-    private sub debug_to_file(byref message as string, byref file as string, byval linenumber as uinteger, byref func as string)
-        dim handle as integer
-        static first_time as integer
-        
-        handle = freefile
-        open DEBUG_LOG_FILE for append as #handle
-        
-        if (first_time = 0) then
-            print #handle, "# Logfile created on "; format(now(), "dd/mm/yyyy HH:mm:ss")
-            print #handle, ""
-            first_time = 1
-        end if
-        
-        '# src/module.bas:123, namespace.function:
-        '#   message
-        '#
-        print #handle, file; ":"; str(linenumber); ", "; lcase(func); ":"
-        print #handle, space(2); message
-        print #handle, ""
-        
-        close #handle
-    end sub
-    #define debug(message) debug_to_file(message, __FILE__, __LINE__, __FUNCTION__)
-#else
-    #define debug(message)
-#endif '# DEBUG_LOG
-
-#endif '# __Debug_bi__
diff --git a/projects/mongrel_service/native/boolean.bi b/projects/mongrel_service/native/boolean.bi
deleted file mode 100644
index 8ca07c7..0000000
--- a/projects/mongrel_service/native/boolean.bi
+++ /dev/null
@@ -1,18 +0,0 @@
-'#--
-'# Copyright (c) 2006-2007 Luis Lavena, Multimedia systems
-'#
-'# This source code is released under the MIT License.
-'# See MIT-LICENSE file for details
-'#++
-
-#ifndef __BOOLEAN_BI__
-#define __BOOLEAN_BI__
-
-#undef BOOLEAN
-type BOOLEAN as byte
-#undef FALSE
-const FALSE as byte = 0
-#undef TRUE
-const TRUE as byte = not FALSE
-
-#endif ' __BOOLEAN_BI__ \ No newline at end of file
diff --git a/projects/mongrel_service/native/console_process.bas b/projects/mongrel_service/native/console_process.bas
deleted file mode 100644
index a2bb5c9..0000000
--- a/projects/mongrel_service/native/console_process.bas
+++ /dev/null
@@ -1,397 +0,0 @@
-'#--
-'# Copyright (c) 2007 Luis Lavena, Multimedia systems
-'#
-'# This source code is released under the MIT License.
-'# See MIT-LICENSE file for details
-'#++
-
-#include once "console_process.bi"
-
-constructor ConsoleProcess(byref new_filename as string = "", byref new_arguments as string = "")
-    '# assign filename and arguments
-    
-    '# if filename contains spaces, automatically quote it!
-    if (instr(new_filename, " ") > 0) then
-        _filename = !"\"" + new_filename + !"\""
-    else
-        _filename = new_filename
-    endif
-    
-    _arguments = new_arguments
-end constructor
-
-destructor ConsoleProcess()
-    '# in case process still running
-    if (running = true) then
-        terminate(true)
-        
-        '# close opened handles
-        '# ...
-        CloseHandle(_process_info.hProcess)
-        CloseHandle(_process_info.hThread)
-    end if
-end destructor
-
-property ConsoleProcess.filename() as string
-    return _filename
-end property
-
-property ConsoleProcess.filename(byref rhs as string)
-    if not (running = true) then
-        _filename = rhs
-    end if
-end property
-
-property ConsoleProcess.arguments() as string
-    return _arguments
-end property
-
-property ConsoleProcess.arguments(byref rhs as string)
-    if not (running = true) then
-        _arguments = rhs
-    end if
-end property
-
-property ConsoleProcess.redirected_stdout() as string
-    return _stdout_filename
-end property
-
-property ConsoleProcess.redirected_stderr() as string
-    return _stderr_filename
-end property
-
-'# running is a helper which evaluates _pid and exit_code
-property ConsoleProcess.running() as boolean
-    dim result as boolean
-
-    '# presume not running
-    result = false
-    
-    if not (_pid = 0) then
-        '# that means the process is/was running.
-        '# now evaluate if exit_code = STILL_ACTIVE
-        result = (exit_code = STILL_ACTIVE)
-    end if
-    
-    return result
-end property
-
-property ConsoleProcess.pid() as uinteger
-    return _pid
-end property
-
-property ConsoleProcess.exit_code() as uinteger
-    static previous_code as uinteger
-    dim result as uinteger
-    
-    result = 0
-    
-    '# is _pid valid?
-    if not (_pid = 0) then
-        if not (_process_info.hProcess = NULL) then
-            '# the process reference is valid, get the exit_code
-            if not (GetExitCodeProcess(_process_info.hProcess, @result) = 0) then
-                previous_code = result
-                '# OK
-                '# no error in the query, get result
-                if not (result = STILL_ACTIVE) then
-                    CloseHandle(_process_info.hProcess)
-                    _process_info.hProcess = NULL
-                end if '# (result = STILL_ACTIVE)
-            end if '# not (GetExitCodeProcess() = 0)
-        else
-            result = previous_code
-        end if '# not (proc = NULL)
-    end if '# not (_pid = 0)
-    
-    return result
-end property
-
-function ConsoleProcess.redirect(byval target as ProcessStdEnum, byref new_std_filename as string) as boolean
-    dim result as boolean
-    
-    if not (running = true) then
-        select case target
-            case ProcessStdOut:
-                _stdout_filename = new_std_filename
-                result = true
-                
-            case ProcessStdErr:
-                _stderr_filename = new_std_filename
-                result = true
-                
-            case ProcessStdBoth:
-                _stdout_filename = new_std_filename
-                _stderr_filename = new_std_filename
-                result = true
-        
-        end select
-    end if
-    
-    return result
-end function
-
-function ConsoleProcess.start() as boolean
-    dim result as boolean
-    dim success as boolean
-    
-    '# API
-    '# New Process resources
-    dim context as STARTUPINFO
-    dim proc_sa as SECURITY_ATTRIBUTES = type(sizeof(SECURITY_ATTRIBUTES), NULL, TRUE)
-    
-    '# StdIn, StdOut, StdErr Read and Write Pipes.
-    dim as HANDLE StdInRd, StdOutRd, StdErrRd
-    dim as HANDLE StdInWr, StdOutWr, StdErrWr
-    dim merged as boolean
-    
-    '# cmdline
-    dim cmdline as string
-    
-    '# assume start will fail
-    result = false
-    
-    if (running = false) then
-        '# we should create the std* for the new proc!
-        '# (like good parents, prepare everything!)
-        
-        '# to ensure everything will work, we must allocate a console
-        '# using AllocConsole, even if it fails.
-        '# This solve the problems when running as service.
-        '# we discard result of AllocConsole since we ALWAYS will allocate it.
-        AllocConsole()
-        
-        '# assume all the following steps succeed
-        success = true
-        
-        '# StdIn is the only std that will be created using pipes always
-        '# StdIn
-        if (CreatePipe(@StdInRd, @StdInWr, @proc_sa, 0) = 0) then
-            success = false
-        end if
-        
-        '# Ensure the handles to the pipe are not inherited.
-        if (SetHandleInformation(StdInWr, HANDLE_FLAG_INHERIT, 0) = 0) then
-            success = false
-        end if
-        
-        '# StdOut and StdErr should be redirected?
-        if (not _stdout_filename = "") or _
-            (not _stderr_filename = "") then
-            
-            '# out and err are the same? (merged)
-            if (_stdout_filename = _stderr_filename) then
-                merged = true
-            end if
-        end if
-        
-        '# StdOut if stdout_filename
-        if not (_stdout_filename = "") then
-            StdOutWr = CreateFile(strptr(_stdout_filename), _
-                                    GENERIC_WRITE, _
-                                    FILE_SHARE_READ or FILE_SHARE_WRITE, _
-                                    @proc_sa, _
-                                    OPEN_ALWAYS, _
-                                    FILE_ATTRIBUTE_NORMAL, _
-                                    NULL)
-            
-            if (StdOutWr = INVALID_HANDLE_VALUE) then
-                '# failed to open file
-                success = false
-            else
-                SetFilePointer(StdOutWr, 0, NULL, FILE_END)
-            end if
-        else
-            '# use pipes instead
-            '# StdOut
-            if (CreatePipe(@StdOutRd, @StdOutWr, @proc_sa, 0) = 0) then
-                success = false
-            end if
-            
-            if (SetHandleInformation(StdOutRd, HANDLE_FLAG_INHERIT, 0) = 0) then
-                success = false
-            end if
-        end if 'not (_stdout_filename = "")
-        
-        '# only create stderr if no merged.
-        if (merged = true) then
-            StdErrWr = StdOutWr
-        else
-            '# do the same for StdErr...
-            if not (_stderr_filename = "") then
-                StdErrWr = CreateFile(strptr(_stderr_filename), _
-                                        GENERIC_WRITE, _
-                                        FILE_SHARE_READ or FILE_SHARE_WRITE, _
-                                        @proc_sa, _
-                                        OPEN_ALWAYS, _
-                                        FILE_ATTRIBUTE_NORMAL, _
-                                        NULL)
-                
-                if (StdErrWr = INVALID_HANDLE_VALUE) then
-                    '# failed to open file
-                    success = false
-                else
-                    SetFilePointer(StdErrWr, 0, NULL, FILE_END)
-                end if
-            else
-                '# use pipes instead
-                '# StdOut
-                if (CreatePipe(@StdErrRd, @StdErrWr, @proc_sa, 0) = 0) then
-                    success = false
-                end if
-                
-                if (SetHandleInformation(StdErrRd, HANDLE_FLAG_INHERIT, 0) = 0) then
-                    success = false
-                end if
-                
-            end if 'not (_stderr_filename = "")
-        end if '(merged = true)
-        
-        '# now we must proceed to create the process
-        '# without the pipes, we shouldn't continue!
-        if (success = true) then
-            '# Set the Std* handles ;-)
-            with context
-                .cb = sizeof( context )
-                .hStdError = StdErrWr
-                .hStdOutput = StdOutWr
-                .hStdInput = StdInRd
-                .dwFlags = STARTF_USESTDHANDLES or STARTF_USESHOWWINDOW
-                '# FIXME: .wShowWindow = iif((_show_console = true), SW_SHOW, SW_HIDE)
-                .wShowWindow = SW_HIDE
-            end with
-            
-            '# build the command line
-            cmdline = _filename + " " + _arguments
-            
-            '# now creates the process
-            if (CreateProcess(NULL, _
-                                strptr(cmdline), _
-                                NULL, _
-                                NULL, _
-                                1, _            '# win32 TRUE (1)
-                                0, _
-                                NULL, _
-                                NULL, _
-                                @context, _
-                                @_process_info) = 0) then
-                result = false
-            else
-                '# set the _pid
-                _pid = _process_info.dwProcessId
-                
-                '# OK? yeah, I think so.
-                result = true
-                
-                '# close the Std* handles
-                CloseHandle(StdInRd)
-                CloseHandle(StdInWr)
-                CloseHandle(StdOutRd)
-                CloseHandle(StdOutWr)
-                CloseHandle(StdErrRd)
-                CloseHandle(StdErrWr)
-                
-                '# close children main Thread handle and
-                '# NULLify to avoid issues
-                CloseHandle(_process_info.hThread)
-                _process_info.hThread = NULL
-            end if '# (CreateProcess() = 0)
-        else
-            result = false
-        end if '# (success = TRUE)
-    end if
-    
-    return result
-end function
-
-function ConsoleProcess.terminate(byval force as boolean = false) as boolean
-    dim result as boolean
-    dim success as boolean
-    
-    dim proc as HANDLE
-    dim code as uinteger
-    dim wait_code as uinteger
-    
-    '# is pid valid?
-    if (running = true) then
-        '# hook our custom console handler
-        if not (SetConsoleCtrlHandler(@_console_handler, 1) = 0) then
-            success = true
-        end if
-        
-        if (success = true) then
-            '# get a handle to Process
-            proc = _process_info.hProcess
-            if not (proc = NULL) then
-                '# process is valid, perform actions
-                success = false
-                
-                if not (force = true) then
-                    '# send CTRL_C_EVENT and wait for result
-                    if not (GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0) = 0) then
-                        '# it worked, wait 5 seconds terminates.
-                        wait_code = WaitForSingleObject(proc, 10000)
-                        if not (wait_code = WAIT_TIMEOUT) then
-                            success = true
-                        end if
-                    else
-                        success = false
-                    end if
-                    
-                    '# Ctrl-C didn't work, try Ctrl-Break
-                    if (success = false) then
-                        '# send CTRL_BREAK_EVENT and wait for result
-                        if not (GenerateConsoleCtrlEvent(CTRL_BREAK_EVENT, 0) = 0) then
-                            '# it worked, wait 5 seconds terminates.
-                            wait_code = WaitForSingleObject(proc, 10000)
-                            if not (wait_code = WAIT_TIMEOUT) then
-                                success = true
-                            end if
-                        else
-                            success = false
-                        end if
-                    end if
-                    
-                '# only do termination if force was set.
-                elseif (force = true) and (success = false) then
-                    '# still no luck? we should do a hard kill then
-                    if (TerminateProcess(proc, 0) = 0) then
-                        success = false
-                    else
-                        success = true
-                    end if
-                end if
-                
-                '# now get process exit code
-                if (success = true) then
-                    result = true
-                else
-                    result = false
-                end if
-            else
-                '# invalid process handler
-                result = false
-            end if
-            
-        end if '# (success = true)
-        
-        '# remove hooks
-        if not (SetConsoleCtrlHandler(@_console_handler, 0) = 0) then
-            success = true
-        end if
-    end if '# not (pid = 0)
-    
-    return result
-end function
-
-function ConsoleProcess._console_handler(byval dwCtrlType as DWORD) as BOOL
-    dim result as BOOL
-    
-    if (dwCtrlType = CTRL_C_EVENT) then
-        result = 1
-    elseif (dwCtrlType = CTRL_BREAK_EVENT) then
-        result = 1
-    end if
-    
-    return result
-end function
diff --git a/projects/mongrel_service/native/console_process.bi b/projects/mongrel_service/native/console_process.bi
deleted file mode 100644
index 3ad49ad..0000000
--- a/projects/mongrel_service/native/console_process.bi
+++ /dev/null
@@ -1,75 +0,0 @@
-'#--
-'# Copyright (c) 2006-2007 Luis Lavena, Multimedia systems
-'#
-'# This source code is released under the MIT License.
-'# See MIT-LICENSE file for details
-'#++
-
-#ifndef __CONSOLE_PROCESS_BI__
-#define __CONSOLE_PROCESS_BI__
-
-#include once "windows.bi"
-#include once "boolean.bi"
-
-enum ProcessStdEnum
-    ProcessStdOut   = 1
-    ProcessStdErr   = 2
-    ProcessStdBoth  = 3
-end enum
-
-type ConsoleProcess
-    '# this class provide basic functionality
-    '# to control child processes
-    
-    '# new ConsoleProcess(Filename, Parameters)
-    declare constructor(byref as string = "", byref as string = "")
-    
-    '# delete
-    declare destructor()
-    
-    '# properties (only getters)
-    declare property filename as string
-    declare property filename(byref as string)
-    
-    declare property arguments as string
-    declare property arguments(byref as string)
-    
-    '# stdout and stderr allow you redirect
-    '# console output and errors to files
-    declare property redirected_stdout as string
-    declare property redirected_stderr as string
-    
-    '# evaluate if the process is running
-    declare property running as boolean
-    
-    '# pid will return the current Process ID, or 0 if no process is running
-    declare property pid as uinteger
-    
-    '# exit_code is the value set by the process prior exiting.
-    declare property exit_code as uinteger
-    
-    '# methods
-    declare function redirect(byval as ProcessStdEnum, byref as string) as boolean
-    declare function start() as boolean
-    declare function terminate(byval as boolean = false) as boolean
-    
-    private:
-        _filename as string
-        _arguments as string
-        _pid as uinteger
-        _process_info as PROCESS_INFORMATION
-        _show_console as boolean = false
-        
-        _redirect_stdout as boolean
-        _stdout_filename as string
-        
-        _redirect_stderr as boolean
-        _stderr_filename as string
-        
-        '# this fake console handler
-        '# is used to trap ctrl-c
-        declare static function _console_handler(byval as DWORD) as BOOL
-        
-end type 'ConsoleProcess
-
-#endif '__CONSOLE_PROCESS_BI__
diff --git a/projects/mongrel_service/native/mongrel_service.bas b/projects/mongrel_service/native/mongrel_service.bas
deleted file mode 100644
index 49caa1b..0000000
--- a/projects/mongrel_service/native/mongrel_service.bas
+++ /dev/null
@@ -1,179 +0,0 @@
-'##################################################################
-'#
-'# mongrel_service: Win32 native implementation for mongrel
-'#                  (using ServiceFB and FreeBASIC)
-'#
-'# Copyright (c) 2006 Multimedia systems
-'# (c) and code by Luis Lavena
-'#
-'#  mongrel_service (native) and mongrel_service gem_pluing are licensed
-'#  in the same terms as mongrel, please review the mongrel license at
-'#  http://mongrel.rubyforge.org/license.html
-'#  
-'##################################################################
-
-'##################################################################
-'# Requirements:
-'# - FreeBASIC 0.18
-'#
-'##################################################################
-
-#include once "mongrel_service.bi"
-#define DEBUG_LOG_FILE EXEPATH + "\mongrel_service.log"
-#include once "_debug.bi"
-
-namespace mongrel_service
-    constructor SingleMongrel()
-        dim redirect_file as string
-        
-        with this.__service
-            .name = "single"
-            .description = "Mongrel Single Process service"
-            
-            '# disabling shared process
-            .shared_process = FALSE
-            
-            '# TODO: fix inheritance here
-            .onInit = @single_onInit
-            .onStart = @single_onStart
-            .onStop = @single_onStop
-        end with
-        
-        with this.__console
-            redirect_file = EXEPATH + "\mongrel.log"
-            debug("redirecting to: " + redirect_file)
-            .redirect(ProcessStdBoth, redirect_file)
-        end with
-        
-        '# TODO: fix inheritance here
-        single_mongrel_ref = @this
-    end constructor
-    
-    destructor SingleMongrel()
-        '# TODO: fin inheritance here
-    end destructor
-    
-    function single_onInit(byref self as ServiceProcess) as integer
-        dim result as integer
-        dim mongrel_cmd as string
-        
-        debug("single_onInit()")
-        
-        '# ruby.exe must be in the path, which we guess is already there.
-        '# because mongrel_service executable (.exe) is located in the same
-        '# folder than mongrel_rails ruby script, we complete the path with
-        '# EXEPATH + "\mongrel_rails" to make it work.
-        '# FIXED ruby installation outside PATH and inside folders with spaces
-        mongrel_cmd = !"\"" + EXEPATH + !"\\ruby.exe" + !"\" " + !"\"" + EXEPATH + !"\\mongrel_rails" + !"\"" + " start"
-        
-        '# due lack of inheritance, we use single_mongrel_ref as pointer to
-        '# SingleMongrel instance. now we should call StillAlive
-        self.StillAlive()
-        if (len(self.commandline) > 0) then
-            '# assign the program
-            single_mongrel_ref->__console.filename = mongrel_cmd
-            single_mongrel_ref->__console.arguments = self.commandline
-            
-            '# fix commandline, it currently contains params to be passed to
-            '# mongrel_rails, and not ruby.exe nor the script to be run.
-            self.commandline = mongrel_cmd + " " + self.commandline
-            
-            '# now launch the child process
-            debug("starting child process with cmdline: " + self.commandline)
-            single_mongrel_ref->__child_pid = 0
-            if (single_mongrel_ref->__console.start() = true) then
-                single_mongrel_ref->__child_pid = single_mongrel_ref->__console.pid
-            end if
-            self.StillAlive()
-            
-            '# check if pid is valid
-            if (single_mongrel_ref->__child_pid > 0) then
-                '# it worked
-                debug("child process pid: " + str(single_mongrel_ref->__child_pid))
-                result = not FALSE
-            end if
-        else
-            '# if no param, no service!
-            debug("no parameters was passed to this service!")
-            result = FALSE
-        end if
-        
-        debug("single_onInit() done")
-        return result
-    end function
-    
-    sub single_onStart(byref self as ServiceProcess)
-        debug("single_onStart()")
-        
-        do while (self.state = Running) or (self.state = Paused)
-            '# instead of sitting idle here, we must monitor the pid
-            '# and re-spawn a new process if needed
-            if not (single_mongrel_ref->__console.running = true) then
-                '# check if we aren't terminating
-                if (self.state = Running) or (self.state = Paused) then
-                    debug("child process terminated!, re-spawning a new one")
-                    
-                    single_mongrel_ref->__child_pid = 0
-                    if (single_mongrel_ref->__console.start() = true) then
-                        single_mongrel_ref->__child_pid = single_mongrel_ref->__console.pid
-                    end if
-                    
-                    if (single_mongrel_ref->__child_pid > 0) then
-                        debug("new child process pid: " + str(single_mongrel_ref->__child_pid))
-                    end if
-                end if
-            end if
-            
-            '# wait for 5 seconds
-            sleep 5000
-        loop
-        
-        debug("single_onStart() done")
-    end sub
-    
-    sub single_onStop(byref self as ServiceProcess)
-        debug("single_onStop()")
-        
-        '# now terminates the child process
-        if not (single_mongrel_ref->__child_pid = 0) then
-            debug("trying to kill pid: " + str(single_mongrel_ref->__child_pid))
-            if not (single_mongrel_ref->__console.terminate() = true) then
-                debug("Terminate() reported a problem when terminating process " + str(single_mongrel_ref->__child_pid))
-            else
-                debug("child process terminated with success.")
-                single_mongrel_ref->__child_pid = 0
-            end if
-        end if
-        
-        debug("single_onStop() done")
-    end sub
-    
-    sub application()
-        dim simple as SingleMongrel
-        dim host as ServiceHost
-        dim ctrl as ServiceController = ServiceController("Mongrel Win32 Service", "version " + VERSION, _
-                                                            "(c) 2006 The Mongrel development team.")
-        
-        '# add SingleMongrel (service)
-        host.Add(simple.__service)
-        select case ctrl.RunMode()
-            '# call from Service Control Manager (SCM)
-            case RunAsService:
-                debug("ServiceHost RunAsService")
-                host.Run()
-                
-            '# call from console, useful for debug purposes.
-            case RunAsConsole:
-                debug("ServiceController Console")
-                ctrl.Console()
-                
-            case else:
-                ctrl.Banner()
-                print "mongrel_service is not designed to run form commandline,"
-                print "please use mongrel_rails service:: commands to create a win32 service."
-        end select
-    end sub
-end namespace
-
-'# MAIN: start native mongrel_service here
-mongrel_service.application()
diff --git a/projects/mongrel_service/native/mongrel_service.bi b/projects/mongrel_service/native/mongrel_service.bi
deleted file mode 100644
index d5ea0dc..0000000
--- a/projects/mongrel_service/native/mongrel_service.bi
+++ /dev/null
@@ -1,61 +0,0 @@
-'##################################################################
-'#
-'# mongrel_service: Win32 native implementation for mongrel
-'#                  (using ServiceFB and FreeBASIC)
-'#
-'# Copyright (c) 2006 Multimedia systems
-'# (c) and code by Luis Lavena
-'#
-'#  mongrel_service (native) and mongrel_service gem_pluing are licensed
-'#  in the same terms as mongrel, please review the mongrel license at
-'#  http://mongrel.rubyforge.org/license.html
-'#  
-'##################################################################
-
-'##################################################################
-'# Requirements:
-'# - FreeBASIC 0.18.
-'#
-'##################################################################
-
-#define SERVICEFB_INCLUDE_UTILS
-#include once "lib/ServiceFB/ServiceFB.bi"
-#include once "console_process.bi"
-
-'# use for debug versions
-#if not defined(GEM_VERSION)
-  #define GEM_VERSION (debug mode)
-#endif
-
-'# preprocessor stringize
-#define PPSTR(x) #x
-
-namespace mongrel_service
-    const VERSION as string = PPSTR(GEM_VERSION)
-    
-    '# namespace include
-    using fb.svc
-    using fb.svc.utils
-    
-    declare function single_onInit(byref as ServiceProcess) as integer
-    declare sub single_onStart(byref as ServiceProcess)
-    declare sub single_onStop(byref as ServiceProcess)
-    
-    '# SingleMongrel
-    type SingleMongrel
-        declare constructor()
-        declare destructor()
-        
-        '# TODO: replace for inheritance here
-        'declare function onInit() as integer
-        'declare sub onStart()
-        'declare sub onStop()
-        
-        __service       as ServiceProcess
-        __console       as ConsoleProcess
-        __child_pid     as uinteger
-    end type
-    
-    '# TODO: replace with inheritance here
-    dim shared single_mongrel_ref as SingleMongrel ptr
-end namespace
diff --git a/projects/mongrel_service/resources/defaults.yaml b/projects/mongrel_service/resources/defaults.yaml
deleted file mode 100644
index 4a05eb1..0000000
--- a/projects/mongrel_service/resources/defaults.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-:debug: false
diff --git a/projects/mongrel_service/tests/all_tests.bas b/projects/mongrel_service/tests/all_tests.bas
deleted file mode 100644
index 0a8864f..0000000
--- a/projects/mongrel_service/tests/all_tests.bas
+++ /dev/null
@@ -1,18 +0,0 @@
-'#--
-'# Copyright (c) 2006-2007 Luis Lavena, Multimedia systems
-'#
-'# This source code is released under the MIT License.
-'# See MIT-LICENSE file for details
-'#++
-
-#include once "testly.bi"
-
-'# the code in this module runs after all
-'# the other modules have "registered" their suites.
-
-'# evaluate the result from run_tests() to
-'# return a error to the OS or not.
-if (run_tests() = false) then
-    end 1
-end if
-
diff --git a/projects/mongrel_service/tests/fixtures/mock_process.bas b/projects/mongrel_service/tests/fixtures/mock_process.bas
deleted file mode 100644
index e9405ab..0000000
--- a/projects/mongrel_service/tests/fixtures/mock_process.bas
+++ /dev/null
@@ -1,92 +0,0 @@
-'#--
-'# Copyright (c) 2006-2007 Luis Lavena, Multimedia systems
-'#
-'# This source code is released under the MIT License.
-'# See MIT-LICENSE file for details
-'#++
-
-'# this program mock a common process that will:
-'# output some text to stdout
-'# output some error messages to stderr
-'# will wait until Ctrl-C is hit (only if commandline contains "wait")
-'# or drop an error if commandline contains "error"
-
-#include once "crt.bi"
-#include once "windows.bi"
-
-dim shared as any ptr control_signal, control_mutex
-dim shared flagged as byte
-dim shared result as integer
-
-function slow_console_handler(byval dwCtrlType as DWORD) as BOOL
-    dim result as BOOL
-    
-    if (dwCtrlType = CTRL_C_EVENT) then
-        fprintf(stdout, !"out: CTRL-C received\r\n")
-        mutexlock(control_mutex)
-        result = 1
-        flagged = 1
-        condsignal(control_signal)
-        mutexunlock(control_mutex)
-    elseif (dwCtrlType = CTRL_BREAK_EVENT) then
-        fprintf(stdout, !"out: CTRL-BREAK received\r\n")
-        mutexlock(control_mutex)
-        result = 1
-        flagged = 2
-        condsignal(control_signal)
-        mutexunlock(control_mutex)
-    end if
-    
-    return result
-end function
-
-sub wait_for(byval flag_level as integer)
-    flagged = 0
-    '# set handler
-    if (SetConsoleCtrlHandler(@slow_console_handler, 1) = 0) then
-        fprintf(stderr, !"err: cannot set console handler\r\n")
-    end if
-    fprintf(stdout, !"out: waiting for keyboard signal\r\n")
-    mutexlock(control_mutex)
-    do until (flagged = flag_level)
-        condwait(control_signal, control_mutex)
-    loop
-    mutexunlock(control_mutex)
-    fprintf(stdout, !"out: got keyboard signal\r\n")
-    if (SetConsoleCtrlHandler(@slow_console_handler, 0) = 0) then
-        fprintf(stderr, !"err: cannot unset console handler\r\n")
-    end if
-end sub
-
-function main() as integer
-    fprintf(stdout, !"out: message\r\n")
-    fprintf(stderr, !"err: error\r\n")
-    
-    select case lcase(command(1))
-        case "wait":
-            sleep
-            return 0
-
-        case "error":
-            '# terminate with error code
-            return 1
-        
-        case "slow1":
-            wait_for(1)
-            return 10
-        
-        case "slow2":
-            wait_for(2)
-            return 20
-    end select
-end function
-
-control_signal = condcreate()
-control_mutex = mutexcreate()
-
-result = main()
-
-conddestroy(control_signal)
-mutexdestroy(control_mutex)
-
-end result
diff --git a/projects/mongrel_service/tests/test_console_process.bas b/projects/mongrel_service/tests/test_console_process.bas
deleted file mode 100644
index d41c0fb..0000000
--- a/projects/mongrel_service/tests/test_console_process.bas
+++ /dev/null
@@ -1,402 +0,0 @@
-'#--
-'# Copyright (c) 2006-2007 Luis Lavena, Multimedia systems
-'#
-'# This source code is released under the MIT License.
-'# See MIT-LICENSE file for details
-'#++
-
-#include once "console_process.bi"
-#include once "file.bi"
-#include once "testly.bi"
-#include once "test_helpers.bi"
-
-namespace Suite_Test_Console_Process
-    '# test helpers
-    declare function process_cleanup() as boolean
-    
-    dim shared child as ConsoleProcess ptr
-    
-    sub before_all()
-        kill("out.log")
-        kill("err.log")
-        kill("both.log")
-        kill("both_slow.log")
-        kill("both_forced.log")
-    end sub
-    
-    sub after_each()
-        process_cleanup()
-    end sub
-    
-    sub test_process_create()
-        child = new ConsoleProcess()
-        assert_not_equal(0, child)
-        assert_equal("", child->filename)
-        assert_equal("", child->arguments)
-        assert_false(child->running)
-        delete child
-    end sub
-    
-    sub test_process_create_args()
-        child = new ConsoleProcess("mock_process.exe", "some params")
-        assert_equal("mock_process.exe", child->filename)
-        assert_equal("some params", child->arguments)
-        delete child
-    end sub
-    
-    sub test_properly_quoted_filename()
-        child = new ConsoleProcess("C:\path with spaces\my_executable.exe", "some params")
-        assert_not_equal(0, instr(child->filename, !"\""))
-        delete child
-    end sub
-    
-    sub test_failed_unexistant_process()
-        child = new ConsoleProcess("no_valid_file.exe", "some params")
-        assert_false(child->start())
-        assert_equal(0, child->pid)
-        assert_false(child->running)
-        delete child
-    end sub
-    
-    sub test_process_spawn_exit_code()
-        child = new ConsoleProcess("mock_process.exe", "error")
-        
-        '# start() should return true since it started, no matter if was terminated
-        '# improperly
-        assert_true(child->start())
-        sleep 500
-        
-        '# should not be running, but pid should be != than 0
-        assert_not_equal(0, child->pid)
-        
-        '# we need to wait a bit prior asking for state
-        '# the process could be still running
-        assert_false(child->running)
-        
-        '# get exit code, should be 1
-        assert_equal(1, child->exit_code)
-        
-        delete child
-    end sub
-    
-    sub test_redirected_output()
-        assert_false(fileexists("out.log"))
-        assert_false(fileexists("err.log"))
-        
-        '# redirected output is used with logging files.
-        child = new ConsoleProcess("mock_process.exe")
-        
-        '# redirect stdout
-        assert_true(child->redirect(ProcessStdOut, "out.log"))
-        assert_string_equal("out.log", child->redirected_stdout)
-        
-        '# redirect stderr
-        assert_true(child->redirect(ProcessStdErr, "err.log"))
-        assert_string_equal("err.log", child->redirected_stderr)
-        
-        '# start() will be true since process terminated nicely
-        assert_true(child->start())
-        sleep 500
-        
-        '# running should be false
-        assert_false(child->running)
-        
-        '# exit_code should be 0
-        assert_equal(0, child->exit_code)
-        
-        delete child
-        
-        '# now out.log and err.log must exist and content must be valid.
-        assert_true(fileexists("out.log"))
-        assert_string_equal("out: message", content_of_file("out.log"))
-        
-        assert_true(fileexists("err.log"))
-        assert_string_equal("err: error", content_of_file("err.log"))
-        
-        assert_equal(0, kill("out.log"))
-        assert_equal(0, kill("err.log"))
-    end sub
-    
-    sub test_redirected_merged_output()
-        dim content as string
-        
-        '# redirected output is used with logging files.
-        child = new ConsoleProcess("mock_process.exe")
-
-        '# redirect both stdout and stderr
-        child->redirect(ProcessStdBoth, "both.log")
-        assert_equal("both.log", child->redirected_stdout)
-        assert_equal("both.log", child->redirected_stderr)
-        
-        '# start() will be true since process terminated nicely
-        assert_true(child->start())
-        sleep 500
-        
-        '# running should be false
-        assert_false(child->running)
-        
-        '# exit_code should be 0
-        assert_equal(0, child->exit_code)
-        
-        delete child
-        
-        '# file must exists
-        assert_true(fileexists("both.log"))
-        
-        '# contents must match
-        content = content_of_file("both.log")
-        
-        assert_not_equal(0, instr(content, "out: message"))
-        assert_not_equal(0, instr(content, "err: error"))
-        
-        assert_equal(0, kill("both.log"))
-    end sub
-    
-    sub test_redirected_output_append()
-        dim content as string
-        
-        child = new ConsoleProcess("mock_process.exe")
-        
-        '# redirect both stdout and stderr
-        child->redirect(ProcessStdBoth, "both.log")
-        
-        '# start() will be true since process terminated nicely
-        assert_true(child->start())
-        sleep 500
-        
-        content = content_of_file("both.log")
-        
-        '# start() again
-        assert_true(child->start())
-        sleep 500
-        
-        delete child
-        
-        assert_not_equal(len(content), len(content_of_file("both.log")))
-        
-        assert_equal(0, kill("both.log"))
-    end sub
-    
-    sub test_process_terminate()
-        dim content as string
-        
-        '# redirected output is used with logging files.
-        child = new ConsoleProcess("mock_process.exe", "wait")
-        child->redirect(ProcessStdBoth, "both.log")
-        
-        '# start
-        assert_true(child->start())
-        sleep 500
-        
-        '# validate if running
-        assert_true(child->running)
-        
-        '# validate PID
-        assert_not_equal(0, child->pid)
-        
-        '# now terminates it
-        assert_true(child->terminate())
-        sleep 500
-        
-        assert_equal(9, child->exit_code)
-        
-        '# it should be done
-        assert_false(child->running)
-        
-        delete child
-        
-        '# validate output
-        '# file must exists
-        assert_true(fileexists("both.log"))
-        
-        '# contents must match
-        content = content_of_file("both.log")
-        
-        assert_not_equal(0, instr(content, "out: message"))
-        assert_not_equal(0, instr(content, "err: error"))
-        assert_not_equal(0, instr(content, "interrupted"))
-        
-        assert_equal(0, kill("both.log"))
-    end sub
-    
-    sub test_process_terminate_slow1()
-        dim content as string
-        
-        '# redirected output is used with logging files.
-        child = new ConsoleProcess("mock_process.exe", "slow1")
-        child->redirect(ProcessStdBoth, "both_slow1.log")
-        
-        '# start
-        assert_true(child->start())
-        sleep 500
-        
-        '# validate if running
-        assert_true(child->running)
-        
-        '# validate PID
-        assert_not_equal(0, child->pid)
-        
-        '# now terminates it
-        assert_true(child->terminate())
-        sleep 500
-        
-        assert_equal(10, child->exit_code)
-        
-        '# it should be done
-        assert_false(child->running)
-        
-        delete child
-        
-        '# validate output
-        '# file must exists
-        assert_true(fileexists("both_slow1.log"))
-        
-        '# contents must match
-        content = content_of_file("both_slow1.log")
-        
-        assert_equal(0, instr(content, "interrupted"))
-        assert_not_equal(0, instr(content, "out: CTRL-C received"))
-        assert_equal(0, instr(content, "out: CTRL-BREAK received"))
-        
-        assert_equal(0, kill("both_slow1.log"))
-    end sub
-    
-    sub test_process_terminate_slow2()
-        dim content as string
-        
-        '# redirected output is used with logging files.
-        child = new ConsoleProcess("mock_process.exe", "slow2")
-        child->redirect(ProcessStdBoth, "both_slow2.log")
-        
-        '# start
-        assert_true(child->start())
-        sleep 500
-        
-        '# validate if running
-        assert_true(child->running)
-        
-        '# validate PID
-        assert_not_equal(0, child->pid)
-        
-        '# now terminates it
-        assert_true(child->terminate())
-        sleep 500
-        
-        assert_equal(20, child->exit_code)
-        
-        '# it should be done
-        assert_false(child->running)
-        
-        delete child
-        
-        '# validate output
-        '# file must exists
-        assert_true(fileexists("both_slow2.log"))
-        
-        '# contents must match
-        content = content_of_file("both_slow2.log")
-        
-        assert_equal(0, instr(content, "interrupted"))
-        assert_not_equal(0, instr(content, "out: CTRL-C received"))
-        assert_not_equal(0, instr(content, "out: CTRL-BREAK received"))
-        
-        '# cleanup
-        assert_equal(0, kill("both_slow2.log"))
-    end sub
-
-    sub test_process_terminate_forced()
-        dim content as string
-        
-        '# redirected output is used with logging files.
-        child = new ConsoleProcess("mock_process.exe", "wait")
-        child->redirect(ProcessStdBoth, "both_forced.log")
-        
-        '# start
-        assert_true(child->start())
-        sleep 500
-        
-        '# validate if running
-        assert_true(child->running)
-        
-        '# validate PID
-        assert_not_equal(0, child->pid)
-        
-        '# now terminates it
-        assert_true(child->terminate(true))
-        sleep 500
-        
-        '# it should be done
-        assert_false(child->running)
-        
-        '# look for termination code
-        assert_equal(0, child->exit_code)
-        
-        delete child
-        
-        '# validate output
-        '# file must exists
-        assert_true(fileexists("both_forced.log"))
-        
-        '# contents must match
-        content = content_of_file("both_forced.log")
-        
-        assert_equal(0, instr(content, "out: message"))
-        assert_equal(0, instr(content, "err: error"))
-        assert_equal(0, instr(content, "interrupted"))
-        
-        assert_equal(0, kill("both_forced.log"))
-    end sub
-    
-    sub test_reuse_object_instance()
-        dim first_pid as uinteger
-        
-        child = new ConsoleProcess("mock_process.exe")
-        
-        '# start
-        assert_true(child->start())
-        sleep 500
-        
-        '# validate not running
-        assert_false(child->running)
-        
-        '# validate PID
-        assert_not_equal(0, child->pid)
-        
-        '# saves PID
-        first_pid = child->pid
-        
-        '# start it again
-        assert_true(child->start())
-        sleep 500
-        
-        '# it should have stopped by now
-        assert_false(child->running)
-        assert_not_equal(0, child->pid)
-        assert_not_equal(first_pid, child->pid)
-        
-        delete child
-    end sub
-    
-    private sub register() constructor
-        add_suite(Suite_Test_Console_Process)
-        add_test(test_process_create)
-        add_test(test_process_create_args)
-        add_test(test_properly_quoted_filename)
-        add_test(test_failed_unexistant_process)
-        add_test(test_process_spawn_exit_code)
-        add_test(test_redirected_output)
-        add_test(test_redirected_merged_output)
-        add_test(test_redirected_output_append)
-        add_test(test_process_terminate)
-        add_test(test_process_terminate_slow1)
-        add_test(test_process_terminate_slow2)
-        add_test(test_process_terminate_forced)
-        add_test(test_reuse_object_instance)
-    end sub
-    
-    '# test helpers below this point
-    private function process_cleanup() as boolean
-        shell "taskkill /f /im mock_process.exe 1>NUL 2>&1"
-        return true
-    end function
-end namespace
diff --git a/projects/mongrel_service/tests/test_helpers.bas b/projects/mongrel_service/tests/test_helpers.bas
deleted file mode 100644
index c4647c0..0000000
--- a/projects/mongrel_service/tests/test_helpers.bas
+++ /dev/null
@@ -1,35 +0,0 @@
-'#--
-'# Copyright (c) 2006-2007 Luis Lavena, Multimedia systems
-'#
-'# This source code is released under the MIT License.
-'# See MIT-LICENSE file for details
-'#++
-
-#include once "testly.bi"
-#include once "test_helpers.bi"
-#include once "file.bi"
-
-'# Global Helpers
-function content_of_file(byref filename as string) as string
-    dim result as string
-    dim handle as integer
-    dim buffer as string
-    
-    result = ""
-    buffer = ""
-    
-    if (fileexists(filename) = true) then
-        handle = freefile
-        open filename for input as #handle
-        do while not (eof(handle))
-            input #handle, buffer
-            result += buffer
-            buffer = ""
-        loop
-        close #handle
-    else
-        result = ""
-    end if
-    
-    return result
-end function
diff --git a/projects/mongrel_service/tests/test_helpers.bi b/projects/mongrel_service/tests/test_helpers.bi
deleted file mode 100644
index 9397962..0000000
--- a/projects/mongrel_service/tests/test_helpers.bi
+++ /dev/null
@@ -1,8 +0,0 @@
-'#--
-'# Copyright (c) 2006-2007 Luis Lavena, Multimedia systems
-'#
-'# This source code is released under the MIT License.
-'# See MIT-LICENSE file for details
-'#++
-
-declare function content_of_file(byref as string) as string \ No newline at end of file
diff --git a/projects/mongrel_service/tools/freebasic.rb b/projects/mongrel_service/tools/freebasic.rb
deleted file mode 100644
index 0b3e445..0000000
--- a/projects/mongrel_service/tools/freebasic.rb
+++ /dev/null
@@ -1,361 +0,0 @@
-#--
-# FreeBASIC project builder
-# inspired by Asset Compiler by Jeremy Voorhis
-# coded by Luis Lavena
-#--
-
-# FreeBASIC Project library for compilation.
-# For example:
-#
-# namespace :projects do
-#   project_task :my_fb_project do
-#     lib         'static'
-#     dylib       'dynamic library'
-#     executable  'exename'
-#    
-#     build_to    'bin'
-#    
-#     define      'MY_DEFINE'
-#    
-#     main        'src/main.bas'
-#     source      'src/other_module.bas'
-#     source      "src/*.bas"
-#   end
-# end
-#
-# This example defines the following tasks:
-#
-#   rake projects:build                 # Build all projects
-#   rake projects:clobber               # Clobber all projects
-#   rake projects:my_fb_project:build   # Build the my_fb_project files
-#   rake projects:my_fb_project:clobber # Remove the my_fb_project files
-#   rake projects:my_fb_project:rebuild # Force a rebuild of the my_fb_project files
-#   rake projects:rebuild               # Rebuild all projects
-
-require 'rake/tasklib'
-require 'pp'
-
-module FreeBASIC
-  # this help me reduce the attempts to remove already removed files.
-  # works with src_files
-  CLOBBER = Rake::FileList.new
-  ON_WINDOWS = (RUBY_PLATFORM =~ /mswin|cygwin|bccwin/)
-  
-  class ProjectTask
-    attr_accessor :name
-    attr_accessor :output_name
-    attr_accessor :type
-    attr_accessor :build_path
-    attr_accessor :defines
-    attr_accessor :main_file
-    attr_accessor :sources
-    attr_accessor :libraries
-    attr_accessor :search_path
-    attr_accessor :libraries_path
-    
-    def initialize(name, &block)
-      @name = name.to_s
-      @build_path = '.'
-      @defines = []
-      @sources = Rake::FileList.new
-      @libraries = []
-      @search_path = []
-      @libraries_path = []
-      @options = {}
-      
-      instance_eval(&block) if block_given?
-      
-      do_cleanup
-      
-      namespace @name do
-        define_clobber_task
-        define_rebuild_task
-        define_build_directory_task
-        define_build_task
-      end
-      add_dependencies_to_main_task
-    end
-    
-    public
-      # using this will set your project type to :executable
-      # and assign exe_name as the output_name for the project
-      # it dynamically will assign extension when running on windows
-      def executable(exe_name)
-        @type = :executable
-        @output_name = "#{exe_name}.#{(ON_WINDOWS ? "exe" : "")}"
-        @real_file_name = @output_name
-      end
-      
-      # lib will set type to :lib and assign 'lib#{lib_name}.a'
-      # as output_name for the project
-      def lib(lib_name)
-        @type = :lib
-        @output_name = "#{lib_name}"
-        @real_file_name = "lib#{lib_name}.a"
-      end
-      
-      # dynlib will set type to :dynlib and assign '#{dll_name}.dll|so'
-      # as output_name for this project
-      def dylib(dll_name)
-        @type = :dylib
-        @output_name = "#{dll_name}.#{(ON_WINDOWS ? "dll" : "so")}"
-        @real_file_name = @output_name
-        @complement_file = "lib#{@output_name}.a"
-      end
-      
-      # this set where the final, compiled executable should be linked
-      # uses @build_path as variable
-      def build_to(path)
-        @build_path = path
-      end
-      
-      # define allow you set compiler time options
-      # collect them into @defines and use later
-      # to call source file compilation process (it wil require cleanup)
-      def define(*defines)
-        @defines << defines
-      end
-      
-      # main set @main_file to be the main module used during the linking
-      # process. also, this module requires special -m flag during his
-      # own compile process
-      # question: in case @no main_file was set, will use the first 'source'
-      # file defined as main? or it should raise a error?
-      def main(main_file)
-        @main_file = main_file
-      end
-      
-      # used to collect sources files for compilation
-      # it will take .bas, .rc, .res as sources
-      # before compilation we should clean @sources!
-      def source(*sources)
-        @sources.include sources
-      end
-    
-      # this is similar to sources, instead library linking is used
-      # also will require cleanup services ;-)
-      def library(*libraries)
-        @libraries << libraries
-      end
-  
-      # use this to set the include path when looking for, ehem, includes
-      # (equals -i fbc compiler param)
-      def search_path(*search_path)
-        @search_path << search_path
-      end
-      
-      # use this to tell the compiler where to look for libraries
-      # (equals -p fbc compiler param)
-      def lib_path(*libraries_path)
-        @libraries_path << libraries_path
-      end
-      
-      # use this to add additional compiler parameters (like debug or errorchecking options)
-      #
-      def option(new_options = {})
-        @options.merge!(new_options)
-      end
-      
-    protected
-      # this method will fix nested libraries and defines
-      # also, if main_file is missing (or wasn't set) will shift the first one
-      # as main
-      def do_cleanup
-        # remove duplicated definitions, flatten
-        @defines.flatten!
-        @defines.uniq! if @defines.length > 1
-
-        # set main_file
-        if @type == :executable
-          @main_file = @sources.shift unless defined?(@main_file)
-        end
-        
-        # empty path? must be corrected
-        @build_path = '.' if @build_path == ''
-        
-        # remove duplicates from sources
-        @sources.uniq! if @sources.length > 1
-        
-        # now the libraries
-        @libraries.flatten!
-        @libraries.uniq! if @libraries.length > 1
-        
-        # search path
-        @search_path.flatten!
-        @search_path.uniq! if @search_path.length > 1
-        
-        # libraries path
-        @libraries_path.flatten!
-        @libraries_path.uniq! if @libraries_path.length > 1
-        
-        # if no target was set, default to executable
-        unless defined?(@output_name)
-          executable(@name)
-        end
-      end
-      
-      # return the compiled name version of the passed source file (src)
-      # compiled_form("test.bas") => "test.o"
-      def compiled_form(src)
-        unless src.nil?
-          src.ext({ ".bas" => "o", ".rc" => "obj" }[File.extname(src)])
-        end
-      end
-      
-      def compiled_project_file
-        File.join @build_path, @real_file_name
-      end
-      
-      def fbc_compile(source, target, main = nil)
-        cmdline = []
-        cmdline << "fbc"
-        cmdline << "-w pedantic" if (@options.has_key?(:pedantic) && @options[:pedantic] == true)
-        cmdline << "-g" if (@options.has_key?(:debug) && @options[:debug] == true)
-        cmdline << "-#{@options[:errorchecking].to_s}" if @options.has_key?(:errorchecking)
-        cmdline << "-mt" if (@options.has_key?(:mt) && @options[:mt] == true)
-        cmdline << "-profile" if (@options.has_key?(:profile) && @options[:profile] == true)
-        cmdline << "-c #{source}"
-        cmdline << "-o #{target}"
-        cmdline << "-m #{main}" unless main.nil?
-        cmdline << @defines.collect { |defname| "-d #{defname}" }
-        cmdline << @search_path.collect { |path| "-i #{path}" }
-        cmdline.flatten.join(' ')
-      end
-      
-      def fbc_link(target, files, extra_files = [])
-        cmdline = []
-        cmdline << "fbc"
-        cmdline << "-g" if (@options.has_key?(:debug) && @options[:debug] == true)
-        cmdline << "-mt" if (@options.has_key?(:mt) && @options[:mt] == true)
-        cmdline << "-profile" if (@options.has_key?(:profile) && @options[:profile] == true)
-        cmdline << "-#{@type.to_s}" unless @type == :executable
-        cmdline << "-x #{target}"
-        cmdline << files << extra_files
-        cmdline << @defines.collect { |defname| "-d #{defname}" }
-        unless @type == :lib
-          cmdline << @libraries_path.collect { |path| "-p #{path}" }
-          cmdline << @libraries.collect { |libname| "-l #{libname}" }
-        end
-        cmdline.flatten.join(' ')
-      end
-      
-      def define_clobber_task
-        desc "Remove all compiled files for #{@name}"
-        task :clobber do
-          # remove compiled and linked file
-          rm compiled_project_file rescue nil if File.exist?(compiled_project_file)
-          if @type == :dylib
-            rm File.join(@build_path, @complement_file) rescue nil if File.exist?(File.join(@build_path, @complement_file))
-          end
-          
-          # remove main file
-          unless @main_file.nil? || !File.exists?(compiled_form(@main_file))
-            rm compiled_form(@main_file) rescue nil
-          end
-          
-          # now the sources files
-          # avoid attempt to remove the file two times (this is a bug in Rake)
-          @sources.each do |src|
-            # exclude compiled source files (c obj).
-            unless src =~ /o$/
-              target = compiled_form(src)
-              unless CLOBBER.include?(target)
-                CLOBBER.include(target)
-                rm target rescue nil if File.exist?(target)
-              end
-            end
-          end
-        end
-      end
-      
-      def define_rebuild_task
-        desc "Force a rebuild of files for #{@name}"
-        task :rebuild => [:clobber, :build]
-      end
-      
-      def define_build_directory_task
-        directory @build_path
-        task :build => @build_path
-      end
-      
-      def define_build_task
-        desc "Build project #{@name}"
-        task :build
-        
-        # empty file task
-        file compiled_project_file
-        
-        # compile main_file
-        # use as pre-requisite the source filename
-        if @type == :executable
-          file compiled_form(@main_file) => @main_file do |t|
-            # remove the path and the extension
-            main_module = File.basename(t.name).ext
-            sh fbc_compile(@main_file, t.name, main_module)
-          end
-        
-          # add dependency
-          file compiled_project_file => compiled_form(@main_file)
-        end
-        
-        # gather files that are passed "as-is" to the compiler
-        unprocessed_files = @sources.select { |rcfile| rcfile =~ /(res|rc|o|obj)$/ }
-        
-        @sources.each do |src|
-          # is a unprocessed file?
-          unless unprocessed_files.include?(src)
-            target = compiled_form(src)
-            
-            # is already in our list of tasks?
-            if not Rake::Task.task_defined?(target)
-              # if not, compile
-              
-              file target => src do
-                sh fbc_compile(src, target)
-              end
-            end
-          
-            # include dependency
-            file compiled_project_file => target
-          end
-        end
-        
-        # now the linking process
-        file compiled_project_file do |t|
-          target = File.join(@build_path, @output_name)
-          sh fbc_link(target, t.prerequisites, unprocessed_files)
-        end
-        
-        # add the dependency
-        task :build => compiled_project_file
-      end
-
-      # Adds dependencies in the parent namespace
-      def add_dependencies_to_main_task
-        desc 'Build all projects' unless task( :build ).comment
-        task :build => "#{@name}:build"
-        
-        desc 'Clobber all projects' unless task( :clobber ).comment
-        task :clobber => "#{@name}:clobber"
-        
-        desc 'Rebuild all projects' unless task( :rebuild ).comment
-        task :rebuild => ["#{@name}:clobber", "#{@name}:build"]
-      end
-  end
-end
-  
-# helper method to define a FreeBASIC::ProjectTask in the current namespace
-def project_task name, &block
-  FreeBASIC::ProjectTask.new name, &block
-end
-
-def include_projects_of name
-  desc 'Build all projects' unless task( :build ).comment
-  task :build => "#{name}:build"
-  
-  desc 'Clobber all projects' unless task( :clobber ).comment
-  task :clobber => "#{name}:clobber"
-  
-  desc 'Rebuild all projects' unless task( :rebuild ).comment
-  task :rebuild => "#{name}:rebuild"
-end
diff --git a/projects/mongrel_status/CHANGELOG b/projects/mongrel_status/CHANGELOG
deleted file mode 100644
index 7e1103d..0000000
--- a/projects/mongrel_status/CHANGELOG
+++ /dev/null
@@ -1,2 +0,0 @@
-
-v0.2.3. Signed gem.
diff --git a/projects/mongrel_status/COPYING b/projects/mongrel_status/COPYING
deleted file mode 100644
index b1e3f5a..0000000
--- a/projects/mongrel_status/COPYING
+++ /dev/null
@@ -1,504 +0,0 @@
-                  GNU LESSER GENERAL PUBLIC LICENSE
-                       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-                            Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-                  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-  
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-                            NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-                     END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
-
diff --git a/projects/mongrel_status/LICENSE b/projects/mongrel_status/LICENSE
deleted file mode 100644
index e5a926e..0000000
--- a/projects/mongrel_status/LICENSE
+++ /dev/null
@@ -1,55 +0,0 @@
-Mongrel Web Server (Mongrel) is copyrighted free software by Zed A. Shaw
-<zedshaw at zedshaw dot com> and contributors. You can redistribute it
-and/or modify it under either the terms of the GPL2 or the conditions below:
-
-1. You may make and give away verbatim copies of the source form of the
-   software without restriction, provided that you duplicate all of the
-   original copyright notices and associated disclaimers.
-
-2. You may modify your copy of the software in any way, provided that
-   you do at least ONE of the following:
-
-     a) place your modifications in the Public Domain or otherwise make them
-     Freely Available, such as by posting said modifications to Usenet or an
-     equivalent medium, or by allowing the author to include your
-     modifications in the software.
-
-     b) use the modified software only within your corporation or
-        organization.
-
-     c) rename any non-standard executables so the names do not conflict with
-     standard executables, which must also be provided.
-
-     d) make other distribution arrangements with the author.
-
-3. You may distribute the software in object code or executable
-   form, provided that you do at least ONE of the following:
-
-     a) distribute the executables and library files of the software,
-     together with instructions (in the manual page or equivalent) on where
-     to get the original distribution.
-
-     b) accompany the distribution with the machine-readable source of the
-     software.
-
-     c) give non-standard executables non-standard names, with
-        instructions on where to get the original software distribution.
-
-     d) make other distribution arrangements with the author.
-
-4. You may modify and include the part of the software into any other
-   software (possibly commercial).  But some files in the distribution
-   are not written by the author, so that they are not under this terms.
-
-5. The scripts and library files supplied as input to or produced as
-   output from the software do not automatically fall under the
-   copyright of the software, but belong to whomever generated them,
-   and may be sold commercially, and may be aggregated with this
-   software.
-
-6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
-   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-   PURPOSE.
-
-
diff --git a/projects/mongrel_status/Manifest b/projects/mongrel_status/Manifest
deleted file mode 100644
index 7d23517..0000000
--- a/projects/mongrel_status/Manifest
+++ /dev/null
@@ -1,6 +0,0 @@
-README
-Manifest
-LICENSE
-lib/mongrel_status/init.rb
-COPYING
-CHANGELOG
diff --git a/projects/mongrel_status/README b/projects/mongrel_status/README
deleted file mode 100644
index 9cd44c1..0000000
--- a/projects/mongrel_status/README
+++ /dev/null
@@ -1,6 +0,0 @@
-== Mongrel Status Plugin
-
-A very simple dumb status plugin that's mostly just a demonstration
-of how to do a plugin for mongrel.  It just prints out the
-PID of a running mongrel server.
-
diff --git a/projects/mongrel_status/Rakefile b/projects/mongrel_status/Rakefile
deleted file mode 100644
index 0922972..0000000
--- a/projects/mongrel_status/Rakefile
+++ /dev/null
@@ -1,16 +0,0 @@
-
-require 'echoe'
-
-Echoe.new("mongrel_status") do |p|
-  p.summary = "A sample plugin that reports the status of mongrel."
-  p.project = "mongrel"
-  p.author = "Zed A. Shaw"
-  p.dependencies = ['gem_plugin >=0.2.3', 'mongrel >=1.0.2']
-
-  p.need_tar_gz = false
-  p.need_tgz = true
-  p.certificate_chain = ['~/p/configuration/gem_certificates/mongrel/mongrel-public_cert.pem',
-    '~/p/configuration/gem_certificates/evan_weaver-mongrel-public_cert.pem']    
-  p.require_signed = true
-end
-
diff --git a/projects/mongrel_status/lib/mongrel_status/init.rb b/projects/mongrel_status/lib/mongrel_status/init.rb
deleted file mode 100644
index cd53dfb..0000000
--- a/projects/mongrel_status/lib/mongrel_status/init.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-require 'mongrel'
-require 'gem_plugin'
-
-
-class Status < GemPlugin::Plugin "/commands"
-  include Mongrel::Command::Base
-  
-  def configure
-    options [
-             ['-c', '--chdir PATH', "Change to dir before starting (will be expanded)", :@cwd, Dir.pwd],
-             ['-P', '--pid FILE', "Where to write the PID", :@pid_file, "log/mongrel.pid"]
-            ]
-  end
-  
-  def validate
-    @cwd = File.expand_path(@cwd)
-    valid_dir? @cwd, "Invalid path to change to during daemon mode: #@cwd"
-    
-    @pid_file = File.join(@cwd,@pid_file)
-    valid_exists? @pid_file, "PID file #@pid_file does not exist. Not running?"
-    
-    return @valid
-  end
-  
-  
-  def run
-    pid = open(@pid_file) {|f| f.read }
-    puts "Mongrel status:"
-    puts "PID: #{pid}"
-  end
-end
-
diff --git a/projects/mongrel_upload_progress/CHANGELOG b/projects/mongrel_upload_progress/CHANGELOG
deleted file mode 100644
index e3b4b88..0000000
--- a/projects/mongrel_upload_progress/CHANGELOG
+++ /dev/null
@@ -1,2 +0,0 @@
-
-v0.2.2. Signed gem.
diff --git a/projects/mongrel_upload_progress/COPYING b/projects/mongrel_upload_progress/COPYING
deleted file mode 100644
index bff74f4..0000000
--- a/projects/mongrel_upload_progress/COPYING
+++ /dev/null
@@ -1 +0,0 @@
-No copying restrictions/license given. \ No newline at end of file
diff --git a/projects/mongrel_upload_progress/LICENSE b/projects/mongrel_upload_progress/LICENSE
deleted file mode 100644
index e5a926e..0000000
--- a/projects/mongrel_upload_progress/LICENSE
+++ /dev/null
@@ -1,55 +0,0 @@
-Mongrel Web Server (Mongrel) is copyrighted free software by Zed A. Shaw
-<zedshaw at zedshaw dot com> and contributors. You can redistribute it
-and/or modify it under either the terms of the GPL2 or the conditions below:
-
-1. You may make and give away verbatim copies of the source form of the
-   software without restriction, provided that you duplicate all of the
-   original copyright notices and associated disclaimers.
-
-2. You may modify your copy of the software in any way, provided that
-   you do at least ONE of the following:
-
-     a) place your modifications in the Public Domain or otherwise make them
-     Freely Available, such as by posting said modifications to Usenet or an
-     equivalent medium, or by allowing the author to include your
-     modifications in the software.
-
-     b) use the modified software only within your corporation or
-        organization.
-
-     c) rename any non-standard executables so the names do not conflict with
-     standard executables, which must also be provided.
-
-     d) make other distribution arrangements with the author.
-
-3. You may distribute the software in object code or executable
-   form, provided that you do at least ONE of the following:
-
-     a) distribute the executables and library files of the software,
-     together with instructions (in the manual page or equivalent) on where
-     to get the original distribution.
-
-     b) accompany the distribution with the machine-readable source of the
-     software.
-
-     c) give non-standard executables non-standard names, with
-        instructions on where to get the original software distribution.
-
-     d) make other distribution arrangements with the author.
-
-4. You may modify and include the part of the software into any other
-   software (possibly commercial).  But some files in the distribution
-   are not written by the author, so that they are not under this terms.
-
-5. The scripts and library files supplied as input to or produced as
-   output from the software do not automatically fall under the
-   copyright of the software, but belong to whomever generated them,
-   and may be sold commercially, and may be aggregated with this
-   software.
-
-6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
-   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-   PURPOSE.
-
-
diff --git a/projects/mongrel_upload_progress/Manifest b/projects/mongrel_upload_progress/Manifest
deleted file mode 100644
index e2a2e8b..0000000
--- a/projects/mongrel_upload_progress/Manifest
+++ /dev/null
@@ -1,7 +0,0 @@
-resources/defaults.yaml
-README
-Manifest
-LICENSE
-lib/mongrel_upload_progress/init.rb
-COPYING
-CHANGELOG
diff --git a/projects/mongrel_upload_progress/README b/projects/mongrel_upload_progress/README
deleted file mode 100644
index 7014ec3..0000000
--- a/projects/mongrel_upload_progress/README
+++ /dev/null
@@ -1,5 +0,0 @@
-== Mongrel_upload_progress GemPlugin
-
-You should document your project here.
-
-
diff --git a/projects/mongrel_upload_progress/Rakefile b/projects/mongrel_upload_progress/Rakefile
deleted file mode 100644
index 23b337e..0000000
--- a/projects/mongrel_upload_progress/Rakefile
+++ /dev/null
@@ -1,15 +0,0 @@
-
-require 'echoe'
-
-Echoe.new("mongrel_upload_progress") do |p|
-  p.summary = "The mongrel_upload_progress gemplugin"
-  p.project = "mongrel"
-  p.author="The Mongrel team"
-  p.dependencies = ['mongrel >=0.3.13.3', 'gem_plugin >=0.2.1']
-
-  p.need_tar_gz = false
-  p.need_tgz = true
-  p.certificate_chain = ['~/p/configuration/gem_certificates/mongrel/mongrel-public_cert.pem',
-    '~/p/configuration/gem_certificates/evan_weaver-mongrel-public_cert.pem']    
-  p.require_signed = true
-end
diff --git a/projects/mongrel_upload_progress/lib/mongrel_upload_progress/init.rb b/projects/mongrel_upload_progress/lib/mongrel_upload_progress/init.rb
deleted file mode 100644
index 5ef1f7e..0000000
--- a/projects/mongrel_upload_progress/lib/mongrel_upload_progress/init.rb
+++ /dev/null
@@ -1,90 +0,0 @@
-require 'mongrel'
-require 'gem_plugin'
-
-class Upload < GemPlugin::Plugin "/handlers"
-  include Mongrel::HttpHandlerPlugin
-
-  def initialize(options = {})
-    @path_info      = Array(options[:path_info])
-    @frequency      = options[:frequency] || 3
-    @request_notify = true
-    if options[:drb]
-      require 'drb'
-      DRb.start_service
-      Mongrel.const_set :Uploads, DRbObject.new(nil, options[:drb])
-    else
-      Mongrel.const_set :Uploads, Mongrel::UploadProgress.new
-    end
-    Mongrel::Uploads.debug = true if options[:debug]
-  end
-
-  def request_begins(params)
-    upload_notify(:add, params, params[Mongrel::Const::CONTENT_LENGTH].to_i)
-  end
-
-  def request_progress(params, clen, total)
-    upload_notify(:mark, params, clen)
-  end
-
-  def process(request, response)
-    upload_notify(:finish, request.params)
-  end
-
-  private
-    def upload_notify(action, params, *args)
-      return unless @path_info.include?(params['PATH_INFO']) &&
-        params[Mongrel::Const::REQUEST_METHOD] == 'POST' &&
-        upload_id = Mongrel::HttpRequest.query_parse(params['QUERY_STRING'])['upload_id']
-      if action == :mark
-        last_checked_time = Mongrel::Uploads.last_checked(upload_id)
-        return unless last_checked_time && Time.now - last_checked_time > @frequency
-      end
-      Mongrel::Uploads.send(action, upload_id, *args)
-      Mongrel::Uploads.update_checked_time(upload_id) unless action == :finish
-    end
-end
-
-# Keeps track of the status of all currently processing uploads
-class Mongrel::UploadProgress
-  attr_accessor :debug
-  def initialize
-    @guard    = Mutex.new
-    @counters = {}
-  end
-
-  def check(upid)
-    @counters[upid].last rescue nil
-  end
-  
-  def last_checked(upid)
-    @counters[upid].first rescue nil
-  end
-
-  def update_checked_time(upid)
-    @guard.synchronize { @counters[upid][0] = Time.now }
-  end
-
-  def add(upid, size)
-    @guard.synchronize do
-      @counters[upid] = [Time.now, {:size => size, :received => 0}]
-      puts "#{upid}: Added" if @debug
-    end
-  end
-
-  def mark(upid, len)
-    return unless status = check(upid)
-    puts "#{upid}: Marking" if @debug
-    @guard.synchronize { status[:received] = status[:size] - len }
-  end
-
-  def finish(upid)
-    @guard.synchronize do
-      puts "#{upid}: Finished" if @debug
-      @counters.delete(upid)
-    end
-  end
-  
-  def list
-    @counters.keys.sort
-  end
-end \ No newline at end of file
diff --git a/projects/mongrel_upload_progress/resources/defaults.yaml b/projects/mongrel_upload_progress/resources/defaults.yaml
deleted file mode 100644
index beb3c6d..0000000
--- a/projects/mongrel_upload_progress/resources/defaults.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-:debug: false
-:upload_path: 'tmp/uploads' \ No newline at end of file
diff --git a/test/unit/test_debug.rb b/test/unit/test_debug.rb
deleted file mode 100644
index 05d92d8..0000000
--- a/test/unit/test_debug.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright (c) 2005 Zed A. Shaw
-# You can redistribute it and/or modify it under the same terms as Ruby.
-#
-# Additional work donated by contributors.  See http://mongrel.rubyforge.org/attributions.html
-# for more information.
-
-require 'test/test_helper'
-require 'mongrel/debug'
-
-class MongrelDbgTest < Test::Unit::TestCase
-
-  def test_tracing_to_log
-    FileUtils.rm_rf "log/mongrel_debug"
-
-    MongrelDbg::configure
-    out = StringIO.new
-
-    MongrelDbg::begin_trace(:rails)
-    MongrelDbg::trace(:rails, "Good stuff")
-    MongrelDbg::end_trace(:rails)
-
-    assert File.exist?("log/mongrel_debug"), "Didn't make logging directory"
-  end
-
-end