Skip to content

Repository files navigation

Weather Forecaster

A small Ruby on Rails application that retrieves and displays weather data for a given U.S. address or ZIP code.
The app uses the OpenWeatherMap API, caches results for 30 minutes per ZIP code, and shows a visual indicator when data is served from cache.


Features

  • Accepts any U.S. address or ZIP code
  • Retrieves current temperature, high, low, and conditions
  • Uses OpenWeatherMap API for weather data
  • Caches results for 30 minutes per ZIP code, using Rails cache (in memory)
  • Displays an indicator if the result came from cache
  • Includes unit and controller tests using Minitest and WebMock
  • Styled with Bootstrap 5

Requirements

  • Ruby 3.x
  • Rails 7.x
  • OpenWeatherMap API key (stored in rails credentials file)

Architecture

  • WeatherService for handling interface with weather api, and fetching weather data
  • Simple controller and views for submitting an address, sending the zip to the service, and displaying the results with basic bootstrap styling for ease of reading.

About

Weather Fetcher (rails)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages