vendor in easyenv.rs (a crate I wrote)

This commit is contained in:
Brandon Thomas committed 2023-09-26 02:03:25 -04:00
1 parent 070433b416
commit 1d3885c367
29 files changed
+431 -22

No files matched your search

Generated
-2
View File
@@ -1986,8 +1986,6 @@ dependencies = [
[[package]]
name = "easyenv"
version = "0.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19f3d306adc28605287f6ded00f416af86373c9c576ce174b6bd2afd46d575a7"
dependencies = [
"dotenv",
"env_logger 0.10.0",
+1
View File
@@ -28,6 +28,7 @@ members = [
"crates/lib/deprecated/config", # TODO(bt, 2023-02-13): Deprecate or repurpose
"crates/lib/deprecated/container_common", # TODO(bt, 2023-02-13): Pull apart and rehome pieces
"crates/lib/deprecated/http_server_common", # TODO(bt, 2023-03-20): Move useful pieces to actix_helpers
"crates/lib/easyenv", # NB: Vendored version of https://github.com/echelon/easyenv.rs that we'll improve.
"crates/lib/envvar",
"crates/lib/errors",
"crates/lib/files/archives",
+1 -1
View File
@@ -17,6 +17,7 @@ path = "src/main.rs"
# Internal
config = { path = "../../lib/deprecated/config" }
container_common = { path = "../../lib/deprecated/container_common" }
easyenv = { path = "../../lib/easyenv" }
# External
anyhow = "1.0.40"
@@ -25,7 +26,6 @@ clap = "2.34.0" # TODO: This is really out of date, but has conflicts when updat
# TODO/NB: Commenting out clap4 as it prevents windows builds
# NB: clap4 = { package = "clap", version = "4.0" }
dotenv = "0.15.0"
easyenv = "0.0.9"
hostname = "0.3.1"
log = "0.4.14"
+1 -1
View File
@@ -17,6 +17,7 @@ path = "src/main.rs"
# Internal
config = { path = "../../lib/deprecated/config" }
container_common = { path = "../../lib/deprecated/container_common" }
easyenv = { path = "../../lib/easyenv" }
# External
anyhow = "1.0.40"
@@ -24,7 +25,6 @@ chrono = { version = "0.4.19", features = ["serde"] }
# TODO/NB: Commenting out clap4 as it prevents windows builds
# clap4 = { package = "clap", version = "4.0" } # TODO/NB: We're using an older version of clap elsewhere, hence the naming.
dotenv = "0.15.0"
easyenv = "0.0.9"
hostname = "0.3.1"
log = "0.4.14"
@@ -16,12 +16,12 @@ path = "src/lib.rs"
# Internal
container_common = { path = "../../deprecated/container_common" }
easyenv = { path = "../../easyenv" }
# External
anyhow = "1.0.40"
once_cell = "1.9.0"
regex = "1.5.4"
easyenv = "0.0.9"
# Twitch
# NB "unsupported" pubsub features may disappear from the Twitch API at any time. It's an unofficial API.
+1 -1
View File
@@ -15,13 +15,13 @@ path = "src/lib.rs"
[dependencies]
# Internal
easyenv = { path = "../easyenv" }
envvar = { path = "../envvar" }
errors = { path = "../errors" }
server_environment = { path = "../server_environment" }
# External
dotenv = "0.15.0"
easyenv = "0.0.9"
hostname = "0.3.1"
log = "0.4.14"
+4 -1
View File
@@ -15,6 +15,9 @@ path = "src/lib.rs"
# TODO: Remove these dependencies.
# These were introduced in refactoring. Config should have few, if any, dependencies.
[dependencies]
# Internal
easyenv = { path = "../../../lib/easyenv" }
# External
anyhow = "1.0.40"
easyenv = "0.0.9"
url = "2.2.2"
+21
View File
@@ -0,0 +1,21 @@
[package]
name = "easyenv"
edition = "2018"
version = "0.0.9"
authors = [
"Brandon Thomas <bt@brand.io>",
"Brandon Thomas <echelon@gmail.com>",
]
publish = false
[lib]
name = "easyenv"
path = "src/lib.rs"
[dependencies]
dotenv = "0.15.0"
env_logger = "0.10.0"
log = "0.4.14"
[dev-dependencies]
# None yet
+75
View File
@@ -0,0 +1,75 @@
use std::env;
use std::env::VarError;
use log::warn;
use crate::EnvError;
/// Get an environment variable as a bool.
/// If not present or there is an error in parsing, return `None`.
pub fn get_env_bool_optional(env_name: &str) -> Option<bool> {
match env::var(env_name).as_ref().ok() {
None => {
warn!("Env var '{}' not supplied.", env_name);
None
},
Some(val) => match val.as_ref() {
"TRUE" => Some(true),
"true" => Some(true),
"FALSE" => Some(false),
"false" => Some(false),
_ => {
warn!("Env var '{}': error parsing boolean value: {:?}", env_name, val);
None
},
}
}
}
/// Get an environment variable as a bool, or fall back to the provided default.
/// Returns the default in the event of a parse error.
pub fn get_env_bool_or_default(env_name: &str, default: bool) -> bool {
get_env_bool_internal(env_name)
.map(|maybe| match maybe {
None => {
warn!("Env var '{}' not supplied. Using default '{}'.", env_name, default);
default
},
Some(val) => val,
})
.unwrap_or_else(|e| {
warn!("Env var '{}': error parsing boolean value: {:?}. Using default '{}'.",
env_name, e, default);
default
})
}
/// Get an environment variable as a bool.
/// If not provided or cannot parse, return an error.
pub fn get_env_bool_required(env_name: &str) -> Result<bool, EnvError> {
get_env_bool_internal(env_name)
.and_then(|maybe| match maybe {
None => {
warn!("Env var '{}' not supplied.", env_name);
Err(EnvError::RequiredNotPresent)
},
Some(val) => Ok(val),
})
}
fn get_env_bool_internal(env_name: &str) -> Result<Option<bool>, EnvError> {
match env::var(env_name).as_deref() {
Err(err) => match err {
// TODO: EnvError enum variant for equals sign in env var name
VarError::NotPresent => Ok(None),
VarError::NotUnicode(_) => Err(EnvError::NotUnicode),
}
Ok(val) => match val {
"TRUE" => Ok(Some(true)),
"true" => Ok(Some(true)),
"FALSE" => Ok(Some(false)),
"false" => Ok(Some(false)),
_ => {
Err(EnvError::ParseError { reason: format!("Couldn't parse as bool: '{}'", val) })
},
}
}
}
+63
View File
@@ -0,0 +1,63 @@
use crate::EnvError;
use log::warn;
use std::env;
use std::time::Duration;
/// Get an environment variable as a `Duration` in seconds.
/// If not provided or cannot parse, return an error.
pub fn get_env_duration_seconds_required(env_name: &str) -> Result<Duration, EnvError> {
get_env_duration_seconds_internal(env_name)
.and_then(|maybe| match maybe {
None => {
warn!("Env var '{}' not supplied.", env_name);
Err(EnvError::RequiredNotPresent)
},
Some(val) => Ok(val),
})
}
/// Get an environment variable as a `Duration` in seconds.
/// If not present or there is an error in parsing, return `None`.
pub fn get_env_duration_seconds_optional(env_name: &str) -> Option<Duration> {
match get_env_duration_seconds_internal(env_name) {
Err(e) => {
warn!("Env var '{}': error parsing numeric value: `{:?}`. Returning no value.", env_name, e);
None
},
Ok(None) => {
warn!("Env var '{}' not present.", env_name);
None
},
Ok(Some(value)) => Some(value),
}
}
/// Get an environment variable as a `Duration` in seconds, or fall back to the provided default.
/// Returns the default in the event of a parse error.
pub fn get_env_duration_seconds_or_default(env_name: &str, default: Duration) -> Duration {
get_env_duration_seconds_internal(env_name)
.map(|maybe| match maybe {
None => {
warn!("Env var '{}' not supplied. Using default '{:?}'.", env_name, default);
default
},
Some(val) => val,
})
.unwrap_or_else(|e| {
warn!("Env var '{}': error parsing numeric value: {:?}. Using default '{:?}'.",
env_name, e, default);
default
})
}
fn get_env_duration_seconds_internal(env_name: &str) -> Result<Option<Duration>, EnvError> {
match env::var(env_name).as_ref().ok() {
None => {
Ok(None)
},
Some(val) => match val.parse::<u64>() {
Ok(number) => Ok(Some(Duration::from_secs(number))),
Err(_) => Err(EnvError::ParseError { reason: format!("Couldn't parse as number: '{}'", val) })
}
}
}
+111
View File
@@ -0,0 +1,111 @@
// Copyright (c) 2020 Brandon Thomas <bt@brand.io>
//! Very simple helper functions for environment variables and environment variable-driven
//! `env_logger` configuration.
#![deny(dead_code)]
#![deny(missing_docs)]
#![deny(unreachable_patterns)]
#![deny(unused_extern_crates)]
#![deny(unused_imports)]
#![deny(unused_qualifications)]
#![deny(unused_qualifications)]
use env_logger;
use std::error::Error;
use std::fmt::{Display, Debug, Formatter};
use std::{env, fmt};
mod boolean;
mod duration;
mod pathbuf;
mod string;
mod num;
/// Name of the environment variable Rust's env logger uses
pub const ENV_RUST_LOG : &'static str = "RUST_LOG";
const DEFAULT_LOG_LEVEL: &'static str = "info";
/// Errors with env variables.
#[derive(Debug)]
pub enum EnvError {
/// The environment variable value is not unicode.
NotUnicode,
/// Problem parsing the env variable as the desired type.
ParseError {
/// Explanation of the parsing failure.
reason: String
},
/// The required environment variable wasn't present.
RequiredNotPresent,
}
impl Display for EnvError {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
write!(f, "EnvError::ParseError")
}
}
impl Error for EnvError {
fn source(&self) -> Option<&(dyn Error + 'static)> {
None
}
}
pub use boolean::get_env_bool_optional;
pub use boolean::get_env_bool_or_default;
pub use boolean::get_env_bool_required;
pub use duration::get_env_duration_seconds_optional;
pub use duration::get_env_duration_seconds_or_default;
pub use duration::get_env_duration_seconds_required;
pub use num::get_env_num;
pub use pathbuf::get_env_pathbuf_optional;
pub use pathbuf::get_env_pathbuf_or_default;
pub use pathbuf::get_env_pathbuf_required;
pub use string::get_env_string_optional;
pub use string::get_env_string_or_default;
pub use string::get_env_string_required;
/// Initialize Rust's env logger.
///
/// The Rust logger reads the desired log level from the `RUST_LOG` environment variable. If this
/// isn't set, the provided default is used. If a default fallback isn't provided to this function,
/// we fall back to `"info"`.
///
/// A more robust logging config might configure on a per-component basis, eg.
/// `"tokio_reactor=warn,hyper=info,debug"`. You can read more in the `log` and `env_logger` crate
/// docs.
pub fn init_env_logger(default_if_absent: Option<&str>) {
if env::var(ENV_RUST_LOG)
.as_ref()
.ok()
.is_none()
{
let default_log_level = default_if_absent.unwrap_or(DEFAULT_LOG_LEVEL);
println!("Setting default logging level to \"{}\", override with env var {}.",
default_log_level, ENV_RUST_LOG);
env::set_var(ENV_RUST_LOG, default_log_level);
}
env_logger::init();
}
/// Initialize dotenv with the default `.env` config file.
pub fn init_dotenv() {
match dotenv::dotenv() {
Ok(_) => println!("dotenv configs initialized"),
Err(e) => println!("Could not initialize dotenv: {:?}", e),
}
}
/// Initialize dotenv and env logger.
/// See `init_dotenv()` and `init_env_logger(Option<&str>)` for further details.
pub fn init_all_with_default_logging(default_if_absent: Option<&str>) {
init_dotenv();
init_env_logger(default_if_absent)
}
+26
View File
@@ -0,0 +1,26 @@
use std::env;
use std::fmt::{Debug, Display};
use std::str::FromStr;
use log::{error, warn};
use crate::EnvError;
/// Get an environment variable as a number, or fall back to the provided default if not set.
/// If the env var is present but can't be parsed, an error is returned instead.
pub fn get_env_num<T>(env_name: &str, default: T) -> Result<T, EnvError>
where T: FromStr + Display,
T::Err: Debug
{
match env::var(env_name).as_ref().ok() {
None => {
warn!("Env var '{}' not supplied. Using default '{}'.", env_name, default);
Ok(default)
},
Some(val) => {
val.parse::<T>()
.map_err(|e| {
error!("Can't parse value '{:?}'. Error: {:?}", val, e);
EnvError::ParseError { reason: format!("Can't parse value: {:?}", e) }
})
},
}
}
+73
View File
@@ -0,0 +1,73 @@
use crate::EnvError;
use log::warn;
use std::env::VarError;
use std::env;
use std::path::{Path, PathBuf};
use std::str::FromStr;
/// Get an environment variable as a `PathBuf`.
/// If not provided or cannot parse, return an error.
pub fn get_env_pathbuf_required(env_name: &str) -> Result<PathBuf, EnvError> {
get_env_pathbuf_internal(env_name)
.and_then(|maybe| match maybe {
None => {
warn!("Env var '{}' not supplied.", env_name);
Err(EnvError::RequiredNotPresent)
},
Some(val) => Ok(val),
})
}
/// Get an environment variable as a `PathBuf`.
/// If not present or there is an error in parsing, return `None`.
pub fn get_env_pathbuf_optional(env_name: &str) -> Option<PathBuf> {
match get_env_pathbuf_internal(env_name) {
Err(e) => {
warn!("Env var '{}': error parsing PathBuf value: `{:?}`. Returning no value.", env_name, e);
None
},
Ok(None) => {
warn!("Env var '{}' not present.", env_name);
None
},
Ok(Some(value)) => Some(value),
}
}
/// Get an environment variable as a `PathBuf`, or fall back to the provided default.
/// Returns the default in the event of a parse error.
pub fn get_env_pathbuf_or_default<P: AsRef<Path>>(env_name: &str, default_value: P) -> PathBuf {
get_env_pathbuf_internal(env_name)
.map(|maybe| match maybe {
None => {
let default_path = default_value.as_ref().to_path_buf();
warn!("Env var '{}' not supplied. Using default '{:?}'.", env_name, &default_path);
default_path
},
Some(val) => val,
})
.unwrap_or_else(|e| {
let default_path = default_value.as_ref().to_path_buf();
warn!("Env var '{}': error: {:?}. Using default '{:?}'.",
env_name, e, &default_path);
default_path
})
}
fn get_env_pathbuf_internal(env_name: &str) -> Result<Option<PathBuf>, EnvError> {
match env::var(env_name).as_ref() {
Err(err) => match err {
// TODO: EnvError enum variant for equals sign in env var name
VarError::NotPresent => Ok(None),
VarError::NotUnicode(_) => Err(EnvError::NotUnicode),
}
Ok(val) => {
match PathBuf::from_str(val) {
Ok(path) => Ok(Some(path)),
Err(_err) => Err(EnvError::ParseError {
reason: "error parsing PathBuf from value".to_string()
}),
}
}
}
}
+37
View File
@@ -0,0 +1,37 @@
use crate::EnvError;
use log::warn;
use std::env;
/// Get an environment variable as an optional `String`.
pub fn get_env_string_optional(env_name: &str) -> Option<String> {
match env::var(env_name).as_ref().ok() {
Some(s) => Some(s.to_string()),
None => {
warn!("Env var '{}' not supplied.", env_name);
None
},
}
}
/// Get an environment variable as a `String`, or fall back to the provided default.
pub fn get_env_string_or_default(env_name: &str, default: &str) -> String {
match env::var(env_name).as_ref().ok() {
Some(s) => s.to_string(),
None => {
warn!("Env var '{}' not supplied. Using default '{}'.", env_name, default);
default.to_string()
},
}
}
/// Get an environment variable as a `String`, or return an error.
pub fn get_env_string_required(env_name: &str) -> Result<String, EnvError> {
match env::var(env_name).as_ref().ok() {
Some(s) => Ok(s.to_string()),
None => {
warn!("Required env var '{}' not supplied.", env_name);
Err(EnvError::RequiredNotPresent)
},
}
}
+1 -1
View File
@@ -16,11 +16,11 @@ path = "src/lib.rs"
[dependencies]
# Internal
easyenv = { path = "../easyenv" }
errors = { path = "../errors" }
# External
dotenv = "0.15.0"
easyenv = "0.0.9"
log = "0.4.14"
[dev-dependencies]
+1 -1
View File
@@ -15,12 +15,12 @@ path = "src/lib.rs"
[dependencies]
# Internal
easyenv = { path = "../easyenv" }
envvar = { path = "../envvar" }
errors = { path = "../errors" }
# External
dotenv = "0.15.0"
easyenv = "0.0.9"
log = "0.4.14"
[dev-dependencies]
+1 -1
View File
@@ -17,6 +17,7 @@ path = "src/main.rs"
# Internal
actix_helpers = { path = "../../lib/actix_helpers" }
concurrency = { path = "../../lib/concurrency" }
easyenv = { path = "../../lib/easyenv" }
enums = { path = "../../_types/enums" }
errors = { path = "../../lib/errors" }
fakeyou_client = { path = "../../lib/api_clients/fakeyou_client" }
@@ -34,7 +35,6 @@ base64 = "0.21.0"
chrono = { version = "0.4.19", features = ["serde"] }
clap = "2.34.0" # TODO: This is really out of date, but has conflicts when updated
dotenv = "0.15.0"
easyenv = "0.0.9"
log = "0.4.14"
once_cell = "1.9.0"
path-absolutize = "3.0.14" # Absolute paths have not stabilized in Rust yet
+1 -1
View File
@@ -17,6 +17,7 @@ path = "src/main.rs"
# Internal
config = { path = "../../../lib/deprecated/config" }
container_common = { path = "../../../lib/deprecated/container_common" }
easyenv = { path = "../../../lib/easyenv" }
enums = { path = "../../../_types/enums" }
errors = { path = "../../../lib/errors" }
jobs_common = { path = "../../../lib/jobs_common" }
@@ -29,7 +30,6 @@ anyhow = "1.0.40"
chrono = { version = "0.4.19", features = ["serde"] }
clap = "2.34.0" # TODO: This is really out of date, but has conflicts when updated
dotenv = "0.15.0"
easyenv = "0.0.9"
hostname = "0.3.1"
log = "0.4.14"
rand = "0.8.3"
+1 -1
View File
@@ -21,6 +21,7 @@ concurrency = { path = "../../../lib/concurrency" }
config = { path = "../../../lib/deprecated/config" }
container_common = { path = "../../../lib/deprecated/container_common" }
crockford = { path = "../../../lib/crockford" }
easyenv = { path = "../../../lib/easyenv" }
enums = { path = "../../../_types/enums" }
envvar = { path = "../../../lib/envvar" }
errors = { path = "../../../lib/errors" }
@@ -42,7 +43,6 @@ anyhow = "1.0.40"
chrono = { version = "0.4.19", features = ["serde"] }
clap = "2.34.0" # TODO: This is really out of date, but has conflicts when updated
dotenv = "0.15.0"
easyenv = "0.0.9"
hostname = "0.3.1"
lfu = "0.2.5"
log = "0.4.14"
+1 -1
View File
@@ -22,6 +22,7 @@ cloud_storage = { path = "../../../lib/api_clients/cloud_storage" }
concurrency = { path = "../../../lib/concurrency" }
config = { path = "../../../lib/deprecated/config" }
container_common = { path = "../../../lib/deprecated/container_common" }
easyenv = { path = "../../../lib/easyenv" }
enums = { path = "../../../_types/enums" }
envvar = { path = "../../../lib/envvar" }
errors = { path = "../../../lib/errors" }
@@ -45,7 +46,6 @@ anyhow = "1.0.40"
chrono = { version = "0.4.19", features = ["serde"] }
clap = "2.34.0" # TODO: This is really out of date, but has conflicts when updated
dotenv = "0.15.0"
easyenv = "0.0.9"
hostname = "0.3.1"
lfu = "0.2.5"
log = "0.4.14"
@@ -18,6 +18,7 @@ path = "src/main.rs"
cloud_storage = { path = "../../../lib/api_clients/cloud_storage" }
config = { path = "../../../lib/deprecated/config" }
container_common = { path = "../../../lib/deprecated/container_common" }
easyenv = { path = "../../../lib/easyenv" }
enums = { path = "../../../_types/enums" }
google_drive_common = { path = "../../../lib/api_clients/google_drive_common" }
hashing = { path = "../../../lib/files/hashing" }
@@ -33,7 +34,6 @@ anyhow = "1.0.40"
chrono = { version = "0.4.19", features = ["serde"] }
clap = "2.34.0" # TODO: This is really out of date, but has conflicts when updated
dotenv = "0.15.0"
easyenv = "0.0.9"
hostname = "0.3.1"
lfu = "0.2.5"
log = "0.4.14"
@@ -18,6 +18,7 @@ path = "src/main.rs"
cloud_storage = { path = "../../../lib/api_clients/cloud_storage" }
config = { path = "../../../lib/deprecated/config" }
container_common = { path = "../../../lib/deprecated/container_common" }
easyenv = { path = "../../../lib/easyenv" }
hashing = { path = "../../../lib/files/hashing" }
jobs_common = { path = "../../../lib/jobs_common" }
memory_caching = { path = "../../../lib/caching/memory_caching" }
@@ -32,7 +33,6 @@ anyhow = "1.0.40"
chrono = { version = "0.4.19", features = ["serde"] }
clap = "2.34.0" # TODO: This is really out of date, but has conflicts when updated
dotenv = "0.15.0"
easyenv = "0.0.9"
hostname = "0.3.1"
lfu = "0.2.5"
log = "0.4.14"
@@ -19,6 +19,7 @@ buckets = { path = "../../../_types/buckets" }
cloud_storage = { path = "../../../lib/api_clients/cloud_storage" }
config = { path = "../../../lib/deprecated/config" }
container_common = { path = "../../../lib/deprecated/container_common" }
easyenv = { path = "../../../lib/easyenv" }
google_drive_common = { path = "../../../lib/api_clients/google_drive_common" }
hashing = { path = "../../../lib/files/hashing" }
jobs_common = { path = "../../../lib/jobs_common" }
@@ -33,7 +34,6 @@ anyhow = "1.0.40"
chrono = { version = "0.4.19", features = ["serde"] }
clap = "2.34.0" # TODO: This is really out of date, but has conflicts when updated
dotenv = "0.15.0"
easyenv = "0.0.9"
hostname = "0.3.1"
lfu = "0.2.5"
log = "0.4.14"
@@ -18,6 +18,7 @@ path = "src/main.rs"
cloud_storage = { path = "../../../lib/api_clients/cloud_storage" }
config = { path = "../../../lib/deprecated/config" }
container_common = { path = "../../../lib/deprecated/container_common" }
easyenv = { path = "../../../lib/easyenv" }
google_drive_common = { path = "../../../lib/api_clients/google_drive_common" }
jobs_common = { path = "../../../lib/jobs_common" }
mysql_queries = { path = "../../../lib/mysql_queries" }
@@ -31,7 +32,6 @@ anyhow = "1.0.40"
chrono = { version = "0.4.19", features = ["serde"] }
clap = "2.34.0" # TODO: This is really out of date, but has conflicts when updated
dotenv = "0.15.0"
easyenv = "0.0.9"
hostname = "0.3.1"
lfu = "0.2.5"
log = "0.4.14"
@@ -17,6 +17,7 @@ path = "src/main.rs"
# Internal
config = { path = "../../../lib/deprecated/config" }
container_common = { path = "../../../lib/deprecated/container_common" }
easyenv = { path = "../../../lib/easyenv" }
http_server_common = { path = "../../../lib/deprecated/http_server_common" }
mysql_queries = { path = "../../../lib/mysql_queries" }
redis_common = { path = "../../../lib/redis_common" }
@@ -29,7 +30,6 @@ base64 = "0.13.0"
chrono = { version = "0.4.19", features = ["serde"] }
derive_more = "0.99.14"
dotenv = "0.15.0"
easyenv = "0.0.9"
futures-timer = "3.0.2"
hex = "0.4.3"
hostname = "0.3.1"
+1 -1
View File
@@ -16,6 +16,7 @@ path = "src/main.rs"
# Internal
actix_helpers = { path = "../../../lib/actix_helpers" }
easyenv = { path = "../../../lib/easyenv" }
errors = { path = "../../../lib/errors" }
http_server_common = { path = "../../../lib/deprecated/http_server_common" }
reusable_types = { path = "../../../_types/reusable_types" }
@@ -23,7 +24,6 @@ reusable_types = { path = "../../../_types/reusable_types" }
# External
chrono = { version = "0.4.19", features = ["serde"] }
dotenv = "0.15.0"
easyenv = "0.0.9"
hostname = "0.3.1"
#once_cell = "1.9.0"
#regex = "1.5.4"
@@ -23,6 +23,7 @@ cloud_storage = { path = "../../../lib/api_clients/cloud_storage" }
config = { path = "../../../lib/deprecated/config" }
container_common = { path = "../../../lib/deprecated/container_common" }
datetimes = { path = "../../../lib/datetimes" }
easyenv = { path = "../../../lib/easyenv" }
enums = { path = "../../../_types/enums" }
envvar = { path = "../../../lib/envvar" }
errors = { path = "../../../lib/errors" }
@@ -56,7 +57,6 @@ base64 = "0.13.0"
chrono = { version = "0.4.19", features = ["serde"] }
derive_more = "0.99.14"
dotenv = "0.15.0"
easyenv = "0.0.9"
hex = "0.4.3"
hostname = "0.3.1"
lazy_static = "1.4.0"
@@ -17,6 +17,7 @@ path = "src/main.rs"
# Internal
config = { path = "../../../lib/deprecated/config" }
container_common = { path = "../../../lib/deprecated/container_common" }
easyenv = { path = "../../../lib/easyenv" }
errors = { path = "../../../lib/errors" }
http_server_common = { path = "../../../lib/deprecated/http_server_common" }
mysql_queries = { path = "../../../lib/mysql_queries" }
@@ -29,7 +30,6 @@ base64 = "0.13.0"
chrono = { version = "0.4.19", features = ["serde"] }
derive_more = "0.99.14"
dotenv = "0.15.0"
easyenv = "0.0.9"
futures-timer = "3.0.2"
hex = "0.4.3"
hostname = "0.3.1"
+2 -1
View File
@@ -19,6 +19,7 @@ cargo test \
cargo test \
--package inference-job \
-- \
--skip util::audiowmark::tests::test_audiowmark
--skip util::audiowmark::tests::test_audiowmark \
--skip util::common_commands::audiowmark::tests::test_audiowmark
echo 'Tests passed.'