Sha256: 5c9314004fda2b7ad46f50c1caf4d8db31a5b121c5916445a2d2daeabd969122
Contents?: true
Size: 1.07 KB
Versions: 1
Compression:
Stored size: 1.07 KB
Contents
require 'capistrano/multiconfig/dsl' include Capistrano::DSL include Capistrano::Multiconfig::DSL stages.each do |stage| Rake::Task.define_task(stage) do # Set stage variable set(:stage, stage) # Load defaults variables load "capistrano/defaults.rb" # Load stage configuration(s). # # For stage 'production' will be loaded next configurations: # # * config/deploy.rb # * config/deploy/production.rb # # For stage 'soa:blog:production' will be loaded next configurations: # # * config/deploy.rb # * config/deploy/soa.rb # * config/deploy/soa/blog.rb # * config/deploy/soa/blog/production.rb stage.split(':').inject([stages_root]) do |paths, segment| paths << File.join(paths.last, segment) end.each do |path| file = "#{path}.rb" load(file) if File.exists?(file) end # Load SCM tasks load "capistrano/#{fetch(:scm)}.rb" # Set locale I18n.locale = fetch(:locale, :en) # configure core backend configure_backend end.add_description("Load #{stage} configuration") end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
capistrano-multiconfig-3.0.3 | lib/capistrano/multiconfig.rb |