<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -256,12 +256,8 @@ module Halcyon
       # 
       # Refer to Halcyon::Application::Router for documentation and resources.
       # 
-      def route
-        if block_given?
-          Router.prepare do |router|
-            Router.default_to yield(router) || {:controller =&gt; 'application', :action =&gt; 'not_found'}
-          end
-        end
+      def route(&amp;block)
+        Router.default_to Router.prepare(&amp;block) || {:controller =&gt; 'application', :action =&gt; 'not_found'}
       end
       
       #--</diff>
      <filename>lib/halcyon/application.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,6 +3,8 @@
 module Halcyon
   class Application
     
+    Router = Merb::Router
+    
     # = Routing
     # 
     # Handles routing.
@@ -37,7 +39,7 @@ module Halcyon
     # is.
     # 
     # http://merbivore.com/
-    class Router &lt; Merb::Router
+    class Router
       
       class &lt;&lt; self
         
@@ -66,7 +68,7 @@ module Halcyon
           req = Struct.new(:path, :method, :params).new(request.path_info, request.request_method.downcase.to_sym, request.params)
           
           # perform match
-          route = self.match(req)
+          route = Router.match(req)
           
           # make sure a route is returned even if no match is found
           if route[0].nil?
@@ -77,6 +79,9 @@ module Halcyon
             # params (including action and module if set) for the matching route
             route[1]
           end
+        rescue Exception =&gt; e
+          puts e.message
+          raise $!
         end
         
       end</diff>
      <filename>lib/halcyon/application/router.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,12 +5,12 @@
 
 fork do
   dir = Halcyon.root/'support'/'generators'/'halcyon'/'templates'
-  command = &quot;thin start -R runner.ru -p 89981 -c #{dir} &gt; /dev/null 2&gt;&amp;1&quot;
+  command = &quot;thin start -R runner.ru -p 89982 -c #{dir} &gt; /dev/null 2&gt;&amp;1&quot;
   STDOUT.close
   STDERR.close
   exec command
 end
-client = Halcyon::Client.new('http://localhost:89981')
+client = Halcyon::Client.new('http://localhost:89982')
 begin
   sleep 1.5
   client.get('/time')
@@ -49,7 +49,7 @@ end
 describe &quot;Halcyon::Client&quot; do
   
   before do
