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.24 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.23 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.22 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.21 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.20 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.19 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.18 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.17 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.16 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.15 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.14 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.13 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.12 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.11 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.10 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.9 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.8 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.7 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.6 lib/capistrano-deploy-management/rails.rb
capistrano-deploy-management-0.1.5 lib/capistrano-deploy-management/rails.rb