Pārlūkot izejas kodu

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 14 gadi atpakaļ
vecāks
revīzija
bfbd2c601f
1 mainītis faili ar 11 papildinājumiem un 0 dzēšanām
  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