<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>generators/components/orms/couchrest_orm_gen.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,9 @@
 # Dependencies contains all required gems, helpers and core configuration
 
+def app(&amp;block)
+  &lt;%= @class_name %&gt;.class_eval(&amp;block)
+end
+
 class &lt;%= @class_name %&gt; &lt; Sinatra::Application
   bundler_require_dependencies
   </diff>
      <filename>generators/base_app/config/dependencies.rb.tt</filename>
    </modified>
    <modified>
      <diff>@@ -20,7 +20,7 @@ module SinatraMore
     class_option :run_bundler, :aliases =&gt; '-b', :default =&gt; false, :type =&gt; :boolean
 
     # Definitions for the available customizable components
-    component_option :orm,      &quot;database engine&quot;,    :aliases =&gt; '-d', :choices =&gt; [:datamapper, :mongomapper, :activerecord, :sequel]
+    component_option :orm,      &quot;database engine&quot;,    :aliases =&gt; '-d', :choices =&gt; [:datamapper, :mongomapper, :activerecord, :sequel, :couchrest]
     component_option :test,     &quot;testing framework&quot;,  :aliases =&gt; '-t', :choices =&gt; [:bacon, :shoulda, :rspec, :testspec, :riot]
     component_option :mock,     &quot;mocking library&quot;,    :aliases =&gt; '-m', :choices =&gt; [:mocha, :rr]
     component_option :script,   &quot;javascript library&quot;, :aliases =&gt; '-s', :choices =&gt; [:jquery, :prototype, :rightjs]</diff>
      <filename>generators/skeleton_generator.rb</filename>
    </modified>
    <modified>
      <diff>@@ -55,6 +55,7 @@ Gem::Specification.new do |s|
      &quot;generators/components/mocks/mocha_mock_gen.rb&quot;,
      &quot;generators/components/mocks/rr_mock_gen.rb&quot;,
      &quot;generators/components/orms/activerecord_orm_gen.rb&quot;,
+     &quot;generators/components/orms/couchrest_orm_gen.rb&quot;,
      &quot;generators/components/orms/datamapper_orm_gen.rb&quot;,
      &quot;generators/components/orms/mongomapper_orm_gen.rb&quot;,
      &quot;generators/components/orms/sequel_orm_gen.rb&quot;,</diff>
      <filename>sinatra_more.gemspec</filename>
    </modified>
    <modified>
      <diff>@@ -103,6 +103,14 @@ class TestSkeletonGenerator &lt; Test::Unit::TestCase
       assert_match_in_file(/MongoDbInitializer/, '/tmp/sample_app/config/initializers/mongo_db.rb')
       assert_match_in_file(/class User.*?include MongoMapper::Document/m, '/tmp/sample_app/app/models/user.rb')
     end
+
+    should &quot;properly generate for couchrest&quot; do
+      buffer = silence_logger { SinatraMore::SkeletonGenerator.start(['sample_app', '/tmp', '--orm=couchrest', '--script=none']) }
+      assert_match /Applying.*?couchrest.*?orm/, buffer
+      assert_match_in_file(/gem 'couchrest'/, '/tmp/sample_app/Gemfile')
+      assert_match_in_file(/CouchRestInitializer/, '/tmp/sample_app/config/initializers/couch_rest.rb')
+      assert_match_in_file(/class User &lt; CouchRest::ExtendedDocument/m, '/tmp/sample_app/app/models/user.rb')      
+    end
   end
 
   context &quot;the generator for renderer component&quot; do</diff>
      <filename>test/generators/test_skeleton_generator.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f3668ca81a2020a90fe28ee6f5d568a837cd7496</id>
    </parent>
  </parents>
  <author>
    <name>Rob Holland</name>
    <email>rob@the-it-refinery.co.uk</email>
  </author>
  <url>http://github.com/robholland/sinatra_more/commit/003277ad6cc6ef87e7b46282c416cf5f375bb94b</url>
  <id>003277ad6cc6ef87e7b46282c416cf5f375bb94b</id>
  <committed-date>2009-11-14T14:15:47-08:00</committed-date>
  <authored-date>2009-11-14T06:40:15-08:00</authored-date>
  <message>Add couchrest support</message>
  <tree>7599a783f555c753f69dfb91c271475d3d2c4f0c</tree>
  <committer>
    <name>Rob Holland</name>
    <email>rob@the-it-refinery.co.uk</email>
  </committer>
</commit>
