chore: change structure
This commit is contained in:
parent
78fc86e134
commit
1a6f8c4f5d
7 changed files with 37 additions and 21 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -3,5 +3,5 @@
|
||||||
/target
|
/target
|
||||||
Cargo.lock
|
Cargo.lock
|
||||||
|
|
||||||
src/main.rs
|
itconfig/src/main.rs
|
||||||
.env*
|
.env*
|
||||||
|
|
22
Cargo.toml
22
Cargo.toml
|
@ -1,17 +1,5 @@
|
||||||
[package]
|
[workspace]
|
||||||
name = "itconfig"
|
members = [
|
||||||
version = "0.2.2"
|
"itconfig",
|
||||||
authors = ["Dmitriy Pleshevskiy <dmitriy@ideascup.me>"]
|
"itconfig_tests"
|
||||||
description = "Easy build a configs from environment variables and use it in globally."
|
]
|
||||||
categories = ["config", "web-programming"]
|
|
||||||
keywords = ["config", "env", "macro", "configuration", "environment"]
|
|
||||||
edition = "2018"
|
|
||||||
license = "MIT"
|
|
||||||
repository = "https://github.com/icetemple/itconfig-rs"
|
|
||||||
homepage = "https://github.com/icetemple/itconfig-rs"
|
|
||||||
documentation = "https://docs.rs/itconfig"
|
|
||||||
readme = "README.md"
|
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
||||||
|
|
||||||
[dependencies]
|
|
17
itconfig/Cargo.toml
Normal file
17
itconfig/Cargo.toml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
[package]
|
||||||
|
name = "itconfig"
|
||||||
|
version = "0.2.3"
|
||||||
|
authors = ["Dmitriy Pleshevskiy <dmitriy@ideascup.me>"]
|
||||||
|
description = "Easy build a configs from environment variables and use it in globally."
|
||||||
|
categories = ["config", "web-programming"]
|
||||||
|
keywords = ["config", "env", "macro", "configuration", "environment"]
|
||||||
|
edition = "2018"
|
||||||
|
license = "MIT"
|
||||||
|
repository = "https://github.com/icetemple/itconfig-rs"
|
||||||
|
homepage = "https://github.com/icetemple/itconfig-rs"
|
||||||
|
documentation = "https://docs.rs/itconfig"
|
||||||
|
readme = "README.md"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
|
@ -108,7 +108,7 @@ impl From<EnvValue> for String {
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// # #[macro_use] extern crate itconfig;
|
/// # #[macro_use] extern crate itconfig;
|
||||||
/// config! {
|
/// config! {
|
||||||
/// #![mod_name = configuration];
|
/// #![mod_name = configuration]
|
||||||
///
|
///
|
||||||
/// DEBUG: bool,
|
/// DEBUG: bool,
|
||||||
/// }
|
/// }
|
||||||
|
@ -166,7 +166,7 @@ macro_rules! __itconfig_parse_module {
|
||||||
// Find module name
|
// Find module name
|
||||||
(
|
(
|
||||||
tokens = [
|
tokens = [
|
||||||
#![mod_name = $mod_name:ident];
|
#![mod_name = $mod_name:ident]
|
||||||
$($rest:tt)*
|
$($rest:tt)*
|
||||||
],
|
],
|
||||||
name = $ignore:tt,
|
name = $ignore:tt,
|
11
itconfig_tests/Cargo.toml
Normal file
11
itconfig_tests/Cargo.toml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[package]
|
||||||
|
name = "itconfig_tests"
|
||||||
|
version = "0.1.0"
|
||||||
|
authors = ["Dmitriy Pleshevskiy <dmitriy@ideascup.me>"]
|
||||||
|
edition = "2018"
|
||||||
|
license = "MIT"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
itconfig = { path = '../itconfig' }
|
|
@ -114,7 +114,7 @@ fn convert_number_value_from_env() {
|
||||||
#[test]
|
#[test]
|
||||||
fn change_config_module_name() {
|
fn change_config_module_name() {
|
||||||
config! {
|
config! {
|
||||||
#![mod_name = custom_config_name];
|
#![mod_name = custom_config_name]
|
||||||
|
|
||||||
DEBUG: bool => true,
|
DEBUG: bool => true,
|
||||||
}
|
}
|
Reference in a new issue