During my last code reading of Capistrano, I traced the deploy recipe to find out what other recipes it uses. Since overriding and hooking into these recipes are used when you customize your application deploy, I wanted to document them here so I can find it again. deploy |-- deploy:update |---- deploy:update_code |------ Code update …
Category: Articles
Refactoring Rails Product
I’m building a compilation of my daily refactorings into a new product. It will include additional content that isn’t available here but I wanted to get some ideas about what you’d like to see added. If you answer the short survey below, I’ll give you a free copy of the product when it’s ready. I’ll …
Daily Code Reading #19 – Capistrano recipes – deploy setup
Today I’m reading through Capistrano‘s deploy:setup recipe. This recipe is used to setup a new server for deployment by creating the directories Capistrano uses and checking permissions. The Code 1 2 3 4 5 6 7 namespace :deploy do desc < { :no_release => true } do dirs = [deploy_to, releases_path, shared_path] dirs += …
Capistrano Variables
Capistrano Variables While reading through Capistrano’s code I’ve come across many the variables used to configure deploy.rb. So I don’t forget them when I need them, I’ll document them here: application – required repository – required scm – defaults to :subversion deploy_via – defaults to :checkout revision – defaults to the latest head version rails_env …
Daily Code Reading #18 – Capistrano recipes – invoke
Continuing from my tour of Capistrano‘s internals, I’m going to start looking through Capistrano‘s recipes now. A recipe for Capistrano is a unit of work, similar to how Rake uses tasks. I’m going to start with the basic invoke recipe today. The Code 1 2 desc < method) enddesc < method) end Review invoke is …