Skip to content

Commit

Permalink
Parse ERB in the config file.
Browse files Browse the repository at this point in the history
  • Loading branch information
msp authored and mojodna committed Nov 15, 2008
1 parent 68aa68a commit ffe533b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/starling/server_runner.rb
@@ -1,4 +1,6 @@
require File.join(File.dirname(__FILE__), 'server')
require 'erb'
require 'fileutils'
require 'optparse'
require 'yaml'

Expand Down Expand Up @@ -34,7 +36,7 @@ def initialize
end

def load_config_file(filename)
config = YAML.load(File.open(filename))
config = YAML.load(ERB.new(File.read(filename)).result)

unless config.is_a?(Hash)
STDERR.puts "Config file does not contain a hash: #{filename}, exiting."
Expand Down

0 comments on commit ffe533b

Please sign in to comment.