This project is simple rails app that accepts gps waypoints throug API request and show the vehicles most recent location on google map.
Project is created with:
- Ruby: ruby 3.0.0p0
- Ruby on Rails: 7.0.4
- Redis server version: Redis server v=5.0.7 sha=00000000:0 malloc=jemalloc-5.2.1 bits=64 build=66bd629f924ac924
To run this project, open your terminal and go to project root and run the following commands:
bundle install
rails db:create
rails db:migrate
rails serverOpen other terminal and make sure your redis server is running to run sidekiq with the following command:
sidekiqAnd now you are ready to make the first POST request with the following format:
{
"latitude": 43.978508518956005,
"longitude": 15.383371119693324,
"sent_at": "2022-09-15 13:53:00",
"vehicle_identifier": "RVZ-076"
}
You can see the locations at "\show" endpoint in your browser
If you want to start with random data, you can run the following command:
rails db:seedThe project is currently using Rspec to run tests, and you can run them with the following command:
bundle exec rspec