From 45a8860e90f892c8b8186a8212147b2b4dbbd01b Mon Sep 17 00:00:00 2001 From: Cedric Wille <24487628+cwille97@users.noreply.github.com> Date: Fri, 1 Mar 2024 12:44:05 -0500 Subject: [PATCH 1/2] Hard code to imperial until frontend is updated Frontend currently expects imperial units, with the React re-write I think we should make it flexible but for now let's set this to imperial. --- backend/app/services/weather_retriever.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/services/weather_retriever.rb b/backend/app/services/weather_retriever.rb index 0bbbb429..ac8f0571 100644 --- a/backend/app/services/weather_retriever.rb +++ b/backend/app/services/weather_retriever.rb @@ -30,7 +30,7 @@ def get_forecast(date, position) Tomorrowiorb.forecast( "#{position.latitude},#{position.longitude}", ["1d"], - "metric" + "imperial" ) end From ae536a99fb908da59e81f9006d51d097c0292e66 Mon Sep 17 00:00:00 2001 From: Cedric Wille <24487628+cwille97@users.noreply.github.com> Date: Fri, 1 Mar 2024 22:41:40 +0000 Subject: [PATCH 2/2] Fix test --- backend/spec/fixtures/vcr_cassettes/WeatherRetriever/55403.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/spec/fixtures/vcr_cassettes/WeatherRetriever/55403.yml b/backend/spec/fixtures/vcr_cassettes/WeatherRetriever/55403.yml index 0ea85156..6a687c20 100644 --- a/backend/spec/fixtures/vcr_cassettes/WeatherRetriever/55403.yml +++ b/backend/spec/fixtures/vcr_cassettes/WeatherRetriever/55403.yml @@ -37,7 +37,7 @@ http_interactions: recorded_at: Tue, 05 Dec 2023 18:17:54 GMT - request: method: get - uri: https://api.tomorrow.io/v4/weather/forecast?apikey=MY_MEGA_TOMORROW_IO_KEY&location=44.967486,-93.2897678×teps=1d&units=metric + uri: https://api.tomorrow.io/v4/weather/forecast?apikey=MY_MEGA_TOMORROW_IO_KEY&location=44.967486,-93.2897678×teps=1d&units=imperial body: encoding: US-ASCII string: ''