From 6abe819b3558d0a0d5134dc987bfca473ff41c83 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Tue, 24 Dec 2019 19:37:55 +0300 Subject: [PATCH] chore: update readme --- README.md | 28 +++++++++++++++++++++++++++- itconfig/README.md | 24 +++++++++++++++++++++--- 2 files changed, 48 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6755b6c..d596326 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # itconfig +[![Documentation](https://docs.rs/itconfig/badge.svg?version=0.2.3)](https://docs.rs/itconfig) + Easy build a configs from environment variables and use it in globally. We recommend you start with the [documentation]. @@ -12,7 +14,7 @@ We recommend you start with the [documentation]. use dotenv::dotenv; config! { - DATABASE_URL: bool, + DEBUG: bool => true, HOST: String => "127.0.0.1".to_string(), } @@ -23,5 +25,29 @@ fn main () { } ``` +## Running tests + +```bash +cargo test +``` + + +## Roadmap + +* [ ] Add namespace for variables +* [ ] Custom env name +* [ ] Add if condition for feature variables + + +## License + +[MIT] © [Ice Temple](https://github.com/icetemple) + + +## Contributors + +[pleshevskiy](https://github.com/pleshevskiy) (Dmitriy Pleshevskiy) – creator, maintainer. + [documentation]: https://docs.rs/itconfig +[MIT]: https://github.com/icetemple/itconfig-rs/blob/master/LICENSE diff --git a/itconfig/README.md b/itconfig/README.md index 6755b6c..1d35b43 100644 --- a/itconfig/README.md +++ b/itconfig/README.md @@ -9,19 +9,37 @@ We recommend you start with the [documentation]. ```rust #[macro_use] extern crate itconfig; -use dotenv::dotenv; +// use dotenv::dotenv; config! { - DATABASE_URL: bool, + DEBUG: bool => true, HOST: String => "127.0.0.1".to_string(), } fn main () { - dotenv().ok(); + // dotenv().ok(); cfg::init(); assert_eq(cfg::HOST(), String::from("127.0.0.1"); } ``` +## Roadmap + +* [ ] Add namespace for variables +* [ ] Custom env name +* [ ] Add if condition for feature variables + + +## License + +[MIT] © [Ice Temple](https://github.com/icetemple) + + +## Contributors + +[pleshevskiy](https://github.com/pleshevskiy) (Dmitriy Pleshevskiy) – creator, maintainer. + + + [documentation]: https://docs.rs/itconfig