From 12ce2934eaf280a53c8d7feb390c5df2790dc87c Mon Sep 17 00:00:00 2001 From: Sloane Perrault Date: Sat, 10 Dec 2022 09:49:01 -0500 Subject: [PATCH] more 2022 elixir setup --- 2022/elixir/.envrc | 1 + 2022/elixir/.envrc.example | 1 + 2022/elixir/.gitignore | 3 +++ 2022/elixir/.iex.exs | 1 + 2022/elixir/config/config.exs | 5 +++++ 2022/elixir/lib/aoc2022.ex | 18 ------------------ 2022/elixir/mix.exs | 3 +-- 2022/elixir/mix.lock | 5 +++++ 2022/elixir/test/aoc2022_test.exs | 8 -------- 9 files changed, 17 insertions(+), 28 deletions(-) create mode 100644 2022/elixir/.envrc create mode 100644 2022/elixir/.envrc.example create mode 100644 2022/elixir/.iex.exs create mode 100644 2022/elixir/config/config.exs delete mode 100644 2022/elixir/lib/aoc2022.ex create mode 100644 2022/elixir/mix.lock delete mode 100644 2022/elixir/test/aoc2022_test.exs diff --git a/2022/elixir/.envrc b/2022/elixir/.envrc new file mode 100644 index 0000000..4f9183c --- /dev/null +++ b/2022/elixir/.envrc @@ -0,0 +1 @@ +export ADVENT_OF_CODE_SESSION=53616c7465645f5fb31c51fe066552607f485449bb8029158a5cbcd72954a87a7eafbf99335cb15b788aeec9ab7fd8f50f063217572b636de31d8e721344f02c diff --git a/2022/elixir/.envrc.example b/2022/elixir/.envrc.example new file mode 100644 index 0000000..81a65ba --- /dev/null +++ b/2022/elixir/.envrc.example @@ -0,0 +1 @@ +export ADVENT_OF_CODE_SESSION= diff --git a/2022/elixir/.gitignore b/2022/elixir/.gitignore index 9944a60..5652851 100644 --- a/2022/elixir/.gitignore +++ b/2022/elixir/.gitignore @@ -24,3 +24,6 @@ aoc_2022-*.tar # Temporary files, for example, from tests. /tmp/ + +# input files +/input/ diff --git a/2022/elixir/.iex.exs b/2022/elixir/.iex.exs new file mode 100644 index 0000000..795d6b6 --- /dev/null +++ b/2022/elixir/.iex.exs @@ -0,0 +1 @@ +import AOC.IEx diff --git a/2022/elixir/config/config.exs b/2022/elixir/config/config.exs new file mode 100644 index 0000000..e158180 --- /dev/null +++ b/2022/elixir/config/config.exs @@ -0,0 +1,5 @@ +import Config + +config :advent_of_code_utils, + auto_compile?: true, + session: System.get_env("ADVENT_OF_CODE_SESSION") diff --git a/2022/elixir/lib/aoc2022.ex b/2022/elixir/lib/aoc2022.ex deleted file mode 100644 index 0606ccf..0000000 --- a/2022/elixir/lib/aoc2022.ex +++ /dev/null @@ -1,18 +0,0 @@ -defmodule Aoc2022 do - @moduledoc """ - Documentation for `Aoc2022`. - """ - - @doc """ - Hello world. - - ## Examples - - iex> Aoc2022.hello() - :world - - """ - def hello do - :world - end -end diff --git a/2022/elixir/mix.exs b/2022/elixir/mix.exs index 81005b8..11c97ef 100644 --- a/2022/elixir/mix.exs +++ b/2022/elixir/mix.exs @@ -21,8 +21,7 @@ defmodule Aoc2022.MixProject do # Run "mix help deps" to learn about dependencies. defp deps do [ - # {:dep_from_hexpm, "~> 0.3.0"}, - # {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"} + {:advent_of_code_utils, "~> 3.1"} ] end end diff --git a/2022/elixir/mix.lock b/2022/elixir/mix.lock new file mode 100644 index 0000000..010c09d --- /dev/null +++ b/2022/elixir/mix.lock @@ -0,0 +1,5 @@ +%{ + "advent_of_code_utils": {:hex, :advent_of_code_utils, "3.1.1", "b1880b694035ab1ea9d722e0e1e3d4444ebc7e7993054083a3eac3c60e425f49", [:mix], [{:floki, "~> 0.34", [hex: :floki, repo: "hexpm", optional: false]}, {:tz, "~> 0.24", [hex: :tz, repo: "hexpm", optional: false]}], "hexpm", "0ab59cf0e397e97dc21e40f2a8d2c4b939ae08ec1dd046284b207d49b3335eb0"}, + "floki": {:hex, :floki, "0.34.0", "002d0cc194b48794d74711731db004fafeb328fe676976f160685262d43706a8", [:mix], [], "hexpm", "9c3a9f43f40dde00332a589bd9d389b90c1f518aef500364d00636acc5ebc99c"}, + "tz": {:hex, :tz, "0.24.0", "a9073f152c5a9d0abeafde57150cd61d9f11faa7fa3710a20e8487ce05c76cee", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:mint, "~> 1.4", [hex: :mint, repo: "hexpm", optional: true]}], "hexpm", "5c08671bb10a56e09371106b08f5c9192449bb22e94a51de063c8c1317317027"}, +} diff --git a/2022/elixir/test/aoc2022_test.exs b/2022/elixir/test/aoc2022_test.exs deleted file mode 100644 index c2063df..0000000 --- a/2022/elixir/test/aoc2022_test.exs +++ /dev/null @@ -1,8 +0,0 @@ -defmodule Aoc2022Test do - use ExUnit.Case - doctest Aoc2022 - - test "greets the world" do - assert Aoc2022.hello() == :world - end -end