Skip to content

Commit 9305983

Browse files
committed
include changes from unmerged PR bitwalker#772
1 parent cc649c7 commit 9305983

File tree

9 files changed

+27
-19
lines changed

9 files changed

+27
-19
lines changed

.github/workflows/elixir.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,20 @@ on:
77
jobs:
88
test:
99
runs-on: ubuntu-latest
10+
continue-on-error: ${{ matrix.experimental }}
1011
strategy:
12+
fail-fast: true
1113
matrix:
12-
otp: ['24.2', '25']
13-
elixir: ['1.12.3', '1.13.3', '1.14.0']
14-
exclude:
15-
- otp: '25'
16-
elixir: '1.12.3'
14+
include:
15+
- otp: "27.2"
16+
elixir: "1.18.0"
17+
experimental: false
18+
- otp: "27.2"
19+
elixir: "1.17.3"
20+
experimental: false
21+
- otp: "26.2"
22+
elixir: "1.17.3"
23+
experimental: false
1724
steps:
1825
- uses: actions/checkout@v2
1926
- uses: erlef/setup-beam@v1
@@ -22,4 +29,3 @@ jobs:
2229
elixir-version: ${{matrix.elixir}}
2330
- run: mix deps.get
2431
- run: mix test
25-

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
2020
- Corrected pluralization rules for bg/cs/he/id/ro/ru
2121
- Fixed documentation formatting of `Timex.TimezoneInfo.create/6`
2222
- Updated tzdata to fix issues with 2024b
23+
- Fix deprecation: Module.eval_quoted/4 is deprecated. Use Code.eval_quoted/3 instead
24+
- Update dependencies and fix deprecations when using Gettext 0.26.x
2325

2426
---
2527

@@ -553,4 +555,4 @@ name. Timezone abbreviations are only supported if they are POSIX timezones in t
553555
### Fixed
554556
- Timezone abbreviation handling (was previously non-deterministic/incorrect)
555557
- Disable tzdata's auto-update during compilation
556-
- Usage of imperative if
558+
- Usage of imperative if

lib/format/datetime/formatter.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,6 @@ defmodule Timex.Format.DateTime.Formatter do
890890
defp pad_char(:zeroes), do: <<?0>>
891891
defp pad_char(:spaces), do: <<32>>
892892

893-
defp width_spec(min..max), do: [min: min, max: max]
893+
defp width_spec(min..max//1), do: [min: min, max: max]
894894
defp width_spec(min, max), do: [min: min, max: max]
895895
end

lib/l10n/gettext.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
defmodule Timex.Gettext do
2-
use Gettext, otp_app: :timex, priv: "priv/translations"
2+
use Gettext.Backend, otp_app: :timex, priv: "priv/translations"
33
end

lib/l10n/translator.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
defmodule Timex.Translator do
2-
import Timex.Gettext
2+
use Gettext, backend: Timex.Gettext
33

44
defmacro with_locale(locale, do: block) do
55
quote do

lib/timex.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,7 @@ defmodule Timex do
12021202
def day_to_num(unquote(atom)), do: unquote(day_num)
12031203
end
12041204

1205-
Module.eval_quoted(__MODULE__, day_quoted, [], __ENV__)
1205+
Code.eval_quoted(day_quoted, [], __ENV__)
12061206
end)
12071207

12081208
# Make an attempt at cleaning up the provided string
@@ -1300,7 +1300,7 @@ defmodule Timex do
13001300
end
13011301
end
13021302

1303-
Module.eval_quoted(__MODULE__, month_quoted, [], __ENV__)
1303+
Code.eval_quoted(month_quoted, [], __ENV__)
13041304
end)
13051305

13061306
# Make an attempt at cleaning up the provided string

lib/timezone/utils.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ defmodule Timex.Timezone.Utils do
1919
def to_olson(unquote(key)), do: unquote(value)
2020
end
2121

22-
Module.eval_quoted(__MODULE__, quoted, [], __ENV__)
22+
Code.eval_quoted(quoted, [], __ENV__)
2323
end)
2424

2525
def to_olson(_tz), do: nil
@@ -39,7 +39,7 @@ defmodule Timex.Timezone.Utils do
3939
def olson_to_win(unquote(key)), do: unquote(value)
4040
end
4141

42-
Module.eval_quoted(__MODULE__, quoted, [], __ENV__)
42+
Code.eval_quoted(quoted, [], __ENV__)
4343
end)
4444

4545
def olson_to_win(_tz), do: nil

