From 1f559580818757dfbdc352869ae86508ed974e82 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Nov 2024 23:50:46 +0000 Subject: [PATCH 1/3] Update thiserror requirement from 1.0 to 2.0 Updates the requirements on [thiserror](https://github.com/dtolnay/thiserror) to permit the latest version. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.0...2.0.0) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- env-settings-utils/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env-settings-utils/Cargo.toml b/env-settings-utils/Cargo.toml index c0edb11..c58f513 100644 --- a/env-settings-utils/Cargo.toml +++ b/env-settings-utils/Cargo.toml @@ -16,7 +16,7 @@ version.workspace = true [dependencies] dotenvy = "0.15" -thiserror = "1.0" +thiserror = "2.0" [dev-dependencies] assert_fs = "1.0" From f7bdff8c4c6569c828233411496b48a65b4fb37e Mon Sep 17 00:00:00 2001 From: Dario Curreri Date: Sun, 22 Dec 2024 18:21:37 +0100 Subject: [PATCH 2/3] ci: update pre-commit ci config --- .pre-commit-config.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cfef43b..83f8748 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,7 +25,3 @@ repos: args: [--autofix, --no-sort-keys] - id: sort-simple-yaml - id: trailing-whitespace - -ci: - autoupdate_branch: develop - autoupdate_commit_msg: ⬆ [pre-commit.ci] pre-commit autoupdate From 0e60e160aa6f968bd99207e2805f31e964bba296 Mon Sep 17 00:00:00 2001 From: Dario Curreri Date: Sun, 22 Dec 2024 18:33:06 +0100 Subject: [PATCH 3/3] docs: update LICENSE badge --- README.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 7ed52d7..9086285 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@
![crates](https://img.shields.io/crates/v/env-settings.svg) -![license](https://img.shields.io/crates/l/env-settings) +![license](https://img.shields.io/crates/l/env-settings) ![validate](https://github.com/dariocurr/env-settings/actions/workflows/validate.yml/badge.svg)
@@ -26,13 +26,13 @@ cargo add env-settings env-settings-derive env-settings-utils When you add the `EnvSettings` derive to a `struct`, two public methods are added to it -- ```rust +- ```rust fn from_env(...) -> env_settings_utils::EnvSettingsResult ``` Create a new instance using just the environment variables. Skipped fields must be passed. If something fails, it returns an `env_settings_utils::EnvSettingsError` error -- ```rust +- ```rust fn new(...) -> env_settings_utils::EnvSettingsResult ``` @@ -125,18 +125,18 @@ fn main() { The current supported parameters for the structs are: -- `case_insensitive`: whether the environment variables matching should be case insensitive. By default, matching is case sensitive. -- `delay`: whether to delay the lookup for environment variables from compilation time to run time. By default the lookup is performed at compilation time -- `file_path`: the file path to read to add some environment variables (e.g. `.env`). By default, it is not set -- `prefix`: the prefix to add to the name of the struct fields before matching the environment variables. By default, it is not set +- `case_insensitive`: whether the environment variables matching should be case insensitive. By default, matching is case sensitive. +- `delay`: whether to delay the lookup for environment variables from compilation time to run time. By default the lookup is performed at compilation time +- `file_path`: the file path to read to add some environment variables (e.g. `.env`). By default, it is not set +- `prefix`: the prefix to add to the name of the struct fields before matching the environment variables. By default, it is not set #### Field The current supported parameters for the fields are: -- `default`: the default value to use if the environment variable is not found. By default, it is not set -- `skip`: whether to skip the parsing of the environment variable. It is necessary if the type specified does not implement `std::str::FromStr`. -- `variable`: the environment variable to use for the lookup. By default, the name of the field +- `default`: the default value to use if the environment variable is not found. By default, it is not set +- `skip`: whether to skip the parsing of the environment variable. It is necessary if the type specified does not implement `std::str::FromStr`. +- `variable`: the environment variable to use for the lookup. By default, the name of the field ### Variables resolution hierarchy @@ -149,11 +149,11 @@ The current supported parameters for the fields are: Before starting to work on a contribution please read: -- [Code of Conduct](https://github.com/dariocurr/.github/blob/main/.github/CODE_OF_CONDUCT.md) -- [Contributing](https://github.com/dariocurr/.github/blob/main/.github/CONTRIBUTING.md) -- [Goverance](https://github.com/dariocurr/.github/blob/main/.github/GOVERNANCE.md) -- [Security](https://github.com/dariocurr/.github/blob/main/.github/SECURITY.md) -- [Support](https://github.com/dariocurr/.github/blob/main/.github/SUPPORT.md) +- [Code of Conduct](https://github.com/dariocurr/.github/blob/main/.github/CODE_OF_CONDUCT.md) +- [Contributing](https://github.com/dariocurr/.github/blob/main/.github/CONTRIBUTING.md) +- [Goverance](https://github.com/dariocurr/.github/blob/main/.github/GOVERNANCE.md) +- [Security](https://github.com/dariocurr/.github/blob/main/.github/SECURITY.md) +- [Support](https://github.com/dariocurr/.github/blob/main/.github/SUPPORT.md) ### Run tests