This is a base ruby hanami development environment.
- 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 😊
- Ruby: Ruby documentation
- Hanami::Controller: Hanami::Controller
- Hanami::Router: Hanami::Router
- Hanami::Utils: Hanami::Utils
- Swagger blocks: Swagger blocks
- Alba: Alba documentation
- Mongoid: Mongoid documentation
- Puma web server: Puma
- Docker Desktop (Docker, Docker Compose)
- 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
<from project root>
cp .env.example .env
<from project root>
docker compose build
<from project root>
docker compose up
- Kill the command/terminal
- Or stop the container
<from project root>
docker compose down
<from project root>
COVERAGE=true bundle exec rake
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 |
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