Archive for the ‘Settings’ Category

.caprc (the capistrano dotfile)

Monday, March 24th, 2008

As of revision 5774, capistrano  has a  default  dotfile.

Here’s how dotfiles work in edge capistrano:

* The dotfile, by default, is called “.caprc” and will be searched
for in your home directory. On Unices, this is the ENV["HOME"]
variable. On windows, it is “#{ENV["HOMEDRIVE"]}#{ENV["HOMEPATH"]}”.
The environment is searched in that order (so if you have HOME set on
Windows, it will be used), and if none is found the root directory is
used.

* You can override the path to the config file via the -c switch:
“cap -c /path/to/.customrc …”

* You can specify that you don’t want to use the config file at all
via the -x switch: “cap -x …”

* The file will be loaded immediately after the “-S” options are
processed. Thus, variables you set via -S will be available to
the .caprc stuff.

The major difference between the patch you submitted and the way I
implemented it is that the .caprc will always be loaded, whether or
not other recipe files are specified. (As I mentioned above, you can
skip the config loading with -x.)

[From Jamis buck on the mailing list ]

What is default_run_options[:pty] ??

Monday, March 24th, 2008

This setting specifies the value for pseudo terminals in Capistrano, the default value is false

As of version 2.1, Capistrano no longer requests that a pty be
allocated for each command. This means that your default profile
settings will be loaded automatically for every command.

You can override the default setting for an individual command by adding :pty => true.

For more information on ssh and shells including Pseudos terminals:  http://net-ssh.rubyforge.org/chapter-5.html

More on Pseudo terminals in general : http://en.wikipedia.org/wiki/Pseudo_terminal