Skip to content

Latest commit

 

History

History
96 lines (66 loc) · 2.68 KB

README.md

File metadata and controls

96 lines (66 loc) · 2.68 KB

Base Service

Overview

This is a base ruby hanami development environment.

Keeping the project up to date

  • This project uses a changelog, include your change description in the changelog.md with your commits
  • If you find something in this readme.md to be out of date, please kindly update it 😊

This project uses

Project setup

Requirements

  • Docker Desktop (Docker, Docker Compose)

Docker setup

  • The provided Dockerfile installs only the requirements needed for the app to run
  • The compose.yml file mounts the root project as a volume so its contents and any changes are accessible immediately in the container for in-container development
  • The compose.yml file overrides the Dockerfile command to reload the server when changes are detected in app

Setup config environment variables

<from project root>
cp .env.example .env

Build container

<from project root>
docker compose build

Run container

<from project root>
docker compose up

How to stop container

  • Kill the command/terminal
  • Or stop the container
<from project root>
docker compose down

Run tests

<from project root>
COVERAGE=true bundle exec rake

Tests folder structure

Folder Test type
spec/base/ Unit tests for app folder. Tests folder structure should follow app folder.
spec/lib/ Unit tests for lib folder. Tests folder structure should follow lib folder.
spec/request/ Request tests
spec/system/ System tests

Running the app

With the container running, the app should now be reachable

Building swagger docs

We need to have SwaggerBlocks for each action in addition to the action class. Same is required for models. Also we need to add all SwaggerBlocks in SWAGGERED_CLASSES in apidocs index action. For more info check Swagger blocks