albertobajo / next-vacation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README

Requirements

Installation

From the project folder, run bundle:

$ docker-compose run web bundle install

Build the app:

$ docker-compose build

Start the containers:

$ docker-compose up

Create and migrate the database:

$ docker-compose run web bundle exec rails db:create db:migrate

RSpec

There are model specs and request specs.

$ docker-compose run web bundle exec rspec

Guard

$ docker-compose run web bundle exec guard --clear

Program requirements

1. Load the provided activities file

There is a rake task for loading madrid.json file placed in folder lib/assets.

With Bash:

$ docker-compose run web bundle exec rake activities:load[lib/assets/madrid.json,Madrid]

With ZSH:

$ docker-compose run web bundle exec rake activities:load\[lib/assets/madrid.json,Madrid\]

2. Create an endpoint that returns all available activities

Some examples:

3. Create an endpoint to recommend what to do at a given time

Some examples:

Same day:

Multiple days:

About


Languages

Language:Ruby 98.3%Language:Dockerfile 1.1%Language:HTML 0.3%Language:Shell 0.3%