This directory contains the source code of a basic Ruby on Rails application, designed as an HTTP API for this technical test.
Make sure you have Ruby installed on your environment. We advise you to use a Version manager as RVM. The ruby version this project uses is specified in the .ruby_version file.
Then install Ruby on Rails by running the command:
gem install rails
Install the dependencies by running the following command on the /api
directory:
bundle install
Then create the database, apply migrations and seed the database as follows:
rails db:create
rails db:migrate
rails db:seed
You can now run the API (it will default to the port 8888
)
rails s
We have created a simple CI that run tests and runs a linter to check the code quality and functionality.
# Without autocorrect
bundle exec rubocop
# With autocorrect
bundle exec rubocop -a
bundle exec rspec