<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>config/initializers/load_ansuz_task.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/has_settings/db/migrate/001_create_has_settings_settings.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -19,11 +19,13 @@ Ansuz is licensed via the BSD license.
  
  1. clone from github: git clone git://github.com/knewter/ansuz.git
  2. install gems: sudo rake gems:install
- 2. rake ansuz:install
+ 3. create proper config/database.yml (note: install script supports this, but db script creation is bugged, so should be done externally from the script)
+ 3. create databases for development &amp; test environments (note: install script is currently bugged for this)
+ 4. rake ansuz:install
  
 NOTE: SQLite has problems with ansuz, please don't use it for now.
 
-NOTE: See the [Ansuz Site Laucher](http://github.com/knewter/ansuz_launcher/tree/master)
+NOTE: See the [Ansuz Site Launcher](http://github.com/knewter/ansuz_launcher/tree/master)
 
 If run with sudo on a server with passenger set up and all the gems already installed, 
 it will check out a new ansuz and set up a fresh database for it and set up a vhost </diff>
      <filename>README.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -7,10 +7,11 @@ module Ansuz
       @themes      = []
       @stdin       = stdin
       @stdout      = stdout
-      @state       = :started
+      @state       = :started # this helps with the tests
     end
 
-    def choose_theme(theme_directory = File.join(RAILS_ROOT, &quot;public&quot;, &quot;themes&quot;)) 
+    def choose_theme(theme_directory = File.join(RAILS_ROOT, &quot;themes&quot;)) 
+      FileUtils.mkdir_p( theme_directory ) unless File.directory?( theme_directory )
       @themes =   Dir.entries(theme_directory).select{|d| d =~ /^\w|^\d/}.collect{|theme| theme=&quot;- #{theme}&quot;}
       if( @themes.any? )
         @stdout.puts &quot;[ansuz] Themes:\n&quot; + @themes.join(&quot;\n&quot;)
@@ -22,7 +23,11 @@ module Ansuz
           theme = @themes.detect{|t| t == theme_choice}
           if( theme )
             @state = :theme_installed
-            return SiteSetting.find_or_create_by_name(:default).update_attribute(:user_theme_name, theme)
+            begin
+              return SiteSetting.find_or_create_by_name(:default).update_attribute(:user_theme_name, theme)
+            rescue
+              STDERR.puts &quot;Badness happened trying to set the default theme. SQLite does this a lot.&quot;
+            end
           else
             @state = :invalid_theme
             @stdout.puts &quot;[ansuz] invalid theme.&quot;
@@ -30,72 +35,41 @@ module Ansuz
         end
       else
         @state = :no_themes_available
-        @stdout.puts &quot;[ansuz]No themes available!&quot;
+        @stdout.puts &quot;[ansuz] No themes available!&quot;
+      end
+    end
+
+    def get_user_response_for(question, default_response=&quot;&quot;)
+      @state = :getting_user_response
+      @stdout.puts question
+      @stdin = rewind(@stdin)
+      response = @stdin.gets.chomp.strip
+      @state = :got_user_response
+      if( response.nil? || response.blank? )
+        return default_response
+      else
+        return response
       end
     end
 
     def create_db_config(database_yaml_path = File.join(RAILS_ROOT, &quot;config&quot;, &quot;database.yml&quot;) )
       unless( File.exists?( database_yaml_path ) )
-        @stdout.puts &quot;[ansuz] Database config does not exist? Would you like one created for you? (Rails will not boot until it has a valid db config)&quot;
-        @state = :user_wants_database_yaml
-        response = @stdin.gets.chomp
+        response = get_user_response_for(&quot;[ansuz] Database config does not exist? Would you like one created for you? (Rails will not boot until it has a valid db config)&quot;)
         if( response =~ /^y|^yes/i )
+          @state = :user_wants_database_yaml
           config = { }
-          @stdout.puts &quot;[ansuz] Database Wizard: Which adapter will the CMS use? ( mysql, sqlite, etc) &quot;
-          database_adapter = @stdin.gets.chomp.strip
-          database_adapter = &quot;mysql&quot; if database_adapter.blank?
-          config[&quot;adapter&quot;] = database_adapter.downcase
-          if( database_adapter != &quot;sqlite&quot; )
-            @stdout.puts &quot;[ansuz] Host (localhost):&quot;
-            database_host = @stdin.gets.chomp.strip
-            database_host = &quot;localhost&quot; if database_host.blank?
-            config[&quot;host&quot;] = database_host
-
-            @stdout.puts &quot;[ansuz] Username (root):&quot;
-            database_username = @stdin.gets.chomp.strip
-            database_username = &quot;root&quot; if database_username.blank?
-            config[&quot;user&quot;] = database_username
-
-            @stdout.puts &quot;[ansuz] Password:&quot;
-            database_password = @stdin.gets.chomp.strip
-            database_password = nil if database_password.blank?
-            config[&quot;password&quot;] = database_password
-
-            @stdout.puts &quot;[ansuz] Socket (/var/run/mysqld/mysqld.sock): &quot;
-            database_socket = @stdin.gets.chomp.strip
-            database_socket = &quot;/var/run/mysqld/mysqld.sock&quot; if database_socket.blank?
-            config[&quot;socket&quot;] = database_socket 
-
-            @stdout.puts &quot;[ansuz] Database Name Prefix (ansuz):&quot;
-            database_prefix = @stdin.gets.chomp.strip
-            database_prefix = &quot;ansuz&quot; if database_prefix.blank?
-            config[&quot;database&quot;] = database_prefix
+          config[&quot;adapter&quot;] = get_user_response_for(&quot;[ansuz] Database Wizard: Which adapter will the CMS use? ( mysql, sqlite, etc) &quot;, &quot;mysql&quot;).downcase
+          if( config[&quot;adapter&quot;] != &quot;sqlite&quot; )
+            config[&quot;host&quot;]     = get_user_response_for(&quot;[ansuz] Host (localhost):&quot;, &quot;localhost&quot;).downcase
+            config[&quot;user&quot;]     = get_user_response_for(&quot;[ansuz] Username (root):&quot;, &quot;root&quot;)
+            config[&quot;password&quot;] = get_user_response_for(&quot;[ansuz] Password:&quot;, nil)
+            config[&quot;socket&quot;]   = get_user_response_for(&quot;[ansuz] Socket (/var/run/mysqld/mysqld.sock): &quot;, &quot;/var/run/mysqld/mysqld.sock&quot;)
+            config[&quot;database&quot;] = get_user_response_for(&quot;[ansuz] Database Name Prefix (ansuz):&quot;, &quot;ansuz&quot;)
           else
-            @stdout.puts &quot;[ansuz] Database Location (db/development.sqlite):&quot;
-            database_location = @stdin.gets.chomp.strip
-            database_location = &quot;db&quot; if database_location.blank?
-            config[&quot;database&quot;] = database_location 
-          end
-
-          database_config = {}
-          [&quot;production&quot;,&quot;development&quot;,&quot;test&quot;].each do |env|
-            database_config[env] = {}
-            config.each_pair do |key,val|
-              case key
-              when &quot;database&quot;:
-                database_config[env][key] = val + &quot;_&quot; + env
-              when &quot;location&quot;:
-                database_config[env][key] = val + &quot;/#{env}.sqlite&quot;
-              else
-                database_config[env][key] = val
-              end
-            end
+            config[&quot;database&quot;] = get_user_response_for(&quot;[ansuz] Database Location (db/development.sqlite):&quot;, &quot;db/&quot;)
           end
 
-          database_yaml = YAML::dump( database_config ).gsub(/^---/,'')
-          handle = File.open( File.join(RAILS_ROOT, &quot;config&quot;, &quot;database.yml&quot;),&quot;w&quot; )
-          handle.puts( database_yaml )
-          handle.close
+          create_config_for_environment([&quot;production&quot;,&quot;development&quot;,&quot;test&quot;], config)
           @state = :database_yaml_created_successfully
           @stdout.puts &quot;[ansuz] Database configuration created successfully&quot;
         else
@@ -108,55 +82,97 @@ module Ansuz
 
     def install
       unless( File.exists?( File.join(RAILS_ROOT, &quot;config&quot;, &quot;database.yml&quot;) ) )
-        @stdout.puts &quot;[ansuz]Please create a config/database.yml file before running this task.&quot;
-        return false
+        #@stdout.puts &quot;[ansuz] Please create a config/database.yml file before running this task.&quot;
+        #return false
+        create_db_config
       end
       
       @stdout.puts &quot;[ansuz] Creating database ..&quot;
       Kernel.silence_stream(@stdout) do
-        # FIXME
-        # Invoking db tasks causes a rollback of some kind during testing -james
-        #Rake::Task['db:create:all'].invoke 
-        `rake db:create:all`
+        create_database
       end
 
       @stdout.puts &quot;[ansuz] Migrating tables ..&quot;
       Kernel.silence_stream(@stdout) do
-        #Rake::Task['db:migrate'].invoke
-        `rake db:migrate`
+        migrate_database
       end
 
       @stdout.puts &quot;[ansuz] Migrating plugins ..&quot;
       Kernel.silence_stream(@stdout) do
-        #Rake::Task['db:migrate:plugins'].invoke
-        `rake db:migrate:plugins`
+        migrate_plugins
       end
 
-      if( User.find(:all, :conditions =&gt; [&quot;login = 'admin'&quot;]).empty? )
-        @stdout.puts &quot;[ansuz] Enter a password for the default admin user:&quot;
-        @stdout.flush
-        password = @stdin.gets.chomp
-        u = User.new :login =&gt; 'admin', :email =&gt; 'admin@example.com', :password =&gt; password, :password_confirmation =&gt; password
-        u.save
-        u.has_role 'admin'
-        u.save # Not sure why we save twice. Josh?
-        @stdout.puts &quot;[ansuz] Admin user created with login 'admin' and the password you entered.&quot;
-      else
-        @stdout.puts &quot;[ansuz] Admin user already exists.&quot;
+      # Create public/uploads directory for FCKeditor 
+      create_fckeditor_uploads_dir
+
+      choose_theme
+      @state = :installation_complete
+    end
+
+    protected
+
+    def create_config_for_environment( environments, config )
+      @state = :creating_config
+      database_config = {}
+      environments.each do |environment|
+        database_config[environment] = {}
+        config.each_pair do |key,val|
+          case key
+          when &quot;database&quot;:
+            database_config[environment][key] = val + &quot;_&quot; + environment
+          when &quot;location&quot;:
+            database_config[environment][key] = val + &quot;/#{environment}.sqlite&quot;
+          else
+            database_config[environment][key] = val
+          end
+        end
       end
 
-      # Create public/uploads directory for FCKeditor 
+      database_yaml = YAML::dump( database_config ).gsub(/^---/,'')
+      handle = File.open( File.join(RAILS_ROOT, &quot;config&quot;, &quot;database.yml&quot;),&quot;w&quot; )
+      handle.puts( database_yaml )
+      handle.close
+    end
+
+    def create_default_admin_user(password)
+      u = User.new :login =&gt; 'admin', :email =&gt; 'admin@example.com', :password =&gt; password, :password_confirmation =&gt; password
+      u.has_role 'admin'
+      u.save
+      @stdout.puts &quot;[ansuz] Admin user created with login 'admin' and the password you entered.&quot;
+    end
+
+    def create_fckeditor_uploads_dir
+      @state = :creating_fckeditor_uploads_dir
       unless( File.directory?( File.join(RAILS_ROOT, &quot;public&quot;, &quot;uploads&quot;) ) )
         @stdout.puts &quot;[ansuz] Creating public/uploads directory for FCKeditor..&quot;
-        FileUtils.mkdir( File.join(RAILS_ROOT, &quot;public&quot;, &quot;uploads&quot;) )
+        FileUtils.mkdir_p( File.join(RAILS_ROOT, &quot;public&quot;, &quot;uploads&quot;) )
+        @state = :created_fckeditor_uploads_dir
+      else
+        @state = :fckeditor_uploads_dir_already_exists
       end
+    end
 
-      #Rake::Task[&quot;ansuz:choose_theme&quot;].invoke
-      self.choose_theme
+    # FIXME: Somthing is causing this to be currently broken, should be fixed!
+    def create_database
+      @state = :creating_databases
+      system &quot;rake db:create:all&quot; 
+    end
 
-      @stdout.puts &quot;[ansuz] Finished! Start Ansuz with `script/server` on Linux or `ruby script/server` on Windows.&quot;
+    def migrate_database
+      @state = :migrating_database
+      system &quot;rake db:migrate&quot;
     end
 
+    def migrate_plugins
+      @state = :migrating_plugins
+      system &quot;rake db:migrate:plugins&quot;
+    end
 
+    def rewind(io)
+      if( io.is_a?(StringIO) ) # In non-test environment, we can't seek through STDIN, it gets rewound for us I suppose -james
+        io.rewind
+      end
+      io
+    end
   end
 end</diff>
      <filename>lib/ansuz/installer.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,145 +1,24 @@
 require &quot;yaml&quot;
+require File.join(File.dirname(__FILE__), &quot;..&quot;,&quot;ansuz&quot;,&quot;installer.rb&quot;)
+@installer = Ansuz::Installer.new
 
 namespace :ansuz do
   desc &quot;Set the CMS theme&quot;
   task(:choose_theme =&gt; :environment) do
-    themes =   Dir.entries( File.join(RAILS_ROOT, &quot;themes&quot;)).select{|d| d =~ /^\w|^\d/}.collect{|theme| theme=&quot;- #{theme}&quot;}
-    if( themes.any? )
-      STDOUT.puts &quot;[ansuz] Themes:\n&quot; + themes.join(&quot;\n&quot;)
-      STDOUT.puts &quot;[ansuz] Enter a selection above, or leave blank for default&quot;
-      theme_choice = $stdin.gets.chomp
-      unless( theme_choice.blank? )
-        theme = theme_choice.detect{|t| t == theme_choice}
-        if( theme )
-          SiteSetting.find_or_create_by_name(:default).update_attribute(:user_theme_name, theme)
-        else
-          STDOUT.puts &quot;[ansuz] invalid theme.&quot;
-        end
-      end
-    else
-      STDOUT.puts &quot;[ansuz] No themes available!&quot;
-    end
-  
+    @installer.choose_theme
   end
 
   # Called at the beginning of the initializer in config/environment.rb before Rails complains about not having a db&quot;
   desc &quot;Build a basic database.yml&quot;
   task(:create_db_config) do
-    unless( File.exists?( File.join(RAILS_ROOT, &quot;config&quot;, &quot;database.yml&quot;) ) )
-      STDOUT.puts &quot;[ansuz] Database config does not exist? Would you like one created for you? (Rails will not boot until it has a valid db config)&quot;
-      response = $stdin.gets.chomp
-      if( response =~ /^y|^yes/i )
-        config = { }
-        STDOUT.puts &quot;[ansuz] Database Wizard: Which adapter will the CMS use? ( mysql, sqlite, etc) &quot;
-        database_adapter = $stdin.gets.chomp.strip
-        database_adapter = &quot;mysql&quot; if database_adapter.blank?
-        config[&quot;adapter&quot;] = database_adapter.downcase
-        if( database_adapter != &quot;sqlite&quot; )
-          STDOUT.puts &quot;[ansuz] Host (localhost):&quot;
-          database_host = $stdin.gets.chomp.strip
-          database_host = &quot;localhost&quot; if database_host.blank?
-          config[&quot;host&quot;] = database_host
-
-          STDOUT.puts &quot;[ansuz] Username (root):&quot;
-          database_username = $stdin.gets.chomp.strip
-          database_username = &quot;root&quot; if database_username.blank?
-          config[&quot;user&quot;] = database_username
-
-          STDOUT.puts &quot;[ansuz] Password:&quot;
-          database_password = $stdin.gets.chomp.strip
-          database_password = nil if database_password.blank?
-          config[&quot;password&quot;] = database_password
-
-          STDOUT.puts &quot;[ansuz] Socket (/var/run/mysqld/mysqld.sock): &quot;
-          database_socket = $stdin.gets.chomp.strip
-          database_socket = &quot;/var/run/mysqld/mysqld.sock&quot; if database_socket.blank?
-          config[&quot;socket&quot;] = database_socket 
-
-          STDOUT.puts &quot;[ansuz] Database Name Prefix (ansuz):&quot;
-          database_prefix = $stdin.gets.chomp.strip
-          database_prefix = &quot;ansuz&quot; if database_prefix.blank?
-          config[&quot;database&quot;] = database_prefix
-        else
-          STDOUT.puts &quot;[ansuz] Database Location (db/development.sqlite):&quot;
-          database_location = $stdin.gets.chomp.strip
-          database_location = &quot;db&quot; if database_location.blank?
-          config[&quot;database&quot;] = database_location 
-        end
-
-        database_config = {}
-        [&quot;production&quot;,&quot;development&quot;,&quot;test&quot;].each do |env|
-          database_config[env] = {}
-          config.each_pair do |key,val|
-            case key
-            when &quot;database&quot;:
-              database_config[env][key] = val + &quot;_&quot; + env
-            when &quot;location&quot;:
-              database_config[env][key] = val + &quot;/#{env}.sqlite&quot;
-            else
-              database_config[env][key] = val
-            end
-          end
-        end
-
-        database_yaml = YAML::dump( database_config ).gsub(/^---/,'')
-        handle = File.open( File.join(RAILS_ROOT, &quot;config&quot;, &quot;database.yml&quot;),&quot;w&quot; )
-        handle.puts( database_yaml )
-        handle.close
-        STDOUT.puts &quot;[ansuz] Database configuration created successfully&quot;
-      end
-    end
+    @installer.create_db_config
   end
 
   desc &quot;Run all the necessary tasks to install Ansuz&quot;
-  task(:install =&gt; :environment) do
-
-    unless( File.exists?( File.join(RAILS_ROOT, &quot;config&quot;, &quot;database.yml&quot;) ) )
-      STDOUT.puts &quot;[ansuz]Please create a config/database.yml file before running this task.&quot;
-      return false
-    end
-    
-    STDOUT.puts &quot;[ansuz] Creating database ..&quot;
-    Kernel.silence_stream(STDOUT) do
-      # FIXME
-      # Invoking db tasks causes a rollback of some kind during testing -james
-      #Rake::Task['db:create:all'].invoke 
-      `rake db:create:all`
-    end
-
-    STDOUT.puts &quot;[ansuz] Migrating tables ..&quot;
-    Kernel.silence_stream(STDOUT) do
-      #Rake::Task['db:migrate'].invoke
-      `rake db:migrate`
-    end
-
-    STDOUT.puts &quot;[ansuz] Migrating plugins ..&quot;
-    Kernel.silence_stream(STDOUT) do
-      #Rake::Task['db:migrate:plugins'].invoke
-      `rake db:migrate:plugins`
-    end
-
-    if( User.find(:all, :conditions =&gt; [&quot;login = 'admin'&quot;]).empty? )
-      STDOUT.puts &quot;[ansuz] Enter a password for the default admin user:&quot;
-      STDOUT.flush
-      password = $stdin.gets.chomp
-      u = User.new :login =&gt; 'admin', :email =&gt; 'admin@example.com', :password =&gt; password, :password_confirmation =&gt; password
-      u.has_role 'admin'
-      u.save
-      STDOUT.puts &quot;[ansuz] Admin user created with login 'admin' and the password you entered.&quot;
-    else
-      STDOUT.puts &quot;[ansuz] Admin user already exists.&quot;
-    end
-
-    # Create public/uploads directory for FCKeditor 
-    unless( File.directory?( File.join(RAILS_ROOT, &quot;public&quot;, &quot;uploads&quot;) ) )
-      STDOUT.puts &quot;[ansuz] Creating public/uploads directory for FCKeditor..&quot;
-      FileUtils.mkdir( File.join(RAILS_ROOT, &quot;public&quot;, &quot;uploads&quot;) )
-    else
-      STDOUT.puts &quot;[ansuz] public/uploads directory for FCKeditor already exists.&quot;
-    end
-
-    Rake::Task[&quot;ansuz:choose_theme&quot;].invoke
-
+  task(:install) do
+    @installer.create_db_config
+    @installer.install
+    system(&quot;rake utils:create_admin&quot;)
     STDOUT.puts &quot;[ansuz] Finished! Start Ansuz with `script/server` on Linux or `ruby script/server` on Windows.&quot;
   end
 </diff>
      <filename>lib/tasks/ansuz.rake</filename>
    </modified>
    <modified>
      <diff>@@ -3,6 +3,60 @@ require &quot;stringio&quot;
 
 # TODO CHECK FOR NO THEMES!
 describe Ansuz::Installer do
+
+  describe &quot;creating a database.yml&quot; do
+    before(:each) do
+      @stdin     = StringIO.new(&quot;&quot;,&quot;r+&quot;) # Fake STDIN
+      @stdout    = StringIO.new(&quot;&quot;,&quot;r+&quot;)
+      @installer = Ansuz::Installer.new('test', @stdin, @stdout )
+      @database_yaml_path        = File.join(RAILS_ROOT, &quot;config&quot;, &quot;database.yml&quot;) 
+      @database_yaml_backup_path = File.join(RAILS_ROOT, &quot;config&quot;, &quot;database.yml.bak&quot;) 
+       
+      # Don't destroy the database config!!
+      if( !File.exists?( @database_yaml_backup_path ) &amp;&amp;  File.exists?( @database_yaml_path ) )
+        FileUtils.cp( @database_yaml_path ,  @database_yaml_backup_path )
+      end
+      
+      if( File.exists?( @database_yaml_path ) )
+        FileUtils.rm( @database_yaml_path )
+      end
+    end
+
+    it &quot;should not continue if the user enters a newline or anything other than y/yes&quot; do
+      @stdin.write &quot;banjo\n&quot;
+      @stdin.rewind
+      @installer.create_db_config
+      @installer.state.should == :user_doesnt_want_database_yaml
+    end
+
+    # You may be tempted to use sqlite for tests, but then you'd be in a world of pain. SQLite - is - the - devil
+    it &quot;should prompt the user if he/she wants a database.yml created for them&quot; do
+      @stdin.write &quot;y\n&quot;
+      @installer.create_db_config &quot;pooptown&quot;
+      @stdin.write &quot;mysql\n&quot;
+      @stdin.write &quot;localhost&quot;
+      @stdin.write &quot;root&quot;
+      @stdin.write &quot;&quot;
+      @stdin.write &quot;\n&quot;
+      @installer.state.should == :database_yaml_created_successfully
+    end
+
+    it &quot;should run all the necessary rake tasks to get ansuz running&quot; do
+      @stdin.write &quot;y\n&quot;
+      @installer.install
+      @installer.state.should == :installation_complete
+      File.exists?( File.join(RAILS_ROOT, &quot;db&quot;, &quot;schema.rb&quot; )).should == true
+    end
+    
+    after(:each) do 
+      @stdout.truncate(0)
+      @stdin.close_write
+      if( File.exists?( @database_yaml_backup_path ) &amp;&amp; !File.exists?( @database_yaml_path ) )
+        FileUtils.cp( @database_yaml_backup_path , @database_yaml_path )
+      end
+    end
+  end
+
   describe &quot;choosing a theme&quot; do
     before(:each) do
       @stdin     = StringIO.new(&quot;&quot;,&quot;r+&quot;) # Fake STDIN/STDOUT
@@ -14,7 +68,7 @@ describe Ansuz::Installer do
     end
 
     it &quot;should show a list of themes available&quot; do
-      @stdin.write &quot;a_test_theme\n&quot; # We gotta write and rewind, or the method won't see anything
+      @stdin.write &quot;a_test_theme\n&quot;
       @stdin.rewind
 
       @installer.choose_theme( @theme_dir )
@@ -43,45 +97,5 @@ describe Ansuz::Installer do
       FileUtils.rm_r(@theme_dir)
     end
   end
-
-  describe &quot;creating a database.yml&quot; do
-    before(:each) do
-      @stdin     = StringIO.new(&quot;&quot;,&quot;r+&quot;) # Fake STDIN
-      @stdout    = StringIO.new(&quot;&quot;,&quot;r+&quot;)
-      @installer = Ansuz::Installer.new('test', @stdin, @stdout )
-      @database_yaml_path        = File.join(RAILS_ROOT, &quot;config&quot;, &quot;database.yml&quot;) 
-      @database_yaml_backup_path = File.join(RAILS_ROOT, &quot;config&quot;, &quot;database.yml.bak&quot;) 
-       
-      # Don't destroy the database config!!
-      if( !File.exists?( @database_yaml_backup_path ) &amp;&amp;  File.exists?( @database_yaml_path ) )
-        FileUtils.cp( @database_yaml_path ,  @database_yaml_backup_path )
-      end
-      
-      if( File.exists?( @database_yaml_path ) )
-        FileUtils.rm( @database_yaml_path )
-      end
-      @stdout.truncate(0)
-    end
-
-    it &quot;should not continue if the user enters a newline or anything other than y/yes&quot; do
-      @stdin.write &quot;banjo\n&quot;
-      @stdin.rewind
-      @installer.create_db_config
-      @installer.state.should == :user_doesnt_want_database_yaml
-    end
-
-    it &quot;should prompt the user if he/she wants a database.yml created for them&quot; do
-    #  @stdin.write &quot;yes\n&quot;
-    #  @stdin.rewind
-    #  @installer.create_db_config
-    #  @installer.state.should == :user_wants_database_yaml
-    end
-    
-    after(:each) do 
-      if( File.exists?( @database_yaml_backup_path ) &amp;&amp; !File.exists?( @database_yaml_path ) )
-        FileUtils.cp( @database_yaml_backup_path , @database_yaml_path )
-      end
-    end
-  end
 end
 </diff>
      <filename>spec/ansuz_installer_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>app/2</filename>
    </removed>
    <removed>
      <filename>config/database.yml.bak</filename>
    </removed>
    <removed>
      <filename>db/schema.rb</filename>
    </removed>
    <removed>
      <filename>vendor/plugins/has_settings/db/migrate/20081220_create_has_settings_settings.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>f336466640ae6b21adc46f2c0b9c7db1ec71cc82</id>
    </parent>
    <parent>
      <id>240e64694e38bcc28108391689150348f3452a99</id>
    </parent>
  </parents>
  <author>
    <name>Josh Adams</name>
    <email>jadams@goro.(none)</email>
  </author>
  <url>http://github.com/knewter/ansuz/commit/a149cd63ed07bd6ea50e5f3c7bd5d4ab39984f6f</url>
  <id>a149cd63ed07bd6ea50e5f3c7bd5d4ab39984f6f</id>
  <committed-date>2009-02-10T05:19:00-08:00</committed-date>
  <authored-date>2009-02-10T05:19:00-08:00</authored-date>
  <message>merged installer</message>
  <tree>fdfbd516396d77c4db874f57743dc038f2d92ca7</tree>
  <committer>
    <name>Josh Adams</name>
    <email>jadams@goro.(none)</email>
  </committer>
</commit>