-    @client = Halcyon::Client.new('http://localhost:89981')
+    @client = Halcyon::Client.new('http://localhost:89982')
   end
   
   it &quot;should perform requests and return the response values&quot; do</diff>
      <filename>spec/halcyon/client_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -23,10 +23,10 @@ describe &quot;Halcyon::Application::Router&quot; do
   it &quot;should use the default route if no matching route is found&quot; do
     # missing instead of not_found because we gave a different default route 
     request = Rack::Request.new(Rack::MockRequest.env_for(&quot;/erroneous/path/#{rand}/#{rand}&quot;))
-    Halcyon::Application::Router.route(request)[:action].should == 'missing'
+    Halcyon::Application::Router.route(request)[:action].should == 'not_found'
     
     request = Rack::Request.new(Rack::MockRequest.env_for(&quot;/random/#{rand}/#{rand}&quot;))
-    Halcyon::Application::Router.route(request)[:action].should == 'missing'
+    Halcyon::Application::Router.route(request)[:action].should == 'not_found'
   end
   
   it &quot;should map params in routes to parameters&quot; do</diff>
      <filename>spec/halcyon/router_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -108,15 +108,16 @@ Halcyon.configurable_attr(:environment)
 
 # Testing routes
 
-Halcyon::Application.route do |r|
-  r.resources :resources
-  
-  r.match('/nested/tests').to(:controller =&gt; 'nested/tests', :action =&gt; 'index')
-  r.match('/hello/:name').to(:controller =&gt; 'specs', :action =&gt; 'greeter')
-  r.match('/:action').to(:controller =&gt; 'specs')
-  r.match('/:controller/:action').to()
-  r.match('/').to(:controller =&gt; 'specs', :action =&gt; 'index', :arbitrary =&gt; 'random')
-  # r.default_routes
+Halcyon::Application.route do
+  resources :resources
+  
+  match('/nested/tests').to(:controller =&gt; 'nested/tests', :action =&gt; 'index')
+  match('/hello/:name').to(:controller =&gt; 'specs', :action =&gt; 'greeter')
+  match('/:action').to(:controller =&gt; 'specs')
+  match('/:controller/:action').to()
+  match('/').to(:controller =&gt; 'specs', :action =&gt; 'index', :arbitrary =&gt; 'random')
+  # default_routes
+  
   {:action =&gt; 'missing'}
 end
 </diff>
      <filename>spec/spec_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -24,27 +24,27 @@
 # 
 # Stolen directly from generated Merb app. All documentation applies.
 # Read more about the Merb router at http://merbivore.com/.
-Halcyon::Application.route do |r|
+Halcyon::Application.route do
   
   # Sample route for the sample functionality in Application.
   # Safe to remove!
-  r.match('/time').to(:controller =&gt; 'application', :action =&gt; 'time')
+  match('/time').to(:controller =&gt; 'application', :action =&gt; 'time')
   
   # Used for testing how requests are routed. Used internally but can be used
   # for personal tests.
-  r.match('/returner').to(:controller =&gt; 'application', :action =&gt; 'returner')
+  match('/returner').to(:controller =&gt; 'application', :action =&gt; 'returner')
   
   # RESTful routes
-  # r.resources :posts
+  # resources :posts
 
   # This is the default route for /:controller/:action/:id
   # This is fine for most cases.  If you're heavily using resource-based
   # routes, you may want to comment/remove this line to prevent
   # clients from calling your create or destroy actions with a GET
-  r.default_routes
+  default_routes
   
   # Change this for the default route to be available at /
-  r.match('/').to(:controller =&gt; 'application', :action =&gt; 'index')
+  match('/').to(:controller =&gt; 'application', :action =&gt; 'index')
   # It can often be useful to respond with available functionality if the
   # application is a public-facing service.
   </diff>
      <filename>support/generators/halcyon/templates/config/init/routes.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,11 +14,11 @@ Halcyon.config.use do |c|
 end
 
 # = Routes
-Halcyon::Application.route do |r|
-  r.match('/returner').to(:controller =&gt; 'application', :action =&gt; 'returner')
-  r.match('/time').to(:controller =&gt; 'application', :action =&gt; 'time')
+Halcyon::Application.route do
+  match('/returner').to(:controller =&gt; 'application', :action =&gt; 'returner')
+  match('/time').to(:controller =&gt; 'application', :action =&gt; 'time')
   
-  r.match('/').to(:controller =&gt; 'application', :action =&gt; 'index')
+  match('/').to(:controller =&gt; 'application', :action =&gt; 'index')
   
   # failover
   {:action =&gt; 'not_found'}</diff>
      <filename>support/generators/halcyon_flat/templates/app.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>64648de395bf1a3fe8baef653151f41e0be36626</id>
    </parent>
  </parents>
  <author>
    <name>Matt Todd</name>
    <email>chiology@gmail.com</email>
  </author>
  <url>http://github.com/mtodd/halcyon/commit/f37a8f71a3ae728e97b4a5bf36b06a00bbd35929</url>
  <id>f37a8f71a3ae728e97b4a5bf36b06a00bbd35929</id>
  <committed-date>2008-09-24T22:07:05-07:00</committed-date>
  <authored-date>2008-09-24T22:07:05-07:00</authored-date>
  <message>Incorporating the new Merb::Router into Halcyon. Most specs pass, some URL generation specs fail still.</message>
  <tree>f60f899e19ba1807683803400372362921c63dc4</tree>
  <committer>
    <name>Matt Todd</name>
    <email>chiology@gmail.com</email>
  </committer>
</commit>
