we print a warning comment at the beginning of the file letting the user know that the file is generated, and that it should not be edited directly
we prefix organization configuration so that we can have configuration scoped to the CLI
we hoist the active field out of the organization scope
Here's an example:
# Warning = 'THIS FILE IS GENERATED. DO NOT EDIT!'
active = 'org1'
[Organizations]
[Organizations.org1]
api_key = 'foobar'
[Organizations.org2]
api_key = 'abcxyz'
It's not the prettiest looking thing, but this is what the TOML library we're using generates. I don't think we can improve it without using lower-level APIs or generating the file manually.
This PR reworks the configuration file:
active
field out of the organization scopeHere's an example:
It's not the prettiest looking thing, but this is what the TOML library we're using generates. I don't think we can improve it without using lower-level APIs or generating the file manually.
This fixes https://github.com/stealthrocket/dispatch/issues/5.