You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm going to change this ticket's goals. This will not be a new command. The app will be modified to create a new 'default' configuration file when one does not already exist.
I'm going to change TTY::Config to only look in the user's home directory. But... and this is the second change, I'm going to add a global option/flag/argument that allows a user to specify a different configuration file.
If I can't get TTY::Config to place nicely with those requirements I will kick it to the curb.
I believe, though, the path forward is to make Hammerhead.configuration receive its configuration object rather than build one. This way, I can inject the configuration into the tool.
I just made Hammerhead::Configuration.config settable. And I think the reason I want something injectable is because I hope to be able to support command-line, ENV, and configuration file settings. I think I'll need a unified configuration object that is injected into Hammerhead::Configuration.
I'm vacillating between simple and complex - I might opt for simple and only go to complex when needed - which I don't need right now.
The tty-config can read and write configuration in many formts including handling of env variables. It stores everything in a deeply nested hash. So, for example, you can read arbitrarily complex configuration options from users. Let's say you can config add command that takes the setting and value:
hammerhead config add a.b.c 1
Then you can invoke set on the tty-config instance:
config.set("a.b.c",value: "1")
Which will result in the following configuration hash:
This command serves two purposes:
Secondarily, and this might go in a separate ticket/milestone, add sub-commands to add/edit a config file.
I will need to document the order in which configuration items are processed.
The text was updated successfully, but these errors were encountered: