<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,43 +1,6 @@
 &lt;?php
 
-/*
-Router::prepare(function($r){
-  $r-&gt;match(&quot;/&quot;)-&gt;to(array(&quot;controller&quot; =&gt; &quot;application&quot;, &quot;action&quot; =&gt; &quot;show&quot;))-&gt;name(&quot;root&quot;);  
-  
-  $r-&gt;match(&quot;/the_name/:action.:format&quot;)-&gt;to(array(&quot;controller&quot; =&gt; &quot;application&quot;))-&gt;name(&quot;the_name_format&quot;);
-  
-  $r-&gt;match(&quot;/api/recent.:format&quot;)-&gt;to(array(&quot;controller&quot; =&gt; &quot;application&quot;, &quot;action&quot; =&gt; &quot;api_recent&quot;))-&gt;name(&quot;api_recent&quot;);
-  
-  $r-&gt;match(&quot;/the_name&quot;)-&gt;to(array(&quot;controller&quot; =&gt; &quot;application&quot;, &quot;action&quot; =&gt; &quot;the_name&quot;))-&gt;name(&quot;the_name&quot;);
-  
-  $r-&gt;match(&quot;/artist/session_set&quot;)-&gt;to(array(&quot;controller&quot; =&gt; &quot;application&quot;, &quot;action&quot; =&gt; &quot;session_set&quot;))-&gt;name(&quot;session_set&quot;);
-  
-  $r-&gt;match(&quot;/artist/session_values&quot;)-&gt;to(array(&quot;controller&quot; =&gt; &quot;application&quot;, &quot;action&quot; =&gt; &quot;session_values&quot;))-&gt;name(&quot;session_values&quot;);
-    
-  $r-&gt;match(&quot;/artist/redirect&quot;)-&gt;to(array(&quot;controller&quot; =&gt; &quot;application&quot;, &quot;action&quot; =&gt; &quot;redirect&quot;))-&gt;name(&quot;redirect&quot;);
-  
-  $r-&gt;match(&quot;/artist/flash_example&quot;)-&gt;to(array(&quot;controller&quot; =&gt; &quot;application&quot;, &quot;action&quot; =&gt; &quot;flash_example&quot;))-&gt;name(&quot;flash_example&quot;);
-  
-  $r-&gt;match(&quot;/artist/flash_show&quot;)-&gt;to(array(&quot;controller&quot; =&gt; &quot;application&quot;, &quot;action&quot; =&gt; &quot;flash_show&quot;))-&gt;name(&quot;flash_show&quot;);
-  
-  $r-&gt;match(&quot;/artist/my_layout&quot;)-&gt;to(array(&quot;controller&quot; =&gt; &quot;application&quot;, &quot;action&quot; =&gt; &quot;my_layout&quot;))-&gt;name(&quot;my_layout&quot;);
-  
-  $r-&gt;match(&quot;/artist/html_form&quot;)-&gt;to(array(&quot;controller&quot; =&gt; &quot;application&quot;, &quot;action&quot; =&gt; &quot;html_form&quot;))-&gt;name(&quot;html_form&quot;);
-  
-  $r-&gt;match(&quot;/artist/:artist&quot;)-&gt;to(array(&quot;controller&quot; =&gt; &quot;application&quot;, &quot;action&quot; =&gt; &quot;show&quot;))-&gt;name(&quot;artist&quot;);
-  
-  $r-&gt;match(&quot;/book(/:id)&quot;)-&gt;to(array(&quot;controller&quot; =&gt; &quot;application&quot;, &quot;action&quot; =&gt; &quot;show&quot;))-&gt;name(&quot;show_book&quot;);
-  
-  $r-&gt;match(&quot;/user/profile&quot;)-&gt;to(array(&quot;controller&quot; =&gt; &quot;application&quot;, &quot;action&quot; =&gt; &quot;profile&quot;))-&gt;name(&quot;user_profile&quot;);
-  
-  $r-&gt;match(&quot;/app/:action&quot;)-&gt;to(array(&quot;controller&quot; =&gt; &quot;application&quot;))-&gt;name(&quot;app&quot;);
-  $r-&gt;match(&quot;/app/:action.:format&quot;)-&gt;to(array(&quot;controller&quot; =&gt; &quot;application&quot;));
-  
-  $r-&gt;match(&quot;/:controller/:action(/:id)&quot;)-&gt;to();
-});
-*/
-
-Router::map(function($r){
+CupcakeRouter::map(function($r){
   $r-&gt;root(&quot;/&quot;, array(&quot;controller&quot; =&gt; &quot;application&quot;, &quot;action&quot; =&gt; &quot;show&quot;));
   
   $r-&gt;the_name_format(&quot;/the_name/:action.:format&quot;, array(&quot;controller&quot; =&gt; &quot;application&quot;));</diff>
      <filename>config/routes.php</filename>
    </modified>
    <modified>
      <diff>@@ -84,7 +84,7 @@ class CupcakeDispatcher {
   # Otherwise returns false when no route is found.
   public function find_route($uri) {
     if(empty($this-&gt;router)) {
-      $this-&gt;setRouter(Router::getInstance());
+      $this-&gt;setRouter(CupcakeRouter::getInstance());
     }
     return $this-&gt;router-&gt;find_route($uri);
   }</diff>
      <filename>vendors/Cupcake/cupcake_dispatcher.php</filename>
    </modified>
    <modified>
      <diff>@@ -54,7 +54,7 @@ function truncate($string, $length=30, $truncate_string=&quot;...&quot;) {
 }
 
 function url($name, $options=array()) {
-  return Router::url($name, $options);
+  return CupcakeRouter::url($name, $options);
 }
 
 function link_to($name, $link, $options=array()) {</diff>
      <filename>vendors/Cupcake/helpers.php</filename>
    </modified>
    <modified>
      <diff>@@ -1,27 +1,12 @@
 &lt;?php
 /**
 * router.php
-*  
-* A Merb like router in PHP
-* Usage:
-*
-*  Router::prepare(function($r){
-*    $r-&gt;match(&quot;/user/profile&quot;)-&gt;to(array(&quot;controller&quot; =&gt; &quot;user&quot;, &quot;action&quot; =&gt; &quot;show&quot;));
-*    $r-&gt;match(&quot;/user/photo/:id(/:name)&quot;)-&gt;to(array(&quot;controller&quot; =&gt; &quot;user&quot;, &quot;action&quot; =&gt; &quot;show_photo&quot;));
-*  });
-*
-*  $r = Router::getInstance();
-*  $r-&gt;find_route(&quot;/user/profile&quot;);           # =&gt; Returns array(&quot;controller&quot; =&gt; &quot;user&quot;, &quot;action&quot; =&gt; &quot;show&quot;);
-*  $r-&gt;find_route(&quot;/user/photo/5&quot;);           # =&gt; Returns array(&quot;controller&quot; =&gt; &quot;user&quot;, &quot;action&quot; =&gt; &quot;show&quot;, &quot;id&quot; =&gt; &quot;5&quot;);
-*  $r-&gt;find_route(&quot;/user/photo/5/funny-day&quot;); # =&gt; Returns array(&quot;controller&quot; =&gt; &quot;user&quot;, &quot;action&quot; =&gt; &quot;show&quot;, &quot;id&quot; =&gt; &quot;5&quot;, &quot;name&quot; =&gt; &quot;funny-day&quot;);
-*
-*
 * @author Fernando Barajas &lt;fernyb@fernyb.net&gt;
 * @version 1.0
 * @package cupcake-core
 */
 
-class Router {
+class CupcakeRouter {
   
   public $conditions = array();
   private $params = array();
@@ -65,7 +50,7 @@ class Router {
   public function __call($method_name, $args) {
     $methods = get_class_methods($this);
     if(in_array($method_name, $methods)) {
-      throw new RouterException(&quot;Router Method exists in router class, use a different route name&quot;);
+      throw new CupcakeRouterException(&quot;Router Method exists in router class, use a different route name&quot;);
       return;
     }
     $path = $args[0];
@@ -309,6 +294,6 @@ class Router {
   }
 }
 
-class RouterException extends Exception { }
+class CupcakeRouterException extends Exception { }
 
 ?&gt;
\ No newline at end of file</diff>
      <filename>vendors/Cupcake/router.php</filename>
    </modified>
    <modified>
      <diff>@@ -397,7 +397,7 @@ function cupcake_generate_assets($opts) {
   $route_content .= &quot;#\n&quot;;
   $route_content .= &quot;# The priority is based upon order of creation: first created -&gt; highest priority.\n&quot;;
   $route_content .= &quot;#\n&quot;;
-  $route_content .= &quot;Router::prepare(function(\$r){\n&quot;;
+  $route_content .= &quot;CupcakeRouter::prepare(function(\$r){\n&quot;;
   $route_content .= '  $r-&gt;match(&quot;/&quot;)-&gt;to(array(&quot;controller&quot; =&gt; &quot;application&quot;, &quot;action&quot; =&gt; &quot;show&quot;))-&gt;name(&quot;root&quot;);';
   $route_content .= &quot;\n&quot;;
   $route_content .= &quot;});\n\n&quot;;</diff>
      <filename>vendors/Cupcake/scripts/cupcake.php</filename>
    </modified>
    <modified>
      <diff>@@ -29,18 +29,18 @@ describe(&quot;Dispatcher -&gt; request_uri&quot;, function(){
 describe(&quot;Dispatcher -&gt; setRouter&quot;, function(){
   it(&quot;sets the router&quot;, function(){
     $d = CupcakeDispatcher::getInstance();
-    $d-&gt;setRouter(Router::getInstance());
-    assert_equal(get_class($d-&gt;router()), &quot;Router&quot;);
+    $d-&gt;setRouter(CupcakeRouter::getInstance());
+    assert_equal(get_class($d-&gt;router()), &quot;CupcakeRouter&quot;);
   });
 });
 
 describe(&quot;Dispatcher -&gt; find_route&quot;, function(){
   it(&quot;returns an array with controller and action&quot;, function(){
-    Router::map(function($r){
+    CupcakeRouter::map(function($r){
       $r-&gt;connect(&quot;/:controller/:action&quot;, array(&quot;controller&quot; =&gt; &quot;application&quot;, &quot;action&quot; =&gt; &quot;method&quot;));
     });
     $d = CupcakeDispatcher::getInstance();
-    $d-&gt;setRouter(Router::getInstance());
+    $d-&gt;setRouter(CupcakeRouter::getInstance());
     
     $params = $d-&gt;find_route(&quot;/application/method&quot;);
     
@@ -49,7 +49,7 @@ describe(&quot;Dispatcher -&gt; find_route&quot;, function(){
   });
 
   it(&quot;returns an array with controller and action and ids&quot;, function(){
-    Router::map(function($r){
+    CupcakeRouter::map(function($r){
       $r-&gt;connect(&quot;/:controller/:action&quot;, array(&quot;controller&quot; =&gt; &quot;application&quot;, &quot;action&quot; =&gt; &quot;method&quot;));
     });
     $d = CupcakeDispatcher::getInstance();
@@ -120,8 +120,8 @@ describe(&quot;Dispatcher -&gt; env&quot;, function(){
 
 describe(&quot;Dispatcher -&gt; params_for_request&quot;, function(){
   it(&quot;returns an array&quot;, function(){
-    Router::getInstance()-&gt;reset();
-    Router::map(function($r){
+    CupcakeRouter::getInstance()-&gt;reset();
+    CupcakeRouter::map(function($r){
       $r-&gt;connect(&quot;/:controller/:action&quot;, array());
     });
     $d = CupcakeDispatcher::getInstance();
@@ -132,9 +132,9 @@ describe(&quot;Dispatcher -&gt; params_for_request&quot;, function(){
   });
 
   it(&quot;merges GET with router params&quot;, function(){
-    Router::getInstance()-&gt;reset();
+    CupcakeRouter::getInstance()-&gt;reset();
     $_GET[&quot;id&quot;] = 25;
-    Router::map(function($r){
+    CupcakeRouter::map(function($r){
       $r-&gt;connect(&quot;/blog/:action&quot;, array(&quot;controller&quot; =&gt; &quot;application&quot;));
     });
     $d = CupcakeDispatcher::getInstance();
@@ -147,10 +147,10 @@ describe(&quot;Dispatcher -&gt; params_for_request&quot;, function(){
   });
   
   it(&quot;does not merge params already defined by router&quot;, function(){
-    Router::getInstance()-&gt;reset();
+    CupcakeRouter::getInstance()-&gt;reset();
     $_GET[&quot;controller&quot;] = &quot;get_application&quot;;
     $_GET[&quot;user_id&quot;] = 100;
-    Router::map(function($r){
+    CupcakeRouter::map(function($r){
       $r-&gt;connect(&quot;/blog/:action&quot;, array(&quot;controller&quot; =&gt; &quot;application&quot;));
     });
     $d = CupcakeDispatcher::getInstance();
@@ -163,9 +163,9 @@ describe(&quot;Dispatcher -&gt; params_for_request&quot;, function(){
   });
 
   it(&quot;returns false when it cannot merge&quot;, function(){
-    Router::getInstance()-&gt;reset();
+    CupcakeRouter::getInstance()-&gt;reset();
     $_GET[&quot;user_id&quot;] = 100;
-    Router::map(function($r){
+    CupcakeRouter::map(function($r){
       $r-&gt;connect(&quot;/blog/:action&quot;, array(&quot;controller&quot; =&gt; &quot;application&quot;));
     });
     $d = CupcakeDispatcher::getInstance();</diff>
      <filename>vendors/Cupcake/specs/tests/dispatcher_spec.php</filename>
    </modified>
    <modified>
      <diff>@@ -2,14 +2,14 @@
 
 describe(&quot;Router -&gt; match&quot;, function(){
   it(&quot;creates an array of routes with path&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $r-&gt;match(&quot;/new/router&quot;);
     ensure((count($r-&gt;routes) &gt; 0), &quot;Failed to create an array of routes&quot;);
     $r-&gt;reset();
   });
   
   it(&quot;can build more than one route&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $r-&gt;match(&quot;/new/router&quot;);
     $r-&gt;match(&quot;/another/route&quot;);
     ensure((count($r-&gt;routes) == 2), &quot;Failed to build more than one route&quot;);
@@ -17,19 +17,19 @@ describe(&quot;Router -&gt; match&quot;, function(){
   });
 
   it(&quot;returns an instance of Router&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $resp = $r-&gt;connect(&quot;/new/current_path&quot;, array());
-    assert_equal(get_class($resp), &quot;Router&quot;, &quot;Failed to return an instance of Router&quot;);
+    assert_equal(get_class($resp), &quot;CupcakeRouter&quot;, &quot;Failed to return an instance of Router&quot;);
     $r-&gt;reset();
   });
 });
 
 describe(&quot;Router -&gt; current_path_params&quot;, function(){
   it(&quot;returns an array&quot;, function(){
-    Router::map(function($r){
+    CupcakeRouter::map(function($r){
       $r-&gt;connect(&quot;/blog/postpage&quot;, array(&quot;controller&quot; =&gt; &quot;article&quot;, &quot;action&quot; =&gt; &quot;show&quot;));
     });
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $params = $r-&gt;current_path_params(&quot;/blog/postpage&quot;, array(&quot;controller&quot; =&gt; &quot;article&quot;, &quot;action&quot; =&gt; &quot;show&quot;));
     
     ensure(is_array($params), &quot;Failed to return an array&quot;);
@@ -38,7 +38,7 @@ describe(&quot;Router -&gt; current_path_params&quot;, function(){
   });
   
   it(&quot;return an array with merged params from current_path route&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $r-&gt;connect(&quot;/blog/post&quot;, array(&quot;controller&quot; =&gt; &quot;article&quot;, &quot;action&quot; =&gt; &quot;show&quot;));
     $params = $r-&gt;current_path_params(&quot;/blog/post&quot;, array(&quot;controller&quot; =&gt; &quot;article&quot;, &quot;action&quot; =&gt; &quot;show&quot;));
     
@@ -49,7 +49,7 @@ describe(&quot;Router -&gt; current_path_params&quot;, function(){
   });
   
   it(&quot;has controller and action for params&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $r-&gt;connect(&quot;/blog/post&quot;, array(&quot;controller&quot; =&gt; &quot;article&quot;, &quot;action&quot; =&gt; &quot;show&quot;));
     $params = $r-&gt;current_path_params(&quot;/blog/post&quot;, array(&quot;controller&quot; =&gt; &quot;article&quot;, &quot;action&quot; =&gt; &quot;show&quot;));
    
@@ -60,7 +60,7 @@ describe(&quot;Router -&gt; current_path_params&quot;, function(){
   });
   
   it(&quot;returns false when current_path not found in routes&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $r-&gt;connect(&quot;/blog/post&quot;, array(&quot;controller&quot; =&gt; &quot;article&quot;, &quot;action&quot; =&gt; &quot;show&quot;));
     $params = $r-&gt;current_path_params(&quot;/blog/post-not-found&quot;, array(&quot;controller&quot; =&gt; &quot;article&quot;, &quot;action&quot; =&gt; &quot;show&quot;));
     
@@ -72,14 +72,14 @@ describe(&quot;Router -&gt; current_path_params&quot;, function(){
 
 describe(&quot;Router -&gt; to&quot;, function(){
   it(&quot;returns an instance of Router&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $resp = $r-&gt;connect(&quot;/blog/post&quot;, array(&quot;controller&quot; =&gt; &quot;main&quot;, &quot;action&quot; =&gt; &quot;show&quot;));
-    assert_equal(get_class($resp), &quot;Router&quot;, &quot;Should have returned an instance of router&quot;);    
+    assert_equal(get_class($resp), &quot;CupcakeRouter&quot;, &quot;Should have returned an instance of router&quot;);    
     $r-&gt;reset();    
   });
   
   it(&quot;return array with path&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $r-&gt;connect(&quot;/blog/post&quot;, array(&quot;controller&quot; =&gt; &quot;main&quot;, &quot;action&quot; =&gt; &quot;show&quot;));
     $resp = end($r-&gt;routes);
     assert_equal($resp['path'], &quot;/blog/post&quot;, &quot;Failed to have path /blog/post&quot;);
@@ -87,7 +87,7 @@ describe(&quot;Router -&gt; to&quot;, function(){
   });
   
   it(&quot;return array with params merged&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $r-&gt;connect(&quot;/blog/post&quot;, array(&quot;controller&quot; =&gt; &quot;main&quot;, &quot;action&quot; =&gt; &quot;show&quot;));
     $resp = end($r-&gt;routes);
     assert_equal($resp['params'], array(&quot;controller&quot; =&gt; &quot;main&quot;, &quot;action&quot; =&gt; &quot;show&quot;), &quot;Failed to merge params&quot;);
@@ -98,20 +98,20 @@ describe(&quot;Router -&gt; to&quot;, function(){
 
 describe(&quot;Router -&gt; name&quot;, function(){
   it(&quot;sets name key in the routes array&quot;, function(){
-    Router::map(function($r){
+    CupcakeRouter::map(function($r){
       $r-&gt;recent_books(&quot;/books/recent&quot;, array(&quot;controller&quot; =&gt; &quot;books&quot;, &quot;action&quot; =&gt; &quot;recent&quot;));
     });
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $route = end($r-&gt;routes);
     assert_equal($route[&quot;name&quot;], &quot;recent_books&quot;, &quot;Failed to return name of route&quot;);
     $r-&gt;reset();
   });
   
   it(&quot;returns false when routes is zero&quot;, function(){
-    Router::map(function($r){
+    CupcakeRouter::map(function($r){
       $r-&gt;recent_books(&quot;/books/recent&quot;, array(&quot;controller&quot; =&gt; &quot;books&quot;, &quot;action&quot; =&gt; &quot;recent&quot;));
     });
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $r-&gt;routes = array();
     assert_equal(count($r-&gt;routes), 0, &quot;Named route should be zero / false when there no routes&quot;);
     $r-&gt;reset();
@@ -120,58 +120,58 @@ describe(&quot;Router -&gt; name&quot;, function(){
 
 describe(&quot;Router -&gt; url&quot;, function(){
   it(&quot;returns a route path string&quot;, function() {
-    Router::map(function($r){
+    CupcakeRouter::map(function($r){
       $r-&gt;recent_books(&quot;/books/recent&quot;, array(&quot;controller&quot; =&gt; &quot;books&quot;, &quot;action&quot; =&gt; &quot;recent&quot;));
     });
-    $params = Router::url(&quot;recent_books&quot;);
+    $params = CupcakeRouter::url(&quot;recent_books&quot;);
     assert_equal($params, &quot;/books/recent&quot;);
-    Router::getInstance()-&gt;reset();
+    CupcakeRouter::getInstance()-&gt;reset();
   });
 
   it(&quot;returns a route path string with query parameters&quot;, function() {
-    Router::map(function($r){
+    CupcakeRouter::map(function($r){
       $r-&gt;recent_books(&quot;/books/recent&quot;, array(&quot;controller&quot; =&gt; &quot;books&quot;, &quot;action&quot; =&gt; &quot;recent&quot;));
     });
-    $params = Router::url(&quot;recent_books&quot;, array(&quot;username&quot; =&gt; &quot;fernyb&quot;));
+    $params = CupcakeRouter::url(&quot;recent_books&quot;, array(&quot;username&quot; =&gt; &quot;fernyb&quot;));
     assert_equal($params, &quot;/books/recent?username=fernyb&quot;);
-    Router::getInstance()-&gt;reset();
+    CupcakeRouter::getInstance()-&gt;reset();
   });
   
   it(&quot;returns a route with params in route path&quot;, function(){
-    Router::map(function($r){
+    CupcakeRouter::map(function($r){
       $r-&gt;show_book(&quot;/book/show/:id&quot;, array(&quot;controller&quot; =&gt; &quot;books&quot;, &quot;action&quot; =&gt; &quot;show&quot;));
     });
-    $params = Router::url(&quot;show_book&quot;, array(&quot;id&quot; =&gt; &quot;100&quot;, &quot;sort&quot; =&gt; &quot;recent&quot;, &quot;author&quot; =&gt; &quot;fernyb&quot;));
+    $params = CupcakeRouter::url(&quot;show_book&quot;, array(&quot;id&quot; =&gt; &quot;100&quot;, &quot;sort&quot; =&gt; &quot;recent&quot;, &quot;author&quot; =&gt; &quot;fernyb&quot;));
     assert_equal($params, &quot;/book/show/100?sort=recent&amp;author=fernyb&quot;);
-    Router::getInstance()-&gt;reset();
+    CupcakeRouter::getInstance()-&gt;reset();
   });  
 });
 
 
 describe(&quot;Routerr -&gt; prepare&quot;, function(){
   it(&quot;returns an instance of Router&quot;, function(){
-	  $rsp = Router::map(function($r){ });
-	  assert_equal(get_class($rsp), &quot;Router&quot;, &quot;Failed to return an instance of Router&quot;);
+	  $rsp = CupcakeRouter::map(function($r){ });
+	  assert_equal(get_class($rsp), &quot;CupcakeRouter&quot;, &quot;Failed to return an instance of Router&quot;);
 	  $rsp-&gt;reset();
   });
   
   it(&quot;creates build routes like merb&quot;, function(){
-    Router::map(function($r){
+    CupcakeRouter::map(function($r){
       $r-&gt;connect(&quot;/&quot;, array(&quot;controller&quot; =&gt; &quot;public&quot;, &quot;action&quot; =&gt; &quot;index&quot;));
       $r-&gt;connect(&quot;/blog/post&quot;, array(&quot;controller&quot; =&gt; &quot;article&quot;, &quot;action&quot; =&gt; &quot;show&quot;));
     });
   
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     assert_equal(count($r-&gt;routes), 2, &quot;It should have a count of 2 routes&quot;);
     $r-&gt;reset();
   });
   
   it(&quot;matches all paths&quot;, function(){
-    Router::map(function($r){
+    CupcakeRouter::map(function($r){
       $r-&gt;connect(&quot;/&quot;, array(&quot;controller&quot; =&gt; &quot;application&quot;, &quot;action&quot; =&gt; &quot;index&quot;));  
       $r-&gt;connect(&quot;/book(/:id)&quot;, array(&quot;controller&quot; =&gt; &quot;book&quot;, &quot;action&quot; =&gt; &quot;details_show&quot;));
     });
-    $router = Router::getInstance();
+    $router = CupcakeRouter::getInstance();
     $params = $router-&gt;find_route(&quot;/book/100&quot;);
     
     assert_equal($params[&quot;id&quot;], &quot;100&quot;);
@@ -184,12 +184,12 @@ describe(&quot;Routerr -&gt; prepare&quot;, function(){
 
 describe(&quot;Router -&gt; route_for&quot;, function(){
   it(&quot;returns an array with route index&quot;, function(){
-    Router::map(function($r){
+    CupcakeRouter::map(function($r){
       $r-&gt;connect(&quot;/&quot;, array(&quot;controller&quot; =&gt; &quot;public&quot;, &quot;action&quot; =&gt; &quot;index&quot;));
       $r-&gt;connect(&quot;/blog/post&quot;, array(&quot;controller&quot; =&gt; &quot;article&quot;, &quot;action&quot; =&gt; &quot;show&quot;));
     });
     
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $route = $r-&gt;route_for(&quot;/&quot;);
     assert_equal($route[0], 0, &quot;It should have returned path: /&quot;);
     
@@ -199,11 +199,11 @@ describe(&quot;Router -&gt; route_for&quot;, function(){
   });
   
   it(&quot;returns an array with params&quot;, function(){
-    Router::map(function($r){
+    CupcakeRouter::map(function($r){
       $r-&gt;connect(&quot;/&quot;, array(&quot;controller&quot; =&gt; &quot;public&quot;, &quot;action&quot; =&gt; &quot;index&quot;));
       $r-&gt;connect(&quot;/blog/post&quot;, array(&quot;controller&quot; =&gt; &quot;article&quot;, &quot;action&quot; =&gt; &quot;show&quot;));
     });
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $route = $r-&gt;route_for(&quot;/&quot;);
     
     $params = array(&quot;path&quot; =&gt; &quot;/&quot;, &quot;params&quot; =&gt; array(&quot;controller&quot; =&gt; &quot;public&quot;, &quot;action&quot; =&gt; &quot;index&quot;));
@@ -222,7 +222,7 @@ describe(&quot;Router -&gt; route_for&quot;, function(){
 */
 describe(&quot;Router -&gt; arrays_to_regexps&quot;, function(){
   it(&quot;returns a string&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $pattern = $r-&gt;arrays_to_regexps(array(&quot;path&quot; =&gt; &quot;/music/artist/:id(/:artist_name)&quot;));
     
     ensure(is_string($pattern));
@@ -230,7 +230,7 @@ describe(&quot;Router -&gt; arrays_to_regexps&quot;, function(){
   });
   
   it(&quot;should match /music/artist/:id(/:artist_name) to /music/artist/5/coldplay&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $pattern = $r-&gt;arrays_to_regexps(array(&quot;path&quot; =&gt; &quot;/music/artist/:id(/:artist_name)&quot;));
     $match   = preg_match(&quot;/&quot;. $pattern .&quot;/&quot;, &quot;/music/artist/5/coldplay&quot;, $matches);
     
@@ -242,7 +242,7 @@ describe(&quot;Router -&gt; arrays_to_regexps&quot;, function(){
   });
 
   it(&quot;should match /music/artist/:id(/:artist_name) to /music/artist/5&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $pattern = $r-&gt;arrays_to_regexps(array(&quot;path&quot; =&gt; &quot;/music/artist/:id(/:artist_name)&quot;));
     $match   = preg_match(&quot;/&quot;. $pattern .&quot;/&quot;, &quot;/music/artist/5&quot;, $matches);
     
@@ -254,10 +254,10 @@ describe(&quot;Router -&gt; arrays_to_regexps&quot;, function(){
   });
   
   it(&quot;should match /book(/:id) to /book&quot;, function(){
-    Router::map(function($r){
+    CupcakeRouter::map(function($r){
       $r-&gt;connect(&quot;/book(/:id)&quot;, array(&quot;controller&quot; =&gt; &quot;store&quot;, &quot;action&quot; =&gt; &quot;books&quot;));
     });
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $pattern = $r-&gt;arrays_to_regexps(array(&quot;path&quot; =&gt; &quot;/book(/:id)&quot;));
     $match   = preg_match(&quot;/&quot;. $pattern .&quot;/&quot;, &quot;/book&quot;, $matches);
     
@@ -266,7 +266,7 @@ describe(&quot;Router -&gt; arrays_to_regexps&quot;, function(){
   });
   
   it(&quot;should match /book(/:id) to /book/100&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $pattern = $r-&gt;arrays_to_regexps(array(&quot;path&quot; =&gt; &quot;/book(/:id)&quot;));
     $match   = preg_match(&quot;/&quot;. $pattern .&quot;/&quot;, &quot;/book/100&quot;, $matches);
     
@@ -277,7 +277,7 @@ describe(&quot;Router -&gt; arrays_to_regexps&quot;, function(){
 
 describe(&quot;Router -&gt; param_keys_for_path&quot;, function(){
   it(&quot;should extract :controller, :action, :id for /:controller/:action/:id&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $params = $r-&gt;param_keys_for_path(&quot;/:controller/:action/:id&quot;);
     
     assert_equal($params[0], &quot;:controller&quot;, &quot;Failed to match :controller&quot;);
@@ -288,7 +288,7 @@ describe(&quot;Router -&gt; param_keys_for_path&quot;, function(){
   });  
   
   it(&quot;should extract :controller, :action for /:controller/:action&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $params = $r-&gt;param_keys_for_path(&quot;/:controller/:action&quot;);
     
     assert_equal($params[0], &quot;:controller&quot;, &quot;Failed to match :controller&quot;);
@@ -298,7 +298,7 @@ describe(&quot;Router -&gt; param_keys_for_path&quot;, function(){
   });  
   
   it(&quot;should extract :action for /controller/:action&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $params = $r-&gt;param_keys_for_path(&quot;/controller/:action&quot;);
     
     assert_equal($params[0], &quot;:action&quot;, &quot;Failed to match :action&quot;);
@@ -307,7 +307,7 @@ describe(&quot;Router -&gt; param_keys_for_path&quot;, function(){
   }); 
     
   it(&quot;should extract :id for /book/:id&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $params = $r-&gt;param_keys_for_path(&quot;/book/:id&quot;);
     
     assert_equal($params[0], &quot;:id&quot;, &quot;Failed to match :id&quot;);
@@ -315,7 +315,7 @@ describe(&quot;Router -&gt; param_keys_for_path&quot;, function(){
   });
   
   it(&quot;should extract :id, :artist for /music/:id(/:artist)&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $params = $r-&gt;param_keys_for_path(&quot;/music/:id(/:artist)&quot;);
     
     assert_equal($params[0], &quot;:id&quot;,     &quot;Failed to match :id&quot;);
@@ -325,7 +325,7 @@ describe(&quot;Router -&gt; param_keys_for_path&quot;, function(){
   }); 
   
   it(&quot;returns an empty array for /:action&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $params = $r-&gt;param_keys_for_path(&quot;/:action&quot;);
     assert_equal($params[0], &quot;:action&quot;, &quot;Failed to match :action&quot;);
     assert_equal(count($params), 1,     &quot;Failed to have 1 key&quot;);
@@ -333,7 +333,7 @@ describe(&quot;Router -&gt; param_keys_for_path&quot;, function(){
   });
   
   it(&quot;returns an empty array for (/:action)&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $params = $r-&gt;param_keys_for_path(&quot;(/:action)&quot;);
     assert_equal($params[0], &quot;:action&quot;, &quot;Failed to match :action&quot;);
     assert_equal(count($params), 1,     &quot;Failed to have 1 key&quot;);
@@ -341,14 +341,14 @@ describe(&quot;Router -&gt; param_keys_for_path&quot;, function(){
   });
         
   it(&quot;returns an empty array for /&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $params = $r-&gt;param_keys_for_path(&quot;/&quot;);
     assert_equal(count($params), 0,     &quot;Failed to have 0 keys&quot;);
     $r-&gt;reset();   
   });
     
   it(&quot;returns an empty array&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $params = $r-&gt;param_keys_for_path(&quot;&quot;);
     assert_equal(count($params), 0,     &quot;Failed to have 0 keys&quot;);
     $r-&gt;reset();   
@@ -359,10 +359,10 @@ describe(&quot;Router -&gt; param_keys_for_path&quot;, function(){
 
 describe(&quot;Router -&gt; map_route_to_params&quot;, function(){
   it(&quot;maps route to params&quot;, function(){
-    Router::map(function($r){
+    CupcakeRouter::map(function($r){
       $r-&gt;connect(&quot;/book/:id&quot;, array(&quot;controller&quot; =&gt; &quot;catalog&quot;, &quot;action&quot; =&gt; &quot;show&quot;));
     });
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $params = $r-&gt;map_route_to_params(&quot;/book/500&quot;);
     
     assert_equal($params[&quot;controller&quot;], &quot;catalog&quot;);
@@ -372,10 +372,10 @@ describe(&quot;Router -&gt; map_route_to_params&quot;, function(){
   });
 
   it(&quot;params from to take precedence over request params&quot;, function(){
-    Router::map(function($r){
+    CupcakeRouter::map(function($r){
       $r-&gt;connect(&quot;/book/:id&quot;, array(&quot;controller&quot; =&gt; &quot;catalog&quot;, &quot;action&quot; =&gt; &quot;show&quot;, &quot;id&quot; =&gt; &quot;25&quot;));
     });
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $params = $r-&gt;map_route_to_params(&quot;/book/5&quot;);
     
     assert_equal($params[&quot;controller&quot;], &quot;catalog&quot;);
@@ -385,10 +385,10 @@ describe(&quot;Router -&gt; map_route_to_params&quot;, function(){
   });
 
   it(&quot;should match some params&quot;, function(){
-    Router::map(function($r){
+    CupcakeRouter::map(function($r){
       $r-&gt;connect(&quot;/book/:id(/:name)&quot;, array(&quot;controller&quot; =&gt; &quot;catalog&quot;, &quot;action&quot; =&gt; &quot;show_book&quot;));
     });
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $params = $r-&gt;map_route_to_params(&quot;/book/5/LearnToRead&quot;);
     
     assert_equal($params[&quot;name&quot;], &quot;LearnToRead&quot;);
@@ -397,10 +397,10 @@ describe(&quot;Router -&gt; map_route_to_params&quot;, function(){
   });    
 
   it(&quot;should match params when having dashes&quot;, function(){
-    Router::map(function($r){
+    CupcakeRouter::map(function($r){
       $r-&gt;connect(&quot;/new/:id(/:name)&quot;, array(&quot;controller&quot; =&gt; &quot;catalog&quot;, &quot;action&quot; =&gt; &quot;show_book&quot;));
     });
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $params = $r-&gt;map_route_to_params(&quot;/new/5/learn-to-read&quot;);
     
     assert_equal($params[&quot;name&quot;], &quot;learn-to-read&quot;);
@@ -408,10 +408,10 @@ describe(&quot;Router -&gt; map_route_to_params&quot;, function(){
   });    
   
   it(&quot;should match all params when having dashes&quot;, function(){
-    Router::map(function($r){
+    CupcakeRouter::map(function($r){
       $r-&gt;connect(&quot;/new/:id(/:name)&quot;, array(&quot;controller&quot; =&gt; &quot;catalog&quot;, &quot;action&quot; =&gt; &quot;show_book&quot;));
     });
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $params = $r-&gt;map_route_to_params(&quot;/new/new-release/learn-to-read&quot;);
     
     assert_equal($params[&quot;name&quot;], &quot;learn-to-read&quot;);
@@ -420,10 +420,10 @@ describe(&quot;Router -&gt; map_route_to_params&quot;, function(){
   });
 
   it(&quot;should match all optional params&quot;, function(){
-    Router::map(function($r){
+    CupcakeRouter::map(function($r){
       $r-&gt;connect(&quot;/artist/:id(/:name(/:page(/:sort_order)))&quot;, array(&quot;controller&quot; =&gt; &quot;catalog&quot;, &quot;action&quot; =&gt; &quot;show_book&quot;));
     });
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $params = $r-&gt;map_route_to_params(&quot;/artist/1234/coldplay/1/recent&quot;);
     
     assert_equal($params[&quot;id&quot;], &quot;1234&quot;);
@@ -434,10 +434,10 @@ describe(&quot;Router -&gt; map_route_to_params&quot;, function(){
   });
   
   it(&quot;should match all params in path&quot;, function(){
-    Router::map(function($r){
+    CupcakeRouter::map(function($r){
       $r-&gt;connect(&quot;/artist/:id/:name/:page/:sort_order&quot;, array(&quot;controller&quot; =&gt; &quot;catalog&quot;, &quot;action&quot; =&gt; &quot;show_book&quot;));
     });
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $params = $r-&gt;map_route_to_params(&quot;/artist/1234/coldplay/1/recent&quot;);
     
     assert_equal($params[&quot;id&quot;], &quot;1234&quot;);
@@ -451,13 +451,13 @@ describe(&quot;Router -&gt; map_route_to_params&quot;, function(){
 
 describe(&quot;Router -&gt; route_path_to_regexp&quot;, function(){
   it(&quot;should return a regular expression&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $pattern = $r-&gt;route_path_to_regexp(&quot;/artist/:id/:name&quot;);
     assert_equal(preg_match(&quot;/{$pattern}/&quot;, &quot;/artist/100/coldplay&quot;), true, &quot;It should return a regular expression&quot;);
   });
   
   it(&quot;should return a regular expression with optional&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $pattern = $r-&gt;route_path_to_regexp(&quot;/artist/:id(/:name)&quot;);
     assert_equal(preg_match(&quot;/{$pattern}/&quot;, &quot;/artist/100&quot;), true, &quot;It should return a regular expression&quot;);
   });  
@@ -466,25 +466,25 @@ describe(&quot;Router -&gt; route_path_to_regexp&quot;, function(){
 
 describe(&quot;Router -&gt; remove_parenthesis&quot;, function(){
   it(&quot;should remove parentheses&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $response = $r-&gt;remove_parenthesis(&quot;(:id)&quot;);
     assert_equal($response, &quot;:id&quot;, &quot;Failed to remove parentheses&quot;);
   });
   
   it(&quot;should remove left parenthese&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $response = $r-&gt;remove_parenthesis(&quot;(:id&quot;);
     assert_equal($response, &quot;:id&quot;, &quot;Failed to remove parentheses&quot;);
   });
   
   it(&quot;should remove right parenthese&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $response = $r-&gt;remove_parenthesis(&quot;:id)&quot;);
     assert_equal($response, &quot;:id&quot;, &quot;Failed to remove parentheses&quot;);
   });  
   
   it(&quot;should remove all parentheses&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $response = $r-&gt;remove_parenthesis(&quot;/:controller(/:id(/:name))&quot;);
     assert_equal($response, &quot;/:controller/:id/:name&quot;, &quot;Failed to remove parentheses&quot;);    
   });
@@ -492,25 +492,25 @@ describe(&quot;Router -&gt; remove_parenthesis&quot;, function(){
 
 describe(&quot;NewRotuer -&gt; is_param_key&quot;, function(){
   it(&quot;returns true when string begins with colon&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $response = $r-&gt;is_param_key(&quot;:name&quot;);
     assert_equal($response, true, &quot;Should return true for, :name&quot;);
   });
   
   it(&quot;returns false when string does not have colon&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $response = $r-&gt;is_param_key(&quot;name&quot;);
     assert_equal($response, false, &quot;Should return false for, name&quot;);    
   });
   
   it(&quot;returns false for name:&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $response = $r-&gt;is_param_key(&quot;name:&quot;);
     assert_equal($response, false);    
   });
   
   it(&quot;returns false for na:me&quot;, function(){
-    $r = Router::getInstance();
+    $r = CupcakeRouter::getInstance();
     $response = $r-&gt;is_param_key(&quot;na:me&quot;);
     assert_equal($response, false);    
   });    
@@ -518,11 +518,11 @@ describe(&quot;NewRotuer -&gt; is_param_key&quot;, function(){
 
 describe(&quot;Creates an Array of Routes&quot;, function(){
   before(function(){
-    Router::map(function($r){
+    CupcakeRouter::map(function($r){
       $r-&gt;connect(&quot;/&quot;, array(&quot;controller&quot; =&gt; &quot;application&quot;, &quot;action&quot; =&gt; &quot;show&quot;));
       $r-&gt;show_books(&quot;/&quot;, array(&quot;controller&quot; =&gt; &quot;application&quot;, &quot;action&quot; =&gt; &quot;view_books&quot;));
     });
-    return Router::getInstance();
+    return CupcakeRouter::getInstance();
   });
   
   it(&quot;has two routes&quot;, function($router){</diff>
      <filename>vendors/Cupcake/specs/tests/router_spec.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>be5f7d58798191767a64e6e3b831d679a817302d</id>
    </parent>
  </parents>
  <author>
    <name>Fernando Barajas</name>
    <email>fernyb@fernyb.net</email>
  </author>
  <url>http://github.com/fernyb/Cupcake/commit/d2fd9e670ad2ea3f8e1b08a411ce6f2844ee75bc</url>
  <id>d2fd9e670ad2ea3f8e1b08a411ce6f2844ee75bc</id>
  <committed-date>2009-11-05T07:23:18-08:00</committed-date>
  <authored-date>2009-11-05T07:23:18-08:00</authored-date>
  <message>[1] - Rename Router to CupcakeRouter</message>
  <tree>31a7eaf98522e2da2d9c425f50c81f5825988a40</tree>
  <committer>
    <name>Fernando Barajas</name>
    <email>fernyb@fernyb.net</email>
  </committer>
</commit>
