Explorar el Código

Make educated guesses at standard Rails gem & table deployment steps.
First pass at supporting either gem bundler or rake gems:install, based
on gems defined in apps data bag.

Also use db:bootstrap for Mephisto, though using db:migrate exclusively
seems to be more common. May need error cases here.

Troy Davis hace 14 años
padre
commit
bfbd2c601f
Se han modificado 1 ficheros con 11 adiciones y 0 borrados
  1. 11 0
      recipes/rails.rb

+ 11 - 0
recipes/rails.rb

@@ -181,4 +181,15 @@ deploy_revision app['id'] do
     "database.yml" => "config/database.yml",
     "memcached.yml" => "config/memcached.yml"
   })
+
+  before_migrate do
+    execute "rake db:bootstrap" if app['force'][node.app_environment]
+    if app['gems'].include?('bundler')
+      execute "bundle install" 
+    else
+      execute "rake gems:install"
+    end
+  end
 end
+
+execute