Requirements
- Use PostgreSQL
- Use Devise
- Use RSpec for testing (unit testing)
- Use FactoryBot and Faker
- Must be multilanguage. (spanish and english).
- All error messages should be also translated
Work To Do
- Create an authentication mechanism, with Bearer access token (JWT) with devise support
- Create the necessary models for a user and group based to-do list app
- Create the necessary API endpoints to manage the to-do lists and share items with your group or other users
- The endpoints must support the selection via params of the attributes to be returned (eg. Only name and ID, instead of name, id, description, due_date, etc...)
The work must be completed on 3 days max. And include all test based on rspec
- Ruby 2.6.0
- Rails 5.2.4
- PosgreSql 9.*
- TDD Rspec
- Clonar repositorio
- Realizar configuracion Base de Datos
config/database.yml
- Instalar dependencias
bundle install
- Correr migraciones
rails db:migrate
- Correr pruebas Rspec
bundle exec rspec
- Resultado pruebas
Finished in 1.87 seconds (files took 4.21 seconds to load)
29 examples, 0 failures
- Inicializar Rails
rails s
POST localhost:3000/groups
{
"name": "Grupo 2"
}
POST localhost:3000/signup
{
"user": {
"email": "[email protected]",
"password": "123456",
"group_id": 1
}
}
POST localhost:3000/tasks
{
"name": "Tarea 1",
"description": "Finalizar Tarea",
"user_id": 1,
"type_share_item": 2
}
GET localhost:3000/tasks
{}
GET localhost:3000/groups
{}
GET localhost:3000/task_list_by_group
{
"group_id": 1
}
GET localhost:3000/task_list_by_user
{
"user_id": 1
}}