Skip to content

Instantly share code, notes, and snippets.

@turastory
Last active February 9, 2021 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save turastory/8cd4e8976582b77356ef6d7e2f3fc924 to your computer and use it in GitHub Desktop.
Save turastory/8cd4e8976582b77356ef6d7e2f3fc924 to your computer and use it in GitHub Desktop.
Jamquery specification

Spec

Jamquery is a simple application for purpose of learning new languages.

  1. jam - User can type any keyword, along with the message to store the message with the keyword as a key.
    $ jam GitHub "The largest hub for storing Git repositories"
    A new jam 'GitHub' successfully added.
  2. query - User can search existing jams and find that matches the keywords.
    $ query GitHub
    > An existing jam 'GitHub' found:
    > "The largest hub for storing Git repositories"
    $ query Apple
    > Jam with the key 'Apple' not found.
  3. mutate - User can change the content of existing jam.
    $ jam GitHub "Boom"
    The existing jam 'GitHub' successfully updated.

Extra challenges

  1. serve - User can use HTTP requests to use jamquery. POST /jam - for add and mutate GET /jam?query= - for 'query'
  2. export - User can get the full list of jams with desired format. (txt, csv, json)
    $ export json
    > {"GitHub":"Boom"}
    $ export csv
    > GitHub,Boom
  3. All these specs should be tested using unit test. Use any kind of unit test framework to test the program.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment