lib/snapshot_archive/cfg.rb in snapshot_archive-0.7.0 vs lib/snapshot_archive/cfg.rb in snapshot_archive-0.8.0
- old
+ new
@@ -38,10 +38,11 @@
end
[
:bind_backup,
:load,
+ :resolve_alias,
:parse_store,
:pwd,
:repository,
:shell,
:store,
@@ -61,9 +62,17 @@
def load(path = ".config/snapshot_archive.rb")
config_path = File.join(ENV["HOME"], path)
require("snapshot_archive/default_configuration")
Kernel.load(config_path) if File.exist?(config_path)
+ end
+
+ def resolve_alias(name)
+ if store_registry[name].is_a?(Array)
+ store_registry[name]
+ else
+ name
+ end
end
def register_store(name, klass_or_alias=nil, active_by_default: true, &block)
store = (
if klass_or_alias.is_a?(String)