]> git.njae.me.uk Git - advent-of-code-24-elixir.git/commitdiff
fix: add public_key and ssl to extra_applications
authorMitchell Hanberg <mitch@mitchellhanberg.com>
Tue, 3 Dec 2024 17:52:39 +0000 (12:52 -0500)
committerMitchell Hanberg <mitch@mitchellhanberg.com>
Tue, 3 Dec 2024 17:52:39 +0000 (12:52 -0500)
chore: format

lib/advent_of_code/input.ex
mix.exs

index 5edba2d4d30300ba82e9b0f68758b584927a8ce7..38a8fc8f7190518125542da99cf33af0930745f3 100644 (file)
@@ -50,10 +50,10 @@ defmodule AdventOfCode.Input do
   defp from_cache!(day, year), do: File.read!(cache_path(day, year))
 
   defp download!(day, year) do
-    {:ok, {{'HTTP/1.1', 200, 'OK'}, _, input}} =
+    {:ok, {{~c"HTTP/1.1", 200, ~c"OK"}, _, input}} =
       :httpc.request(
         :get,
-        {'https://adventofcode.com/#{year}/day/#{day}/input', headers()},
+        {~c"https://adventofcode.com/#{year}/day/#{day}/input", headers()},
         [],
         []
       )
@@ -84,7 +84,8 @@ defmodule AdventOfCode.Input do
 
   defp headers,
     do: [
-      {'user-agent', 'github.com/mhanberg/advent-of-code-elixir-starter by aoc@mitchellhanberg.com'},
-      {'cookie', String.to_charlist("session=" <> Keyword.get(config(), :session_cookie))}
+      {~c"user-agent",
+       ~c"github.com/mhanberg/advent-of-code-elixir-starter by aoc@mitchellhanberg.com"},
+      {~c"cookie", String.to_charlist("session=" <> Keyword.get(config(), :session_cookie))}
     ]
 end
diff --git a/mix.exs b/mix.exs
index 4116f66c050df1bbd65813f82fbceadcbbb9d3f7..017ffd19ca76b8e4766aa1c096b8f359c05d9e44 100644 (file)
--- a/mix.exs
+++ b/mix.exs
@@ -14,7 +14,7 @@ defmodule AdventOfCode.MixProject do
   # Run "mix help compile.app" to learn about applications.
   def application do
     [
-      extra_applications: [:logger, :inets]
+      extra_applications: [:logger, :inets, :public_key, :ssl]
     ]
   end