Sha256: a06bd860d7b13a8b5fc0c04621eee4d18e16e200b4a8dc50cdec359eadff7525

Contents?: true

Size: 1.54 KB

Versions: 17

Compression:

Stored size: 1.54 KB

Contents

######################################################################
#                     DEFAULT CAPABILITIES SETUP
#
# The 'capabilities:defaults' task hooks itself into the deployment
# stream by attaching an after hook to 'environment:defaults'.
#
# Prior to execution, all of the capabilities which were specified in
# the deploy.rb file are loaded and then each capability has its
# 'defaults' task called.
#
# All capability's defaults tasks are in the format:
#   capabilities:defaults:<capability_name>
#
# Defaults tasks are there simply to set standard conventional
# standards on each capability.  In almost all cases, they can
# be overridden.
#
# Defaults are also optional.  If a capability doesn't require any
# environment variables to be set, it can simply omit a defaults task.
#
######################################################################
Capistrano::Configuration.instance(:must_exist).load do
  before  'capabilities:defaults',      'load_capability_defaults'

  namespace :capabilities do
    namespace :defaults do
      desc <<-DESC
        [internal] Installs all capabilities for the given deployment type.

        Most of these values can be overridden in each application's deploy.rb file.
      DESC
      task :default do
        capabilities.defaults.send(deployment_type.to_s)

        if exists?(:capabilities)
          fetch(:capabilities).each do |capability|
            capabilities.defaults.send(capability.to_s) if capabilities.defaults.respond_to?(capability.to_sym)
          end
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
chicken_soup-0.9.0 lib/chicken_soup/capabilities/defaults.rb
chicken_soup-0.8.6 lib/chicken_soup/capabilities/defaults.rb
chicken_soup-0.8.5 lib/chicken_soup/capabilities/defaults.rb
chicken_soup-0.8.4 lib/chicken_soup/capabilities/defaults.rb
chicken_soup-0.8.3 lib/chicken_soup/capabilities/defaults.rb
chicken_soup-0.8.2 lib/chicken_soup/capabilities/defaults.rb
chicken_soup-0.8.1 lib/chicken_soup/capabilities/defaults.rb
chicken_soup-0.8.0 lib/chicken_soup/capabilities/defaults.rb
chicken_soup-0.6.1 lib/chicken_soup/capabilities/defaults.rb
chicken_soup-0.6.0 lib/chicken_soup/capabilities/defaults.rb
chicken_soup-0.5.3 lib/chicken_soup/capabilities/defaults.rb
chicken_soup-0.5.2 lib/chicken_soup/capabilities/defaults.rb
chicken_soup-0.5.0 lib/chicken_soup/capabilities/defaults.rb
chicken_soup-0.4.1 lib/chicken_soup/capabilities/defaults.rb
chicken_soup-0.4.0 lib/chicken_soup/capabilities/defaults.rb
chicken_soup-0.3.0 lib/chicken_soup/capabilities/defaults.rb
chicken_soup-0.2.0 lib/chicken_soup/capabilities/defaults.rb