Module: YouthTree::Capistrano

Defined in:
lib/youth_tree/capistrano.rb

Constant Summary collapse

VERSION =
"0.3.1".freeze

Class Method Summary collapse

Class Method Details

.load(&blk) ⇒ Object



5
6
7
# File 'lib/youth_tree/capistrano.rb', line 5

def self.load(&blk)
  ::Capistrano::Configuration.instance(:must_exist).load(&blk)
end

.load_all!Object



17
18
19
20
21
22
# File 'lib/youth_tree/capistrano.rb', line 17

def self.load_all!
  require 'youth_tree/capistrano/git_submodule_fix'
  load_recipe! %w(base rvm git bundler settings db unicorn compass barista jammit uploads syncing)
  load { load 'deploy' }
  load_recipe! 'deploy_hooks'
end

.load_named(name, &blk) ⇒ Object



13
14
15
# File 'lib/youth_tree/capistrano.rb', line 13

def self.load_named(name, &blk)
  load { load(&blk) unless disabled?(name) }
end

.load_recipe!(*names) ⇒ Object



9
10
11
# File 'lib/youth_tree/capistrano.rb', line 9

def self.load_recipe!(*names)
  names.flatten.each { |name| require "youth_tree/recipes/#{name}" }
end