Skip to content

Commit

Permalink
chore: Elixir 1.16.3, Erlang 26.2.5
Browse files Browse the repository at this point in the history
Migrates warn -> warning, updates ssl_verify_fun, and converts single-quoted charlists to the ~c
sigil.
  • Loading branch information
bklebe committed Jun 5, 2024
1 parent cf3f7eb commit 092af7a
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
elixir 1.14.5-otp-25
erlang 25.3.2.7
elixir 1.16.3-otp-26
erlang 26.2.5
3 changes: 2 additions & 1 deletion lib/concentrate/gtfs/unzip.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ defmodule Concentrate.GTFS.Unzip do
Unzips the GTFS file into constituent files.
"""
@behaviour Concentrate.Parser
@file_list ['agency.txt', 'routes.txt', 'trips.txt', 'stop_times.txt', 'stops.txt']
# zip file_list takes charlists
@file_list [~c"agency.txt", ~c"routes.txt", ~c"trips.txt", ~c"stop_times.txt", ~c"stops.txt"]

def parse(binary, _opts) do
{:ok, files} = :zip.unzip(binary, [:memory, file_list: @file_list])
Expand Down
2 changes: 1 addition & 1 deletion lib/concentrate/merge_filter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ defmodule Concentrate.MergeFilter do

def handle_info(msg, state) do
_ =
Logger.warn(fn ->
Logger.warning(fn ->
"unknown message to #{__MODULE__} #{inspect(self())}: #{inspect(msg)}"
end)

Expand Down
2 changes: 1 addition & 1 deletion lib/concentrate/parser/gtfs_realtime_enhanced.ex
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ defmodule Concentrate.Parser.GTFSRealtimeEnhanced do
end

defp decode_feed_entity(entity, _opts, feed_timestamp) do
Logger.warn("event=malformed_entity timestamp=#{feed_timestamp} #{inspect(entity)}")
Logger.warning("event=malformed_entity timestamp=#{feed_timestamp} #{inspect(entity)}")
[]
end

Expand Down
2 changes: 1 addition & 1 deletion lib/concentrate/parser/helpers.ex
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ defmodule Concentrate.Parser.Helpers do
when is_integer(vehicle_timestamp) and is_integer(feed_timestamp) and
vehicle_timestamp > feed_timestamp do
_ =
Logger.warn(
Logger.warning(
"vehicle timestamp after feed timestamp feed_url=#{inspect(options.feed_url)} vehicle_id=#{inspect(vehicle_id)} feed_timestamp=#{inspect(feed_timestamp)} vehicle_timestamp=#{inspect(vehicle_timestamp)}"
)

Expand Down
8 changes: 4 additions & 4 deletions lib/concentrate/producer/httpoison/state_machine.ex
Original file line number Diff line number Diff line change
Expand Up @@ -382,11 +382,11 @@ defmodule Concentrate.Producer.HTTPoison.StateMachine do
[{message, delay} | fallback_messages]
end

defp error_log_level(:closed), do: :warn
defp error_log_level({:closed, _}), do: :warn
defp error_log_level(:closed), do: :warning
defp error_log_level({:closed, _}), do: :warning
defp error_log_level({:ssl_closed, _}), do: :info
defp error_log_level(:timeout), do: :warn
defp error_log_level({:unexpected_code, _}), do: :warn
defp error_log_level(:timeout), do: :warning
defp error_log_level({:unexpected_code, _}), do: :warning
defp error_log_level(_), do: :error

defp now do
Expand Down
2 changes: 1 addition & 1 deletion lib/concentrate/producer/s3.ex
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ defmodule Concentrate.Producer.S3 do
{:noreply, [], state}

{_, error} ->
Logger.warn(
Logger.warning(
"#{__MODULE__} error fetching s3 url=#{state.url}} error=#{inspect(error, limit: :infinity)}"
)

Expand Down
2 changes: 1 addition & 1 deletion mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"plug_crypto": {:hex, :plug_crypto, "1.2.2", "05654514ac717ff3a1843204b424477d9e60c143406aa94daf2274fdd280794d", [:mix], [], "hexpm", "87631c7ad914a5a445f0a3809f99b079113ae4ed4b867348dd9eec288cecb6db"},
"ranch": {:hex, :ranch, "1.7.1", "6b1fab51b49196860b733a49c07604465a47bdb78aa10c1c16a3d199f7f8c881", [:rebar3], [], "hexpm", "451d8527787df716d99dc36162fca05934915db0b6141bbdac2ea8d3c7afc7d7"},
"sentry": {:hex, :sentry, "8.0.6", "c8de1bf0523bc120ec37d596c55260901029ecb0994e7075b0973328779ceef7", [:mix], [{:hackney, "~> 1.8", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: true]}, {:plug, "~> 1.6", [hex: :plug, repo: "hexpm", optional: true]}, {:plug_cowboy, "~> 2.3", [hex: :plug_cowboy, repo: "hexpm", optional: true]}], "hexpm", "051a2d0472162f3137787c7c9d6e6e4ef239de9329c8c45b1f1bf1e9379e1883"},
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"},
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"},
"statistex": {:hex, :statistex, "1.0.0", "f3dc93f3c0c6c92e5f291704cf62b99b553253d7969e9a5fa713e5481cd858a5", [:mix], [], "hexpm", "ff9d8bee7035028ab4742ff52fc80a2aa35cece833cf5319009b52f1b5a86c27"},
"stream_data": {:hex, :stream_data, "0.5.0", "b27641e58941685c75b353577dc602c9d2c12292dd84babf506c2033cd97893e", [:mix], [], "hexpm", "012bd2eec069ada4db3411f9115ccafa38540a3c78c4c0349f151fc761b9e271"},
"telemetry": {:hex, :telemetry, "0.4.3", "a06428a514bdbc63293cd9a6263aad00ddeb66f608163bdec7c8995784080818", [:rebar3], [], "hexpm", "eb72b8365ffda5bed68a620d1da88525e326cb82a75ee61354fc24b844768041"},
Expand Down
2 changes: 1 addition & 1 deletion test/concentrate/gtfs/unzip_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defmodule Concentrate.GTFS.UnzipTest do
end

# all the zip module arguments are charlists, hence the single quotes
{:ok, {_, zip_file}} = :zip.create('gtfs.zip', bodies, [:memory])
{:ok, {_, zip_file}} = :zip.create(~c"gtfs.zip", bodies, [:memory])
assert is_binary(zip_file)
parsed = parse(zip_file, [])
assert find_body(parsed, "trips.txt") == "trips.txt body"
Expand Down

0 comments on commit 092af7a

Please sign in to comment.