Simple API written in Rails 6 to handle vehicles, models and brands. Ruby Version 2.7.0
git clone https://github.com/danilolic/vehicles.git
cd vehicles
bundle install
touch config/master.key && echo -e "395a8e6203ebea08e42b35be14434763" >> config/master.key
touch config/credentials/development.key && echo -e "ad5f9b1bc62da63566bc74e5736e6704" >> config/credentials/development.key
touch config/credentials/test.key && echo -e "ccc185978088b9b086dabbb4602b0247" >> config/credentials/test.key
rails db:create db:migrate db:seed
Warning: Do not share your master key if you have sensitive data.
With db:seed you can get some samples to query.
rails s
https://documenter.getpostman.com/view/6655494/T1LLDTCb
https://polar-brushlands-02894.herokuapp.com/api/brands
The api uses JWT with refresh tokens as strategy to authentication if you are not familiar see that:
https://auth0.com/blog/refresh-tokens-what-are-they-and-when-to-use-them/
The api uses nested routes to improve readability.
You can see the test coverage opening on the browser the file coverage/index.html
You can see the code quality running on the root folder:
rubycritic app/
You can see for security issue running on the root folder:
brakeman