lib/larva/configurator.rb in larva-1.1.3 vs lib/larva/configurator.rb in larva-1.2.0
- old
+ new
@@ -1,5 +1,7 @@
+require 'erb'
+
module Larva
class Configurator
def self.configure(options = {})
c = new(options)
@@ -35,10 +37,10 @@
after_configure if respond_to?(:after_configure)
end
private
def parse_config_file(filename)
- contents = File.read("#{@config_dir}/#{filename}")
+ contents = ERB.new(File.read(File.join(@config_dir, filename))).result
hash = YAML::load(contents)
hash.stringify_keys[@env].symbolize_keys
rescue
nil
end