<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -5,6 +5,11 @@ module Integrity
   class Installer &lt; Thor
     include FileUtils
 
+    def self.database_path
+      File.join(ENV[&quot;HOME&quot;], &quot;.integrity.sqlite3&quot;)
+    end
+    private_class_method :database_path
+
     desc &quot;install [PATH]&quot;,
        &quot;Copy template files to PATH for desired deployement strategy
        (either Thin, Passenger or Heroku). Next, go there and edit them.&quot;
@@ -36,21 +41,24 @@ module Integrity
     end
 
     desc &quot;launch [CONFIG]&quot;,
-         &quot;Launch Integrity real quick.&quot;
-    method_options :config =&gt; :optional, :port =&gt; 4567
+         &quot;Launch Integrity real quick. Database is saved in #{database_path}.&quot;
+    method_options :config =&gt; :optional, :port =&gt; :optional
     def launch
       require &quot;thin&quot;
       require &quot;do_sqlite3&quot;
 
-      File.file?(options[:config].to_s) ?
-        Integrity.new(options[:config]) : Integrity.new
-      Integrity.config[:base_uri] = &quot;http://0.0.0.0:#{options[:port]}&quot;
+      options[:port] ||= 4567
+      config = { :database_uri =&gt; &quot;sqlite3://#{ENV[&quot;HOME&quot;]}/.integrity.db&quot;,
+                 :base_uri     =&gt; &quot;http://0.0.0.0:#{options[:port]}&quot;,
+                 :export_directory =&gt; &quot;/tmp/integrity-exports&quot;             }
+      config.merge!(YAML.load_file(options[:config])) if options[:config]
 
-      DataMapper.auto_migrate!
+      migrate_db(config)
 
       Thin::Server.start(&quot;0.0.0.0&quot;, options[:port], Integrity::App)
     rescue LoadError =&gt; boom
-      puts &quot;Make sure thin and do_sqlite3 are insatalled&quot;
+      $stderr &lt;&lt; &quot;Make sure thin and do_sqlite3 are insatalled\n\n&quot;
+      raise
     end
 
     private</diff>
      <filename>lib/integrity/installer.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>54a76b2d9f72f809ff5a21f5d1c2dadfb99a3acf</id>
    </parent>
  </parents>
  <author>
    <name>Simon Rozet</name>
    <email>simon@rozet.name</email>
  </author>
  <url>http://github.com/will/integrity/commit/4a0ef6569ddf74db9ba57ed10690501ed9e8444d</url>
  <id>4a0ef6569ddf74db9ba57ed10690501ed9e8444d</id>
  <committed-date>2009-04-15T02:04:08-07:00</committed-date>
  <authored-date>2009-04-15T02:04:08-07:00</authored-date>
  <message>Installer#launch: save database in $HOME</message>
  <tree>079c7c653517f9bba2b9cacb1d0bd0f7e9f40b13</tree>
  <committer>
    <name>Simon Rozet</name>
    <email>simon@rozet.name</email>
  </committer>
</commit>
