Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Exercism plugin #404

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

dethancosta
Copy link
Contributor

Overview

Adds a plugin for the Exercism CLI. A config file at ~/.config/exercism/user.json is provisioned/imported. This file contains a URL to the Exercism API, an API key, and a directory in which the user's Exercism workspace is located.

Type of change

  • Created a new plugin
  • Improved an existing plugin
  • Fixed a bug in an existing plugin
  • Improved contributor utilities or experience

Related Issue(s)

How To Test

Run any exercism command other than help or version.
E.g., exercism download --track=cpp --exercise=armstrong-numbers

Changelog

The user can now use the Exercism plugin to authenticate to the Exercism CLI.

Copy link
Member

@hculea hculea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! I've left a few questions

},
DefaultProvisioner: provision.TempFile(
tempFileConfig,
provision.AtFixedPath("~/.config/exercism/user.json"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For many tools, the equivalent of ~/.config from Linux on MacOS is ~/Library/Application Support.

Is this the case here too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually had to find the config file on my Mac since the documentation doesn't give the location, so it is indeed ~/.config for MacOS.

Name: "Exercism CLI",
Runs: []string{"exercism"},
DocsURL: sdk.URL("https://exercism.org/docs/using/solving-exercises/working-locally"),
NeedsAuth: needsauth.IfAll(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there may be some other situations as well when we don't want to prompt, for example for a command such as exercism configure --token=<your-api-token>.

Is --token a flag available for all the commands? In that case, we may want to exclude this flag from prompting altogether.

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.

New plugin: Exercism
2 participants