ruby-exercises icon indicating copy to clipboard operation
ruby-exercises copied to clipboard

Add an exercise generator to bootstrap directory structure for new exercises

Open JoshDevHub opened this issue 1 year ago • 0 comments

Because

I'm working on a series of new exercises in this repo, and due to the number of files and folders, there's an inconvenient amount of work for getting a new exercise setup. This will save me a lot of time while building the new exercises.

Partially inspired by the javascript-exercises repo, which has a generator script of its own for the same purposes.

This PR

  • Creates a new ExerciseGenerator class with tests. This class's #generate method will create the directory structure and boilerplate files for a new exercise.
  • Adds a script at bin/generate_exercise, which forwards command line args to ExerciseGenerator#generate. This makes running the generator more ergonomic.
  • Updates the README to include documentation for how to use the generator script. (This could potentially be moved to a local CONTRIBUTING.md for this repo?)

Issue

Closes #XXXXX

Additional Information

Pull Request Requirements

  • [x] I have thoroughly read and understand The Odin Project Contributing Guide
  • [x] The title of this PR follows the location of change: brief description of change format, e.g. Data types exercise: Update spec files
  • [x] The Because section summarizes the reason for this PR
  • [x] The This PR section has a bullet point list describing the changes in this PR
  • [ ] If this PR addresses an open issue, it is linked in the Issue section
  • [ ] If this PR includes changes that needs to be updated on the solutions branch, I have created another PR (and linked it to this PR).

JoshDevHub avatar Nov 19 '24 21:11 JoshDevHub