From a2887ecc36b951a1ccef843892de0752eae65b8a Mon Sep 17 00:00:00 2001 From: Matthew Gordon Date: Mon, 19 Feb 2024 21:55:15 -0400 Subject: [PATCH] Rename to Locality --- .cargo/config.toml | 2 +- Cargo.toml | 2 +- src/app.rs | 2 +- src/config.rs | 2 +- src/db/migrations.rs | 2 +- src/main.rs | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 8b7033b..f7da9a3 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,2 @@ [env] -LOCALHUB_STATIC_FILE_PATH = { value = "static", relative = true } +LOCALITY_STATIC_FILE_PATH = { value = "static", relative = true } diff --git a/Cargo.toml b/Cargo.toml index e1de720..066a6fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "localhub" +name = "locality" version = "0.1.0" edition = "2021" diff --git a/src/app.rs b/src/app.rs index 648ce70..b8fa6a0 100644 --- a/src/app.rs +++ b/src/app.rs @@ -15,5 +15,5 @@ struct IndexTemplate<'a> { } async fn root<'a>() -> IndexTemplate<'a> { - IndexTemplate { title: "LocalHub" } + IndexTemplate { title: "Locality" } } diff --git a/src/config.rs b/src/config.rs index 75b026c..63f91a0 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,6 +1,6 @@ use {std::env, thiserror::Error}; -const ENV_VAR_PREFIX: &str = "LOCALHUB_"; +const ENV_VAR_PREFIX: &str = "LOCALITY_"; #[derive(Error, Debug)] pub enum Error { diff --git a/src/db/migrations.rs b/src/db/migrations.rs index 2425bfb..d4a86b6 100644 --- a/src/db/migrations.rs +++ b/src/db/migrations.rs @@ -182,7 +182,7 @@ mod tests { use super::*; async fn test_db() -> Database { - let url = std::env::var("LOCALHUB_TEST_DATABASE_URL").unwrap(); + let url = std::env::var("LOCALITY_TEST_DATABASE_URL").unwrap(); Database::new(&url) .unwrap() .connection_pool diff --git a/src/main.rs b/src/main.rs index 0a326e7..ba1ee03 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,7 +21,7 @@ pub enum Error { fn main() { let runtime = tokio::runtime::Runtime::new().unwrap(); - std::process::exit(match runtime.block_on(localhub_main()) { + std::process::exit(match runtime.block_on(locality_main()) { Ok(()) => 0, Err(err) => { eprintln!("ERROR: {}", err); @@ -30,7 +30,7 @@ fn main() { }) } -async fn localhub_main() -> Result<(), Error> { +async fn locality_main() -> Result<(), Error> { let config = get_config()?; let db_pool = Database::new(&config.database_url)?;