diff options
| author | Luke Hoersten <[email protected]> | 2026-07-28 20:13:03 -0500 |
|---|---|---|
| committer | Luke Hoersten <[email protected]> | 2026-07-28 20:13:03 -0500 |
| commit | 3a535a57c1b5fa48d5495c31d308b42943f92583 (patch) | |
| tree | f752c07530fcb10b75de41428b82df34d43e5a87 /src/config.rs | |
| parent | cf5eabb9647e6d53ec29a3f7de599a38dbfd5490 (diff) | |
Rename project to mattertimectl; default fabric label to Matter Time Controllerv0.1.0
- Rename crate, binary, and repo from mattertimesync to mattertimectl
- Change default fabricLabel to "Matter Time Controller"
- Point README at src.nth.io as the main repo, GitHub as the mirror
Diffstat (limited to 'src/config.rs')
| -rw-r--r-- | src/config.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/config.rs b/src/config.rs index 3e53975..8288d4e 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,5 +1,5 @@ //! Validated JSON configuration, file-compatible with the TypeScript -//! implementation (`/etc/mattertimesync/config.json`, camelCase keys). +//! implementation (`/etc/mattertimectl/config.json`, camelCase keys). //! //! Unknown fields are rejected loudly via serde's `deny_unknown_fields`; //! device membership deliberately lives in controller storage, not here. @@ -10,7 +10,7 @@ use std::path::PathBuf; use jiff::tz::TimeZone; use serde::Deserialize; -pub const DEFAULT_CONFIG_PATH: &str = "/etc/mattertimesync/config.json"; +pub const DEFAULT_CONFIG_PATH: &str = "/etc/mattertimectl/config.json"; /// Matter FabricDescriptorStruct label limit. const FABRIC_LABEL_MAX_LENGTH: usize = 32; @@ -94,7 +94,7 @@ fn default_timezone() -> String { } fn default_fabric_label() -> String { - "Matter Time Sync".into() + "Matter Time Controller".into() } impl Config { @@ -168,18 +168,18 @@ impl Config { mod tests { use super::*; - const MINIMAL: &str = r#"{ "storagePath": "/var/lib/mattertimesync" }"#; + const MINIMAL: &str = r#"{ "storagePath": "/var/lib/mattertimectl" }"#; #[test] fn minimal_config_applies_defaults() { let config = Config::parse(MINIMAL).unwrap(); assert_eq!( config.storage_path, - PathBuf::from("/var/lib/mattertimesync") + PathBuf::from("/var/lib/mattertimectl") ); assert_eq!(config.timezone, "America/Chicago"); assert_eq!(config.log_level, LogLevel::Info); - assert_eq!(config.fabric_label, "Matter Time Sync"); + assert_eq!(config.fabric_label, "Matter Time Controller"); } #[test] @@ -220,7 +220,7 @@ mod tests { let config = Config::parse(r#"{ "storagePath": "/var/lib/$USER/mts" }"#).unwrap(); assert!(config.path_warnings()[0].contains("unexpanded shell variable")); - let config = Config::parse(r#"{ "storagePath": "/var/lib/mattertimesync" }"#).unwrap(); + let config = Config::parse(r#"{ "storagePath": "/var/lib/mattertimectl" }"#).unwrap(); assert!(config.path_warnings().is_empty()); } |
