Compare commits

..
Author SHA1 Message Date
phoenix 22bd8e4737 bump: icarus_envy
Release Tagging / release (pull_request) Successful in 1m0s
Rust Build / Test Suite (pull_request) Successful in 1m1s
Rust Build / Rustfmt (pull_request) Successful in 49s
Rust Build / Check (pull_request) Successful in 2m30s
Rust Build / build (pull_request) Successful in 44s
Rust Build / Clippy (pull_request) Successful in 1m43s
2026-07-07 16:33:41 -04:00
phoenix e1e3a8bf8d Removing async and async dev dependency
Rust Build / Check (pull_request) Successful in 35s
Release Tagging / release (pull_request) Failing after 39s
Rust Build / Test Suite (pull_request) Successful in 29s
Rust Build / Rustfmt (pull_request) Successful in 38s
Rust Build / Clippy (pull_request) Successful in 31s
Rust Build / build (pull_request) Successful in 45s
2026-07-07 16:31:40 -04:00
10 changed files with 49 additions and 50 deletions
+2 -2
View File
@@ -9,8 +9,8 @@ POSTGRES_MAIN_PASSWORD=password
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}
SOARICARUS_BASE_API_URL=https://soaricarus.com
SOARICARUS_AUTH_BASE_API_URL=https://auth.soaricarus.com
ICARUS_BASE_API_URL=https://icarus.com
ICARUS_AUTH_BASE_API_URL=https://auth.icarus.com
APP_ENV=development
BACKEND_PORT=8001
FRONTEND_URL=http://localhost:4200
+2 -2
View File
@@ -9,8 +9,8 @@ POSTGRES_MAIN_PASSWORD=password
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}
SOARICARUS_BASE_API_URL=https://soaricarus.com
SOARICARUS_AUTH_BASE_API_URL=https://auth.soaricarus.com
ICARUS_BASE_API_URL=https://icarus.com
ICARUS_AUTH_BASE_API_URL=https://auth.icarus.com
APP_ENV=development
BACKEND_PORT=8001
FRONTEND_URL=http://localhost:4200
+1 -1
View File
@@ -20,7 +20,7 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.97
toolchain: 1.96.1
components: cargo
- uses: Swatinem/rust-cache@v2
+6 -6
View File
@@ -1,4 +1,4 @@
name: sienvy Build
name: Rust Build
on:
push:
@@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.97
toolchain: 1.96.1
- uses: Swatinem/rust-cache@v2
- run: cargo check
@@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.97
toolchain: 1.96.1
- uses: Swatinem/rust-cache@v2
- run: cargo test
@@ -38,7 +38,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.97
toolchain: 1.96.1
- run: rustup component add rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
@@ -50,7 +50,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.97
toolchain: 1.96.1
- run: rustup component add clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy -- -D warnings
@@ -62,6 +62,6 @@ jobs:
- uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.97
toolchain: 1.96.1
- uses: Swatinem/rust-cache@v2
- run: cargo build
Generated
+8 -8
View File
@@ -29,6 +29,14 @@ version = "0.15.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b"
[[package]]
name = "icarus_envy"
version = "0.8.0"
dependencies = [
"const_format",
"dotenvy",
]
[[package]]
name = "konst"
version = "0.2.20"
@@ -62,14 +70,6 @@ dependencies = [
"proc-macro2",
]
[[package]]
name = "sienvy"
version = "0.8.0"
dependencies = [
"const_format",
"dotenvy",
]
[[package]]
name = "unicode-ident"
version = "1.0.24"
+1 -1
View File
@@ -1,5 +1,5 @@
[package]
name = "sienvy"
name = "icarus_envy"
version = "0.8.0"
edition = "2024"
rust-version = "1.95"
-1
View File
@@ -1,4 +1,3 @@
# sienvy
This is a library used to retrieve environment variables associated with various
icarus projects. Rather than having the various icarus projects such as icarus,
icarus_auth, songparser, and others, have environment code, it would be more
+2 -2
View File
@@ -40,7 +40,7 @@ pub fn get_root_directory() -> crate::EnvVar {
pub fn get_icarus_base_api_url() -> crate::EnvVar {
dotenvy::dotenv().ok();
let key = crate::keys::SOARICARUS_BASE_API_URL;
let key = crate::keys::ICARUS_BASE_API_URL;
let value = std::env::var(key).expect(key);
crate::init_envvar(key, &value)
@@ -48,7 +48,7 @@ pub fn get_icarus_base_api_url() -> crate::EnvVar {
pub fn get_icarus_auth_base_api_url() -> crate::EnvVar {
dotenvy::dotenv().ok();
let key = crate::keys::SOARICARUS_AUTH_BASE_API_URL;
let key = crate::keys::ICARUS_AUTH_BASE_API_URL;
let value = std::env::var(key).expect(key);
crate::init_envvar(key, &value)
+9 -9
View File
@@ -2,7 +2,7 @@
pub const DB_URL: &str = "DATABASE_URL";
/// Environment key for secret main key
/// Used for the soaricarus app
/// Used for the icarus app
pub const SECRET_MAIN_KEY: &str = "SECRET_MAIN_KEY";
/// Environment key for service logins
@@ -12,14 +12,14 @@ pub const SERVICE_PASSPHRASE: &str = "SERVICE_PASSPHRASE";
/// Generic use of secret key that could be found in various apps
pub const SECRET_KEY: &str = "SECRET_KEY";
/// Environment key for root directory for the soaricarus app
/// Environment key for root directory for the icarus app
pub const ROOT_DIRECTORY: &str = "ROOT_DIRECTORY";
/// Environment key for soaricarus api url
pub const SOARICARUS_BASE_API_URL: &str = "SOARICARUS_BASE_API_URL";
/// Environment key for icarus api url
pub const ICARUS_BASE_API_URL: &str = "ICARUS_BASE_API_URL";
/// Environment key for soaricarus auth api url
pub const SOARICARUS_AUTH_BASE_API_URL: &str = "SOARICARUS_AUTH_BASE_API_URL";
/// Environment key for icarus auth api url
pub const ICARUS_AUTH_BASE_API_URL: &str = "ICARUS_AUTH_BASE_API_URL";
/// Environment key for App status
pub const APP_ENV: &str = "APP_ENV";
@@ -41,9 +41,9 @@ pub mod error {
pub const SERVICE_LOGIN: &str = concatcp!(super::SERVICE_PASSPHRASE, " ", GENERAL_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 SOARICARUS_BASE_API_URL: &str = concatcp!(super::SOARICARUS_BASE_API_URL, " ", GENERAL_ERROR);
pub const SOARICARUS_AUTH_BASE_API_URL: &str =
concatcp!(super::SOARICARUS_AUTH_BASE_API_URL, " ", 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 APP_ENV: &str = concatcp!(super::APP_ENV, " ", GENERAL_ERROR);
pub const BACKEND_PORT: &str = concatcp!(super::BACKEND_PORT, " ", GENERAL_ERROR);
pub const FRONTEND_URL: &str = concatcp!(super::FRONTEND_URL, " ", GENERAL_ERROR);
+18 -18
View File
@@ -2,7 +2,7 @@
mod tests {
#[test]
fn test_dburl() {
let result = sienvy::environment::get_db_url();
let result = icarus_envy::environment::get_db_url();
assert_eq!(
result.value, "postgres://myuser:password@localhost:5432/my_db",
"DATABASE_URL does not match {:?}",
@@ -12,7 +12,7 @@ mod tests {
#[test]
fn test_get_secret_main_key() {
let result = sienvy::environment::get_secret_main_key();
let result = icarus_envy::environment::get_secret_main_key();
assert_eq!(
result.value, "Somesupersecretpassword!!!45345435",
"SECRET_MAIN_KEY does not match {:?}",
@@ -22,7 +22,7 @@ mod tests {
#[test]
fn test_get_service_passphrase() {
let result = sienvy::environment::get_service_passphrase();
let result = icarus_envy::environment::get_service_passphrase();
assert_eq!(
result.value, "T5OCHDHadAtuOWIqRAS7u8XHDDkzKT1Uvvw7mGMkNzKjVdlHA8xGdILf2adDHspO",
"SERVICE_PASSPHRASE does not match {:?}",
@@ -32,7 +32,7 @@ mod tests {
#[test]
fn test_get_secret_key() {
let result = sienvy::environment::get_secret_key();
let result = icarus_envy::environment::get_secret_key();
assert_eq!(
result.value, "AmIGoodEnoughForYou?",
"SECRET_KEY does not match {:?}",
@@ -42,7 +42,7 @@ mod tests {
#[test]
fn test_get_root_directory() {
let result = sienvy::environment::get_root_directory();
let result = icarus_envy::environment::get_root_directory();
assert_eq!(
result.value, "/path/to/root",
"ROOT_DIRECTORY does not match {:?}",
@@ -52,7 +52,7 @@ mod tests {
#[test]
fn test_get_icarus_base_api_url() {
let result = sienvy::environment::get_icarus_base_api_url();
let result = icarus_envy::environment::get_icarus_base_api_url();
assert_eq!(
result.value, "https://icarus.com",
"ICARUS_BASE_API_URL does not match {:?}",
@@ -62,57 +62,57 @@ mod tests {
#[test]
fn test_get_app_env() {
let result = sienvy::environment::get_app_env();
let result = icarus_envy::environment::get_app_env();
assert_eq!(
result.value,
"development",
"{} does not match {:?}",
sienvy::keys::APP_ENV,
icarus_envy::keys::APP_ENV,
result
)
}
#[test]
fn test_get_backend_port() {
let result = sienvy::environment::get_backend_port();
let result = icarus_envy::environment::get_backend_port();
assert_eq!(
result.value,
"8001",
"{} does not match {:?}",
sienvy::keys::BACKEND_PORT,
icarus_envy::keys::BACKEND_PORT,
result
)
}
#[test]
fn test_get_frontend_url() {
let result = sienvy::environment::get_frontend_url();
let result = icarus_envy::environment::get_frontend_url();
assert_eq!(
result.value,
"http://localhost:4200",
"{} does not match {:?}",
sienvy::keys::FRONTEND_URL,
icarus_envy::keys::FRONTEND_URL,
result
)
}
#[test]
fn test_get_rust_log() {
let result = sienvy::environment::get_rust_log();
let result = icarus_envy::environment::get_rust_log();
assert_eq!(
result.value,
"debug",
"{} does not match {:?}",
sienvy::keys::RUST_LOG,
icarus_envy::keys::RUST_LOG,
result
)
}
#[test]
fn test_get_allowed_origins() {
let result = sienvy::environment::get_allowed_origins();
let result = icarus_envy::environment::get_allowed_origins();
assert_eq!(
result.value,
"https://soaricarus.com,https://www.soaricarus.com",
"{} does not match {:?}",
sienvy::keys::ALLOWED_ORIGINS,
icarus_envy::keys::ALLOWED_ORIGINS,
result
);
@@ -122,7 +122,7 @@ mod tests {
result.key
);
match sienvy::utility::delimitize(&result) {
match icarus_envy::utility::delimitize(&result) {
Ok(allowed_origins) => {
assert_eq!(
allowed_origins.len(),
@@ -152,7 +152,7 @@ mod tests {
];
for (key, value) in keys.iter() {
let result = sienvy::environment::get_env(key);
let result = icarus_envy::environment::get_env(key);
assert_eq!(
result.value, *value,
"{:?} does not match {:?}",