Sha256: 331d09ee1da4e23b8f899eda42311bbded490500be9f73df5e1af8749bf37888

Contents?: true

Size: 1.71 KB

Versions: 2

Compression:

Stored size: 1.71 KB

Contents

require 'deprec-core'
Capistrano::Configuration.instance(:must_exist).load do 
  namespace :deprec do
    namespace :rack do

      set :rack_env, 'production'

      desc "Install Rack stack on Ubuntu server (8.04, 10.04)"
      task :install_stack do   
        top.deprec.git.install
        # top.deprec.ruby.install       # Uses ruby_vm_type
        top.deprec.mri.install       # Uses ruby_vm_type
        gem2.install 'bundler'
        install_rails_deps
        # XXX temporary fix
        # top.deprec.web.install        # Uses web_server_type 
        # top.deprec.app.install        # Uses app_server_type
        top.deprec.apache.install        
        top.deprec.passenger.install        
        top.deprec.logrotate.install  
      end

      task :install_rails_deps, :roles => :app do
        apt.install( { :base => %w(libmysqlclient15-dev sqlite3 libsqlite3-ruby libsqlite3-dev libpq-dev) }, :stable)
      end
      
      desc "Generate config files for rack app."
      task :config_gen do
        # XXX temporary fix
        # top.deprec.web.config_gen_project
        # top.deprec.app.config_gen_project
        top.deprec.apache.config_gen_project
        top.deprec.passenger.config_gen_project
      end

      desc "Push out config files for rack app."
      task :config do
        # XXX temporary fix
        # top.deprec.web.config_project
        # top.deprec.app.config_project
        top.deprec.apache.config_project
        top.deprec.passenger.config_project
      end

      desc "Install debs listed in :packages_for_project"
      task :install_packages, :roles => :app do
        if packages_for_project
          apt.install({ :base => packages_for_project }, :stable)
        end
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
deprec-3.1.0.rc16 lib/deprec/recipes/rack.rb
deprec-3.1.0.rc15 lib/deprec/recipes/rack.rb