A few days ago Jamis released Capistrano 2.0.
I just wanted to write down some things I ran into — maybe someone finds it useful. This article will not be a complete “what is new in cap 2” article.
:svn_username is now :scm_username:svn_password is now :scm_passwordThey now are the same for each version control system.
A feature I find really helpful. E.g if you don’t want to store a password in the configuration file.
set :scm_password do
Capistrano::CLI.password_prompt
end
To hook into an existing task you now have to specify a the whole taskname including the namespace. E.g.:
after "deploy:update_code", :link_in_configfiles where deploy is the namespace and update_code the task name.
To see a full list of tasks and its namespaces run cap -T.
The new namespaces also effects how to overwrite a task. E.g. to overwrite the old :restart task, you now have to write it like that (the restart task also is in the deploy namespace):
deploy.task :restart do
# restart your servers here
end
I think most other things are documented or mentioned here:
Also, because Capistrano won’t win a price for the best documentation, often a look at the source code can be helpful. It’s clean and easy to understand.
Man you don’t even know how long I’ve waited for this since disabling my own Movable Type widget (that doesn’t work since Haloscan bypasses that code).
THANK YOU!
well, that’s really very usefull… Thanks a lot!