<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>History.txt</filename>
    </added>
    <added>
      <filename>MIT-LICENSE.txt</filename>
    </added>
    <added>
      <filename>README.rdoc</filename>
    </added>
    <added>
      <filename>lib/rack/bug/panels/log_panel.rb</filename>
    </added>
    <added>
      <filename>lib/rack/bug/panels/sql_panel.rb</filename>
    </added>
    <added>
      <filename>lib/rack/bug/panels/templates_panel.rb</filename>
    </added>
    <added>
      <filename>lib/rack/bug/views/panels/log.html.erb</filename>
    </added>
    <added>
      <filename>lib/rack/bug/views/panels/sql.html.erb</filename>
    </added>
    <added>
      <filename>lib/rack/bug/views/panels/templates.html.erb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1 +1,2 @@
 coverage
+pkg</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,6 @@
 require &quot;rubygems&quot;
+require &quot;rake/gempackagetask&quot;
+require &quot;rake/clean&quot;
 require &quot;spec/rake/spectask&quot;
 require File.expand_path(&quot;./lib/rack/bug&quot;)
 
@@ -18,3 +20,27 @@ Spec::Rake::SpecTask.new(:rcov) do |t|
   end
 end
 
+spec = Gem::Specification.new do |s|
+  s.name         = &quot;rack-bug&quot;
+  s.version      = Rack::Bug::VERSION
+  s.author       = &quot;Bryan Helmkamp&quot;
+  s.email        = &quot;bryan&quot; + &quot;@&quot; + &quot;brynary.com&quot;
+  s.homepage     = &quot;http://github.com/brynary/rack-bug&quot;
+  s.summary      = &quot;Debugging toolbar for Rack applications implemented as middleware&quot;
+  s.description  = s.summary
+  s.files        = %w[History.txt Rakefile README.rdoc] + Dir[&quot;lib/**/*&quot;]
+  
+  # rdoc
+  s.has_rdoc         = true
+  s.extra_rdoc_files = %w(README.rdoc MIT-LICENSE.txt)
+end
+
+Rake::GemPackageTask.new(spec) do |package|
+  package.gem_spec = spec
+end
+
+desc 'Install the package as a gem.'
+task :install =&gt; [:clean, :package] do
+  gem = Dir['pkg/*.gem'].first
+  sh &quot;sudo gem install --no-rdoc --no-ri --local #{gem}&quot;
+end
\ No newline at end of file</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -7,10 +7,15 @@ end
 require &quot;rack/bug/toolbar&quot;
 require &quot;rack/bug/panels/timer_panel&quot;
 require &quot;rack/bug/panels/env_panel&quot;
+require &quot;rack/bug/panels/sql_panel&quot;
+require &quot;rack/bug/panels/log_panel&quot;
+require &quot;rack/bug/panels/templates_panel&quot;
 
 module Rack
   module Bug
     
+    VERSION = &quot;0.1.0&quot;
+    
     class Middleware
       
       def initialize(app)</diff>
      <filename>lib/rack/bug.rb</filename>
    </modified>
    <modified>
      <diff>@@ -19,6 +19,10 @@ module Rack
         return [status, headers, body]
       end
       
+      def has_content?
+        true
+      end
+      
       def before(env)
       end
       </diff>
      <filename>lib/rack/bug/panel.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,15 +1,71 @@
