Sha256: 89aabb1c07b2d2466408933da765aaae552890879895be8eb66d9944acfb5c48
Contents?: true
Size: 907 Bytes
Versions: 2
Compression:
Stored size: 907 Bytes
Contents
module Capistrano module Env module Plugin def use config = Capistrano::Env::Config.new yield(config) add config set :default_environment, config.envs config end def add(config) namespace :deploy do namespace :capenv do namespace :copy do [:release, :current].each do |type| task type do path = fetch "#{type}_path".to_sym parent.parent.parent.upload StringIO.new(config.capenv_content), "#{path}/#{config.capenv_file}" end end end end end after 'deploy:finalize_update', 'deploy:capenv:copy:release' before 'deploy:restart', 'deploy:capenv:copy:current' end end end end Capistrano.plugin :capenv, Capistrano::Env::Plugin if Capistrano.respond_to?(:plugin)
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
capistrano-env-0.2.0 | lib/capistrano/env/plugin.rb |
capistrano-env-0.1.2 | lib/capistrano/env/plugin.rb |