<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/tabs_on_rails/tabs/builder.rb</filename>
    </added>
    <added>
      <filename>lib/tabs_on_rails/tabs/tabs_builder.rb</filename>
    </added>
    <added>
      <filename>test/tabs/builder_test.rb</filename>
    </added>
    <added>
      <filename>test/tabs/tabs_builder_test.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,23 +1,24 @@
 CHANGELOG.rdoc
+LICENSE.rdoc
+Manifest
+README.rdoc
+Rakefile
 init.rb
 install.rb
+lib/tabs_on_rails.rb
 lib/tabs_on_rails/controller_mixin.rb
 lib/tabs_on_rails/tabs.rb
+lib/tabs_on_rails/tabs/builder.rb
+lib/tabs_on_rails/tabs/tabs_builder.rb
 lib/tabs_on_rails/version.rb
-lib/tabs_on_rails.rb
-LICENSE.rdoc
-Manifest
 rails/init.rb
-Rakefile
-README.rdoc
-tabs_on_rails.gemspec
 tasks/tabs_on_rails_tasks.rake
-test/builder_test.rb
 test/controller_mixin_helpers_test.rb
 test/controller_mixin_test.rb
 test/controller_mixin_with_controller_test.rb
-test/fixtures/mixin/standard.html.erb
-test/tabs_builder_test.rb
-test/tabs_on_rails_test.rb
+test/fixtures/mixin/default.html.erb
+test/fixtures/mixin/with_open_close_tabs.html.erb
+test/tabs/builder_test.rb
+test/tabs/tabs_builder_test.rb
 test/test_helper.rb
 uninstall.rb</diff>
      <filename>Manifest</filename>
    </modified>
    <modified>
      <diff>@@ -14,128 +14,13 @@
 #++
 
 
-module TabsOnRails
-  
-  class Tabs
-    
-    # 
-    # = Builder
-    #
-    # The Builder class represents the interface for any custom Builder.
-    # 
-    # To create a custom Builder extend this class 
-    # and implement the following abstract methods:
-    # 
-    # * tab_for(args)
-    #
-    class Builder
-      
-      # Initializes a new builder with +context+.
-      #
-      # Note. You should not overwrite this method to prevent incompatibility with future versions.
-      def initialize(context, options = {})
-        @context   = context
-        @namespace = options.delete(:namespace) || :default
-      end
-      
-      # Returns true if +tab+ is the +current_tab+.
-      #
-      # ==== Examples
-      # 
-      #   class MyController &lt; ApplicationController
-      #     tab :foo
-      #   end
-      # 
-      #   current_tab? :foo   # =&gt; true
-      #   current_tab? 'foo'  # =&gt; true
-      #   current_tab? :bar   # =&gt; false
-      #   current_tab? 'bar'  # =&gt; false
-      #
-      def current_tab?(tab)
-        tab.to_s == @context.current_tab(@namespace).to_s
-      end
+require 'tabs_on_rails/tabs/builder'
+require 'tabs_on_rails/tabs/tabs_builder'
 
-      
-      # Creates and returns a tab with given +args+.
-      # 
-      # ==== Raises
-      # 
-      # NotImplemented:: you should implement this method in your custom Builder.
-      # 
-      def tab_for(*args)
-        raise NotImplementedError
-      end
-      
-      # Overwrite this method to use a custom open tag for your tabs.
-      def open_tabs(*args)
-      end
-      
-      # Overwrite this method to use a custom close tag for your tabs.
-      def close_tabs(*args)
-      end
-      
-    end
-    
-    #
-    # = Tabs Builder
-    # 
-    # The TabsBuilder is and example of custom Builder.
-    # It creates a new tab
-    #
-    class TabsBuilder &lt; Builder
 
-      # Implements Builder#tab_for.
-      # Returns a link_to +tab+ with +name+ and +options+ if +tab+ is not the current tab,
-      # a simple tab name wrapped by a span tag otherwise.
-      # 
-      #   current_tab? :foo   # =&gt; true
-      # 
-      #   tab_for :foo, 'Foo', foo_path
-      #   # =&gt; &lt;li&gt;&lt;span&gt;Foo&lt;/span&gt;&lt;/li&gt;
-      # 
-      #   tab_for :bar, 'Bar', bar_path
-      #   # =&gt; &lt;li&gt;&lt;a href=&quot;/link/to/bar&quot;&gt;Bar&lt;/a&gt;&lt;/li&gt;
-      # 
-      def tab_for(tab, name, options)
-        content = @context.link_to_unless(current_tab?(tab), name, options) do
-          @context.content_tag(:span, name)
-        end
-        @context.content_tag(:li, content)
-      end
-      
-      # Implements Builder#open_tabs.
-      # 
-      # Returns an unordered list open tag.
-      # The &lt;tt&gt;options&lt;/tt&gt; is used to customize the HTML attributes of the tag.
-      #
-      #   open_tag
-      #   # =&gt; &quot;&lt;ul&gt;&quot;
-      #
-      #   open_tag :class =&gt; &quot;centered&quot;
-      #   # =&gt; &quot;&lt;ul class=\&quot;centered\&quot;&gt;&quot;
-      #
-      def open_tabs(options = {})
-        @context.tag(&quot;ul&quot;, options, open = true)
-      end
-      
-      # Implements Builder#close_tabs.
-      # 
-      # Returns an unordered list close tag.
-      # The &lt;tt&gt;options&lt;/tt&gt; hash is ignored. It exists only for 
-      # coeherence with the parent Builder API.
-      #
-      #   close_tag
-      #   # =&gt; &quot;&lt;/ul&gt;&quot;
-      #
-      #   close_tag :class =&gt; &quot;centered&quot;
-      #   # =&gt; &quot;&lt;/ul&gt;&quot;
-      #
-      def close_tabs(options = {})
-        &quot;&lt;/ul&gt;&quot;
-      end
-      
-    end
-    
+module TabsOnRails
+
+  class Tabs
 
     def initialize(context, options = {}, &amp;block)
       @context = context</diff>
      <filename>lib/tabs_on_rails/tabs.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,12 +8,9 @@ gem     'mocha', '~&gt;0.9.7'
 # gem     'rails', '2.2.2'
 # gem     'mocha', '0.9.5'
 
-require 'mocha'
 require 'test/unit'
 require 'active_support'
 require 'action_controller'
-require 'action_controller/cgi_ext'
-require 'action_controller/test_process'
 require 'action_view/test_case'
 
 $:.unshift File.dirname(__FILE__) + '/../lib'</diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>test/builders/builder_test.rb</filename>
    </removed>
    <removed>
      <filename>test/builders/tabs_builder_test.rb</filename>
    </removed>
    <removed>
      <filename>test/tabs_on_rails_test.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>69e988dfbef89da4b625bad4e52bd7043700b2d6</id>
    </parent>
  </parents>
  <author>
    <name>Simone Carletti</name>
    <email>weppos@weppos.net</email>
  </author>
  <url>http://github.com/weppos/tabs_on_rails/commit/ed777f9888b805e2781cf37a0139d10a30e640fb</url>
  <id>ed777f9888b805e2781cf37a0139d10a30e640fb</id>
  <committed-date>2009-10-29T01:14:03-07:00</committed-date>
  <authored-date>2009-10-29T01:14:03-07:00</authored-date>
  <message>Refactoring internal file hierarchy.</message>
  <tree>049c39fd5800b6d1f3c32292e42e59e057b2caea</tree>
  <committer>
    <name>Simone Carletti</name>
    <email>weppos@weppos.net</email>
  </committer>
</commit>
