Module: DeploYML::Frameworks::Rails3
- Includes:
- Rails
- Defined in:
- lib/deployml/frameworks/rails3.rb
Overview
Provides methods for deploying Rails 3 projects.
Instance Method Summary collapse
-
#migrate(shell) ⇒ Object
Migrates the database using the
db:autoupgradeif DataMapper is being used, or the typicaldb:migratetask.
Methods included from Rails
Instance Method Details
#migrate(shell) ⇒ Object
Migrates the database using the db:autoupgrade if
DataMapper is being used, or the typical
db:migrate task.
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/deployml/frameworks/rails3.rb', line 19 def migrate(shell) case @orm when :datamapper shell.status "Running DataMapper auto-upgrades ..." shell.run 'rake', 'db:autoupgrade', "RAILS_ENV=#{@environment}" else shell.status "Running ActiveRecord migrations ..." shell.run 'rake', 'db:migrate', "RAILS_ENV=#{@environment}" end shell.status "Database migrated." end |