소스 검색

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 년 전
부모
커밋
bfbd2c601f
1개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  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