<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,17 +1,22 @@
+require 'rubygems'
+Gem.clear_paths
+Gem.path.unshift(File.join(File.dirname(__FILE__), &quot;gems&quot;))
+
 require 'rake'
 require 'rake/rdoctask'
 require 'rake/testtask'
 require 'spec/rake/spectask'
 require 'fileutils'
-require 'rubygems'
-
-MERB_ENV = ENV['MERB_ENV'] if ENV['MERB_ENV']
 
 require File.dirname(__FILE__)+'/config/boot.rb'
-require MERB_FRAMEWORK_ROOT+'/tasks'
-MERB_ROOT = File.dirname(__FILE__)
+require Merb::framework_root+'/tasks'
 include FileUtils
 
+# Set these before any dependencies load
+# otherwise the ORM may connect to the wrong env
+Merb.root = File.dirname(__FILE__)
+Merb.environment = ENV['MERB_ENV'] if ENV['MERB_ENV']
+
 # Get Merb plugins and dependencies
 require File.dirname(__FILE__)+'/config/dependencies.rb'
 Merb::Plugins.rakefiles.each {|r| require r } 
@@ -21,9 +26,9 @@ Merb::Plugins.rakefiles.each {|r| require r }
 
 desc &quot;load merb_init.rb&quot;
 task :merb_init do
