lib/dru/config.rb in dru-0.6.0 vs lib/dru/config.rb in dru-1.0.0

- old
+ new

@@ -6,14 +6,15 @@ module Dru class Config extend Forwardable include Singleton - def_delegators :configs, :docker_projects_folder + def_delegators :configs, :docker_projects_folder, :alias DEFAULT = { - 'docker_projects_folder' => "~/.dru" + 'docker_projects_folder' => "~/.dru", + 'alias' => {} }.freeze attr_reader :config_file_path def config_file_path=(config_file_path) @@ -27,9 +28,10 @@ @configs ||= JSON.parse(DEFAULT.merge(user_configs).to_json, object_class: OpenStruct) end def user_configs return {} unless config_file_path && File.file?(config_file_path) + YAML.load_file(config_file_path) || {} end end end