<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -12,6 +12,10 @@ app = Nyane.new do
     &quot;Goodbye&quot;
   end
 
+  get &quot;/redirect&quot; do
+    redirect_to &quot;/&quot;
+  end
+
   get &quot;/time&quot; do
     @now = Time.now
     erb :time</diff>
      <filename>demo/example.ru</filename>
    </modified>
    <modified>
      <diff>@@ -19,6 +19,11 @@ class Nyane
     @actions &lt;&lt; [route, :post, block]
   end
 
+  def redirect_to(path)
+    @response.status = 302
+    @response.headers[&quot;Location&quot;] = path
+  end
+
   def load(file)
     path = File.join(@root, file) + &quot;.rb&quot;
     eval(File.read(path), binding, path)</diff>
      <filename>lib/nyane.rb</filename>
    </modified>
    <modified>
      <diff>@@ -34,4 +34,25 @@ describe &quot;POST&quot; do
   it &quot;should capture POST parameters&quot; do
     @app.mock.post(&quot;/&quot;, :input =&gt; &quot;text=Nyane&quot;).body.should == { &quot;text&quot; =&gt; 'Nyane' }.inspect
   end
+end
+
+describe &quot;redirect&quot; do
+  before do
+    @app = Nyane.new do
+      get &quot;/&quot; do
+        &quot;/&quot;
+      end
+      
+      get &quot;/redirect&quot; do
+        redirect_to &quot;/&quot;
+      end
+    end
+  end
+  
+  it &quot;should redirect to path&quot; do
+    response = @app.mock.get(&quot;/redirect&quot;)
+    response.status.should == 302
+    response.location.should == &quot;/&quot;
+    response.body.should == &quot;/&quot;
+  end
 end
\ No newline at end of file</diff>
      <filename>spec/app_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>28dd8148a2f4a7393cc01ea6e53012336ffb7c85</id>
    </parent>
  </parents>
  <author>
    <name>Arthur Zapparoli</name>
    <email>arthurzap@gmail.com</email>
  </author>
  <url>http://github.com/arthurgeek/nyane/commit/e57b89a9aecc19241742f70038a452f08dba97b2</url>
  <id>e57b89a9aecc19241742f70038a452f08dba97b2</id>
  <committed-date>2008-12-19T22:46:14-08:00</committed-date>
  <authored-date>2008-12-19T22:41:40-08:00</authored-date>
  <message>Added redirect_to method</message>
  <tree>0962ab2cde612fc53677eba13f54ec9119114b54</tree>
  <committer>
    <name>Arthur Zapparoli</name>
    <email>arthurzap@gmail.com</email>
  </committer>
</commit>
