<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -135,7 +135,7 @@ module Serve
           :Port =&gt; options[:port],
           :BindAddress =&gt; options[:address],
           :DocumentRoot =&gt; options[:root],
-          :DirectoryIndex =&gt; %w(index.html index.txt index.text index.haml index.textile index.markdown index.email index.redirect),
+          :DirectoryIndex =&gt; %w(index.html index.erb index.html.erb index.rhtml index.haml index.html.haml index.txt index.text index.textile index.markdown index.email index.redirect),
           :AppendExtensions =&gt; %w(html txt text haml erb rhtml html.erb html.haml textile markdown email redirect)
         )
         trap(&quot;INT&quot;) { server.shutdown }</diff>
      <filename>lib/serve/application.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,14 +1,24 @@
 module Serve #:nodoc:
   class Handler &lt; FileTypeHandler #:nodoc:
-    extension 'haml', 'erb', 'rhtml', 'html.erb', 'html.haml'
+    extension 'erb', 'html.erb', 'rhtml', 'haml', 'html.haml'
     
     def process(req, res)
+      class &lt;&lt; req
+        alias headers header
+      end
       res['content-type'] = content_type
-      res.body = parse
+      res.body = parse(req, res)
     end
     
-    def parse
-      context = Context.new
+    def parse(req, res)
+      context = Context.new(req, res)
+      view_helpers_file_path = Dir.pwd + '/view_helpers.rb'
+      if File.file?(view_helpers_file_path)
+        (class &lt;&lt; context; self end).module_eval(File.read(view_helpers_file_path))
+        class &lt;&lt; context
+          include ViewHelpers
+        end
+      end
       parser = Parser.new(context)
       context.content &lt;&lt; parser.parse_file(@script_filename)
       layout = find_layout_for(@script_filename)
@@ -76,8 +86,10 @@ module Serve #:nodoc:
     
     class Context #:nodoc:
       attr_accessor :content, :parser
+      attr_reader :request, :response
       
-      def initialize
+      def initialize(req, res)
+        @request, @response = req, res
         @content = ''
       end
       </diff>
      <filename>lib/serve/handlers/dynamic_handler.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ module Serve #:nodoc:
     MAJOR = 0
     MINOR = 9
     TINY  = 7
-
+    
     STRING = [MAJOR, MINOR, TINY].join('.')
   end
   </diff>
      <filename>lib/serve/version.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,3 @@
 = render :template =&gt; &quot;test.html.erb&quot;
-
+= custom_method
 - @title = &quot;Haml Template&quot;
\ No newline at end of file</diff>
      <filename>test_project/test.haml</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d78d992509c26c54f2c208f1a45b38cf9d2edee4</id>
    </parent>
  </parents>
  <author>
    <name>John W. Long</name>
    <email>me@johnwlong.com</email>
  </author>
  <url>http://github.com/jlong/serve/commit/fd238d583ecb252b93e16361b458b0ff4df4b342</url>
  <id>fd238d583ecb252b93e16361b458b0ff4df4b342</id>
  <committed-date>2008-07-17T06:51:15-07:00</committed-date>
  <authored-date>2008-07-17T06:51:15-07:00</authored-date>
  <message>merged in adams changes</message>
  <tree>13732db68836f1785f61f69b56f42e1875c08015</tree>
  <committer>
    <name>John W. Long</name>
    <email>me@johnwlong.com</email>
  </committer>
</commit>
