https://www.loom.com/share/cd1fddae70cf464d88cd9d56f36c464e
Use the open-weather-ruby-client gem to obtain weather information and cache details for requests by zip and display those results to the user.
-
Ruby version
ruby 2.5.9p229 (2021-04-05 revision 67939) [x86_64-darwin16]
-
Rails
Rails 5.2.8.1
Please set your config/environment.yml
like such:
development:
open_weather_api_key: '<development_key>'
production
open_weather_api_key: '<production_key>'
-
Database creation
rake db:create
-
Database initialization
rake db:schema:load
-
How to run the test suite
bundle exec rspec spec/services
OR individually:bundle exec rspec spec/services/weather_forecast_spec.rb
bundle exec rspec spec/services/fetch_weather_by_zip_spec.rb
bundle exec rspec spec/services/fetch_weather_by_city_spec.rb
bundle exec rspec spec/services/cached_weather_by_zip_spec.rb