bmuller/configulator — pull request #1 by grisha (2014-11-07 02:35:37+00:00)
Title: A variation in which Yaml and JSON objects are first-class values which ...

...preserve their type, not just strings. I think this syntax is also a little easier on the eyes than the ERB - all you need to do is to start the value with an equal sign: "=".
```
mysql_host: 127.0.0.1
mysql_ports: [ 1001, 1002, 1003, 1004, 1005 ]
first_two_ports: = mysql_ports[0...2]
random_port: = mysql_ports.sample
db_host: = "#{mysql_host}"
db_port: = random_port
as_url: = "mysql://#{db_host}:#{random_port}/"
current_time: = Time.now
# note that interpolation below is tricky becase a blank preceeding a hash #{is a Yaml comment}
comment: = "At " + Time.now.to_s + " port " + random_port.to_s + "was chosen"
vendor:
name: Some Company
email: info@example.com
contact: = vendor["email"]
```