Skip to content

Instantly share code, notes, and snippets.

@mxriverlynn
Created November 8, 2009 02:38
Show Gist options
  • Save mxriverlynn/229057 to your computer and use it in GitHub Desktop.
Save mxriverlynn/229057 to your computer and use it in GitHub Desktop.
an example of expanding templates for deployment, with Albacore
require 'albacore'
Albacore::ExpandTemplatesTask.new(:templates) do |templates|
templates.expand_files = {"./templates/web.config.template" => "./www/web.config"}
templates.data_file = "./templates/data/web.config.yml"
end
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="some app setting goes here" value="#{some_setting}" />
</appSettings>
<connectionStrings>
<add name="mydatabase" connectionString="#{connection_string}"/>
</connectionStrings>
</configuration>
some_setting: some value goes here
connection_string: server='some server'; database='some database'; user='some user'; password='its a secret!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment