From 6216882e1898bd7b35719d84946f2e600911daac Mon Sep 17 00:00:00 2001 From: Jeremie Gillet Date: Sat, 21 Dec 2024 11:55:54 +0900 Subject: [PATCH 1/5] ci and readme --- .github/workflows/ci.yml | 6 +++--- .tool-versions | 1 + README.md | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 .tool-versions diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51f2e9904..0a1868f0d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - elixir: [1.17] + elixir: [1.18] otp: [27.0] steps: @@ -76,8 +76,6 @@ jobs: strategy: matrix: include: - - elixir: '1.13.0' - otp: '24.1' - elixir: '1.14.0' otp: '25.0' - elixir: '1.15.0' @@ -86,6 +84,8 @@ jobs: otp: '26.2' - elixir: '1.17.0' otp: '27.0' + - elixir: '1.18.0' + otp: '27.0' steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 000000000..28f80386a --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +elixir 1.18.0-otp-27 diff --git a/README.md b/README.md index 958c2d7b6..4ca00df87 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ ## Setup -The exercises currently target Elixir versions from 1.13 to 1.17 and Erlang/OTP versions from 24 to 27. Detailed installation instructions can be found at +The exercises currently target Elixir versions from 1.14 to 1.18 and Erlang/OTP versions from 25 to 27. Detailed installation instructions can be found at [https://elixir-lang.org/install.html](https://elixir-lang.org/install.html). We recommend using the [asdf version manager](https://github.com/asdf-vm/asdf) to manage multiple Elixir versions. ## Testing From c65e462946f766c359846eb72f3ea15682d335ce Mon Sep 17 00:00:00 2001 From: Jeremie Gillet Date: Sat, 21 Dec 2024 12:04:18 +0900 Subject: [PATCH 2/5] replace List.zip --- exercises/practice/crypto-square/.meta/example.ex | 2 +- exercises/practice/matrix/.meta/example.ex | 2 +- exercises/practice/saddle-points/.meta/example.ex | 2 +- exercises/practice/spiral-matrix/.meta/example.ex | 2 +- exercises/practice/transpose/.meta/example.ex | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/exercises/practice/crypto-square/.meta/example.ex b/exercises/practice/crypto-square/.meta/example.ex index 01d9388d0..53f260449 100644 --- a/exercises/practice/crypto-square/.meta/example.ex +++ b/exercises/practice/crypto-square/.meta/example.ex @@ -19,7 +19,7 @@ defmodule CryptoSquare do normalized |> String.graphemes() |> Enum.chunk_every(section_length, section_length, List.duplicate(" ", section_length)) - |> List.zip() + |> Enum.zip() |> Enum.map(&Tuple.to_list/1) |> Enum.join(" ") end diff --git a/exercises/practice/matrix/.meta/example.ex b/exercises/practice/matrix/.meta/example.ex index f307e9050..76c5de059 100644 --- a/exercises/practice/matrix/.meta/example.ex +++ b/exercises/practice/matrix/.meta/example.ex @@ -14,7 +14,7 @@ defmodule Matrix do %Matrix{ matrix: rows, - transposed_matrix: rows |> List.zip() |> Enum.map(&Tuple.to_list/1) + transposed_matrix: rows |> Enum.zip() |> Enum.map(&Tuple.to_list/1) } end diff --git a/exercises/practice/saddle-points/.meta/example.ex b/exercises/practice/saddle-points/.meta/example.ex index f6afcb292..f07e52bce 100644 --- a/exercises/practice/saddle-points/.meta/example.ex +++ b/exercises/practice/saddle-points/.meta/example.ex @@ -24,7 +24,7 @@ defmodule SaddlePoints do def columns(str) do str |> rows - |> List.zip() + |> Enum.zip() |> Enum.map(&Tuple.to_list/1) end diff --git a/exercises/practice/spiral-matrix/.meta/example.ex b/exercises/practice/spiral-matrix/.meta/example.ex index 95a35b154..7ece1db17 100644 --- a/exercises/practice/spiral-matrix/.meta/example.ex +++ b/exercises/practice/spiral-matrix/.meta/example.ex @@ -27,6 +27,6 @@ defmodule Spiral do end defp transpose(matrix) do - matrix |> List.zip() |> Enum.map(&Tuple.to_list/1) + matrix |> Enum.zip() |> Enum.map(&Tuple.to_list/1) end end diff --git a/exercises/practice/transpose/.meta/example.ex b/exercises/practice/transpose/.meta/example.ex index ce4202340..56653c1b5 100644 --- a/exercises/practice/transpose/.meta/example.ex +++ b/exercises/practice/transpose/.meta/example.ex @@ -26,7 +26,7 @@ defmodule Transpose do rows |> Enum.map(fn x -> get_padded_row(x, max_length) end) |> Enum.map(&String.to_charlist/1) - |> List.zip() + |> Enum.zip() |> Enum.map(&Tuple.to_list/1) |> Enum.map(&List.to_string/1) |> Enum.map(fn x -> x |> String.trim_trailing("*") |> String.replace("*", " ") end) From 2b75f037dd3fe5ecdfcf4378cf0c637f23ccd148 Mon Sep 17 00:00:00 2001 From: Jeremie Gillet Date: Sat, 21 Dec 2024 12:06:22 +0900 Subject: [PATCH 3/5] replace unless link --- concepts/cond/about.md | 2 +- concepts/if/about.md | 2 +- concepts/if/introduction.md | 2 +- concepts/if/links.json | 2 +- exercises/concept/file-sniffer/.docs/hints.md | 2 +- exercises/concept/name-badge/.docs/hints.md | 2 +- exercises/concept/name-badge/.docs/introduction.md | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/concepts/cond/about.md b/concepts/cond/about.md index 68fb30e32..09b9acc2c 100644 --- a/concepts/cond/about.md +++ b/concepts/cond/about.md @@ -16,4 +16,4 @@ The `cond` conditional is usually used when there are more than two logical bran [cond]: https://hexdocs.pm/elixir/case-cond-and-if.html#cond [case]: https://hexdocs.pm/elixir/case-cond-and-if.html#case -[if]: https://hexdocs.pm/elixir/case-cond-and-if.html#if-unless +[if]: https://hexdocs.pm/elixir/case-cond-and-if.html#if diff --git a/concepts/if/about.md b/concepts/if/about.md index aa8aae4a9..0cfd50e2f 100644 --- a/concepts/if/about.md +++ b/concepts/if/about.md @@ -66,7 +66,7 @@ truthy?.(nil) # => true ``` -[getting-started-if]: https://hexdocs.pm/elixir/case-cond-and-if.html#if-unless +[getting-started-if]: https://hexdocs.pm/elixir/case-cond-and-if.html#if [kernel-if]: https://hexdocs.pm/elixir/Kernel.html#if/2 [kernel-boolean-and]: https://hexdocs.pm/elixir/Kernel.html#and/2 [kernel-boolean-or]: https://hexdocs.pm/elixir/Kernel.html#or/2 diff --git a/concepts/if/introduction.md b/concepts/if/introduction.md index b40fc8453..9e1080392 100644 --- a/concepts/if/introduction.md +++ b/concepts/if/introduction.md @@ -28,5 +28,5 @@ This syntax is helpful for very short expressions, but should be avoided if the In Elixir, all datatypes evaluate to a _truthy_ or _falsy_ value when they are encountered in a boolean context (like an `if` expression). All data is considered _truthy_ **except** for `false` and `nil`. In particular, empty strings, the integer `0`, and empty lists are all considered _truthy_ in Elixir. -[getting-started-if]: https://hexdocs.pm/elixir/case-cond-and-if.html#if-unless +[getting-started-if]: https://hexdocs.pm/elixir/case-cond-and-if.html#if [kernel-if]: https://hexdocs.pm/elixir/Kernel.html#if/2 diff --git a/concepts/if/links.json b/concepts/if/links.json index 08d0f5306..4d214c2d9 100644 --- a/concepts/if/links.json +++ b/concepts/if/links.json @@ -1,6 +1,6 @@ [ { - "url": "https://hexdocs.pm/elixir/case-cond-and-if.html#if-unless", + "url": "https://hexdocs.pm/elixir/case-cond-and-if.html#if", "description": "Getting Started: `if`" }, { diff --git a/exercises/concept/file-sniffer/.docs/hints.md b/exercises/concept/file-sniffer/.docs/hints.md index 897bf918a..5984aa03a 100644 --- a/exercises/concept/file-sniffer/.docs/hints.md +++ b/exercises/concept/file-sniffer/.docs/hints.md @@ -21,7 +21,7 @@ - You can use the [`if` macro conditional][if] for binary conditions. [binary-matching]: https://hexdocs.pm/elixir/binaries-strings-and-charlists.html#binaries -[if]: https://hexdocs.pm/elixir/case-cond-and-if.html#if-unless +[if]: https://hexdocs.pm/elixir/case-cond-and-if.html#if [mfc]: https://hexdocs.pm/elixir/modules-and-functions.html#function-definition [mimetype]: https://en.wikipedia.org/wiki/Media_type [pattern-matching]: https://hexdocs.pm/elixir/pattern-matching.html#pattern-matching diff --git a/exercises/concept/name-badge/.docs/hints.md b/exercises/concept/name-badge/.docs/hints.md index f20a4b672..2c9ba1455 100644 --- a/exercises/concept/name-badge/.docs/hints.md +++ b/exercises/concept/name-badge/.docs/hints.md @@ -21,5 +21,5 @@ [kernel-if]: https://hexdocs.pm/elixir/Kernel.html#if/2 [getting-started-basic-strings]: https://hexdocs.pm/elixir/basic-types.html#strings -[getting-started-if]: https://hexdocs.pm/elixir/case-cond-and-if.html#if-unless +[getting-started-if]: https://hexdocs.pm/elixir/case-cond-and-if.html#if [elixirschool-if]: https://elixirschool.com/en/lessons/basics/control-structures/#if-and-unless-0 diff --git a/exercises/concept/name-badge/.docs/introduction.md b/exercises/concept/name-badge/.docs/introduction.md index adbabec9a..ffdb38082 100644 --- a/exercises/concept/name-badge/.docs/introduction.md +++ b/exercises/concept/name-badge/.docs/introduction.md @@ -42,5 +42,5 @@ This syntax is helpful for very short expressions, but should be avoided if the In Elixir, all datatypes evaluate to a _truthy_ or _falsy_ value when they are encountered in a boolean context (like an `if` expression). All data is considered _truthy_ **except** for `false` and `nil`. In particular, empty strings, the integer `0`, and empty lists are all considered _truthy_ in Elixir. [nil-dictionary]: https://www.merriam-webster.com/dictionary/nil -[getting-started-if]: https://hexdocs.pm/elixir/case-cond-and-if.html#if-unless +[getting-started-if]: https://hexdocs.pm/elixir/case-cond-and-if.html#if [kernel-if]: https://hexdocs.pm/elixir/Kernel.html#if/2 From 3ad4fd1c34800b61cd794a0e695020699c97f9e2 Mon Sep 17 00:00:00 2001 From: Jeremie Gillet Date: Sat, 21 Dec 2024 12:09:06 +0900 Subject: [PATCH 4/5] remove stray file --- .tool-versions | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .tool-versions diff --git a/.tool-versions b/.tool-versions deleted file mode 100644 index 28f80386a..000000000 --- a/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -elixir 1.18.0-otp-27 From bcb69b1c1d844dfba1e624a95337bb536a461f86 Mon Sep 17 00:00:00 2001 From: Jeremie Gillet Date: Mon, 6 Jan 2025 20:46:48 +0900 Subject: [PATCH 5/5] use 1.18.1 and otp 27.2 --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a1868f0d..aefc10325 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,8 +17,8 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - elixir: [1.18] - otp: [27.0] + elixir: [1.18.1] + otp: [27.2] steps: - name: Checkout code @@ -84,8 +84,8 @@ jobs: otp: '26.2' - elixir: '1.17.0' otp: '27.0' - - elixir: '1.18.0' - otp: '27.0' + - elixir: '1.18.1' + otp: '27.2' steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683