<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,6 @@
 == 1.0.0 The Big release
+ * Runner now remembers -r, -D and -V parameters so that clustered servers inherit those and
+   `restart` keep your parameters.
  * Make Set-Cookie header, in Rails adapter, compatible with current Rack spec [Pedro Belo]
    [#73, state:resolved]
  * Add --no-epoll option to disable epoll usage on Linux [#61 state:resolved]</diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -57,7 +57,7 @@ You need to setup a config.ru file and pass it to the thin script:
  
  run app
 
- thin start -r config.ru
+ thin start -R config.ru
  
 See example directory for more samples and run 'thin -h' for usage.
 </diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -40,7 +40,8 @@ module Thin
         :log                  =&gt; 'log/thin.log',
         :pid                  =&gt; 'tmp/pids/thin.pid',
         :max_conns            =&gt; Server::DEFAULT_MAXIMUM_CONNECTIONS,
-        :max_persistent_conns =&gt; Server::DEFAULT_MAXIMUM_PERSISTENT_CONNECTIONS
+        :max_persistent_conns =&gt; Server::DEFAULT_MAXIMUM_PERSISTENT_CONNECTIONS,
+        :requires             =&gt; []
       }
       
       parse!
@@ -116,9 +117,9 @@ 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;-r&quot;, &quot;--require FILE&quot;, &quot;require the library&quot;)                     { |file| @options[:requires] &lt;&lt; file }
+        opts.on_tail(&quot;-D&quot;, &quot;--debug&quot;, &quot;Set debbuging on&quot;)                               { @options[:debug] = true }
+        opts.on_tail(&quot;-V&quot;, &quot;--trace&quot;, &quot;Set tracing on (log raw request/response)&quot;)      { @options[:trace] = true }
         opts.on_tail(&quot;-h&quot;, &quot;--help&quot;, &quot;Show this message&quot;)                               { puts opts; exit }
         opts.on_tail('-v', '--version', &quot;Show version&quot;)                                 { puts Thin::SERVER; exit }
       end
@@ -157,6 +158,10 @@ module Thin
       # relative to this one.
       Dir.chdir(@options[:chdir]) unless CONFIGLESS_COMMANDS.include?(@command)
       
+      @options[:requires].each { |r| ruby_require r }
+      Logging.debug = @options[:debug]
+      Logging.trace = @options[:trace]
+      
       controller = case
       when cluster? then Controllers::Cluster.new(@options)
       when service? then Controllers::Service.new(@options)</diff>
      <filename>lib/thin/runner.rb</filename>
    </modified>
    <modified>
      <diff>@@ -217,6 +217,9 @@ ENDIF:title
       &lt;li&gt;&lt;a href=&quot;/thin/download/&quot;&gt;download&lt;/a&gt;&lt;/li&gt;
       &lt;li&gt;&lt;a href=&quot;/thin/usage/&quot;&gt;usage&lt;/a&gt;&lt;/li&gt;
       &lt;li&gt;&lt;a href=&quot;/thin/doc/&quot;&gt;doc&lt;/a&gt;&lt;/li&gt;
+      &lt;li&gt;&lt;a href=&quot;http://github.com/macournoyer/thin/&quot;&gt;code&lt;/a&gt;&lt;/li&gt;
+      &lt;li&gt;&lt;a href=&quot;http://thin.lighthouseapp.com/projects/7212-thin/&quot;&gt;bugs&lt;/a&gt;&lt;/li&gt;
+      &lt;li&gt;&lt;a href=&quot;/thin/users/&quot;&gt;users&lt;/a&gt;&lt;/li&gt;
       &lt;li&gt;&lt;a href=&quot;http://groups.google.com/group/thin-ruby/&quot;&gt;community&lt;/a&gt;&lt;/li&gt;
     &lt;/ul&gt;
     &lt;div id=&quot;sidebar&quot;&gt;</diff>
      <filename>site/rdoc.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,7 +13,7 @@ describe Runner do
     Runner.new(%w(stop)).command.should == 'stop'
     Runner.new(%w(restart)).command.should == 'restart'
   end
-
+  
   it &quot;should abort on unknow command&quot; do
     runner = Runner.new(%w(poop))
     
@@ -66,14 +66,33 @@ describe Runner do
   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.run! rescue nil
     
     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)
+    runner = Runner.new(%w(start -r unexisting))
+    proc { runner.run! }.should raise_error(LoadError)
+  end
+  
+  it &quot;should remember requires&quot; do
+    runner = Runner.new(%w(start -r rubygems -r thin))
+    runner.options[:requires].should == %w(rubygems thin)
+  end
+
+  it &quot;should remember debug options&quot; do
+    runner = Runner.new(%w(start -D -V))
+    runner.options[:debug].should be_true
+    runner.options[:trace].should be_true
+  end
+
+  it &quot;should default debug and trace to false&quot; do
+    runner = Runner.new(%w(start))
+    runner.options[:debug].should_not be_true
+    runner.options[:trace].should_not be_true
   end
 end
 </diff>
      <filename>spec/runner_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f67fb1820ad5d790655c85bbc410a99fe1bea28d</id>
    </parent>
  </parents>
  <author>
    <name>macournoyer</name>
    <email>macournoyer@gmail.com</email>
  </author>
  <url>http://github.com/macournoyer/thin/commit/a8ed858fcd39ac6b6cab0fa03853b3ed479a30a3</url>
  <id>a8ed858fcd39ac6b6cab0fa03853b3ed479a30a3</id>
  <committed-date>2008-07-18T08:39:43-07:00</committed-date>
  <authored-date>2008-07-18T08:39:43-07:00</authored-date>
  <message>Runner now remembers -r, -D and -V parameters
so that clustered servers inherit those and
`restart` keep your parameters.</message>
  <tree>a0ba067fd9fb525f4462cd41fe6f6b34ae062ee6</tree>
  <committer>
    <name>macournoyer</name>
    <email>macournoyer@gmail.com</email>
  </committer>
</commit>
