danielherrerohernando / ohce-kata

Carlos Jiménez @betisman & Daniel Herrero - Award Winning Solution for GuideSmiths 2019 Christmas Challenge
3 stars 0 forks source link

ohce-cli-app

Our solution for GuideSmiths 2019 Christmas Challenge - ohce-kata.

Usage

Just install the app globally npm i ohce-cli-app -g in your machine and the ohce command will be available. (the app-package is available in NPM)

Example:

ohce Felipe will launch the app.

ohce Glenn --language=en will launch the app in English.

ohce Peter -l hu will launch the app in Hungarian.

Solution criteria:

Besides that, our cli-app, obviously, meets all the requirements that were specified in the original kata-specs.

But we have gone further and implemented a few more features that make our ohce app cooler.

We have set a CI pipeline to run our test suite and publishing test results as an artifact with GitHub actions and a CD pipeline too for automating the app-package publishing to NPM (https://www.npmjs.com/package/ohce-cli-app) triggered by each new release. Furthermore, the CD pipeline generates the executable files for Linux, Mac and Windows and save them as artifacts attached to each release.

A Kanban board has been our tool to manage project issues, milestones and PRs. Each commit is related to at least one issue by its id#.

We hope you like it,

Lots of love ❤️, Carlos & Daniel

kata-requirements

ohce is a console application that echoes the reverse of what you input through the console.

Even though it seems a silly application, ohce knows a thing or two.

  1. When you start oche, it greets you differently depending on the current time, but only in Spanish:
    • Between 20 and 6 hours, ohce will greet you saying: ¡Buenas noches < your name >!
    • Between 6 and 12 hours, ohce will greet you saying: ¡Buenos días < your name >!
    • Between 12 and 20 hours, ohce will greet you saying: ¡Buenas tardes < your name >!
  2. When you introduce a palindrome, ohce likes it and after reverse-echoing it, it adds ¡Bonita palabra!
  3. ohce knows when to stop, you just have to write Stop! and it'll answer Adios < your name > and end.

This is an example of using ohce during the morning:

$ ohce Pedro
> ¡Buenos días Pedro!
$ hola
> aloh
$ oto
> oto
> ¡Bonita palabra!
$ stop
> pots
$ Stop!
> Adios Pedro