Compare commits

..
Author SHA1 Message Date
phoenix d06c8fdf49 Name change (#3)
sienvy Build / Check (push) Successful in 26s
sienvy Build / Test Suite (push) Successful in 25s
sienvy Build / Rustfmt (push) Successful in 37s
Release Tagging / release (push) Successful in 2m52s
sienvy Build / Clippy (push) Successful in 2m44s
sienvy Build / build (push) Successful in 2m34s
Reviewed-on: #3
2026-07-14 16:33:01 -04:00
4 changed files with 30 additions and 7 deletions
+22
View File
@@ -0,0 +1,22 @@
Copyright (c) 2026 Kun Deng.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
+2 -2
View File
@@ -38,7 +38,7 @@ pub fn get_root_directory() -> crate::EnvVar {
crate::init_envvar(key, &value) crate::init_envvar(key, &value)
} }
pub fn get_icarus_base_api_url() -> crate::EnvVar { pub fn get_soaricarus_base_api_url() -> crate::EnvVar {
dotenvy::dotenv().ok(); dotenvy::dotenv().ok();
let key = crate::keys::SOARICARUS_BASE_API_URL; let key = crate::keys::SOARICARUS_BASE_API_URL;
let value = std::env::var(key).expect(key); let value = std::env::var(key).expect(key);
@@ -46,7 +46,7 @@ pub fn get_icarus_base_api_url() -> crate::EnvVar {
crate::init_envvar(key, &value) crate::init_envvar(key, &value)
} }
pub fn get_icarus_auth_base_api_url() -> crate::EnvVar { pub fn get_soaricarus_auth_base_api_url() -> crate::EnvVar {
dotenvy::dotenv().ok(); dotenvy::dotenv().ok();
let key = crate::keys::SOARICARUS_AUTH_BASE_API_URL; let key = crate::keys::SOARICARUS_AUTH_BASE_API_URL;
let value = std::env::var(key).expect(key); let value = std::env::var(key).expect(key);
+2 -1
View File
@@ -41,7 +41,8 @@ pub mod error {
pub const SERVICE_LOGIN: &str = concatcp!(super::SERVICE_PASSPHRASE, " ", GENERAL_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 SECRET_KEY: &str = concatcp!(super::SECRET_KEY, " ", GENERAL_ERROR);
pub const ROOT_DIRECTORY: &str = concatcp!(super::ROOT_DIRECTORY, " ", 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_BASE_API_URL: &str =
concatcp!(super::SOARICARUS_BASE_API_URL, " ", GENERAL_ERROR);
pub const SOARICARUS_AUTH_BASE_API_URL: &str = pub const SOARICARUS_AUTH_BASE_API_URL: &str =
concatcp!(super::SOARICARUS_AUTH_BASE_API_URL, " ", GENERAL_ERROR); concatcp!(super::SOARICARUS_AUTH_BASE_API_URL, " ", GENERAL_ERROR);
pub const APP_ENV: &str = concatcp!(super::APP_ENV, " ", GENERAL_ERROR); pub const APP_ENV: &str = concatcp!(super::APP_ENV, " ", GENERAL_ERROR);
+4 -4
View File
@@ -51,11 +51,11 @@ mod tests {
} }
#[test] #[test]
fn test_get_icarus_base_api_url() { fn test_get_soaricarus_base_api_url() {
let result = sienvy::environment::get_icarus_base_api_url(); let result = sienvy::environment::get_soaricarus_base_api_url();
assert_eq!( assert_eq!(
result.value, "https://icarus.com", result.value, "https://soaricarus.com",
"ICARUS_BASE_API_URL does not match {:?}", "SOARICARUS_BASE_API_URL does not match {:?}",
result result
) )
} }