<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,25 +1,25 @@
 module Rack
   class AdapterNotFound &lt; RuntimeError; end
-
+  
   # Hash used to guess which adapter to use in &lt;tt&gt;Adapter.for&lt;/tt&gt;.
   # Framework name =&gt; file unique to this framework.
   # +nil+ for value to never guess.
-  ADAPTERS = {
-    :rails   =&gt; &quot;config/environment.rb&quot;,
-    :ramaze  =&gt; &quot;start.rb&quot;,
-    :merb    =&gt; &quot;config/init.rb&quot;,
-    :halcyon =&gt; 'runner.ru',
-    :mack    =&gt; 'config/app_config/default.yml',
-    :file    =&gt; nil
-  }
-    
-  module Adapter    
+  ADAPTERS = [
+    [:rails,   'config/environment.rb'],
+    [:ramaze,  'start.rb'],
+    [:halcyon, 'runner.ru'],
+    [:merb,    'config/init.rb'],
+    [:mack,    'config/app_config/default.yml'],
+    [:file,    nil]
+  ]
+  
+  module Adapter
     # Guess which adapter to use based on the directory structure
     # or file content.
     # Returns a symbol representing the name of the adapter to use
     # to load the application under &lt;tt&gt;dir/&lt;/tt&gt;.
     def self.guess(dir)
-      ADAPTERS.each_pair do |adapter, file|
+      ADAPTERS.each do |(adapter, file)|
         return adapter if file &amp;&amp; ::File.exist?(::File.join(dir, file))
       end
       raise AdapterNotFound, &quot;No adapter found for #{dir}&quot;
@@ -33,39 +33,39 @@ module Rack
       
       when :ramaze
         require &quot;#{options[:chdir]}/start&quot;
-
+        
         Ramaze.trait[:essentials].delete Ramaze::Adapter
         Ramaze.start :force =&gt; true
-
+        
         return Ramaze::Adapter::Base
-
+        
       when :merb
         require 'merb-core'
-
+        
         Merb::Config.setup(:merb_root   =&gt; options[:chdir],
                            :environment =&gt; options[:environment])
         Merb.environment = Merb::Config[:environment]
         Merb.root = Merb::Config[:merb_root]
         Merb::BootLoader.run
-
+        
         return Merb::Rack::Application.new
-      
+        
       when :halcyon
         require 'halcyon'
         
         $:.unshift(Halcyon.root/'lib')
-        Halcyon::Runner.load_config Halcyon.root/'config'/'config.yml'
         
         return Halcyon::Runner.new
-      
+        
       when :mack
         ENV[&quot;MACK_ENV&quot;] = options[:environment]
         load(::File.join(options[:chdir], &quot;Rakefile&quot;))
         require 'mack'
         return Mack::Utils::Server.build_app
+        
       when :file
         return Rack::File.new(options[:chdir])
-      
+        
       else
         raise AdapterNotFound, &quot;Adapter not found: #{name}&quot;
         </diff>
      <filename>lib/rack/adapter/loader.rb</filename>
    </modified>
    <modified>
      <diff>@@ -63,7 +63,7 @@ module Thin
         opts.on(&quot;-S&quot;, &quot;--socket FILE&quot;, &quot;bind to unix domain socket&quot;)                    { |file| @options[:socket] = file }
         opts.on(&quot;-y&quot;, &quot;--swiftiply [KEY]&quot;, &quot;Run using swiftiply&quot;)                       { |key| @options[:swiftiply] = key }
         opts.on(&quot;-A&quot;, &quot;--adapter NAME&quot;, &quot;Rack adapter to use (default: autodetect)&quot;,
-                                        &quot;(#{Rack::ADAPTERS.keys.join(', ')})&quot;)          { |name| @options[:adapter] = name }
+                                        &quot;(#{Rack::ADAPTERS.map{|a|a.first}.join(', ')})&quot;) { |name| @options[:adapter] = name }
         opts.on(&quot;-R&quot;, &quot;--rackup FILE&quot;, &quot;Load a Rack config file instead of &quot; +
                                        &quot;Rack adapter&quot;)                                  { |file| @options[:rackup] = file }
         opts.on(&quot;-c&quot;, &quot;--chdir DIR&quot;, &quot;Change to dir before starting&quot;)                   { |dir| @options[:chdir] = File.expand_path(dir) }</diff>
      <filename>lib/thin/runner.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>bdddd86657ae44adef067acc43b0a7391f3530de</id>
    </parent>
  </parents>
  <author>
    <name>Matt Todd</name>
    <email>chiology@gmail.com</email>
  </author>
  <url>http://github.com/macournoyer/thin/commit/1537b449d44cb79cfa3236e2d264cfea31ae8f0f</url>
  <id>1537b449d44cb79cfa3236e2d264cfea31ae8f0f</id>
  <committed-date>2008-07-01T09:48:37-07:00</committed-date>
  <authored-date>2008-07-01T09:48:37-07:00</authored-date>
  <message>Changed adapters to be guessed in specific order (due t potential conflicts). Updated testing and option listing. Updated the Halcyon adapter loader.</message>
  <tree>cbe1bfede88d770dac5147fd0f99c4c6f3a98260</tree>
  <committer>
    <name>Matt Todd</name>
    <email>chiology@gmail.com</email>
  </committer>
</commit>
