chore: change structure

This commit is contained in:
Dmitriy Pleshevskiy 2019-12-23 14:56:19 +03:00
parent 78fc86e134
commit 1a6f8c4f5d
7 changed files with 37 additions and 21 deletions

2
.gitignore vendored
View file

@ -3,5 +3,5 @@
/target /target
Cargo.lock Cargo.lock
src/main.rs itconfig/src/main.rs
.env* .env*

View file

@ -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
View 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]

View file

@ -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
View 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' }

View file

@ -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,
} }