I am using capistrano to deploy a RoR application. The codebase is in a git repository, and branching is widely used in development. Capistrano uses deploy.rb f
General answer:
If you have a setting file with a content modified from environment to environment, you should make that line as a "template" (with a string representing variable name like @BRANCH_NAME@ or @ENV_NAME@).
Then you would have a (versioned) script able to read your config file, and replace the "@BRANCH_NAME@" variable by the appropriate value needed by your deployment process.