From 715c712d0b7c5975f6e3ef21c02fdeb0a63d80cd Mon Sep 17 00:00:00 2001 From: Ivan Habunek Date: Wed, 18 Jan 2023 16:42:03 +0100 Subject: [PATCH] Improve naming --- lib/triglav/public_transport/import_gtfs.ex | 4 ++-- lib/triglav/public_transport/npt.ex | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/triglav/public_transport/import_gtfs.ex b/lib/triglav/public_transport/import_gtfs.ex index 7a1c0e5..e349a13 100644 --- a/lib/triglav/public_transport/import_gtfs.ex +++ b/lib/triglav/public_transport/import_gtfs.ex @@ -36,7 +36,7 @@ defmodule Triglav.PublicTransport.ImportGtfs do operator = Operators.gpp_osijek() url = "https://b2b.promet-info.hr/dc/b2b.gtfs.osijekgpp" target = Triglav.tmp_dir!() <> "/#{operator.slug}.zip" - Npt.download(url, target) + Npt.download!(url, target) import_from_archive(operator, target, opts) end @@ -44,7 +44,7 @@ defmodule Triglav.PublicTransport.ImportGtfs do operator = Operators.jadrolinija() url = "https://b2b.promet-info.hr/dc/b2b.gtfs.jl" target = Triglav.tmp_dir!() <> "/#{operator.slug}.zip" - Npt.download(url, target) + Npt.download!(url, target) import_from_archive(operator, target, opts) end diff --git a/lib/triglav/public_transport/npt.ex b/lib/triglav/public_transport/npt.ex index 04d1424..4d24f63 100644 --- a/lib/triglav/public_transport/npt.ex +++ b/lib/triglav/public_transport/npt.ex @@ -12,7 +12,7 @@ defmodule Triglav.PublicTransport.Npt do plug Triglav.Tesla.Middleware.ErrrorOnStatus plug Triglav.Tesla.Middleware.Logger - def download(url, target) do + def download!(url, target) do response = get!(url) File.write!(target, response.body) end -- 2.45.2