lib/simple_provision/configuration.rb in simple_provision-0.99.10 vs lib/simple_provision/configuration.rb in simple_provision-0.99.11
- old
+ new
@@ -16,21 +16,25 @@
private
def default_options
begin
- YAML.load(File.read(server_file))
+ YAML.load(ERB.new(File.read(default_file)).result)
rescue Errno::ENOENT
{}
end
end
def server_options
begin
- YAML.load(File.read(server_file))
+ YAML.load(ERB.new(File.read(server_file)).result)
rescue Errno::ENOENT
- raise MissingServerConfiguration, "Please create a configuration file './#{server_file}'"
+ raise MissingServerConfiguration, "Please create a configuration file at '#{server_file}'"
end
+ end
+
+ def default_file
+ "provision/servers/default.yml"
end
def server_file
"provision/servers/#{profile}.yml"
end