mix.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ defmodule Timex.Mixfile do
5757
[
5858
{:tzdata, "~> 1.1"},
5959
{:combine, "~> 0.10"},
60-
{:gettext, "~> 0.20"},
60+
{:gettext, "~> 0.26"},
6161
{:ex_doc, "~> 0.13", only: [:docs]},
6262
{:benchfella, "~> 0.3", only: [:bench]},
6363
{:dialyxir, "~> 1.0", only: [:dev], runtime: false},
6464
{:excoveralls, "~> 0.4", only: [:test]},
65-
{:stream_data, "~> 0.4", only: [:test]}
65+
{:stream_data, "~> 1.1", only: [:test]}
6666
]
6767
end
6868

mix.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"},
88
"ex_doc": {:hex, :ex_doc, "0.28.4", "001a0ea6beac2f810f1abc3dbf4b123e9593eaa5f00dd13ded024eae7c523298", [:mix], [{:earmark_parser, "~> 1.4.19", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "bf85d003dd34911d89c8ddb8bda1a958af3471a274a4c2150a9c01c78ac3f8ed"},
99
"excoveralls": {:hex, :excoveralls, "0.14.4", "295498f1ae47bdc6dce59af9a585c381e1aefc63298d48172efaaa90c3d251db", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "e3ab02f2df4c1c7a519728a6f0a747e71d7d6e846020aae338173619217931c1"},
10-
"expo": {:hex, :expo, "0.3.0", "13127c1d5f653b2927f2616a4c9ace5ae372efd67c7c2693b87fd0fdc30c6feb", [:mix], [], "hexpm", "fb3cd4bf012a77bc1608915497dae2ff684a06f0fa633c7afa90c4d72b881823"},
11-
"gettext": {:hex, :gettext, "0.22.0", "a25d71ec21b1848957d9207b81fd61cb25161688d282d58bdafef74c2270bdc4", [:mix], [{:expo, "~> 0.3.0", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "cb0675141576f73720c8e49b4f0fd3f2c69f0cd8c218202724d4aebab8c70ace"},
10+
"expo": {:hex, :expo, "1.1.0", "f7b9ed7fb5745ebe1eeedf3d6f29226c5dd52897ac67c0f8af62a07e661e5c75", [:mix], [], "hexpm", "fbadf93f4700fb44c331362177bdca9eeb8097e8b0ef525c9cc501cb9917c960"},
11+
"gettext": {:hex, :gettext, "0.26.2", "5978aa7b21fada6deabf1f6341ddba50bc69c999e812211903b169799208f2a8", [:mix], [{:expo, "~> 0.5.1 or ~> 1.0", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "aa978504bcf76511efdc22d580ba08e2279caab1066b76bb9aa81c4a1e0a32a5"},
1212
"hackney": {:hex, :hackney, "1.18.1", "f48bf88f521f2a229fc7bae88cf4f85adc9cd9bcf23b5dc8eb6a1788c662c4f6", [:rebar3], [{:certifi, "~>2.9.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.3.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", "a4ecdaff44297e9b5894ae499e9a070ea1888c84afdd1fd9b7b2bc384950128e"},
1313
"idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"},
1414
"jason": {:hex, :jason, "1.3.0", "fa6b82a934feb176263ad2df0dbd91bf633d4a46ebfdffea0c8ae82953714946", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "53fc1f51255390e0ec7e50f9cb41e751c260d065dcba2bf0d08dc51a4002c2ac"},
@@ -20,7 +20,7 @@
2020
"nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"},
2121
"parse_trans": {:hex, :parse_trans, "3.3.1", "16328ab840cc09919bd10dab29e431da3af9e9e7e7e6f0089dd5a2d2820011d8", [:rebar3], [], "hexpm", "07cd9577885f56362d414e8c4c4e6bdf10d43a8767abb92d24cbe8b24c54888b"},
2222
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"},
23-
"stream_data": {:hex, :stream_data, "0.5.0", "b27641e58941685c75b353577dc602c9d2c12292dd84babf506c2033cd97893e", [:mix], [], "hexpm", "012bd2eec069ada4db3411f9115ccafa38540a3c78c4c0349f151fc761b9e271"},
23+
"stream_data": {:hex, :stream_data, "1.2.0", "58dd3f9e88afe27dc38bef26fce0c84a9e7a96772b2925c7b32cd2435697a52b", [:mix], [], "hexpm", "eb5c546ee3466920314643edf68943a5b14b32d1da9fe01698dc92b73f89a9ed"},
2424
"tzdata": {:hex, :tzdata, "1.1.2", "45e5f1fcf8729525ec27c65e163be5b3d247ab1702581a94674e008413eef50b", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "cec7b286e608371602318c414f344941d5eb0375e14cfdab605cca2fe66cba8b"},
2525
"unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"},
2626
}

0 commit comments

Comments
 (0)