lib/hx.rb in hx-0.10.0 vs lib/hx.rb in hx-0.11.0
- old
+ new
@@ -459,14 +459,19 @@
end
end
def load(io, config_path)
raw_config = YAML.load(io)
+ load_raw(raw_config, config_path)
+ end
+
+ def load_raw(raw_config, config_path)
options = {}
options[:base_dir] = File.dirname(config_path)
for key, value in raw_config.fetch('options', {})
options[key.intern] = value
end
+ options[:config_file] = config_path
if raw_config.has_key? 'require'
for library in raw_config['require']
Hx.local_require(options, library)
end