This is a Ruby on Rails application that allows users to search by IATA code for the temperature and location of a city. The application uses the Weatherapi API to fetch the data.
To run the application, clone the repository and navigate to the root directory of the project.
$ git clone https://github.com/jimmy-owoa/patrimore_test.git
$ cd patrimore_test
The application requires the following to run:
- Ruby 3.2.1
- Rails 7.0.4.2
- MySQL 8.0.31
-
Install dependencies
bundle install
-
Create database
rails db:create
-
Run migrations
rails db:migrate
-
Run the server
rails s
To use the application, sign up or log in to an existing account. Once logged in, you can search for the temperature and location of a city by entering its IATA code. The application caches the results for faster access and stores the last searched cities for each user.
The application comes with RSpec tests to ensure the functionality of the user creation and registration. To run the tests, navigate to the root directory of the project and execute the following command:
rspec
- Ruby on Rails - The web framework used
- MySQL - Database
- RSpec - Testing framework
- Bootstrap - CSS framework
- Weatherapi - Weather API
This project is licensed under the MIT License - see the LICENSE.md file for details