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 #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 += …
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 #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 …
Daily Code Reading #17 – Capistrano control flow
I’m reading through Capistrano‘s code this week and decided to start with something different. Instead of jumping right into different methods, I’m going to review the overall flow to get an understanding of how one part works. For Capistrano, I’m going to figure out how cap deploy works. 1 2 3 4 #!/usr/bin/env ruby …