towerops/lib/towerops/devices
Graham McIntire efaf5558ff refactor: convert 6 Gleam modules to idiomatic Elixir with TDD (#196)
Phase 1: Foundation Types (100% complete)
- query_helpers: SQL LIKE sanitization with pipe operators
- numeric: Integer parsing with pattern matching guards
- result: Pure Elixir Result monad (map, and_then, unwrap_or)

Phase 2: Ecto Domain Types (100% complete)
- ip_address: IPv4/IPv6 validation using :inet directly
- mac_address: Multi-format MAC parsing (colon/hyphen/dot/compact)
- snmp_oid: OID parsing/manipulation with recursive pattern matching

All 198 tests passing across converted modules.
API changed from Gleam-style {:some/:none to idiomatic {:ok/:error.
Refactored parse_numeric_oid to use with statement, reducing nesting depth.

Reviewed-on: graham/towerops-web#196
2026-03-28 09:52:07 -05:00
..
mikrotik_backups refactor: convert 6 Gleam modules to idiomatic Elixir with TDD (#196) 2026-03-28 09:52:07 -05:00
backup_request.ex handle mikrotik ssh 2026-02-02 16:42:18 -06:00
backup_requests.ex handle mikrotik ssh 2026-02-02 16:42:18 -06:00
credential_resolver.ex Replace conditionals with functional pattern matching 2026-02-10 17:11:37 -06:00
device.ex feat: simplify device type to manual-only with 6 options (#109) 2026-03-22 11:24:53 -05:00
device_firmware_history.ex Add firmware tracking database schema 2026-02-01 10:13:16 -06:00
event.ex add sensor value change events for all sensor types 2026-02-11 15:06:55 -06:00
event_logger.ex perf: LiveView event batching & PubSub optimization (TOW-26) 2026-03-15 14:08:27 -05:00
firmware.ex fix nil firmware comparison 2026-02-05 13:47:56 -06:00
firmware_release.ex Add firmware tracking database schema 2026-02-01 10:13:16 -06:00
mikrotik_backup.ex Mikrotik backup and gettext start 2026-02-02 09:11:22 -06:00
mikrotik_backups.ex handle mikrotik ssh 2026-02-02 16:42:18 -06:00
version_comparator.ex refactor: convert 6 Gleam modules to idiomatic Elixir with TDD (#196) 2026-03-28 09:52:07 -05:00