https://github.com/al3rez/hometime
hometime - Ruby on Rails Engineer Skill Assessment
https://github.com/al3rez/hometime
Last synced: 9 months ago
JSON representation
hometime - Ruby on Rails Engineer Skill Assessment
- Host: GitHub
- URL: https://github.com/al3rez/hometime
- Owner: al3rez
- Created: 2021-09-20T16:30:30.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-09-20T16:38:30.000Z (over 4 years ago)
- Last Synced: 2025-02-23T20:37:24.508Z (over 1 year ago)
- Language: Ruby
- Size: 32.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hometime
### Running the application
To run this project simply you need to have Docker installed.
> https://docs.docker.com/get-docker/
```sh
cd hometime
docker compose up
```
Wait for a few seconds until Docker instances become `healthy`, you can run the migrations.
> NOTE: You can check if Docker instances are running healthy by executing `docker-compose ps`
```sh
docker compose run web rails db:create db:migrate RAILS_ENV=development
```
> NOTE: You can run this using `docker-compose` but the latest version of
> Docker has added `docker compose` but if you find it unstable you can install
> `docker-compose`.
>```sh
>cd hometime
>docker-compose up
>docker-compose run web rails db:create db:migrate RAILS_ENV=development
>```
### Running the tests
You need to run the migrations for test environment using the command below:
```sh
docker compose run web rails db:create db:migrate RAILS_ENV=development
```
Then you can run `RSpec` tests using the command below:
```sh
docker compose run web rspec --format doc
```
### Things that can be done
- [ ] Use a serializer gem to prettify the response of `ReservationsController#create`
- [ ] Add static typing / schema validations inside each mapper to avoid bad data
- [ ] Deploy the application on Heroku