<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,6 @@
 == 0.8.0 Dodgy Dentist release
+ * Add --require (-r) option to require a library, before executing your script.
+ * Rename --rackup short option to -R, warn and load as rackup when file ends with .ru.
  * List supported adapters in command usage.
  * Add file adapter to built-in adapter, serve static files in current directory.
  * Allow disabling signal handling in Server with :signals =&gt; false</diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -14,10 +14,10 @@ module Thin
   # Raised when an option is not valid.
   class InvalidOption &lt; RunnerError; end
   
-  # Build and control one Thin server.
+  # Build and control Thin servers.
   # Hey Controller pattern is not only for web apps yo!
   module Controllers  
-    # Controls a Thin server.
+    # Controls one Thin server.
     # Allow to start, stop, restart and configure a single thin server.
     class Controller
       include Logging</diff>
      <filename>lib/thin/controllers/controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -64,7 +64,7 @@ module Thin
         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 }
-        opts.on(&quot;-r&quot;, &quot;--rackup FILE&quot;, &quot;Load a Rack config file instead of &quot; +
+        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) }
         opts.on(      &quot;--stats PATH&quot;, &quot;Mount the Stats adapter under PATH&quot;)             { |path| @options[:stats] = path }
@@ -113,6 +113,7 @@ module Thin
         opts.separator &quot;&quot;
         opts.separator &quot;Common options:&quot;
 
+        opts.on_tail(&quot;-r&quot;, &quot;--require FILE&quot;, &quot;require the library&quot;)                     { |file| ruby_require file }
         opts.on_tail(&quot;-D&quot;, &quot;--debug&quot;, &quot;Set debbuging on&quot;)                               { Logging.debug = true }
         opts.on_tail(&quot;-V&quot;, &quot;--trace&quot;, &quot;Set tracing on (log raw request/response)&quot;)      { Logging.trace = true }
         opts.on_tail(&quot;-h&quot;, &quot;--help&quot;, &quot;Show this message&quot;)                               { puts opts; exit }
@@ -186,5 +187,14 @@ module Thin
           YAML.load_file(file).each { |key, value| @options[key.to_sym] = value }
         end
       end
+      
+      def ruby_require(file)
+        if File.extname(file) == '.ru'
+          warn 'WARNING: Use the -R option to load a Rack config file'
+          @options[:rackup] = file
+        else
+          require file
+        end
+      end
   end
 end
\ No newline at end of file</diff>
      <filename>lib/thin/runner.rb</filename>
    </modified>
    <modified>
      <diff>@@ -61,7 +61,20 @@ describe Runner do
   
   it &quot;should consider as a cluster with :only option&quot; do
     Runner.new(%w(start --only 3000)).should be_a_cluster
-  end  
+  end
+  
+  it &quot;should warn when require a rack config file&quot; do
+    STDERR.stub!(:write)
+    STDERR.should_receive(:write).with(/WARNING:/)
+
+    runner = Runner.new(%w(start -r config.ru))
+    
+    runner.options[:rackup].should == 'config.ru'
+  end
+  
+  it &quot;should require file&quot; do
+    proc { Runner.new(%w(start -r unexisting)) }.should raise_error(LoadError)
+  end
 end
 
 describe Runner, 'with config file' do</diff>
      <filename>spec/runner_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>dc472b681619c0134db30e7d68b2edbfb1a02076</id>
    </parent>
  </parents>
  <author>
    <name>macournoyer</name>
    <email>macournoyer@gmail.com</email>
  </author>
  <url>http://github.com/macournoyer/thin/commit/a3a783e2ffe03eebde8c329479b8e15dc0b3d21a</url>
  <id>a3a783e2ffe03eebde8c329479b8e15dc0b3d21a</id>
  <committed-date>2008-04-05T13:32:56-07:00</committed-date>
  <authored-date>2008-04-05T13:32:56-07:00</authored-date>
  <message>Add --require (-r) option to require a library, before executing your script.
Rename --rackup short option to -R, warn and load as rackup when file ends with .ru.</message>
  <tree>ae75ab61b967a3e7173e2e67f1d40ab0f2ca859d</tree>
  <committer>
    <name>macournoyer</name>
    <email>macournoyer@gmail.com</email>
  </committer>
</commit>
