lib/wrapbox/config_repository.rb in wrapbox-0.9.0 vs lib/wrapbox/config_repository.rb in wrapbox-0.10.0

- old
+ new

@@ -6,10 +6,15 @@ def initialize @configs = {} end def load_yaml(yaml_file) - configs = YAML.load(ERB.new(File.read(yaml_file)).result) + file = ERB.new(File.read(yaml_file)).result + configs = if Gem::Version.new(Psych::VERSION) >= Gem::Version.new("4.0.0") + YAML.load(file, aliases: true) + else + YAML.load(file) + end configs.each do |name, configuration| load_config(name, configuration.merge("name" => name)) end end