Class: Capistrano::Cowboy

Inherits:
Object
  • Object
show all
Defined in:
lib/capistrano/cowboy.rb

Class Method Summary collapse

Class Method Details

.load_into(configuration) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/capistrano/cowboy.rb', line 5

def self.load_into(configuration)
  configuration.load do
    namespace :cowboy do
      task :configure do
        deploy_stage = fetch(:stage, 'none')
        set :repository, "."
        set :deploy_via, :copy
        set :scm, :none
        set :stage, deploy_stage
        set :cowboy_deploy, true
        set :copy_exclude, [".git/*", ".svn/*", "log/*", "vendor/bundle/*"]
      end
      desc 'Deploy without SCM'
      task :default do
        before 'deploy:update_code', 'cowboy:configure'

        # workaround to ensure cowboy comes into play before gitflow
        before 'gitflow:calculate_tag', 'cowboy:configure'
      end
    end
  end
end