<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,7 +1,7 @@
 require 'rack/lobster'
 
 use Rack::ShowExceptions
-use Rack::Auth::Basic do |username, password|
+use Rack::Auth::Basic, &quot;Lobster 2.0&quot; do |username, password|
   'secret' == password
 end
 </diff>
      <filename>example/protectedlobster.ru</filename>
    </modified>
    <modified>
      <diff>@@ -8,8 +8,8 @@ module Rack
 
       attr_accessor :realm
 
-      def initialize(app, &amp;authenticator)
-        @app, @authenticator = app, authenticator
+      def initialize(app, realm=nil, &amp;authenticator)
+        @app, @realm, @authenticator = app, realm, authenticator
       end
 
 </diff>
      <filename>lib/rack/auth/abstract/handler.rb</filename>
    </modified>
    <modified>
      <diff>@@ -21,7 +21,7 @@ module Rack
 
         attr_writer :passwords_hashed
 
-        def initialize(app)
+        def initialize(*args)
           super
           @passwords_hashed = nil
         end</diff>
      <filename>lib/rack/auth/digest/md5.rb</filename>
    </modified>
    <modified>
      <diff>@@ -35,7 +35,7 @@ context 'Rack::Auth::Basic' do
     response.should.be.a.client_error
     response.status.should.equal 401
     response.should.include 'WWW-Authenticate'
-    response.headers['WWW-Authenticate'].should =~ /Basic realm=&quot;/
+    response.headers['WWW-Authenticate'].should =~ /Basic realm=&quot;#{Regexp.escape(realm)}&quot;/
     response.body.should.be.empty
   end
 
@@ -66,4 +66,8 @@ context 'Rack::Auth::Basic' do
     end
   end
 
+  specify 'realm as optional constructor arg' do
+    app = Rack::Auth::Basic.new(unprotected_app, realm) { true }
+    assert_equal realm, app.realm
+  end
 end</diff>
      <filename>test/spec_rack_auth_basic.rb</filename>
    </modified>
    <modified>
      <diff>@@ -218,4 +218,9 @@ context 'Rack::Auth::Digest::MD5' do
       response.body.to_s.should.equal 'Hi Alice'
     end
   end
+
+  specify 'realm as optional constructor arg' do
+    app = Rack::Auth::Digest::MD5.new(unprotected_app, realm) { true }
+    assert_equal realm, app.realm
+  end
 end</diff>
      <filename>test/spec_rack_auth_digest.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>db1c378de3268f7749a59dba3fd9a71ffd25a4e3</id>
    </parent>
  </parents>
  <author>
    <name>Brian Candler</name>
    <email>b.candler@pobox.com</email>
  </author>
  <url>http://github.com/chneukirchen/rack/commit/ebb03fac2da1eb4d6baa6fe676f3f9e67241d7e3</url>
  <id>ebb03fac2da1eb4d6baa6fe676f3f9e67241d7e3</id>
  <committed-date>2009-02-27T15:34:31-08:00</committed-date>
  <authored-date>2009-02-26T09:06:24-08:00</authored-date>
  <message>Allow realm to be passed to auth handler's initialize method

Signed-off-by: Ryan Tomayko &lt;rtomayko@gmail.com&gt;</message>
  <tree>9aedd70799bf23fd34f18998ae4ecc94234b5b8c</tree>
  <committer>
    <name>Ryan Tomayko</name>
    <email>rtomayko@gmail.com</email>
  </committer>
</commit>
