diff --git a/assets/client/src/components/ChallengeDetails.js b/assets/client/src/components/ChallengeDetails.js index 82d92f32d..581cd1507 100644 --- a/assets/client/src/components/ChallengeDetails.js +++ b/assets/client/src/components/ChallengeDetails.js @@ -121,7 +121,7 @@ export const ChallengeDetails = ({challenge, challengePhases, preview, print, ta

Follow challenge as guest

Receive challenge updates to your email. No sign-in required

- +
diff --git a/lib/challenge_gov/application.ex b/lib/challenge_gov/application.ex index 3b7bc1660..586ea1a89 100644 --- a/lib/challenge_gov/application.ex +++ b/lib/challenge_gov/application.ex @@ -11,7 +11,7 @@ defmodule ChallengeGov.Application do # Start the PubSub system {Phoenix.PubSub, name: ChallengeGov.PubSub}, ChallengeGov.Repo, - {Finch, name: ChallengeGov.HTTPClient}, + # {Finch, name: ChallengeGov.HTTPClient}, Web.Endpoint, ChallengeGov.Scheduler, ChallengeGov.Telemetry, diff --git a/lib/challenge_gov/gov_delivery/implementation.ex b/lib/challenge_gov/gov_delivery/implementation.ex index f615837ac..1ebb53261 100644 --- a/lib/challenge_gov/gov_delivery/implementation.ex +++ b/lib/challenge_gov/gov_delivery/implementation.ex @@ -24,219 +24,170 @@ defmodule ChallengeGov.GovDelivery.Implementation do |> code() |> GovDelivery.remove_topic_endpoint() - request = Finch.build(:delete, endpoint, auth_headers()) - Logger.info(inspect(request)) + headers = auth_headers() + Logger.info("Delete(#{endpoint}, #{inspect(headers)})") - case Finch.request(request, HTTPClient) do - {:ok, %{status: 200}} -> + case HTTPoison.delete(endpoint, headers) do + {:ok, %HTTPoison.Response{status_code: 200}} -> Logger.info("Gov Delivery Removed Topic #{challenge.id}") Challenges.clear_gov_delivery_topic(challenge) {:ok, :removed} - {:ok, %{body: body}} -> + {:ok, %HTTPoison.Response{body: body}} -> Logger.error("Gov Delivery Failed to Remove Topic #{challenge.id} #{inspect(body)}") {:error, inspect(body)} - e -> - Logger.error("Gov Delivery Failed to Remove Topic #{challenge.id} E: #{inspect(e)}") - {:error, e} + {:error, %HTTPoison.Error{reason: reason}} -> + Logger.error("Gov Delivery Failed to Remove Topic #{challenge.id} E: #{inspect(reason)}") + {:error, reason} end end @impl ChallengeGov.GovDelivery def add_topic(challenge) do body = xml_topic_from_challenge(challenge) + headers = auth_headers() ++ [{"content-type", "application/xml; charset: utf-8"}] + endpoint = GovDelivery.create_topic_endpoint() - request = - Finch.build( - :post, - GovDelivery.create_topic_endpoint(), - auth_headers() ++ [{"content-type", "application/xml; charset: utf-8"}], - body - ) + Logger.info("Post(#{endpoint}, #{body}, #{inspect(headers)})") - Logger.info(inspect(request)) - - case Finch.request(request, HTTPClient) do - {:ok, %{status: 200}} -> + case HTTPoison.post(endpoint, body, headers) do + {:ok, %HTTPoison.Response{status_code: 200}} -> Challenges.store_gov_delivery_topic(challenge, code(challenge.id)) set_category(challenge) - {:ok, %{body: body}} -> + {:ok, %HTTPoison.Response{body: body}} -> Logger.error("Gov Delivery Failed to Add Topic #{challenge.id} #{inspect(body)}") {:error, inspect(body)} - e -> - Logger.error("Gov Delivery Failed to Add Topic #{challenge.id} E: #{inspect(e)}") - {:error, e} + {:error, %HTTPoison.Error{reason: reason}} -> + Logger.error("Gov Delivery Failed to Add Topic #{challenge.id} E: #{inspect(reason)}") + {:error, reason} end end @impl ChallengeGov.GovDelivery def subscribe_user_general(user) do body = xml_subscribe_general(user) + headers = auth_headers() ++ [{"content-type", "application/xml; charset: utf-8"}] + endpoint = GovDelivery.subscribe_endpoint() - request = - Finch.build( - :post, - GovDelivery.subscribe_endpoint(), - auth_headers() ++ [{"content-type", "application/xml; charset: utf-8"}], - body - ) - - Logger.info(inspect(request)) + Logger.info("Post(#{endpoint}, #{body}, #{inspect(headers)})") - case Finch.request(request, HTTPClient) do - {:ok, %{status: 200}} -> + case HTTPoison.post(endpoint, body, headers) do + {:ok, %HTTPoison.Response{status_code: 200}} -> {:ok, :subscribed} - {:ok, %{body: body}} -> + {:ok, %HTTPoison.Response{body: body}} -> Logger.error("Gov Delivery Failed to Subscribe User General #{user.id} #{inspect(body)}") {:error, inspect(body)} - e -> - Logger.error("Gov Delivery Failed to Subscribe User General #{user.id} E: #{inspect(e)}") - {:error, e} + {:error, %HTTPoison.Error{reason: reason}} -> + Logger.error( + "Gov Delivery Failed to Subscribe User General #{user.id} E: #{inspect(reason)}" + ) + + {:error, reason} end end @impl ChallengeGov.GovDelivery def subscribe_user_challenge(user, challenge) do body = xml_subscribe_challenge(user, challenge) + headers = auth_headers() ++ [{"content-type", "application/xml; charset: utf-8"}] + endpoint = GovDelivery.subscribe_endpoint() - request = - Finch.build( - :post, - GovDelivery.subscribe_endpoint(), - auth_headers() ++ [{"content-type", "application/xml; charset: utf-8"}], - body - ) - - Logger.info(inspect(request)) + Logger.info("Post(#{endpoint}, #{body}, #{inspect(headers)})") - case Finch.request(request, HTTPClient) do - {:ok, %{status: 200}} -> + case HTTPoison.post(endpoint, body, headers) do + {:ok, %HTTPoison.Response{status_code: 200}} -> {:ok, :subscribed} - {:ok, %{body: body}} -> + {:ok, %HTTPoison.Response{body: body}} -> Logger.error( - "Gov Delivery Failed to Subscribe User Challenge user: #{user.id} challenge: #{challenge.id} #{inspect(body)}" + "Gov Delivery Failed to Subscribe User Challenge #{user.id} #{challenge.id} #{inspect(body)}" ) {:error, inspect(body)} - e -> + {:error, %HTTPoison.Error{reason: reason}} -> Logger.error( - "Gov Delivery Failed to Subscribe User Challenge user: #{user.id} challenge: #{challenge.id} E: #{inspect(e)}" + "Gov Delivery Failed to Subscribe User Challenge #{user.id} #{challenge.id} E: #{inspect(reason)}" ) - {:error, e} + {:error, reason} end end @impl ChallengeGov.GovDelivery def send_bulletin(challenge, subject, body) do body = xml_send_bulletin(challenge, subject, body) + headers = auth_headers() ++ [{"content-type", "application/xml; charset: utf-8"}] + endpoint = GovDelivery.send_bulletin_endpoint() - request = - Finch.build( - :post, - GovDelivery.send_bulletin_endpoint(), - auth_headers() ++ [{"content-type", "application/xml; charset: utf-8"}], - body - ) - - Logger.info(inspect(request)) + Logger.info("Post(#{endpoint}, #{body}, #{inspect(headers)})") - case Finch.request(request, HTTPClient) do - {:ok, %{status: 200}} -> + case HTTPoison.post(endpoint, body, headers) do + {:ok, %HTTPoison.Response{status_code: 200}} -> {:ok, :sent} - {:ok, %{body: body}} -> - Logger.error( - "Gov Delivery Failed to Send Bulletin subject: #{inspect(subject)} challenge: #{challenge.id} #{inspect(body)}" - ) - - {:send_error, inspect(body)} - - e -> - Logger.error( - "Gov Delivery Failed to Send Bulletin subject: #{inspect(subject)} challenge: #{challenge.id} E: #{inspect(e)}" - ) + {:ok, %HTTPoison.Response{body: body}} -> + Logger.error("Gov Delivery Failed to Send Bulletin #{challenge.id} #{inspect(body)}") + {:error, inspect(body)} - {:send_error, e} + {:error, %HTTPoison.Error{reason: reason}} -> + Logger.error("Gov Delivery Failed to Send Bulletin #{challenge.id} E: #{inspect(reason)}") + {:error, reason} end end @impl ChallengeGov.GovDelivery def get_topic_subscribe_count(challenge) do - request = - Finch.build( - :get, - GovDelivery.topic_details_endpoint(code(challenge.id)), - auth_headers() ++ [{"content-type", "application/xml; charset: utf-8"}] - ) - - Logger.info(inspect(request)) + endpoint = challenge.id |> code() |> GovDelivery.get_topic_subscribe_count_endpoint() - case Finch.request(request, HTTPClient) do - {:ok, %{status: 200, body: body}} -> - result = - body - |> xpath(~x"//topic/subscribers-count/text()") - |> to_string() + headers = auth_headers() + Logger.info("Get(#{endpoint}, #{inspect(headers)})") - {:ok, parse_count_result(result)} + case HTTPoison.get(endpoint, headers) do + {:ok, %HTTPoison.Response{status_code: 200, body: body}} -> + count = body |> parse_count_result() + {:ok, count} - {:ok, %{body: body}} -> + {:ok, %HTTPoison.Response{body: body}} -> Logger.error( - "Gov Delivery Failed to get topic subscribe count challenge: #{challenge.id} #{inspect(body)}" + "Gov Delivery Failed to Get Topic Subscribe Count #{challenge.id} #{inspect(body)}" ) {:error, inspect(body)} - e -> + {:error, %HTTPoison.Error{reason: reason}} -> Logger.error( - "Gov Delivery Failed to get topic subscribe count challenge: #{challenge.id} E: #{inspect(e)}" + "Gov Delivery Failed to Get Topic Subscribe Count #{challenge.id} E: #{inspect(reason)}" ) - {:error, e} + {:error, reason} end end def set_category(challenge) do - endpoint = - challenge.id - |> code() - |> GovDelivery.set_topic_categories_endpoint() - - request = - Finch.build( - :put, - endpoint, - auth_headers() ++ [{"content-type", "application/xml; charset: utf-8"}], - xml_categories_for_challenge() - ) + body = xml_categories_for_challenge() + headers = auth_headers() ++ [{"content-type", "application/xml; charset: utf-8"}] + endpoint = GovDelivery.set_category_endpoint() - Logger.info(inspect(request)) + Logger.info("Post(#{endpoint}, #{body}, #{inspect(headers)})") - case Finch.request(request, HTTPClient) do - {:ok, %{status: 200}} -> - {:ok, :added} + case HTTPoison.post(endpoint, body, headers) do + {:ok, %HTTPoison.Response{status_code: 200}} -> + Logger.info("Gov Delivery Set Category #{challenge.id}") + {:ok, :set} - {:ok, %{body: body}} -> - Logger.error( - "Gov Delivery Failed to set category challenge: #{challenge.id} #{inspect(body)}" - ) - - {:category_error, inspect(body)} - - e -> - Logger.error( - "Gov Delivery Failed to set category challenge: #{challenge.id} E: #{inspect(e)}" - ) + {:ok, %HTTPoison.Response{body: body}} -> + Logger.error("Gov Delivery Failed to Set Category #{challenge.id} #{inspect(body)}") + {:error, inspect(body)} - {:category_error, e} + {:error, %HTTPoison.Error{reason: reason}} -> + Logger.error("Gov Delivery Failed to Set Category #{challenge.id} E: #{inspect(reason)}") + {:error, reason} end end diff --git a/lib/challenge_gov/recaptcha/implementation.ex b/lib/challenge_gov/recaptcha/implementation.ex index 3f94679b4..16b675322 100644 --- a/lib/challenge_gov/recaptcha/implementation.ex +++ b/lib/challenge_gov/recaptcha/implementation.ex @@ -23,14 +23,12 @@ defmodule ChallengeGov.Recaptcha.Implementation do body = Plug.Conn.Query.encode(%{secret: key, response: token}) - request = Finch.build(:post, "https://www.google.com/recaptcha/api/siteverify", headers, body) - - case Finch.request(request, HTTPClient) do - {:ok, %{body: body, status: 200}} -> + case HTTPoison.post("https://www.google.com/recaptcha/api/siteverify", body, headers) do + {:ok, %HTTPoison.Response{status_code: 200, body: body}} -> {:ok, Jason.decode!(body)} - {:error, failure} -> - {:error, "Error: " <> inspect(failure)} + {:error, %HTTPoison.Error{reason: reason}} -> + {:error, "Error: " <> inspect(reason)} _ -> {:error, "Unknown Recaptcha Failure"} diff --git a/lib/mix/tasks/import_helper.ex b/lib/mix/tasks/import_helper.ex index 4f30236e8..abbf26480 100644 --- a/lib/mix/tasks/import_helper.ex +++ b/lib/mix/tasks/import_helper.ex @@ -489,10 +489,10 @@ defmodule Mix.Tasks.ImportHelper do {:ok, tmp_file} = Stein.Storage.Temp.create(extname: extension) - request = Finch.build(:get, logo_url) + headers = [{"Content-Type", "application/octet-stream"}] - case Finch.request(request, HTTPClient) do - {:ok, %{status: 200, body: body}} -> + case HTTPoison.get(logo_url, headers) do + {:ok, %HTTPoison.Response{status_code: 200, body: body}} -> File.write!(tmp_file, body, [:binary]) %{ @@ -500,7 +500,7 @@ defmodule Mix.Tasks.ImportHelper do path: tmp_file } - {:ok, %{status: 404}} -> + {:ok, %HTTPoison.Response{status_code: 404}} -> "" end end diff --git a/lib/web/controllers/api/banner_controller.ex b/lib/web/controllers/api/banner_controller.ex new file mode 100644 index 000000000..13d94e716 --- /dev/null +++ b/lib/web/controllers/api/banner_controller.ex @@ -0,0 +1,31 @@ +defmodule Web.Api.BannerController do + use Web, :controller + import Plug.Conn + + alias ChallengeGov.SiteContent + def init(default), do: default + + def call(conn, _params) do + {:ok, banner} = SiteContent.get("site_wide_banner") + + case banner_is_active?(banner) do + true -> + text(conn, banner.content) + + false -> + text(conn, "") + end + end + + defp banner_is_active?(banner) do + now = DateTime.utc_now() + + if is_nil(banner.start_date) or is_nil(banner.end_date) do + false + else + !is_nil(banner.content) and + DateTime.compare(now, banner.start_date) === :gt and + DateTime.compare(now, banner.end_date) === :lt + end + end +end diff --git a/lib/web/router.ex b/lib/web/router.ex index 50191c329..da3481333 100644 --- a/lib/web/router.ex +++ b/lib/web/router.ex @@ -243,6 +243,8 @@ defmodule Web.Router do get("/phase/:phase_id/winners", WinnerController, :phase_winners) get("/challenges/filter", ChallengeController, :filter) + + get("/banner", BannerController, :ok) end # Public Routes diff --git a/lib/web/templates/layout/app.html.eex b/lib/web/templates/layout/app.html.eex index 3f0da2c55..9ea13f3e5 100644 --- a/lib/web/templates/layout/app.html.eex +++ b/lib/web/templates/layout/app.html.eex @@ -74,11 +74,7 @@
-

- - <%= raw (@conn.assigns.site_wide_banner.content) %> - -

+ <%= Web.SharedView.render_safe_html( (@conn.assigns.site_wide_banner.content)) %>
diff --git a/lib/web/templates/layout/public.html.eex b/lib/web/templates/layout/public.html.eex index ff037f683..3e3840f5f 100644 --- a/lib/web/templates/layout/public.html.eex +++ b/lib/web/templates/layout/public.html.eex @@ -17,11 +17,7 @@
-

- - <%= raw (@conn.assigns.site_wide_banner.content) %> - -

+ <%= Web.SharedView.render_safe_html( (@conn.assigns.site_wide_banner.content) )%>
diff --git a/mix.exs b/mix.exs index 3442dd305..009bbcf5d 100644 --- a/mix.exs +++ b/mix.exs @@ -62,7 +62,6 @@ defmodule ChallengeGov.MixProject do {:elixir_uuid, "~> 1.2"}, {:ex_check, "~> 0.12", only: [:dev, :test], runtime: true}, {:export, "~> 0.1.1"}, - {:finch, "~> 0.14.0"}, {:gettext, "~> 0.11"}, {:hackney, "~> 1.13"}, {:httpoison, "~> 1.7"}, @@ -74,7 +73,7 @@ defmodule ChallengeGov.MixProject do {:mix_audit, "~> 0.1", only: [:dev, :test], runtime: false}, {:money, "~> 1.8.0"}, {:nimble_csv, "~> 0.6"}, - {:oban, "~> 2.3"}, + {:oban, "~> 2.13.5", override: true}, {:phoenix, "~> 1.5.7"}, {:phoenix_ecto, "~> 4.0"}, {:phoenix_html, "~> 3.1.0", override: true}, diff --git a/mix.lock b/mix.lock new file mode 100644 index 000000000..0be6d504b --- /dev/null +++ b/mix.lock @@ -0,0 +1,91 @@ +%{ + "bamboo": {:hex, :bamboo, "1.7.1", "7f0946e8c9081ce10d347cdba33c247c7c1c4f7dddc194ab0633603ef879bbdf", [:mix], [{:hackney, ">= 1.15.2", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:mime, "~> 1.4", [hex: :mime, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.1", [hex: :phoenix, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "5fb34c3ab638fc409deec47c1e91f9d78ad95bf22ccb153588b434e1ff1aa730"}, + "bamboo_smtp": {:hex, :bamboo_smtp, "2.1.0", "4be58f3c51d9f7875dc169ae58a1d2f08e5b718bf3895f70d130548c0598f422", [:mix], [{:bamboo, "~> 1.2", [hex: :bamboo, repo: "hexpm", optional: false]}, {:gen_smtp, "~> 0.15.0", [hex: :gen_smtp, repo: "hexpm", optional: false]}], "hexpm", "0aad00ef93d0e0c83a0e1ca6998fea070c8a720a990fbda13ce834136215ee49"}, + "bcrypt_elixir": {:hex, :bcrypt_elixir, "2.3.1", "5114d780459a04f2b4aeef52307de23de961b69e13a5cd98a911e39fda13f420", [:make, :mix], [{:comeonin, "~> 5.3", [hex: :comeonin, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "42182d5f46764def15bf9af83739e3bf4ad22661b1c34fc3e88558efced07279"}, + "browser": {:hex, :browser, "0.4.4", "bd6436961a6b2299c6cb38d0e49761c1161d869cd0db46369cef2bf6b77c3665", [:mix], [{:plug, "~> 1.2", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "d476ca309d4a4b19742b870380390aabbcb323c1f6f8745e2da2dfd079b4f8d7"}, + "bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"}, + "certifi": {:hex, :certifi, "2.12.0", "2d1cca2ec95f59643862af91f001478c9863c2ac9cb6e2f89780bfd8de987329", [:rebar3], [], "hexpm", "ee68d85df22e554040cdb4be100f33873ac6051387baf6a8f6ce82272340ff1c"}, + "combine": {:hex, :combine, "0.10.0", "eff8224eeb56498a2af13011d142c5e7997a80c8f5b97c499f84c841032e429f", [:mix], [], "hexpm", "1b1dbc1790073076580d0d1d64e42eae2366583e7aecd455d1215b0d16f2451b"}, + "comeonin": {:hex, :comeonin, "5.5.1", "5113e5f3800799787de08a6e0db307133850e635d34e9fab23c70b6501669510", [:mix], [], "hexpm", "65aac8f19938145377cee73973f192c5645873dcf550a8a6b18187d17c13ccdb"}, + "cors_plug": {:hex, :cors_plug, "3.0.3", "7c3ac52b39624bc616db2e937c282f3f623f25f8d550068b6710e58d04a0e330", [:mix], [{:plug, "~> 1.13", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "3f2d759e8c272ed3835fab2ef11b46bddab8c1ab9528167bd463b6452edf830d"}, + "cowboy": {:hex, :cowboy, "2.13.0", "09d770dd5f6a22cc60c071f432cd7cb87776164527f205c5a6b0f24ff6b38990", [:make, :rebar3], [{:cowlib, ">= 2.14.0 and < 3.0.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, ">= 1.8.0 and < 3.0.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "e724d3a70995025d654c1992c7b11dbfea95205c047d86ff9bf1cda92ddc5614"}, + "cowboy_telemetry": {:hex, :cowboy_telemetry, "0.3.1", "ebd1a1d7aff97f27c66654e78ece187abdc646992714164380d8a041eda16754", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "3a6efd3366130eab84ca372cbd4a7d3c3a97bdfcfb4911233b035d117063f0af"}, + "cowlib": {:hex, :cowlib, "2.14.0", "623791c56c1cc9df54a71a9c55147a401549917f00a2e48a6ae12b812c586ced", [:make, :rebar3], [], "hexpm", "0af652d1550c8411c3b58eed7a035a7fb088c0b86aff6bc504b0bc3b7f791aa2"}, + "credo": {:hex, :credo, "1.7.11", "d3e805f7ddf6c9c854fd36f089649d7cf6ba74c42bc3795d587814e3c9847102", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "56826b4306843253a66e47ae45e98e7d284ee1f95d53d1612bb483f88a8cf219"}, + "credo_contrib": {:hex, :credo_contrib, "0.2.0", "032af0f1f096ddc7a2128fa475fdbb34f73563ca3fb2d6f826b0fa343b76d507", [:mix], [{:credo, "~> 1.0", [hex: :credo, repo: "hexpm", optional: false]}], "hexpm", "afebe9dd51371c121aab3eb14b1c70316be4345b0333fdcedb5d6404a06be309"}, + "credo_envvar": {:hex, :credo_envvar, "0.1.4", "40817c10334e400f031012c0510bfa0d8725c19d867e4ae39cf14f2cbebc3b20", [:mix], [{:credo, "~> 1.0", [hex: :credo, repo: "hexpm", optional: false]}], "hexpm", "5055cdb4bcbaf7d423bc2bb3ac62b4e2d825e2b1e816884c468dee59d0363009"}, + "credo_naming": {:hex, :credo_naming, "2.1.0", "d44ad58890d4db552e141ce64756a74ac1573665af766d1ac64931aa90d47744", [:make, :mix], [{:credo, "~> 1.6", [hex: :credo, repo: "hexpm", optional: false]}], "hexpm", "830e23b3fba972e2fccec49c0c089fe78c1e64bc16782a2682d78082351a2909"}, + "crontab": {:hex, :crontab, "1.1.14", "233fcfdc2c74510cabdbcb800626babef414e7cb13cea11ddf62e10e16e2bf76", [:mix], [{:ecto, "~> 1.0 or ~> 2.0 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}], "hexpm", "4e3b9950bc22ae8d0395ffb5f4b127a140005cba95745abf5ff9ee7e8203c6fa"}, + "db_connection": {:hex, :db_connection, "2.7.0", "b99faa9291bb09892c7da373bb82cba59aefa9b36300f6145c5f201c7adf48ec", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "dcf08f31b2701f857dfc787fbad78223d61a32204f217f15e881dd93e4bdd3ff"}, + "decimal": {:hex, :decimal, "2.3.0", "3ad6255aa77b4a3c4f818171b12d237500e63525c2fd056699967a3e7ea20f62", [:mix], [], "hexpm", "a4d66355cb29cb47c3cf30e71329e58361cfcb37c34235ef3bf1d7bf3773aeac"}, + "earmark": {:hex, :earmark, "1.4.47", "7e7596b84fe4ebeb8751e14cbaeaf4d7a0237708f2ce43630cfd9065551f94ca", [:mix], [], "hexpm", "3e96bebea2c2d95f3b346a7ff22285bc68a99fbabdad9b655aa9c6be06c698f8"}, + "ecto": {:hex, :ecto, "3.12.5", "4a312960ce612e17337e7cefcf9be45b95a3be6b36b6f94dfb3d8c361d631866", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "6eb18e80bef8bb57e17f5a7f068a1719fbda384d40fc37acb8eb8aeca493b6ea"}, + "ecto_sql": {:hex, :ecto_sql, "3.12.1", "c0d0d60e85d9ff4631f12bafa454bc392ce8b9ec83531a412c12a0d415a3a4d0", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.12", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.7", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.19 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "aff5b958a899762c5f09028c847569f7dfb9cc9d63bdb8133bff8a5546de6bf5"}, + "elixir_make": {:hex, :elixir_make, "0.9.0", "6484b3cd8c0cee58f09f05ecaf1a140a8c97670671a6a0e7ab4dc326c3109726", [:mix], [], "hexpm", "db23d4fd8b757462ad02f8aa73431a426fe6671c80b200d9710caf3d1dd0ffdb"}, + "elixir_uuid": {:hex, :elixir_uuid, "1.2.1", "dce506597acb7e6b0daeaff52ff6a9043f5919a4c3315abb4143f0b00378c097", [:mix], [], "hexpm", "f7eba2ea6c3555cea09706492716b0d87397b88946e6380898c2889d68585752"}, + "erlport": {:hex, :erlport, "0.11.0", "8bb46a520e6eb9146e655fbf9b824433d9d532194667069d9aa45696aae9684b", [:rebar3], [], "hexpm", "8eb136ccaf3948d329b8d1c3278ad2e17e2a7319801bc4cc2da6db278204eee4"}, + "ex_aws": {:hex, :ex_aws, "2.2.5", "013c5c6a1ff4ff09266b3904d3d65d8f9717edbd52f760470469af8b36c860f7", [:mix], [{:configparser_ex, "~> 4.0", [hex: :configparser_ex, repo: "hexpm", optional: true]}, {:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: true]}, {:jsx, "~> 3.0", [hex: :jsx, repo: "hexpm", optional: true]}, {:sweet_xml, "~> 0.6", [hex: :sweet_xml, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.3", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "e8da4c3470e8e249f406013d2cc42f7f80a71c3f2dad51aba7155d028a13868b"}, + "ex_aws_s3": {:hex, :ex_aws_s3, "2.5.6", "d135983bbd8b6df6350dfd83999437725527c1bea151e5055760bfc9b2d17c20", [:mix], [{:ex_aws, "~> 2.0", [hex: :ex_aws, repo: "hexpm", optional: false]}, {:sweet_xml, ">= 0.0.0", [hex: :sweet_xml, repo: "hexpm", optional: true]}], "hexpm", "9874e12847e469ca2f13a5689be04e546c16f63caf6380870b7f25bf7cb98875"}, + "ex_check": {:hex, :ex_check, "0.16.0", "07615bef493c5b8d12d5119de3914274277299c6483989e52b0f6b8358a26b5f", [:mix], [], "hexpm", "4d809b72a18d405514dda4809257d8e665ae7cf37a7aee3be6b74a34dec310f5"}, + "excoveralls": {:hex, :excoveralls, "0.18.5", "e229d0a65982613332ec30f07940038fe451a2e5b29bce2a5022165f0c9b157e", [:mix], [{:castore, "~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "523fe8a15603f86d64852aab2abe8ddbd78e68579c8525ae765facc5eae01562"}, + "expo": {:hex, :expo, "1.1.0", "f7b9ed7fb5745ebe1eeedf3d6f29226c5dd52897ac67c0f8af62a07e661e5c75", [:mix], [], "hexpm", "fbadf93f4700fb44c331362177bdca9eeb8097e8b0ef525c9cc501cb9917c960"}, + "export": {:hex, :export, "0.1.1", "6dfd268b0692428f89b9285859a2dc02b6dcd2e8fdfbca34ac6e6a331351df91", [:mix], [{:erlport, "~> 0.9", [hex: :erlport, repo: "hexpm", optional: false]}], "hexpm", "3da7444ff4053f1824352f4bdb13fbd2c28c93c2011786fb686b649fdca1021f"}, + "file_system": {:hex, :file_system, "1.1.0", "08d232062284546c6c34426997dd7ef6ec9f8bbd090eb91780283c9016840e8f", [:mix], [], "hexpm", "bfcf81244f416871f2a2e15c1b515287faa5db9c6bcf290222206d120b3d43f6"}, + "gen_smtp": {:hex, :gen_smtp, "0.15.0", "9f51960c17769b26833b50df0b96123605a8024738b62db747fece14eb2fbfcc", [:rebar3], [], "hexpm", "29bd14a88030980849c7ed2447b8db6d6c9278a28b11a44cafe41b791205440f"}, + "gen_stage": {:hex, :gen_stage, "1.2.1", "19d8b5e9a5996d813b8245338a28246307fd8b9c99d1237de199d21efc4c76a1", [:mix], [], "hexpm", "83e8be657fa05b992ffa6ac1e3af6d57aa50aace8f691fcf696ff02f8335b001"}, + "gettext": {:hex, :gettext, "0.26.2", "5978aa7b21fada6deabf1f6341ddba50bc69c999e812211903b169799208f2a8", [:mix], [{:expo, "~> 0.5.1 or ~> 1.0", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "aa978504bcf76511efdc22d580ba08e2279caab1066b76bb9aa81c4a1e0a32a5"}, + "hackney": {:hex, :hackney, "1.20.1", "8d97aec62ddddd757d128bfd1df6c5861093419f8f7a4223823537bad5d064e2", [:rebar3], [{:certifi, "~> 2.12.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~> 6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~> 1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~> 1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.4.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~> 1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "fe9094e5f1a2a2c0a7d10918fee36bfec0ec2a979994cff8cfe8058cd9af38e3"}, + "hpax": {:hex, :hpax, "1.0.2", "762df951b0c399ff67cc57c3995ec3cf46d696e41f0bba17da0518d94acd4aac", [:mix], [], "hexpm", "2f09b4c1074e0abd846747329eaa26d535be0eb3d189fa69d812bfb8bfefd32f"}, + "html_sanitize_ex": {:hex, :html_sanitize_ex, "1.4.3", "67b3d9fa8691b727317e0cc96b9b3093be00ee45419ffb221cdeee88e75d1360", [:mix], [{:mochiweb, "~> 2.15 or ~> 3.1", [hex: :mochiweb, repo: "hexpm", optional: false]}], "hexpm", "87748d3c4afe949c7c6eb7150c958c2bcba43fc5b2a02686af30e636b74bccb7"}, + "httpoison": {:hex, :httpoison, "1.8.2", "9eb9c63ae289296a544842ef816a85d881d4a31f518a0fec089aaa744beae290", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "2bb350d26972e30c96e2ca74a1aaf8293d61d0742ff17f01e0279fef11599921"}, + "idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"}, + "inet_cidr": {:hex, :inet_cidr, "1.0.8", "d26bb7bdbdf21ae401ead2092bf2bb4bf57fe44a62f5eaa5025280720ace8a40", [:mix], [], "hexpm", "d5b26da66603bb56c933c65214c72152f0de9a6ea53618b56d63302a68f6a90e"}, + "jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"}, + "joken": {:hex, :joken, "2.6.2", "5daaf82259ca603af4f0b065475099ada1b2b849ff140ccd37f4b6828ca6892a", [:mix], [{:jose, "~> 1.11.10", [hex: :jose, repo: "hexpm", optional: false]}], "hexpm", "5134b5b0a6e37494e46dbf9e4dad53808e5e787904b7c73972651b51cce3d72b"}, + "jose": {:hex, :jose, "1.11.10", "a903f5227417bd2a08c8a00a0cbcc458118be84480955e8d251297a425723f83", [:mix, :rebar3], [], "hexpm", "0d6cd36ff8ba174db29148fc112b5842186b68a90ce9fc2b3ec3afe76593e614"}, + "logger_json": {:hex, :logger_json, "4.3.0", "41aaaab2c2e1c071bfddbcc5a3f567884fdf312d222c7f1a7e3de6ab667774f7", [:mix], [{:ecto, "~> 2.1 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "001bbc34d7c451cfeed298c8384cb3aab10b364db2eb095c466c7a1a28bee6e0"}, + "metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm", "69b09adddc4f74a40716ae54d140f93beb0fb8978d8636eaded0c31b6f099f16"}, + "mime": {:hex, :mime, "1.6.0", "dabde576a497cef4bbdd60aceee8160e02a6c89250d6c0b29e56c0dfb00db3d2", [:mix], [], "hexpm", "31a1a8613f8321143dde1dafc36006a17d28d02bdfecb9e95a880fa7aabd19a7"}, + "mimerl": {:hex, :mimerl, "1.3.0", "d0cd9fc04b9061f82490f6581e0128379830e78535e017f7780f37fea7545726", [:rebar3], [], "hexpm", "a1e15a50d1887217de95f0b9b0793e32853f7c258a5cd227650889b38839fe9d"}, + "mint": {:hex, :mint, "1.7.1", "113fdb2b2f3b59e47c7955971854641c61f378549d73e829e1768de90fc1abf1", [:mix], [{:castore, "~> 0.1.0 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:hpax, "~> 0.1.1 or ~> 0.2.0 or ~> 1.0", [hex: :hpax, repo: "hexpm", optional: false]}], "hexpm", "fceba0a4d0f24301ddee3024ae116df1c3f4bb7a563a731f45fdfeb9d39a231b"}, + "mix_audit": {:hex, :mix_audit, "0.1.4", "35c424173a574436a80ad7f63cf014a7d9ce727de8cd4e7b4138d90b11aec043", [:make, :mix], [{:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:yaml_elixir, "~> 2.4.0", [hex: :yaml_elixir, repo: "hexpm", optional: false]}], "hexpm", "7a43fee661bcadbad31aa04a86d33a890421c174723814b8a3a7f0e7076936a1"}, + "mochiweb": {:hex, :mochiweb, "3.2.2", "bb435384b3b9fd1f92f2f3fe652ea644432877a3e8a81ed6459ce951e0482ad3", [:rebar3], [], "hexpm", "4114e51f1b44c270b3242d91294fe174ce1ed989100e8b65a1fab58e0cba41d5"}, + "money": {:hex, :money, "1.8.0", "e532023fbeccb5ca7d503e2d86434669428810a46bd2e3966ba5b063be4e0358", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}, {:ecto, "~> 1.0 or ~> 2.0 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:phoenix_html, "~> 2.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "b21aa903d3f91fed7e6dc921438ca1920c49af2e83df3025b4f3fb6981b483f6"}, + "nimble_csv": {:hex, :nimble_csv, "0.7.0", "52f23ce46eee304d063d1716e19e45ea544bd751536bc53e5d41cb7fc0ca9405", [:mix], [], "hexpm", "e7051e7a95b5c4f26512af5805c320ee9185e752d949f048bf318fedef86cccc"}, + "oban": {:hex, :oban, "2.13.6", "a0cb1bce3bd393770512231fb5a3695fa19fd3af10d7575bf73f837aee7abf43", [:mix], [{:ecto_sql, "~> 3.6", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.16", [hex: :postgrex, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "3c1c5eb16f377b3cbbf2ea14be24d20e3d91285af9d1ac86260b7c2af5464887"}, + "parse_trans": {:hex, :parse_trans, "3.4.1", "6e6aa8167cb44cc8f39441d05193be6e6f4e7c2946cb2759f015f8c56b76e5ff", [:rebar3], [], "hexpm", "620a406ce75dada827b82e453c19cf06776be266f5a67cff34e1ef2cbb60e49a"}, + "phoenix": {:hex, :phoenix, "1.5.14", "2d5db884be496eefa5157505ec0134e66187cb416c072272420c5509d67bf808", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_html, "~> 2.13 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.10", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 1.0 or ~> 2.2", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.1.2 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "207f1aa5520320cbb7940d7ff2dde2342162cf513875848f88249ea0ba02fef7"}, + "phoenix_ecto": {:hex, :phoenix_ecto, "4.6.3", "f686701b0499a07f2e3b122d84d52ff8a31f5def386e03706c916f6feddf69ef", [:mix], [{:ecto, "~> 3.5", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.1", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.16 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}], "hexpm", "909502956916a657a197f94cc1206d9a65247538de8a5e186f7537c895d95764"}, + "phoenix_html": {:hex, :phoenix_html, "3.1.0", "0b499df05aad27160d697a9362f0e89fa0e24d3c7a9065c2bd9d38b4d1416c09", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "0c0a98a2cefa63433657983a2a594c7dee5927e4391e0f1bfd3a151d1def33fc"}, + "phoenix_live_reload": {:hex, :phoenix_live_reload, "1.5.3", "f2161c207fda0e4fb55165f650f7f8db23f02b29e3bff00ff7ef161d6ac1f09d", [:mix], [{:file_system, "~> 0.3 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "b4ec9cd73cb01ff1bd1cac92e045d13e7030330b74164297d1aee3907b54803c"}, + "phoenix_live_view": {:hex, :phoenix_live_view, "0.15.7", "09720b8e5151b3ca8ef739cd7626d4feb987c69ba0b509c9bbdb861d5a365881", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.5.7", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 0.5", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "3a756cf662420272d0f1b3b908cce5222163b5a95aa9bab404f9d29aff53276e"}, + "phoenix_pubsub": {:hex, :phoenix_pubsub, "2.1.3", "3168d78ba41835aecad272d5e8cd51aa87a7ac9eb836eabc42f6e57538e3731d", [:mix], [], "hexpm", "bba06bc1dcfd8cb086759f0edc94a8ba2bc8896d5331a1e2c2902bf8e36ee502"}, + "plug": {:hex, :plug, "1.16.1", "40c74619c12f82736d2214557dedec2e9762029b2438d6d175c5074c933edc9d", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a13ff6b9006b03d7e33874945b2755253841b238c34071ed85b0e86057f8cddc"}, + "plug_cowboy": {:hex, :plug_cowboy, "2.7.2", "fdadb973799ae691bf9ecad99125b16625b1c6039999da5fe544d99218e662e4", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "245d8a11ee2306094840c000e8816f0cbed69a23fc0ac2bcf8d7835ae019bb2f"}, + "plug_crypto": {:hex, :plug_crypto, "1.2.5", "918772575e48e81e455818229bf719d4ab4181fcbf7f85b68a35620f78d89ced", [:mix], [], "hexpm", "26549a1d6345e2172eb1c233866756ae44a9609bd33ee6f99147ab3fd87fd842"}, + "poison": {:hex, :poison, "3.1.0", "d9eb636610e096f86f25d9a46f35a9facac35609a7591b3be3326e99a0484665", [:mix], [], "hexpm", "fec8660eb7733ee4117b85f55799fd3833eb769a6df71ccf8903e8dc5447cfce"}, + "porcelain": {:hex, :porcelain, "2.0.3", "2d77b17d1f21fed875b8c5ecba72a01533db2013bd2e5e62c6d286c029150fdc", [:mix], [], "hexpm", "dc996ab8fadbc09912c787c7ab8673065e50ea1a6245177b0c24569013d23620"}, + "postgrex": {:hex, :postgrex, "0.20.0", "363ed03ab4757f6bc47942eff7720640795eb557e1935951c1626f0d303a3aed", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "d36ef8b36f323d29505314f704e21a1a038e2dc387c6409ee0cd24144e187c0f"}, + "quantum": {:hex, :quantum, "3.5.3", "ee38838a07761663468145f489ad93e16a79440bebd7c0f90dc1ec9850776d99", [:mix], [{:crontab, "~> 1.1", [hex: :crontab, repo: "hexpm", optional: false]}, {:gen_stage, "~> 0.14 or ~> 1.0", [hex: :gen_stage, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:telemetry_registry, "~> 0.2", [hex: :telemetry_registry, repo: "hexpm", optional: false]}], "hexpm", "500fd3fa77dcd723ed9f766d4a175b684919ff7b6b8cfd9d7d0564d58eba8734"}, + "ranch": {:hex, :ranch, "2.2.0", "25528f82bc8d7c6152c57666ca99ec716510fe0925cb188172f41ce93117b1b0", [:make, :rebar3], [], "hexpm", "fa0b99a1780c80218a4197a59ea8d3bdae32fbff7e88527d7d8a4787eff4f8e7"}, + "remote_ip": {:hex, :remote_ip, "0.2.1", "cd27cd8ea54ecaaf3532776ff4c5e353b3804e710302e88c01eadeaaf42e7e24", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:inet_cidr, "~> 1.0", [hex: :inet_cidr, repo: "hexpm", optional: false]}, {:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "2e7ab1a461cc3cd5719f37e116a08f45c8b8493923063631b164315d6b7ee8e0"}, + "sobelow": {:hex, :sobelow, "0.13.0", "218afe9075904793f5c64b8837cc356e493d88fddde126a463839351870b8d1e", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "cd6e9026b85fc35d7529da14f95e85a078d9dd1907a9097b3ba6ac7ebbe34a0d"}, + "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"}, + "stein": {:hex, :stein, "0.5.4", "7d768c6926af3fa446d31ce94cbafd1c5ec92972be52dede5284583eff91223d", [:mix], [{:bcrypt_elixir, "~> 2.0", [hex: :bcrypt_elixir, repo: "hexpm", optional: false]}, {:ecto, "~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:elixir_uuid, "~> 1.2", [hex: :elixir_uuid, repo: "hexpm", optional: false]}, {:timex, "~> 3.5", [hex: :timex, repo: "hexpm", optional: false]}], "hexpm", "b794e44b078e327251331daa79315c03b5e173160c4ccc6324c6e5886da940d0"}, + "stein_storage": {:hex, :stein_storage, "0.1.0", "b01164fac3af95cc25c4bd8d7e4d3a632ca81b0f2739b9bbe13c0d43111d21c7", [:mix], [{:ex_aws, "~> 2.1", [hex: :ex_aws, repo: "hexpm", optional: false]}, {:ex_aws_s3, "~> 2.0", [hex: :ex_aws_s3, repo: "hexpm", optional: false]}, {:hackney, "~> 1.15", [hex: :hackney, repo: "hexpm", optional: false]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "0fe855612d2b204a89a0e62d0ba00c5226acd237cac761becbd67cd6d412421d"}, + "sweet_xml": {:hex, :sweet_xml, "0.6.6", "fc3e91ec5dd7c787b6195757fbcf0abc670cee1e4172687b45183032221b66b8", [:mix], [], "hexpm", "2e1ec458f892ffa81f9f8386e3f35a1af6db7a7a37748a64478f13163a1f3573"}, + "telemetry": {:hex, :telemetry, "0.4.3", "a06428a514bdbc63293cd9a6263aad00ddeb66f608163bdec7c8995784080818", [:rebar3], [], "hexpm", "eb72b8365ffda5bed68a620d1da88525e326cb82a75ee61354fc24b844768041"}, + "telemetry_registry": {:hex, :telemetry_registry, "0.2.1", "fe648a691f2128e4279d993cd010994c67f282354dc061e697bf070d4b87b480", [:mix, :rebar3], [{:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "4221cefbcadd0b3e7076960339223742d973f1371bc20f3826af640257bc3690"}, + "tesla": {:hex, :tesla, "1.12.3", "7189f71ac607169a1bb2dfcf8747dedd4d9384ec00cec6c7b38c5f03811a73c7", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:exjsx, ">= 3.0.0", [hex: :exjsx, repo: "hexpm", optional: true]}, {:finch, "~> 0.13", [hex: :finch, repo: "hexpm", optional: true]}, {:fuse, "~> 2.4", [hex: :fuse, repo: "hexpm", optional: true]}, {:gun, ">= 1.0.0", [hex: :gun, repo: "hexpm", optional: true]}, {:hackney, "~> 1.6", [hex: :hackney, repo: "hexpm", optional: true]}, {:ibrowse, "4.4.2", [hex: :ibrowse, repo: "hexpm", optional: true]}, {:jason, ">= 1.0.0", [hex: :jason, repo: "hexpm", optional: true]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.0", [hex: :mint, repo: "hexpm", optional: true]}, {:msgpax, "~> 2.3", [hex: :msgpax, repo: "hexpm", optional: true]}, {:poison, ">= 1.0.0", [hex: :poison, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "4dfb0d6a81ca79c8662a4f03884843a5b3251825ba47ea6f9ab84dcc354fdeec"}, + "text_delta": {:hex, :text_delta, "1.1.0", "b53ffc23f859ac2a70f7bc36071f21c5e5a7bdb4fa647be7e4869d73e45da3ce", [:mix], [], "hexpm", "fdf471ae9ca3d42bdfba63f2c31aa1403fa9ee22bf56b1d99a9fefc6672b45bb"}, + "timex": {:hex, :timex, "3.7.11", "bb95cb4eb1d06e27346325de506bcc6c30f9c6dea40d1ebe390b262fad1862d1", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:gettext, "~> 0.20", [hex: :gettext, repo: "hexpm", optional: false]}, {:tzdata, "~> 1.1", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm", "8b9024f7efbabaf9bd7aa04f65cf8dcd7c9818ca5737677c7b76acbc6a94d1aa"}, + "tzdata": {:hex, :tzdata, "1.1.2", "45e5f1fcf8729525ec27c65e163be5b3d247ab1702581a94674e008413eef50b", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "cec7b286e608371602318c414f344941d5eb0375e14cfdab605cca2fe66cba8b"}, + "unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"}, + "waffle": {:hex, :waffle, "1.1.9", "8ce5ca9e59fa5491da67a2df57b8711d93223df3c3e5c21ad2acdedc41a0f51a", [:mix], [{:ex_aws, "~> 2.1", [hex: :ex_aws, repo: "hexpm", optional: true]}, {:ex_aws_s3, "~> 2.1", [hex: :ex_aws_s3, repo: "hexpm", optional: true]}, {:hackney, "~> 1.9", [hex: :hackney, repo: "hexpm", optional: false]}, {:sweet_xml, "~> 0.6", [hex: :sweet_xml, repo: "hexpm", optional: true]}], "hexpm", "307c63cfdfb4624e7c423868a128ccfcb0e5291ae73a9deecb3a10b7a3eb277c"}, + "waffle_ecto": {:hex, :waffle_ecto, "0.0.12", "e5c17c49b071b903df71861c642093281123142dc4e9908c930db3e06795b040", [:mix], [{:ecto, "~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:waffle, "~> 1.0", [hex: :waffle, repo: "hexpm", optional: false]}], "hexpm", "585fe6371057066d2e8e3383ddd7a2437ff0668caf3f4cbf5a041e0de9837168"}, + "wallaby": {:hex, :wallaby, "0.29.1", "7ad61c98a1425db291a392e45504e897b1271c746b40fe9f19f87a86729d2fac", [:mix], [{:ecto_sql, ">= 3.0.0", [hex: :ecto_sql, repo: "hexpm", optional: true]}, {:httpoison, "~> 0.12 or ~> 1.0", [hex: :httpoison, repo: "hexpm", optional: false]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:phoenix_ecto, ">= 3.0.0", [hex: :phoenix_ecto, repo: "hexpm", optional: true]}, {:web_driver_client, "~> 0.2.0", [hex: :web_driver_client, repo: "hexpm", optional: false]}], "hexpm", "21b1360c4b13adbb0a1ff5c1053204cc4489ac81e9579c6c5011a27915cb7415"}, + "web_driver_client": {:hex, :web_driver_client, "0.2.0", "63b76cd9eb3b0716ec5467a0f8bead73d3d9612e63f7560d21357f03ad86e31a", [:mix], [{:hackney, "~> 1.6", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:tesla, "~> 1.3", [hex: :tesla, repo: "hexpm", optional: false]}], "hexpm", "83cc6092bc3e74926d1c8455f0ce927d5d1d36707b74d9a65e38c084aab0350f"}, + "xml_builder": {:hex, :xml_builder, "2.1.4", "e60e21c0a39b9dd8dec1db5a2525c713f7fe4e85ed247caedf22a9bcdd2d5069", [:mix], [], "hexpm", "48188a4df8b9168ceb8318d128299bce064d272e18967349b2592347c434e677"}, + "yamerl": {:hex, :yamerl, "0.10.0", "4ff81fee2f1f6a46f1700c0d880b24d193ddb74bd14ef42cb0bcf46e81ef2f8e", [:rebar3], [], "hexpm", "346adb2963f1051dc837a2364e4acf6eb7d80097c0f53cbdc3046ec8ec4b4e6e"}, + "yaml_elixir": {:hex, :yaml_elixir, "2.4.0", "2f444abc3c994c902851fde56b6a9cb82895c291c05a0490a289035c2e62ae71", [:mix], [{:yamerl, "~> 0.7", [hex: :yamerl, repo: "hexpm", optional: false]}], "hexpm", "4e25a6d5c873e393689c6f1062c5ec90f6cd1be2527b073178ae37eae4c78bee"}, +} diff --git a/priv/repo/seeds.exs b/priv/repo/seeds.exs index 044f22c19..d7b84f7ef 100644 --- a/priv/repo/seeds.exs +++ b/priv/repo/seeds.exs @@ -77,12 +77,11 @@ defmodule Helpers do end def import_agencies_api(url) do - {:ok, %{body: body, status: 200}} = Finch.build(:get, url) |> Finch.request(HTTPClient) + {:ok, %{body: body, status_code: 200}} = HTTPoison.get(url) data = Jason.decode!(body) count = data["metadata"]["count"] - {:ok, %{body: body, status: 200}} = - Finch.build(:get, url <> "?page_size=#{count}") |> Finch.request(HTTPClient) + {:ok, %{body: body, status_code: 200}} = HTTPoison.get("#{url}?page_size=#{count}") data = Jason.decode!(body) diff --git a/test/web/plugs/site_wide_banner_test.exs b/test/web/plugs/site_wide_banner_test.exs index 3c955f9c3..4f3b23a57 100644 --- a/test/web/plugs/site_wide_banner_test.exs +++ b/test/web/plugs/site_wide_banner_test.exs @@ -56,4 +56,41 @@ defmodule Web.Plugs.SiteWideBannerTest do assert !Map.has_key?(conn.assigns, :site_wide_banner) end end + + describe "checks for banner API" do + test "adds banner to check if available", %{conn: conn} do + TestHelpers.create_site_wide_banner(%{"content" => "this is a test"}) + + conn = + conn + |> get("/api/banner") + + assert text_response(conn, 200) =~ "this is a test" + end + end + + test "does not banner to assign if banner dates are not active for API", %{conn: conn} do + end_date = + DateTime.utc_now() + |> DateTime.add(60 * 60 * -1, :second) + |> DateTime.to_string() + + TestHelpers.create_site_wide_banner(%{"end_date" => end_date}) + + conn = + conn + |> get("/api/banner") + + assert text_response(conn, 200) =~ "" + end + + test "does not banner to assign if banner content is nil API", %{conn: conn} do + TestHelpers.create_site_wide_banner(%{"content" => ""}) + + conn = + conn + |> get("/api/banner") + + assert text_response(conn, 200) =~ "" + end end