-jQuery(function() {
-  jQuery(&quot;#rack_bug ul.panels li a&quot;).click(function () {
-    current = $('#rack_bug #' + this.className);
-    
-    if (current.is(':visible')) {
-      $('.panelContent').hide();
-      current.hide();
-    } else {
-      $('.panelContent').hide();
-      current.show();
+// jQuery(function() {
+//   jQuery(&quot;#rack_bug ul.panels li a&quot;).click(function () {
+//     current = $('#rack_bug #' + this.className);
+//     
+//     if (current.is(':visible')) {
+//       $('.panelContent').hide();
+//       current.hide();
+//     } else {
+//       $('.panelContent').hide();
+//       current.show();
+//     }
+//     
+//     return false;
+//   });
+// });
+
+var _$ = window.$;
+jQuery.noConflict();
+jQuery(function($) {
+  $.rackBug = function(data, klass) {
+    $.rackBug.init();
+  }
+  $.extend($.rackBug, {
+    init: function() {
+      var current = null;
+      $('#rack_bug ul.panels li a').click(function() {
+        current = $('#rack_bug #' + this.className);
+        
+        if (current.is(':visible')) {
+          $(document).trigger('close.rackBug');
+        } else {
+          $('#rack_bug .panel_content').hide();
+          current.show();
+          $.rackBug.open();
+        }
+        return false;
+      });
+      $('#rack_bug a.close').click(function() {
+        $(document).trigger('close.rackBug');
+        return false;
+      });
+    },
+    open: function() {
+      $(document).bind('keydown.rackBug', function(e) {
+        if (e.keyCode == 27) {
+          $.rackBug.close();
+        }
+      });
+    },
+    toggle_content: function(elem) {
+      if (elem.is(':visible')) {
+        elem.hide();
+      } else {
+        elem.show();
+      }
+    },
+    close: function() {
+      $(document).trigger('close.rackBug');
+      return false;
     }
-    
-    return false;
   });
-});
\ No newline at end of file
+  $(document).bind('close.rackBug', function() {
+    $(document).unbind('keydown.rackBug');
+    $('.panel_content').hide();
+  });
+});
+
+jQuery(function() {
+  jQuery.rackBug();
+});
+$ = _$;</diff>
      <filename>lib/rack/bug/public/__rack_bug__/bug.js</filename>
    </modified>
    <modified>
      <diff>@@ -28,7 +28,7 @@ module Rack
       end
       
       def panel_classes
-        [TimerPanel, EnvPanel]
+        [TimerPanel, EnvPanel, SQLPanel, LogPanel, TemplatesPanel]
       end
       
       def inject_into(response)</diff>
      <filename>lib/rack/bug/toolbar.rb</filename>
    </modified>
    <modified>
      <diff>@@ -16,17 +16,24 @@
     
       &lt;% @panels.each do |panel| %&gt;
         &lt;li&gt;
-          &lt;a href=&quot;#&quot; class=&quot;&lt;%= panel.name %&gt;&quot;&gt;
+          &lt;% if panel.has_content? %&gt;
+            &lt;a href=&quot;#&quot; class=&quot;&lt;%= panel.name %&gt;&quot;&gt;
+              &lt;%= panel.heading %&gt;
+            &lt;/a&gt;
+          &lt;% else %&gt;
             &lt;%= panel.heading %&gt;
-          &lt;/a&gt;
+          &lt;% end %&gt;
         &lt;/li&gt;
       &lt;% end %&gt;
     &lt;/ul&gt;
   &lt;/div&gt;
   
   &lt;% @panels.each do |panel| %&gt;
-    &lt;div class=&quot;panel_content&quot; id=&quot;&lt;%= panel.name %&gt;&quot;&gt;
-      &lt;%= panel.content %&gt;
-    &lt;/div&gt;
+    &lt;% if panel.has_content? %&gt;
+      &lt;div class=&quot;panel_content&quot; id=&quot;&lt;%= panel.name %&gt;&quot;&gt;
+        &lt;a href=&quot;&quot; class=&quot;close&quot;&gt;Close&lt;/a&gt;
+        &lt;%= panel.content %&gt;
+      &lt;/div&gt;
+    &lt;% end %&gt;
   &lt;% end %&gt;
 &lt;/div&gt;</diff>
      <filename>lib/rack/bug/views/bug.html.erb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>README</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>84f1a1f09a0f70ffdc05fbfe0ac3140874079b4d</id>
    </parent>
  </parents>
  <author>
    <name>Bryan Helmkamp</name>
    <email>bryan@brynary.com</email>
  </author>
  <url>http://github.com/brynary/rack-bug/commit/80a5901b3f1bc6594bc0b6d595e5f846b9b75a8a</url>
  <id>80a5901b3f1bc6594bc0b6d595e5f846b9b75a8a</id>
  <committed-date>2009-03-08T22:39:12-07:00</committed-date>
  <authored-date>2009-03-08T22:39:12-07:00</authored-date>
  <message>Adding very basic logging, sql, templates panels</message>
  <tree>c7a5477857dee16c05d7bd86301b4d5b4610499b</tree>
  <committer>
    <name>Bryan Helmkamp</name>
    <email>bryan@brynary.com</email>
  </committer>
</commit>
