Replaced the rerun gem with guard-rack; added some work to support Windows better; added a way to configure the application with config.yaml

This commit is contained in:
2023-03-09 15:48:33 -05:00
parent 39ebf6a535
commit 46e4e5c079
8 changed files with 49 additions and 11 deletions

View File

@ -2,8 +2,14 @@ require 'yaml'
class Config
DEFAULT_CONFIG = 'data/defaults.yaml'
def initialize(config_path)
@data = YAML::load_file(config_path)
@data = YAML::load_file(DEFAULT_CONFIG)
if File.exists?(config_path)
@data.merge!(YAML::load_file(config_path))
end
end
def get(key, depth = 0)