-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Sparta Sync command and allow for local testing (#6)
## Description This PR has two main goals: - fixing the fact that `sparta sync` overrides the repository even when the exercises already exists with the same SHA, - and allowing the use of a local instance of Sparta API. `sparta init` has now two hidden flags: `--force` (or `-f`) and `--spartaURL="url"`. Both have default values so it will not change the usage for students. `--spartaURL` is there to change the URL that the CLI will ask for the calendar (which can now be set to our `.local` instance) and will record that in the `config.json` that the CLI generates at init `--force` is a convenience option to recreate an `exercises` directory when calling `sparta init`. ## Motivation and Context We couldn't tell the previous students to use `sparta sync` even if they missed some day because it would have overwritten all their exercises. ## How Has This Been Tested? Manually locally ## Types of changes - ~Chore (non-breaking change which refactors / improves the existing code base)~ - Bug fix (non-breaking change which fixes an issue) - ~New feature (non-breaking change which adds functionality)~ - ~Breaking change (fix or feature that would cause existing functionality to change)~ ## Checklist: - ✅ : My code follows the code style of this project. - ✅ : My change requires a change to the documentation. - ✅ : I have updated the documentation accordingly. - ✅ : I have read the [**CONTRIBUTING**][CONTRIBUTING_FILE] document. - 🔴 : I have added tests to cover my changes. - ✅ : All new and existing tests passed. [CONTRIBUTING_FILE]: https://github.com/fewlinesco/guidelines/blob/master/CONTRIBUTING.adoc
- Loading branch information
Showing
9 changed files
with
62 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters