<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>generators/dwell/dwell_generator.rb</filename>
    </added>
    <added>
      <filename>generators/dwell/templates/deploy.rb</filename>
    </added>
    <added>
      <filename>generators/dwell/templates/known_hosts/github</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -11,17 +11,20 @@ Install Capistrano2 (if you don't already have it) then build and install this g
 
 ### Typical Usage
 
-1. From within your Rails directory, run: 
-    `capify .`
-2. Click this link for recommended contents of config/deploy.rb:
-    `http://pastie.org/private/lodo1zveqgc2i0rto9idw`
-3. Configure you application name, domain, repository location and server name details in your deploy.rb
-4.  Bootstrap your server (see docs below) with:
-    `cap dwell:server:bootstrap` or `cap dwell:linode:bootstrap` 
-5. Install the Dwell stack and any optional packages:
-    `cap dwell:install`
-6. Setup your rails app and apache vhost then fire everything up: 
-    `cap dwell:rails:setup_and_deploy_cold`
+1. Capify your Rails directory
+2. Initialize dwell inside your Rails directory (you'll want to overwrite deploy.rb)
+3. Edit your deploy.rb: configure you applications name, domain, repository, server details, etc
+4. Bootstrap your server
+5. Install the Dwell stack and any optional packages
+6. Setup your rails app and apache vhost then deploy cold
+
+Or all said and done:
+    
+    $ capify .
+    $ dwell init .
+    $ cap dwell:server:bootstrap
+    $ cap dwell:install
+    $ cap dwell:rails:setup_and_deploy_cold    
 
 
 The Dwell Stack - dwell:install
@@ -105,7 +108,8 @@ SSL certificates (if found) will be copied and installed during `setup_and_deplo
 
 SSL certificates should be saved locally:
 
+    config/dwell/ssl/ca/*.crt
     config/dwell/ssl/*.crt
     config/dwell/ssl/*.key
 
-Any key with `CA` in it's name is assumed to be a Certificate Authority and is added to your Apache config with `SSLCACertificateFile`.
\ No newline at end of file
+Any keys inside `ssl/ca` are assumed to be a Certificate Authority and are added to your Apache config with `SSLCACertificateFile`.
\ No newline at end of file</diff>
      <filename>README.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@ task :default =&gt; [:update_gemspec]
 
 task :update_gemspec do
   puts &quot;Rewriting candidates in gemspec...&quot;
-  files=Dir.glob(&quot;{bin,lib}/**/*&quot;)
+  files=Dir.glob(&quot;{bin,lib,generators}/**/*&quot;)
   spec=File.read(&quot;dwell.gemspec&quot;)
   spec.gsub!(/^(  candidates = )\[.*$/, &quot;\\1&quot; + files.inspect)
   File.open(&quot;dwell.gemspec&quot;,&quot;w&quot;).write(spec)</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,13 @@
 #!/usr/bin/env ruby
+require 'rubygems'
+require 'rubigen'
 
-puts &quot;coming soon&quot;
\ No newline at end of file
+if %w(-v --version).include? ARGV.first
+  puts &quot;dwell version 0.2.1&quot;
+  exit(0)
+end
+
+require 'rubigen/scripts/generate'
+source=RubiGen::PathSource.new(:dwell, &quot;#{File.dirname(__FILE__)}/../generators&quot;)
+RubiGen::Base.append_sources(source)
+RubiGen::Scripts::Generate.new.run(ARGV, :generator =&gt; 'dwell')</diff>
      <filename>bin/dwell</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 #!/usr/bin/env ruby
 SPEC = Gem::Specification.new do |s|
   s.name = 'dwell'
-  s.version = '0.2.0'
+  s.version = '0.2.1'
   
   s.authors = ['Robert Bousquet','Josh Goebel']
   s.description = &quot;Automated Rails production environment setup for Ubuntu&quot;
@@ -14,7 +14,7 @@ SPEC = Gem::Specification.new do |s|
   s.require_paths = ['lib']
   s.add_dependency('capistrano', '&gt; 2.0.0')
 #  candidates = Dir.glob(&quot;{bin,lib}/**/*&quot;) 
-  candidates = [&quot;bin/dwell&quot;, &quot;lib/dwell&quot;, &quot;lib/dwell/cap_extensions.rb&quot;, &quot;lib/dwell/known_hosts&quot;, &quot;lib/dwell/known_hosts/github&quot;, &quot;lib/dwell/recipes&quot;, &quot;lib/dwell/recipes/apache.rb&quot;, &quot;lib/dwell/recipes/bootstrap&quot;, &quot;lib/dwell/recipes/bootstrap/linode.rb&quot;, &quot;lib/dwell/recipes/bootstrap/server.rb&quot;, &quot;lib/dwell/recipes/campfire.rb&quot;, &quot;lib/dwell/recipes/extras&quot;, &quot;lib/dwell/recipes/extras/daemontools.rb&quot;, &quot;lib/dwell/recipes/extras/php.rb&quot;, &quot;lib/dwell/recipes/extras/tinydns.rb&quot;, &quot;lib/dwell/recipes/gems.rb&quot;, &quot;lib/dwell/recipes/git.rb&quot;, &quot;lib/dwell/recipes/imagemagick.rb&quot;, &quot;lib/dwell/recipes/mercurial.rb&quot;, &quot;lib/dwell/recipes/mysql&quot;, &quot;lib/dwell/recipes/mysql/base.rb&quot;, &quot;lib/dwell/recipes/mysql/db.rb&quot;, &quot;lib/dwell/recipes/mysql/helper.rb&quot;, &quot;lib/dwell/recipes/mysql.rb&quot;, &quot;lib/dwell/recipes/passenger.rb&quot;, &quot;lib/dwell/recipes/postfix.rb&quot;, &quot;lib/dwell/recipes/rails&quot;, &quot;lib/dwell/recipes/rails/app.rb&quot;, &quot;lib/dwell/recipes/rails/base.rb&quot;, &quot;lib/dwell/recipes/rails_app.rb&quot;, &quot;lib/dwell/recipes/ruby.rb&quot;, &quot;lib/dwell/recipes/sqlite.rb&quot;, &quot;lib/dwell/recipes/svn.rb&quot;, &quot;lib/dwell/recipes/ubuntu.rb&quot;, &quot;lib/dwell/recipes.rb&quot;, &quot;lib/dwell/templates&quot;, &quot;lib/dwell/templates/deploy.rb&quot;, &quot;lib/dwell/templates/passenger.conf&quot;, &quot;lib/dwell/templates/vhost.conf&quot;, &quot;lib/dwell/templates/vhost_ssl.conf&quot;, &quot;lib/dwell/ubuntu_extensions.rb&quot;, &quot;lib/dwell.rb&quot;]
+  candidates = [&quot;bin/dwell&quot;, &quot;lib/dwell&quot;, &quot;lib/dwell/cap_extensions.rb&quot;, &quot;lib/dwell/recipes&quot;, &quot;lib/dwell/recipes/apache.rb&quot;, &quot;lib/dwell/recipes/bootstrap&quot;, &quot;lib/dwell/recipes/bootstrap/linode.rb&quot;, &quot;lib/dwell/recipes/bootstrap/server.rb&quot;, &quot;lib/dwell/recipes/campfire.rb&quot;, &quot;lib/dwell/recipes/extras&quot;, &quot;lib/dwell/recipes/extras/daemontools.rb&quot;, &quot;lib/dwell/recipes/extras/php.rb&quot;, &quot;lib/dwell/recipes/extras/tinydns.rb&quot;, &quot;lib/dwell/recipes/gems.rb&quot;, &quot;lib/dwell/recipes/git.rb&quot;, &quot;lib/dwell/recipes/imagemagick.rb&quot;, &quot;lib/dwell/recipes/mercurial.rb&quot;, &quot;lib/dwell/recipes/mysql&quot;, &quot;lib/dwell/recipes/mysql/base.rb&quot;, &quot;lib/dwell/recipes/mysql/db.rb&quot;, &quot;lib/dwell/recipes/mysql/helper.rb&quot;, &quot;lib/dwell/recipes/mysql.rb&quot;, &quot;lib/dwell/recipes/passenger.rb&quot;, &quot;lib/dwell/recipes/postfix.rb&quot;, &quot;lib/dwell/recipes/rails&quot;, &quot;lib/dwell/recipes/rails/app.rb&quot;, &quot;lib/dwell/recipes/rails/base.rb&quot;, &quot;lib/dwell/recipes/rails_app.rb&quot;, &quot;lib/dwell/recipes/ruby.rb&quot;, &quot;lib/dwell/recipes/sqlite.rb&quot;, &quot;lib/dwell/recipes/svn.rb&quot;, &quot;lib/dwell/recipes/ubuntu.rb&quot;, &quot;lib/dwell/recipes.rb&quot;, &quot;lib/dwell/templates&quot;, &quot;lib/dwell/templates/passenger.conf&quot;, &quot;lib/dwell/templates/vhost.conf&quot;, &quot;lib/dwell/templates/vhost_ssl.conf&quot;, &quot;lib/dwell/ubuntu_extensions.rb&quot;, &quot;lib/dwell.rb&quot;, &quot;generators/dwell&quot;, &quot;generators/dwell/dwell_generator.rb&quot;, &quot;generators/dwell/templates&quot;, &quot;generators/dwell/templates/deploy.rb&quot;, &quot;generators/dwell/templates/known_hosts&quot;, &quot;generators/dwell/templates/known_hosts/github&quot;]
   candidates.concat(%w(LICENSE README.markdown))
   s.files = candidates.delete_if do |item| 
     item.include?(&quot;CVS&quot;) || item.include?(&quot;rdoc&quot;) </diff>
      <filename>dwell.gemspec</filename>
    </modified>
    <modified>
      <diff>@@ -9,10 +9,14 @@ Capistrano::Configuration.instance(:must_exist).load do
         dwell1.invoke_with_input(&quot;passwd #{deploy_user}&quot;, /UNIX password/, new_password)
       end
       
-      task :copy_ssh_key do
+      task :copy_ssh_keys do
         dwell1.mkdir &quot;/home/#{deploy_user}/.ssh&quot;, :mode =&gt; 0700, :owner =&gt; &quot;#{deploy_user}.admin&quot;
-        put File.read(&quot;config/dwell/authorized_keys/#{deploy_user}&quot;), &quot;/home/#{deploy_user}/.ssh/authorized_keys&quot;, :mode =&gt; 0600
+        Dir.glob(&quot;config/dwell/authorized_keys/#{deploy_user}/*&quot;).each do |file|
+          key=File.read(file)
+          dwell1.append_to_file_if_missing(&quot;/home/#{deploy_user}/.ssh/authorized_keys&quot;, key)
+        end
         sudo &quot;chown #{deploy_user}.admin /home/#{deploy_user}/.ssh/authorized_keys&quot;
+        sudo &quot;chmod 0600 /home/#{deploy_user}/.ssh/authorized_keys&quot;
       end
       
       task :disable_root_login do
@@ -38,7 +42,7 @@ Capistrano::Configuration.instance(:must_exist).load do
           sudo &quot;apt-get install ubuntu-standard -y&quot; 
         end
         create_deploy_user
-        copy_ssh_key
+        copy_ssh_keys
         set :user, deploy_user        
         # test deploy login via ssh before we disable root login
         sudo &quot;echo&quot;</diff>
      <filename>lib/dwell/recipes/bootstrap/server.rb</filename>
    </modified>
    <modified>
      <diff>@@ -29,8 +29,8 @@ Capistrano::Configuration.instance(:must_exist).load do
           put File.read(&quot;config/dwell/deploy_keys/#{user}.pub&quot;), &quot;/home/#{user}/.ssh/id_rsa.pub&quot;, :mode =&gt; 0600
           sudo &quot;chown #{user}.admin /home/#{user}/.ssh/id_rsa.pub&quot;
         end
-        known_hosts.each do |host|
-          key=File.open(&quot;#{File.dirname(__FILE__)}/../known_hosts/#{host}&quot;).read
+        Dir.glob(&quot;config/dwell/known_hosts/*&quot;).each do |file|
+          key=File.open(file).read
           dwell1.append_to_file_if_missing(&quot;/home/#{user}/.ssh/known_hosts&quot;, key)
         end
         sudo &quot;chown #{user}.admin /home/#{user}/.ssh/known_hosts&quot;</diff>
      <filename>lib/dwell/recipes/rails/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -53,8 +53,7 @@
   # Server Private Key
   SSLCertificateKeyFile /etc/ssl/private/&lt;%= domain %&gt;.key
   
-  &lt;% Dir.glob(&quot;config/dwell/ssl/*&quot;).each do |file| 
-    next unless file =~ /CA/ %&gt;
+  &lt;% Dir.glob(&quot;config/dwell/ssl/ca/*&quot;).each do |file| %&gt;
   SSLCACertificateFile /etc/ssl/certs/&lt;%= File.basename(file) %&gt;
   &lt;% end %&gt;
 </diff>
      <filename>lib/dwell/templates/vhost_ssl.conf</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>lib/dwell/known_hosts/github</filename>
    </removed>
    <removed>
      <filename>lib/dwell/templates/deploy.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>2e51dd87190a86855972eec2ce349a7d318411a4</id>
    </parent>
  </parents>
  <author>
    <name>Josh Goebel</name>
    <email>dreamer3@gmail.com</email>
  </author>
  <url>http://github.com/yyyc514/dwell/commit/cd6f1568d70853187ffcd48ce4c0004b22e7acac</url>
  <id>cd6f1568d70853187ffcd48ce4c0004b22e7acac</id>
  <committed-date>2008-12-09T12:41:31-08:00</committed-date>
  <authored-date>2008-12-09T12:41:31-08:00</authored-date>
  <message>add generator support and rework some hard coded things (SSL &quot;SA&quot; and known_hosts) to lean on the directory structure more and thereby be more flexible</message>
  <tree>d4530221bfe5f09bc50c74fa2d84e1dbcaa5ad2e</tree>
  <committer>
    <name>Josh Goebel</name>
    <email>dreamer3@gmail.com</email>
  </committer>
</commit>
