Sha256: 7716de249616a1f420943db1bdedb644092d3a47a1a4ab0608c6645fde808591

Contents?: true

Size: 712 Bytes

Versions: 44

Compression:

Stored size: 712 Bytes

Contents

module CapistranoDeployManagement
  module Rails
    def self.load_into(configuration)
      configuration.load do
        set :rake do
          if using_recipe?(:bundle)
            'bundle exec rake'
          else
            'rake'
          end
        end

        set(:rails_env) { 'production' }

        namespace :deploy do
          desc 'Deploy & migrate'
          task :migrations do
            update
            migrate
            restart
          end

          desc 'Run migrations'
          task :migrate, :roles => :db, :only => {:primary => true} do
            run "cd #{current_path} && RAILS_ENV=#{rails_env} #{rake} db:migrate"
          end
        end

      end
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
capistrano-deploy-management-0.1.46 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.45 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.44 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.43 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.42 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.41 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.40 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.39 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.38 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.37 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.36 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.35 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.34 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.33 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.32 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.31 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.30 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.29 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.28 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.25 lib/capistrano-deploy-management/rails.rb