pulled Node config params and Shape config params into a textfile, and now using token replacement to auto fill Node and Shape config params throughout the code base. In this way, if I need to make changes to the Node or Shape configs, those changes are propagated to all of the other constructors

This commit is contained in:
Eric Rowell
2013-01-26 20:42:19 -08:00
parent 6a73f4dcfb
commit b1038e99bf
25 changed files with 98 additions and 993 deletions

View File

@@ -143,11 +143,10 @@ class Build < Thor
def replace_tokens(content, version)
date = Time.now.strftime("%b %d %Y")
# Add the version number
content.gsub!("@version", version)
# Add the date
content.sub!("@date", date)
content.gsub!("{{version}}", version)
content.sub!("{{date}}", date)
content.gsub!("{{NodeParams}}", IO.read("configParams/NodeParams.txt"))
content.gsub!("{{ShapeParams}}", IO.read("configParams/ShapeParams.txt"))
return content
end