From 6353336bba7806a7520c727eb6ec38f772d9692f Mon Sep 17 00:00:00 2001 From: phoenix Date: Thu, 14 Aug 2025 17:57:52 -0400 Subject: [PATCH 1/6] tsk-17: Added ICARUS_AUTH_BASE_API_URL to env files --- .env | 1 + .env.sample | 1 + 2 files changed, 2 insertions(+) diff --git a/.env b/.env index 131d6d5..4905119 100644 --- a/.env +++ b/.env @@ -8,3 +8,4 @@ POSTGRES_MAIN_DB=my_db POSTGRES_MAIN_HOST=localhost DATABASE_URL=postgres://${POSTGRES_MAIN_USER}:${POSTGRES_MAIN_PASSWORD}@${POSTGRES_MAIN_HOST}:5432/${POSTGRES_MAIN_DB} ICARUS_BASE_API_URL=https://icarus.com +ICARUS_AUTH_BASE_API_URL=https://auth.icarus.com diff --git a/.env.sample b/.env.sample index 131d6d5..4905119 100644 --- a/.env.sample +++ b/.env.sample @@ -8,3 +8,4 @@ POSTGRES_MAIN_DB=my_db POSTGRES_MAIN_HOST=localhost DATABASE_URL=postgres://${POSTGRES_MAIN_USER}:${POSTGRES_MAIN_PASSWORD}@${POSTGRES_MAIN_HOST}:5432/${POSTGRES_MAIN_DB} ICARUS_BASE_API_URL=https://icarus.com +ICARUS_AUTH_BASE_API_URL=https://auth.icarus.com -- 2.43.0 From cda52a660f4eb138b56a3f2c9b064b746e002f51 Mon Sep 17 00:00:00 2001 From: phoenix Date: Thu, 14 Aug 2025 18:08:23 -0400 Subject: [PATCH 2/6] tsk-17: Added version tagging for pull requests --- .gitea/workflows/tag_release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitea/workflows/tag_release.yml b/.gitea/workflows/tag_release.yml index 5a4e49c..03870d4 100644 --- a/.gitea/workflows/tag_release.yml +++ b/.gitea/workflows/tag_release.yml @@ -4,6 +4,8 @@ on: push: branches: - main + pull_request: + - main jobs: release: -- 2.43.0 From 93642b9bb348c8f605c11ba588ac6f3af8d46156 Mon Sep 17 00:00:00 2001 From: phoenix Date: Thu, 14 Aug 2025 18:10:45 -0400 Subject: [PATCH 3/6] tsk-17: Workflow fix --- .gitea/workflows/tag_release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/tag_release.yml b/.gitea/workflows/tag_release.yml index 03870d4..f7b78e7 100644 --- a/.gitea/workflows/tag_release.yml +++ b/.gitea/workflows/tag_release.yml @@ -4,7 +4,8 @@ on: push: branches: - main - pull_request: + pull_request: + branches: - main jobs: -- 2.43.0 From 8646def6d589fea50a9ce3299d6eac1a78db8977 Mon Sep 17 00:00:00 2001 From: phoenix Date: Thu, 14 Aug 2025 18:12:34 -0400 Subject: [PATCH 4/6] tsk-17: Added functionality --- src/environment.rs | 5 +++++ src/keys.rs | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/environment.rs b/src/environment.rs index 1b36c8e..fdb636f 100644 --- a/src/environment.rs +++ b/src/environment.rs @@ -27,3 +27,8 @@ pub async fn get_icarus_base_api_url() -> String { dotenvy::dotenv().ok(); std::env::var(crate::keys::ICARUS_BASE_API_URL).expect(crate::keys::error::ICARUS_BASE_API_URL) } + +pub async fn get_icarus_auth_base_api_url() -> String { + dotenvy::dotenv().ok(); + std::env::var(crate::keys::ICARUS_AUTH_BASE_API_URL).expect(crate::keys::error::ICARUS_AUTH_BASE_API_URL) +} diff --git a/src/keys.rs b/src/keys.rs index 2d88721..dcfaa41 100644 --- a/src/keys.rs +++ b/src/keys.rs @@ -18,6 +18,9 @@ pub const ROOT_DIRECTORY: &str = "ROOT_DIRECTORY"; // Environment key for icarus api url pub const ICARUS_BASE_API_URL: &str = "ICARUS_BASE_API_URL"; +// Environment key for icarus auth api url +pub const ICARUS_AUTH_BASE_API_URL: &str = "ICARUS_AUTH_BASE_API_URL"; + pub mod error { use const_format::concatcp; @@ -28,4 +31,5 @@ pub mod error { pub const SECRET_KEY: &str = concatcp!(super::SECRET_KEY, " ", GENERAL_ERROR); pub const ROOT_DIRECTORY: &str = concatcp!(super::ROOT_DIRECTORY, " ", GENERAL_ERROR); pub const ICARUS_BASE_API_URL: &str = concatcp!(super::ICARUS_BASE_API_URL, " ", GENERAL_ERROR); + pub const ICARUS_AUTH_BASE_API_URL: &str = concatcp!(super::ICARUS_AUTH_BASE_API_URL, " ", GENERAL_ERROR); } -- 2.43.0 From c68eb36bc19a1865de1c29b8d86e7377f7ea43fa Mon Sep 17 00:00:00 2001 From: phoenix Date: Thu, 14 Aug 2025 18:13:10 -0400 Subject: [PATCH 5/6] tsk-17: Code formatting --- src/environment.rs | 3 ++- src/keys.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/environment.rs b/src/environment.rs index fdb636f..d001768 100644 --- a/src/environment.rs +++ b/src/environment.rs @@ -30,5 +30,6 @@ pub async fn get_icarus_base_api_url() -> String { pub async fn get_icarus_auth_base_api_url() -> String { dotenvy::dotenv().ok(); - std::env::var(crate::keys::ICARUS_AUTH_BASE_API_URL).expect(crate::keys::error::ICARUS_AUTH_BASE_API_URL) + std::env::var(crate::keys::ICARUS_AUTH_BASE_API_URL) + .expect(crate::keys::error::ICARUS_AUTH_BASE_API_URL) } diff --git a/src/keys.rs b/src/keys.rs index dcfaa41..2a9a8aa 100644 --- a/src/keys.rs +++ b/src/keys.rs @@ -31,5 +31,6 @@ pub mod error { pub const SECRET_KEY: &str = concatcp!(super::SECRET_KEY, " ", GENERAL_ERROR); pub const ROOT_DIRECTORY: &str = concatcp!(super::ROOT_DIRECTORY, " ", GENERAL_ERROR); pub const ICARUS_BASE_API_URL: &str = concatcp!(super::ICARUS_BASE_API_URL, " ", GENERAL_ERROR); - pub const ICARUS_AUTH_BASE_API_URL: &str = concatcp!(super::ICARUS_AUTH_BASE_API_URL, " ", GENERAL_ERROR); + pub const ICARUS_AUTH_BASE_API_URL: &str = + concatcp!(super::ICARUS_AUTH_BASE_API_URL, " ", GENERAL_ERROR); } -- 2.43.0 From d498f600468c7e5fcf03a640f8c5b9476765fe96 Mon Sep 17 00:00:00 2001 From: phoenix Date: Thu, 14 Aug 2025 18:13:43 -0400 Subject: [PATCH 6/6] tsk-17: Version bump --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d52baf3..ab87d49 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -297,7 +297,7 @@ checksum = "f154ce46856750ed433c8649605bf7ed2de3bc35fd9d2a9f30cddd873c80cb08" [[package]] name = "icarus_envy" -version = "0.3.1" +version = "0.3.2" dependencies = [ "async-std", "const_format", diff --git a/Cargo.toml b/Cargo.toml index 0f08fad..8cfc376 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "icarus_envy" -version = "0.3.1" +version = "0.3.2" edition = "2024" rust-version = "1.88" -- 2.43.0