Sha256: 1e2dddd45374bbfcb996677786469362ca34d053eb9dd8fafbc67cb3a6380e8a

Contents?: true

Size: 1.93 KB

Versions: 4

Compression:

Stored size: 1.93 KB

Contents

# Copyright 2006-2011 by Mike Bailey. All rights reserved.
Capistrano::Configuration.instance(:must_exist).load do 

  # Bundler's Capistrano tasks update this
  # Call rake within tasks using #{rake}
  _cset :rake, 'rake'
  
  # Deprec checks here for local versions of config templates before it's own
  _cset :local_template_dir, File.join('config','templates')
  
  # Prompt user for missing values if not supplied
  _cset(:application) do
    Capistrano::CLI.ui.ask "Enter name of project(no spaces)" do |q|
      q.validate = /^[0-9a-z_]*$/
    end
  end 

  _cset(:domain) do
    Capistrano::CLI.ui.ask "Enter domain name for project" do |q|
      q.validate = /^[0-9a-z_\.]*$/
    end
  end

  _cset(:repository) do
    Capistrano::CLI.ui.ask "Enter repository URL for project" do |q|
      # q.validate = //
    end
  end

  _cset :backup_dir, '/var/backups'  

  # XXX We *probably* want these set
  # Must be set for the password prompt from git to work
  # default_run_options[:pty] = true  
  # ssh_options[:forward_agent] = true

  # SCM
  _cset :scm, "git"
  _cset :user, "deploy" 
  _cset :deploy_via, :remote_cache
  _cset :branch, "master"

  # XXX rails deploy stuff
  _cset :apps_root,    '/srv'  # parent dir for apps
  _cset(:deploy_to)    { File.join(apps_root, application) } # dir for current app
  _cset(:current_path) { File.join(deploy_to, "current") }
  _cset(:shared_path)  { File.join(deploy_to, "shared") }

  # XXX more rails deploy stuff?

  _cset :group, 'deploy'           # deployment group
  _cset(:group_src) { group }      # group ownership for src dir
  _cset :src_dir, '/usr/local/src' # 3rd party src on servers lives here
  _cset(:web_server_aliases) { domain.match(/^www/) ? [] : ["www.#{domain}"] }    

  # It can be useful to know the user running this command
  # even when USER is set to someone else. Sorry windows!
  _cset :current_user, `whoami`.chomp

  # Only used by vmbuilder_plugins
  _cset :run_method, 'sudo'

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
deprec-core-3.1.10 lib/deprec-core/defaults.rb
deprec-core-3.1.9 lib/deprec-core/defaults.rb
deprec-core-3.1.8 lib/deprec-core/defaults.rb
deprec-core-3.1.7 lib/deprec-core/defaults.rb