-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Handle platform closures (#2107)
* Added field to struct. * Added fetch for all platform IDs at a station. * Added edge cases so widgets can handle single platform closures. * Added PreFare alert tests. * Added SubwayStatus tests. * Credo. * Fixed check so function can be used by WidgetInstances. * Fixed platform closure logic for SubwayStatus. * Name changes. * Refactor to pattern match Co-authored-by: sloane <[email protected]> * Changed reject to filter. * Formatting. * Fixed route selection for station closures at JFK. * Added cldr_messages to help with pluralizing strings. * Pluralized strings. * Added more tests. * Fixed platform names. * Changed how we determine if ie is for a subway platform. * Fixed tests. * Added platform support for GL. * Use existing function. * No single pipes. * Exclude partial closures from dual_screen_alert?. * Added typespecs. * Added a struct to describe alerts WidgetInstance.SubwayStatus expects. * Added provider so we don't see warnings. * Moved partial closure logic to CG. * Added a comment. * Added better type. * Fixed default. --------- Co-authored-by: sloane <[email protected]>
- Loading branch information
1 parent
24fb7a6
commit ddfe9ab
Showing
14 changed files
with
1,073 additions
and
472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,11 @@ config :ueberauth, Ueberauth, | |
keycloak: nil | ||
] | ||
|
||
config :ex_cldr, | ||
default_locale: "en", | ||
default_backend: Screens.Cldr, | ||
json_library: Jason | ||
|
||
config :screens, | ||
gds_dms_username: "[email protected]", | ||
config_fetcher: Screens.Config.Fetch.S3, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
defmodule Screens.Cldr do | ||
@moduledoc """ | ||
Define a backend module that will host our | ||
Cldr configuration and public API. | ||
Most function calls in Cldr will be calls | ||
to functions on this module. | ||
""" | ||
use Cldr, | ||
locales: ["en"], | ||
default_locale: "en", | ||
providers: [Cldr.Number] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.