This project repo runs on Rails 7.0.8.
This API uses two different external APIs:
- MapQuest - used for location to coordinate conversion as well as directions to calculate arrival times
- Weather API - used for current, daily (upto 5 days), hourly (24 hours), and estimated time of arrival weather information
Both APIs require user logins that will provide the API key for you through each respective User Profile.
-
Use the following command:
EDITOR="code --wait" rails credentials:edit
-
This will open up the
credentials.yml.enc
file where the keys need to be formatted in this layout:
mapquest:
key: [provided-key]
weatherapi:
key: [provided-key]
- Close the window to save the credentials, this will match up with the API key replacements I.E.
Rails.application.credentials.mapquest[:key]
- Run
rails db:migrate
in the terminal to begin the setup for this API - Run
bundle install
in the terminal to include the necessary gems - Run
bundle exec rspec
to access the tests written in the rspec folder