<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>doc/LICENSE</filename>
    </added>
    <added>
      <filename>lib/helpers/default.rb</filename>
    </added>
    <added>
      <filename>verify/layers/data_mapper/association_verify.rb</filename>
    </added>
    <added>
      <filename>verify/mapping/named.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,5 @@
 begin
-  $: &lt;&lt; 'lib'; %w( rubygems rake/testtask rake/rdoctask rake/gempackagetask rcov/rcovtask extensions/all
+  $: &lt;&lt; 'lib'; %w( rubygems rake/testtask rake/rdoctask rake/gempackagetask extensions/all
     utilities/string utilities/symbol date).each { |dep| require dep }
 rescue
   puts &quot;Better do `rake setup` to get all the fancies you're missing&quot;
@@ -93,7 +93,7 @@ end
 
 desc &quot;Run verification suite.&quot;
 Rake::TestTask.new(:verify) do |t|
-  t.test_files = FileList[&quot;verify/*/*.rb&quot;].exclude(&quot;**/helpers.rb&quot;, &quot;**/app_generation/*.rb&quot;)
+  t.test_files = FileList[&quot;verify/**/*.rb&quot;].exclude(&quot;**/helpers.rb&quot;, &quot;**/app_generation/*.rb&quot;)
   t.verbose = true
 end
 </diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -8,6 +8,7 @@ module Waves
 
           auto_eval :Configurations do
             auto_eval :Mapping do
+              extend Waves::Mapping
               handle(Waves::Dispatchers::NotFoundError) do
                 html = Waves.application.views[:errors].process( request ) do
                   not_found_404( :error =&gt; Waves::Dispatchers::NotFoundError )</diff>
      <filename>lib/layers/default_errors.rb</filename>
    </modified>
    <modified>
      <diff>@@ -33,8 +33,9 @@ module Waves
 
           auto_create_module( :Helpers ) do
             include AutoCode
-            auto_create_module { include Waves::Helpers::Default }
+            auto_create_module
             auto_load true, :directories =&gt; [ :helpers ]
+            auto_eval( true ){ include Waves::Helpers::Default }
           end          
 
         end</diff>
      <filename>lib/layers/mvc.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,10 +5,9 @@ module Waves
       module Filebase
         
         def self.included(app)
-          app.module_eval
+          app.module_eval do
             auto_eval( :Models ) do
-          	  include AutoCode
-          	  auto_eval true { include Filebase::Model[ :db / self.name.snake_case ] }
+          	  auto_eval( true ) { include Filebase::Model[ :db / self.name.snake_case ] }
           	end
           end
         end
@@ -19,4 +18,4 @@ module Waves
     
   end
   
-end
+end
\ No newline at end of file</diff>
      <filename>lib/layers/orm/filebase.rb</filename>
    </modified>
    <modified>
      <diff>@@ -16,8 +16,14 @@ module Waves
             auto_create :Models do
               include AutoCode
               auto_create_class true, ::Sequel::Model
+              auto_load true, :directories =&gt; [ :models ]
               auto_eval true do
-                set_dataset Waves.application.database[ basename.snake_case.pluralize.intern ]
+                default = superclass.basename.snake_case.pluralize.intern
+                if @dataset &amp;&amp; @dataset.opts[:from] != [ default ]
+                  # don't clobber dataset from autoloaded file
+                else
+                  set_dataset Waves.application.database[ basename.snake_case.pluralize.intern ]
+                end
               end
             end
             </diff>
      <filename>lib/layers/orm/sequel.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,6 +5,7 @@ module Waves
 
         def app.config ; Waves.config ; end
         def app.configurations ; self::Configurations ; end
+        def app.paths ; configurations::Mapping.named; end
         
         app.instance_eval do
 
@@ -12,10 +13,12 @@ module Waves
           
           auto_create_module( :Configurations ) do
             include AutoCode
-            auto_eval( :Mapping ) { extend Waves::Mapping }
             auto_create_class true, Waves::Configurations::Default
             auto_load :Mapping, :directories =&gt; [:configurations]
             auto_load true, :directories =&gt; [:configurations]
+            auto_eval :Mapping do
+              extend Waves::Mapping
+            end
           end
 
         end</diff>
      <filename>lib/layers/simple.rb</filename>
    </modified>
    <modified>
      <diff>@@ -139,10 +139,10 @@ module Waves
     # Maps a request to a block. Don't use this method directly unless you know what
     # you're doing. Use +path+ or +url+ instead.
     def map( path, options = {}, params = {}, &amp;block )
-      if path.is_a? Hash
-        params = options
-        options = path
-      else
+      case path
+      when Hash
+        params = options; options = path
+      when String
         options[:path] = path
       end
       mapping &lt;&lt; [ options, params, block ]
@@ -198,7 +198,7 @@ module Waves
       end
       return false
     end
-
+    
     # Match the given request against the defined rules. This is typically only called
     # by a dispatcher object, so you shouldn't typically use it directly.
     def []( request )
@@ -262,5 +262,6 @@ module Waves
       end
     end
   end
+  
 
 end</diff>
      <filename>lib/mapping/mapping.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,9 +2,6 @@ module Waves
 
   module Renderers
 
-    extend AutoCode
-    # auto_load :renderers, Class
-
     # The renderers mixin provides a number of methods to simplify writing new renderers.
     # Just include this in your Renderer class and write your render method.
     module Mixin</diff>
      <filename>lib/renderers/mixin.rb</filename>
    </modified>
    <modified>
      <diff>@@ -33,7 +33,7 @@ class String
   end
 
   def snake_case
-    gsub(/([a-z\d])([A-Z])/){ &quot;#{$1}_#{$2}&quot;}.tr(&quot;-&quot;, &quot;_&quot;).downcase
+    gsub(/\s+/,'').gsub(/([a-z\d])([A-Z])/){ &quot;#{$1}_#{$2}&quot;}.tr(&quot;-&quot;, &quot;_&quot;).downcase
   end
 
   def title_case</diff>
      <filename>lib/utilities/string.rb</filename>
    </modified>
    <modified>
      <diff>@@ -26,6 +26,10 @@ module Waves
         def threaded(*args,&amp;block)
           mapping.threaded(*args,&amp;block)
         end
+        
+        def generator(*args,&amp;block)
+          mapping.generator(*args,&amp;block)
+        end
 
       end
     end</diff>
      <filename>lib/verify/mapping.rb</filename>
    </modified>
    <modified>
      <diff>@@ -60,7 +60,7 @@ module Waves
     # A class method that returns the known Renderers, which is any module that is defined within Waves::Renderers and includes the Renderers::Mixin. You can define new Renderers simply be reopening Waves::Renderers and defining a module that mixes in Renderers::Mixin.
     def Views.renderers
       return [] if Renderers.constants.nil?
-      Renderers.constants.inject([]) do |rx,cname|
+      Renderers.constants.sort.inject([]) do |rx,cname|
         ( Module === (c=Renderers.const_get(cname)) &amp;&amp;
           c &lt; Renderers::Mixin ) ? ( rx &lt;&lt; c ) : rx
       end</diff>
      <filename>lib/views/mixin.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@ require 'rack'
 require 'daemons'
 require 'live_console'
 
-gem 'dyoder-autocode'
+# gem 'dyoder-autocode'
 require 'autocode'
 
 # for mimetypes only or when using as default handler
@@ -57,19 +57,19 @@ require 'controllers/mixin'
 require 'controllers/base'
 require 'views/mixin'
 require 'views/base'
-require 'renderers/mixin'
-require 'renderers/markaby'
-require 'helpers/asset_helper'
-require 'helpers/number_helper'
 require 'helpers/tag_helper'
 require 'helpers/url_helper'
+require 'helpers/common'
+require 'helpers/form'
+require 'helpers/formatting'
+require 'helpers/model'
+require 'helpers/view'
+require 'helpers/default'
+require 'helpers/asset_helper'
+require 'helpers/number_helper'
+require 'renderers/mixin'
 require 'renderers/erubis'
-require 'helpers/common.rb'
-require 'helpers/form.rb'
-require 'helpers/formatting.rb'
-require 'helpers/model.rb'
-require 'helpers/view.rb'
-require 'helpers/base'
+require 'renderers/markaby'
 
 # waves test support
 require 'verify/mapping.rb'</diff>
      <filename>lib/waves.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,7 +14,7 @@ module Blog
 
       port 3000
 
-    handler ::Rack::Handler::Mongrel, :Host =&gt; host, :Port =&gt; port
+      handler ::Rack::Handler::Mongrel, :Host =&gt; host, :Port =&gt; port
       # handler ::Rack::Handler::WEBrick, :BindAddress =&gt; host, :Port =&gt; port
       # handler ::Rack::Handler::Thin, :Host =&gt; host, :Port =&gt; port
 </diff>
      <filename>samples/blog/configurations/development.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,7 @@ module Blog
 
       port 80
 
-    handler ::Rack::Handler::Mongrel, :Host =&gt; host, :Port =&gt; port
+      handler ::Rack::Handler::Mongrel, :Host =&gt; host, :Port =&gt; port
       # handler ::Rack::Handler::WEBrick, :BindAddress =&gt; host, :Port =&gt; port
       # handler ::Rack::Handler::Thin, :Host =&gt; host, :Port =&gt; port
 </diff>
      <filename>samples/blog/configurations/production.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ module Blog
 
   module Models
 
-    class Entry &lt; Default
+    class Entry &lt; Sequel::Model
       one_to_many :comments, :class =&gt; Blog::Models::Comment, :key =&gt; :entry_id
     end
 </diff>
      <filename>samples/blog/models/entry.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,8 +3,6 @@
 Bacon.extend Bacon::TestUnitOutput
 Bacon.summary_on_exit
 
-# protect TextMate from itself.
-
 # Prepend the framework lib to the loadpath
 $:.unshift( File.join(File.dirname(__FILE__), &quot;..&quot;, &quot;lib&quot;) )
 require 'waves'</diff>
      <filename>verify/helpers.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@ require 'layers/orm/sequel'
 module TestApplication
   include AutoCode
   module Configurations
-    module Development
+    class Development
       stub!(:database).and_return(:adapter =&gt; 'sqlite', :database =&gt; 'test.db')
     end
   end</diff>
      <filename>verify/layers/sequel/model.rb</filename>
    </modified>
    <modified>
      <diff>@@ -27,22 +27,22 @@ describe &quot;A developer can map requests to filters.&quot; do
 
     mapping.before('/pathstring') { request.response.write(&quot;Before pathstring&quot;) }
     mapping.wrap('/pathstring') { request.response.write(&quot;Wrap pathstring&quot;) }
-    mapping.map('/pathstring') { &quot;During pathstring&quot; }
+    mapping.path('/pathstring') { &quot;During pathstring&quot; }
     mapping.after('/pathstring') { request.response.write(&quot;After pathstring&quot;) }
 
     mapping.before(%r{^/pathregexp$}) { request.response.write(&quot;Before pathregexp&quot;) }
     mapping.wrap(%r{^/pathregexp$}) { request.response.write(&quot;Wrap pathregexp&quot;) }
-    mapping.map(%r{^/pathregexp$}) { &quot;During pathregexp&quot; }
+    mapping.path(%r{^/pathregexp$}) { &quot;During pathregexp&quot; }
     mapping.after(%r{^/pathregexp$}) { request.response.write(&quot;After pathregexp&quot;) }
 
     mapping.before('/pathstring/name', :method =&gt; :post) { request.response.write(&quot;Before pathstring post&quot;) }
     mapping.wrap('/pathstring/name', :method =&gt; :post) { request.response.write(&quot;Wrap pathstring post&quot;) }
-    mapping.map('/pathstring/name', :method =&gt; :post) { &quot;During pathstring post&quot; }
+    mapping.path('/pathstring/name', :method =&gt; :post) { &quot;During pathstring post&quot; }
     mapping.after('/pathstring/name', :method =&gt; :post) { request.response.write(&quot;After pathstring post&quot;) }
 
     mapping.before(%r{^/pathregexp/name$}, :method =&gt; :post) { request.response.write(&quot;Before pathregexp post&quot;) }
     mapping.wrap(%r{^/pathregexp/name$}, :method =&gt; :post) { request.response.write(&quot;Wrap pathregexp post&quot;) }
-    mapping.map(%r{^/pathregexp/name$}, :method =&gt; :post) { &quot;During pathregexp post&quot; }
+    mapping.path(%r{^/pathregexp/name$}, :method =&gt; :post) { &quot;During pathregexp post&quot; }
     mapping.after(%r{^/pathregexp/name$}, :method =&gt; :post) { request.response.write(&quot;After pathregexp post&quot;) }
   end
 
@@ -61,5 +61,5 @@ describe &quot;A developer can map requests to filters.&quot; do
   it &quot;When having 'before', 'after' and 'wrap' filters but no corresponding map action this results in a 404&quot; do
     get('/filters_with_no_map').status.should == 404
   end
-
+  
 end</diff>
      <filename>verify/mapping/filters.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,32 +1,34 @@
 # require 'test_helper' because RubyMate needs help
 require File.join(File.dirname(__FILE__) , &quot;helpers&quot;)
 
-class TestView
-  include Waves::Views::Mixin
-end
+Dir.chdir(File.dirname(__FILE__)) do
+  class TestView
+    include Waves::Views::Mixin
+  end
 
-describe &quot;Waves::Views&quot; do
+  describe &quot;Waves::Views&quot; do
   
-  it &quot;provides a list of Renderers&quot; do
-    Waves::Views.renderers.should.respond_to :[]
-  end
+    it &quot;provides a list of Renderers&quot; do
+      Waves::Views.renderers.should.respond_to :[]
+    end
   
-  it &quot;defines an error for missing templates&quot; do
-    defined?(Waves::Views::NoTemplateError).should.not.be.nil
-  end
+    it &quot;defines an error for missing templates&quot; do
+      defined?(Waves::Views::NoTemplateError).should.not.be.nil
+    end
   
-end
+  end
 
-describe &quot;A class which has included Waves::Views::Mixin&quot; do
+  describe &quot;A class which has included Waves::Views::Mixin&quot; do
   
-  before do
-    @view = TestView.new(mock(:request))
-  end
+    before do
+      @view = TestView.new(mock(:request))
+    end
   
-  it &quot;uses the first renderer for which it can find a template file with the associated extension&quot; do
-    @view.renderer(&quot;foo&quot;).should == Waves::Renderers::Erubis
-    @view.renderer(&quot;moo&quot;).should == Waves::Renderers::Erubis
-    @view.renderer(&quot;bleat&quot;).should == nil
-  end
+    it &quot;uses the first renderer for which it can find a template file with the associated extension&quot; do
+      @view.renderer(&quot;foo&quot;).should == Waves::Renderers::Erubis
+      @view.renderer(&quot;moo&quot;).should == Waves::Renderers::Erubis
+      @view.renderer(&quot;bleat&quot;).should == nil
+    end
   
+  end
 end
\ No newline at end of file</diff>
      <filename>verify/views/rendering.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>lib/helpers/base.rb</filename>
    </removed>
    <removed>
      <filename>verify/data_mapper/association_verify.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>b2afb99741c52794f5dd4504986a1981d6e61255</id>
    </parent>
    <parent>
      <id>1b5f38e64f148398e2de3da38aeb55affba69dbf</id>
    </parent>
  </parents>
  <author>
    <name>Pascal</name>
    <email>psq@psq-imac-2.local</email>
  </author>
  <url>http://github.com/dyoder/waves/commit/d1d522e724fc133230f9a70dedf8a745918e1449</url>
  <id>d1d522e724fc133230f9a70dedf8a745918e1449</id>
  <committed-date>2008-05-30T01:00:31-07:00</committed-date>
  <authored-date>2008-05-30T01:00:31-07:00</authored-date>
  <message>merged with master</message>
  <tree>cd1cd2022a797276fd165fe277fc1deec85c2f17</tree>
  <committer>
    <name>Pascal</name>
    <email>psq@psq-imac-2.local</email>
  </committer>
</commit>
