Module: CapistranoDeploy
- Defined in:
- lib/capistrano-deploy.rb,
lib/capistrano-deploy/git.rb,
lib/capistrano-deploy/rvm.rb,
lib/capistrano-deploy/rails.rb,
lib/capistrano-deploy/bundle.rb,
lib/capistrano-deploy/unicorn.rb,
lib/capistrano-deploy/whenever.rb,
lib/capistrano-deploy/passenger.rb,
lib/capistrano-deploy/multistage.rb,
lib/capistrano-deploy/rails_assets.rb
Defined Under Namespace
Modules: Bundle, Git, Multistage, Passenger, Rails, RailsAssets, Rvm, Unicorn, Whenever
Constant Summary collapse
- Bundler =
CapistranoDeploy::Bundle
Class Method Summary collapse
Class Method Details
.load_into(configuration) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/capistrano-deploy.rb', line 4 def self.load_into(configuration) configuration.load do @used_recipes = [] class << self attr_reader :used_recipes end def use_recipe(recipe_name) return if @used_recipes.include?(recipe_name.to_sym) begin require "capistrano-deploy/#{recipe_name}" recipe = CapistranoDeploy.const_get(recipe_name.to_s.capitalize.gsub(/_(\w)/) { $1.upcase }) recipe.load_into(self) @used_recipes << recipe.to_s.split('::').last.downcase.to_sym rescue LoadError abort "Are you misspelled `#{recipe_name}` recipe name?" end end def use_recipes(*recipes) recipes.each do |recipe| use_recipe(recipe) end end def using_recipe?(recipe) used_recipes.include?(recipe.to_sym) end namespace :deploy do desc 'Run deploy' task :default do update restart end task :update do # nothing end task :restart do # nothing end end end end |