Skip to content

Allow setting additional configuration options.#111

Merged
kytrinyx merged 1 commit intoexercism:masterfrom
jish:allow_additional_config
Sep 24, 2014
Merged

Allow setting additional configuration options.#111
kytrinyx merged 1 commit intoexercism:masterfrom
jish:allow_additional_config

Conversation

@jish
Copy link
Contributor

@jish jish commented Sep 24, 2014

Currently when you set one configuration option, it blows away previously set configuration options.

If we set a custom directory, then the value is set.

$ exercism configure --dir="~/code/exercism"
The configuration has been written to /Users/josh/.exercism.json
Your exercism directory can be found at /Users/josh/code/exercism

$ cat ~/.exercism.json
{"apiKey":"","exercismDirectory":"/Users/josh/code/exercism","hostname":"http://exercism.io"}

However, when we set a key, the custom directory is blown away

$ exercism configure --key="abc123"
The configuration has been written to /Users/josh/.exercism.json
Your exercism directory can be found at /Users/josh/exercism

$ cat ~/.exercism.json
{"apiKey":"abc123","exercismDirectory":"/Users/josh/exercism","hostname":"http://exercism.io"}

Currently when you set one configuration option, it blows away
previously set configuration options.

If we set a custom directory, then the value is set.

    $ exercism configure --dir="~/code/exercism"
    The configuration has been written to /Users/josh/.exercism.json
    Your exercism directory can be found at /Users/josh/code/exercism

    $ cat ~/.exercism.json
    {"apiKey":"","exercismDirectory":"/Users/josh/code/exercism","hostname":"http://exercism.io"}

However, when we set a key, the custom directory is blown away

    $ exercism configure --key="abc123"
    The configuration has been written to /Users/josh/.exercism.json
    Your exercism directory can be found at /Users/josh/exercism

    $ cat ~/.exercism.json
    {"apiKey":"abc123","exercismDirectory":"/Users/josh/exercism","hostname":"http://exercism.io"}
@kytrinyx
Copy link
Member

Thanks for the contribution! I don't see that the new AddValues method is being called. Is this a work in progress, or would you like me to pull this in and then change the handler to use it?

@kytrinyx
Copy link
Member

Actually, I have a few moments to finish this, I'm pulling it in. Thanks ❤️

kytrinyx added a commit that referenced this pull request Sep 24, 2014
Allow setting additional configuration options.
@kytrinyx kytrinyx merged commit c671573 into exercism:master Sep 24, 2014
@jish
Copy link
Contributor Author

jish commented Sep 24, 2014

Yea, I submitted it before I actually used the AddValues method :x I realized that this morning, thanks for cleaning it up! :)

lcowell pushed a commit to lcowell/cli that referenced this pull request Jan 25, 2015
Allow setting additional configuration options.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants