Skip to content

Commit

Permalink
use module name
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyshull committed Jun 26, 2024
1 parent a55a569 commit 1c0d981
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/dotcom/cache/key_generator.ex
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ defmodule Dotcom.Cache.KeyGenerator do
mod
|> Kernel.to_string()
|> String.split(".")
|> then(fn [_ | tail] -> tail end)
|> Kernel.then(fn [_ | tail] -> tail end)
|> Enum.map_join(".", &Recase.to_snake/1)
|> String.downcase()
end
Expand Down
2 changes: 1 addition & 1 deletion lib/dotcom/cache/trip_plan_feedback/key_generator.ex
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ defmodule Dotcom.Cache.TripPlanFeedback.KeyGenerator do
mod
|> Kernel.to_string()
|> String.split(".")
|> then(fn [_ | tail] -> tail end)
|> Kernel.then(fn [_ | tail] -> tail end)
|> Enum.map_join(".", &Recase.to_snake/1)
|> String.downcase()
end
Expand Down
2 changes: 1 addition & 1 deletion lib/dotcom/trip_plan/map.ex
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ defmodule Dotcom.TripPlan.Map do

polyline
|> Polyline.decode()
|> Kernel.then(fn line -> Enum.concat([[from], line, [to]]) end)
|> Kernel.Kernel.then(fn line -> Enum.concat([[from], line, [to]]) end)
|> Polyline.encode()
end

Expand Down
10 changes: 5 additions & 5 deletions test/dotcom_web/controllers/helpers_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ defmodule DotcomWeb.ControllerHelpersTest do
|> assign(:route, route)
|> assign(:direction_id, 1)
|> assign_alerts([])
|> then(fn conn -> conn.assigns.alerts end)
|> Kernel.then(fn conn -> conn.assigns.alerts end)

expected = [@commuter_rail_alert, @worcester_alert, @worcester_inbound_alert]
assert alerts == expected
Expand All @@ -231,7 +231,7 @@ defmodule DotcomWeb.ControllerHelpersTest do
|> assign(:route, route)
|> assign(:direction_id, 0)
|> assign_alerts([])
|> then(fn conn -> conn.assigns.alerts end)
|> Kernel.then(fn conn -> conn.assigns.alerts end)

expected = [@commuter_rail_alert, @worcester_alert]
assert alerts == expected
Expand All @@ -246,7 +246,7 @@ defmodule DotcomWeb.ControllerHelpersTest do
|> assign(:route, route)
|> assign(:direction_id, nil)
|> assign_alerts([])
|> then(fn conn -> conn.assigns.alerts end)
|> Kernel.then(fn conn -> conn.assigns.alerts end)

expected = [@commuter_rail_alert, @worcester_alert, @worcester_inbound_alert]
assert alerts == expected
Expand All @@ -260,7 +260,7 @@ defmodule DotcomWeb.ControllerHelpersTest do
|> assign(:date_time, Timex.now())
|> assign(:route, route)
|> assign_alerts([])
|> then(fn conn -> conn.assigns.alerts end)
|> Kernel.then(fn conn -> conn.assigns.alerts end)

expected = [@commuter_rail_alert, @worcester_alert, @worcester_inbound_alert]
assert alerts == expected
Expand Down Expand Up @@ -294,7 +294,7 @@ defmodule DotcomWeb.ControllerHelpersTest do
|> assign(:route, route)
|> assign(:direction_id, 0)
|> assign_alerts([])
|> then(fn conn -> conn.assigns.alerts end)
|> Kernel.then(fn conn -> conn.assigns.alerts end)

expected = [@commuter_rail_alert, @worcester_alert, worcester_ambiguous_alert]
assert alerts == expected
Expand Down

0 comments on commit 1c0d981

Please sign in to comment.