<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1 +1 @@
-Subproject commit d221938a6401d956ac6cfdc892f9b1c11b1fa31a
+Subproject commit 08d709f78b8c5b0fbeb7821e37fa53e69afcf433</diff>
      <filename>rack</filename>
    </modified>
    <modified>
      <diff>@@ -144,7 +144,7 @@ module Tap
     
     # Returns a uri to the specified action on self.
     def uri(action=nil, params={})
-      server.uri(&quot;#{name}#{action ? '/' : ''}#{action}&quot;, params)
+      server.uri(&quot;#{name}#{name &amp;&amp; action ? '/' : ''}#{action}&quot;, params)
     end
     
     def template_path(path)</diff>
      <filename>tap-server/lib/tap/controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -31,7 +31,7 @@ module Tap
         if request.get?
           render 'access.erb', :locals =&gt; {:secret =&gt; request['secret']}, :layout =&gt; true
         else
-          redirect uri(&quot;admin/#{request['secret']}&quot;)
+          redirect uri(&quot;admin&quot;, :secret =&gt; request['secret'])
         end
       end
       
@@ -103,7 +103,11 @@ module Tap
       # Returns a controller uri, attaching the secret to the action, if specified.
       def uri(action=nil, params={})
         secret = params.delete(:secret)
-        action = &quot;#{action}/#{secret}&quot; if secret
+        
+        if secret
+          action = action ? &quot;#{action}/#{secret}&quot; : secret
+        end
+        
         super(action, params)
       end
       </diff>
      <filename>tap-server/lib/tap/controllers/server.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,7 +11,7 @@ module Tap
     config :controllers, {}
 
     def controller_uri(env, controller, action=nil, params={})
-      uri &quot;/#{escape(&quot;#{env}:#{controller}&quot;)}#{action ? '/' : ''}#{action}&quot;, params
+      uri &quot;#{escape(&quot;#{env}:#{controller}&quot;)}#{action ? '/' : ''}#{action}&quot;, params
     end
 
     # a helper method for routing a key to a controller
@@ -55,7 +55,8 @@ module Tap
       else
         # use main controller
         controller = self.controller
-
+        path = nil
+        
         unless controller
           raise ServerError.new(&quot;404 Error: could not route to controller&quot;, 404)
         end
@@ -63,7 +64,7 @@ module Tap
 
       # handle the request
       rack_env['tap.server'] = self
-      rack_env['tap.path'] = &quot;/#{path}&quot;
+      rack_env['tap.path'] = path
       controller.call(rack_env)
     rescue ServerError
       $!.response</diff>
      <filename>tap-server/lib/tap/router.rb</filename>
    </modified>
    <modified>
      <diff>@@ -122,9 +122,10 @@ module Tap
       initialize_config(config)
     end
     
+    # path should not start with &quot;/&quot;
     def uri(path=nil, params={})
       query = build_query(params)
-      &quot;http://#{host}:#{port}#{path}#{query.empty? ? '' : '?'}#{query}&quot;
+      &quot;http://#{host}:#{port}/#{path}#{query.empty? ? '' : '?'}#{query}&quot;
     end
     
     def path(dir, path)</diff>
      <filename>tap-server/lib/tap/server.rb</filename>
    </modified>
    <modified>
      <diff>@@ -10,4 +10,10 @@ form.run, form.rename, form.duplicate, form.delete {
 li.task, li.join, li.queue {
   border-top: thin solid black;
   padding: 0.5em;
+}
+
+pre.yaml {
+  padding: 1em;
+  background-color: 99FFCC;
+  overflow: hidden;
 }
\ No newline at end of file</diff>
      <filename>tap-server/public/stylesheets/tap.css</filename>
    </modified>
    <modified>
      <diff>@@ -2,8 +2,9 @@
 &lt;div&gt;Tap &lt;%= Tap::VERSION %&gt;&lt;/div&gt;
 &lt;div&gt;
 Server:
-&lt;pre&gt;&lt;%= YAML.dump(server.config.to_hash) %&gt;&lt;/pre&gt;
+&lt;pre class=&quot;yaml&quot;&gt;&lt;%= YAML.dump(server.config.to_hash) %&gt;&lt;/pre&gt;
 &lt;/div&gt;
+&lt;% if Object.const_defined?(:Gem) %&gt;
 &lt;div&gt;
 Active Gems:
 &lt;ul&gt;
@@ -12,6 +13,7 @@ Active Gems:
   &lt;% end %&gt;
 &lt;/ul&gt;
 &lt;/div&gt;
+&lt;% end %&gt;
 &lt;form action=&quot;&lt;%= uri :shutdown, :secret =&gt; secret %&gt;&quot; method=&quot;post&quot;&gt;
   &lt;input type=&quot;submit&quot; value=&quot;shutdown&quot; /&gt;
 &lt;/form&gt;</diff>
      <filename>tap-server/views/tap/controllers/server/admin.erb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d6f5af3b0e73313517f7599cd0d78ece6b170627</id>
    </parent>
  </parents>
  <author>
    <name>Simon Chiang</name>
    <email>simon.a.chiang@gmail.com</email>
  </author>
  <url>http://github.com/bahuvrihi/tap/commit/118b8773556adfb092178332afb123bb99ef1338</url>
  <id>118b8773556adfb092178332afb123bb99ef1338</id>
  <committed-date>2009-05-12T11:06:56-07:00</committed-date>
  <authored-date>2009-05-12T11:06:56-07:00</authored-date>
  <message>fixed some particulars of uri generation</message>
  <tree>eb48ac09c19da857d966bafa678834cfa33c8ea6</tree>
  <committer>
    <name>Simon Chiang</name>
    <email>simon.a.chiang@gmail.com</email>
  </committer>
</commit>