-  require 'merb'
-  require File.dirname(__FILE__)+'/config/merb_init.rb'
-end  
+  # deprecated - here for BC
+  Rake::Task['merb_env'].invoke
+end
 
 task :uninstall =&gt; [:clean] do
   sh %{sudo gem uninstall #{NAME}}
@@ -56,6 +61,18 @@ Spec::Rake::SpecTask.new('specs') do |t|
   t.spec_files = Dir['spec/**/*_spec.rb'].sort
 end
 
+desc &quot;Run all model specs&quot;
+Spec::Rake::SpecTask.new('model_specs') do |t|
+  t.spec_opts = [&quot;--format&quot;, &quot;specdoc&quot;, &quot;--colour&quot;]
+  t.spec_files = Dir['spec/models/**/*_spec.rb'].sort
+end
+
+desc &quot;Run all controller specs&quot;
+Spec::Rake::SpecTask.new('controller_specs') do |t|
+  t.spec_opts = [&quot;--format&quot;, &quot;specdoc&quot;, &quot;--colour&quot;]
+  t.spec_files = Dir['spec/controllers/**/*_spec.rb'].sort
+end
+
 desc &quot;Run a specific spec with TASK=xxxx&quot;
 Spec::Rake::SpecTask.new('spec') do |t|
   t.spec_opts = [&quot;--format&quot;, &quot;specdoc&quot;, &quot;--colour&quot;]
@@ -84,6 +101,19 @@ task :aok do
   sh %{rake spec}
 end
 
+unless Gem.cache.search(&quot;haml&quot;).empty?
+  namespace :haml do
+    desc &quot;Compiles all sass files into CSS&quot;
+    task :compile_sass do
+      gem 'haml'
+      require 'sass'
+      puts &quot;*** Updating stylesheets&quot;
+      Sass::Plugin.update_stylesheets
+      puts &quot;*** Done&quot;      
+    end
+  end
+end
+
 ##############################################################################
 # SVN
 ##############################################################################</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 module Merb
   module GlobalHelper
-    # helpers deinfed here available to all views.  
+    # helpers defined here available to all views.  
   end
 end    
\ No newline at end of file</diff>
      <filename>app/helpers/global_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,6 +6,6 @@ class Comment &lt; DataMapper::Base
   
   belongs_to :article
   
-  validates_presence_of :post_id, :email
+  validates_presence_of :article_id, :email
 end
 </diff>
      <filename>app/models/comment.rb</filename>
    </modified>
    <modified>
      <diff>@@ -130,7 +130,7 @@
 		
 		&lt;div class=&quot;header&quot;&gt;
 			&lt;h1&gt;&lt;%= @exception.name.humanize %&gt; &lt;sup class=&quot;error_&lt;%= @exception.class::STATUS %&gt;&quot;&gt;&lt;%= @exception.class::STATUS %&gt;&lt;/sup&gt;&lt;/h1&gt;
-			&lt;% if show_details = ::Merb::Server.config[:exception_details] -%&gt;
+			&lt;% if show_details = ::Merb::Config[:exception_details] -%&gt;
 				&lt;h2&gt;&lt;%= @exception.message %&gt;&lt;/h2&gt;
 			&lt;% else -%&gt;
 				&lt;h2&gt;Sorry about that...&lt;/h2&gt;</diff>
      <filename>app/views/exceptions/internal_server_error.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@
   &lt;head&gt;
     &lt;title&gt;Fresh Merb App&lt;/title&gt;
     &lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
-    &lt;link rel=&quot;stylesheet&quot; href=&quot;/stylesheets/master.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; charset=&quot;utf-8&quot; /&gt;
+    &lt;link rel=&quot;stylesheet&quot; href=&quot;/stylesheets/master.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; charset=&quot;utf-8&quot;&gt;
   &lt;/head&gt;
   &lt;body&gt;
     &lt;%= catch_content :layout %&gt;</diff>
      <filename>app/views/layout/application.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 frozen_framework_path = File.join(File.dirname(__FILE__), &quot;..&quot;, &quot;framework&quot;)
 
-unless defined?(MERB_FRAMEWORK_ROOT)
+unless defined?(Merb::framework_root)
   if File.directory?(frozen_framework_path)
     $:.unshift frozen_framework_path
     require File.join(frozen_framework_path, &quot;merb&quot;)</diff>
      <filename>config/boot.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,14 +2,14 @@
 # This is a sample database file for the DataMapper ORM
 :development: &amp;defaults
   :adapter: mysql
-  :database: blog_development
+  :database: blerb_development
   :username: root
   :password: 
   :host: localhost
 
 :test:
   &lt;&lt;: *defaults
-  :database: blog_test
+  :database: blerb_test
 
 :production:
   &lt;&lt;: *defaults</diff>
      <filename>config/database.yml</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,9 @@
 # Make the app's &quot;gems&quot; directory a place where gems are loaded from
 Gem.clear_paths
-Gem.path.unshift(MERB_ROOT / &quot;gems&quot;)
+Gem.path.unshift(Merb.root / &quot;gems&quot;)
 
 # Make the app's &quot;lib&quot; directory a place where ruby files get &quot;require&quot;d from
-$LOAD_PATH.unshift(MERB_ROOT / &quot;lib&quot;)
+$LOAD_PATH.unshift(Merb.root / &quot;lib&quot;)
 
 ### Merb doesn't come with database support by default.  You need
 ### an ORM plugin.  Install one, and uncomment one of the following lines,
@@ -34,7 +34,7 @@ use_test :rspec
 # OR
 # dependencies &quot;RedCloth&quot; =&gt; &quot;&gt; 3.0&quot;, &quot;ruby-aes-cext&quot; =&gt; &quot;= 1.0&quot;
 
-Merb::Server.after_app_loads do
+Merb::BootLoader.after_app_loads do
   ### Add dependencies here that must load after the application loads:
 
   # dependency &quot;magic_admin&quot; # this gem uses the app's model classes</diff>
      <filename>config/dependencies.rb</filename>
    </modified>
    <modified>
      <diff>@@ -21,7 +21,7 @@
 
 # A secret key is required when using the 'cookie' session store (default), 
 # change this value to something unique to your application and keep it private
-:session_secret_key: /USERS/HORNBECK/CODE/MERB/BLOG8167
+:session_secret_key: /USERS/JEFF/DEV/PROJECTS/BLERB6404
 
 # Uncomment to use the merb upload progress. The 'path match' will be treated as
 # a regex for any URLs that should be considered for upload monitoring.
@@ -32,8 +32,18 @@
 # automatically in production mode.
 #:cache_templates: true
 
+# Uncomment to bundle assets in dev mode. Assets are automatically bundled in
+# production mode.
+#:bundle_assets: true
+
+# this is true if you want mongrel to emulate the X-Sendfile header internally,
+# false if you want it to fall thru to apache or whatever front end server you use.
+# true by default
+#:mongrel_x_sendfile: false
+
 # Uncomment and set this if you want to run a drb server for upload progress
 # or other drb services.
+#:start_drb: true
 #:drb_server_port: 32323
 
 # If you want to protect some or all of your app with  HTTP basic auth then
@@ -61,4 +71,12 @@
 # It is often useful to use a differant layout from 'application' for errors
 # set this to the layout template (or :none) that you want to use by default
 #:exception_layout: :none
-  
\ No newline at end of file
+
+# You can override settings for specific environments by creating a yaml
+# file for that environment in config/environments.  For example, to
+# change the configuration only for development create
+# config/environments/development.yml
+
+# If you don't intend to parse JSON, use ActiveSupport, or want to roll your own
+# set this to true, to disable the loading of the JSON gem
+# :disable_json_gem: true
\ No newline at end of file</diff>
      <filename>config/merb.yml</filename>
    </modified>
    <modified>
      <diff>@@ -4,13 +4,14 @@ puts &quot;Started merb_init.rb ...&quot;
 
 # Your app's dependencies, including your database layer (if any) are defined
 # in config/dependencies.rb
-require File.join(MERB_ROOT, 'config', 'dependencies')
+require File.join(Merb.root, 'config', 'dependencies')
 
 # Here's where your controllers, helpers, and models, etc. get loaded.  If you
 # need to change the order of things, just move the call to 'load_application'
 # around this file.
 puts &quot;Loading Application...&quot;
-Merb::Server.load_application
+Merb::BootLoader.load_application
 
 # Load environment-specific configuration
-require File.join(MERB_ROOT, 'config', 'environments', MERB_ENV)
+environment_config = File.join(Merb.root, 'config', 'environments', Merb.environment)
+require environment_config if File.exist?(environment_config)</diff>
      <filename>config/merb_init.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,9 @@
 #!/usr/bin/env ruby
 APP_ROOT = File.join(File.dirname(__FILE__), '..')
 
+def at_exit
+end
+
 begin
   require 'rubigen'
 rescue LoadError</diff>
      <filename>script/destroy</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,7 @@ rescue LoadError
 end
 
 require File.join(File.dirname(__FILE__), &quot;..&quot;, 'config', 'boot')
-require (APP_ROOT / &quot;config&quot; / &quot;merb_init&quot; )
+require File.join(Merb.root, 'config', 'dependencies')
 module Kernel
   undef dependency if defined?(Kernel.dependency)
 end</diff>
      <filename>script/generate</filename>
    </modified>
    <modified>
      <diff>@@ -1,21 +1,15 @@
-MERB_ENV=&quot;test&quot; unless Object.const_defined?('MERB_ENV')
 $TESTING=true
 require File.join(File.dirname(__FILE__), &quot;..&quot;, 'config', 'boot')
-require File.join(MERB_ROOT, 'config', 'merb_init')
+Merb.environment=&quot;test&quot;
+require File.join(Merb.root, 'config', 'merb_init')
 
 require 'merb/test/helper'
 require 'merb/test/rspec'
 
-DataMapper::Base.auto_migrate!
-### METHODS BELOW THIS LINE SHOULD BE EXTRACTED TO MERB ITSELF
-
-def fake_render(template, ivars={})
-  dummy = Object.new
-  ivars.each do |key, value|
-    dummy.instance_variable_set &quot;@#{key.to_s}&quot;, value
-  end
-  template = &quot;#{MERB_VIEW_ROOT}/#{template}&quot;
-  engine = Merb::Template.engine_for(template)
-  view_context = Merb::ViewContext.new dummy
-  engine.transform(:file =&gt; template, :view_context =&gt; view_context)
+Spec::Runner.configure do |config|
+    config.include(Merb::Test::Helper)
+    config.include(Merb::Test::RspecMatchers)
 end
+
+
+### METHODS BELOW THIS LINE SHOULD BE EXTRACTED TO MERB ITSELF</diff>
      <filename>spec/spec_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,10 +4,11 @@ $TESTING=true
 
 require 'rubygems'
 require 'test/unit'
-require File.join(MERB_ROOT, 'config', 'merb_init')
+require File.join(Merb.root, 'config', 'merb_init')
 
 require 'merb/test/helper'
 
 class Test::Unit::TestCase
+  include Merb::Test::Helper
   # Add more helper methods to be used by all tests here...
 end
\ No newline at end of file</diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>208424ba50668a35b5d3d1ff60d0b4cbb8eb6a4b</id>
    </parent>
  </parents>
  <author>
    <name>Jeff Whitmire</name>
    <email>jeff@jwhitmire.com</email>
  </author>
  <url>http://github.com/hornbeck/blerb-core/commit/8c1d2b656e433578c8f873d86f9fde5e54857a40</url>
  <id>8c1d2b656e433578c8f873d86f9fde5e54857a40</id>
  <committed-date>2008-01-25T15:06:14-08:00</committed-date>
  <authored-date>2008-01-25T15:06:14-08:00</authored-date>
  <message>jw - applying buffington patch</message>
  <tree>0d0c469963c2f6194b106a41987a8327ea35a4df</tree>
  <committer>
    <name>Jeff Whitmire</name>
    <email>jeff@jwhitmire.com</email>
  </committer>
</commit>
