- TimeHelpers.to_datetime: `cond` with match?/2 guards becomes five function heads dispatched by input type — DateTime passes through, NaiveDateTime anchors to UTC, integer is a millisecond Unix epoch, binary tries ISO 8601, everything else is nil. - PageController.health: the three-branch `cond` + inner `if db_healthy` becomes a chain of small respond_* helpers, each pattern-matched on a single axis (health_status, shutting_down?, db_healthy?). db_healthy?/0 isolates the rescue. - format_uptime splits the cond into four format_uptime_parts/4 clauses. Adds tests for the PageController actions (health 200 / 503-draining, ready, sitemap.xml, .well-known/api-catalog, status.json). Coverage 66.81 → 67.29%. |
||
|---|---|---|
| .. | ||
| channels | ||
| components | ||
| controllers | ||
| live | ||
| plugs | ||
| aprs_symbol.ex | ||
| endpoint.ex | ||
| gettext.ex | ||
| router.ex | ||
| telemetry.ex | ||
| time_helpers.ex | ||
| time_utils.ex | ||
| user_auth.ex | ||
| weather_units.ex | ||