forked from maurocordioli/viperus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lint, cleanup, fmt, clippy, 2021 edition
A few minor cleanups to make it easier to submit PRs: * migrate to 2021 edition * run `cargo fmt` * bump some dependencies to their latest * Note that Clap is locked to 2.x until clap-rs/clap#1206 is fixed in v4 (?) * spelling fixes TODO for another PR: * fix many clippy [from_over_into](https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into) warnings in the src/map/map_value.rs file. * README.md still has a few bugs. Uncomment a section in the lib.rs to show them during the test run.
- Loading branch information
Showing
16 changed files
with
169 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/target | ||
**/*.rs.bk | ||
Cargo.lock | ||
/nogit | ||
/nogit | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,13 +2,13 @@ | |
name = "viperus" | ||
version = "0.1.11" | ||
authors = ["mauro cordioli <[email protected]>"] | ||
edition = "2018" | ||
edition = "2021" | ||
license = "MIT OR Apache-2.0" | ||
repository = "https://github.com/maurocordioli/viperus" | ||
description="Viperus is an (in)complete configuration solution for rust applications heavly inspired by the GO package Viper.It supports defaults reading from JSON, TOML, YAML, envfile,java properties, environment variables reading from Clap command line flags setting explicit values" | ||
description = "Viperus is an (in)complete configuration solution for rust applications heavly inspired by the GO package Viper.It supports defaults reading from JSON, TOML, YAML, envfile,java properties, environment variables reading from Clap command line flags setting explicit values" | ||
exclude = ["tarpaulin-report.html"] | ||
keywords= ["config", "yaml", "toml", "json", "dotenv"] | ||
readme="README.md" | ||
keywords = ["config", "yaml", "toml", "json", "dotenv"] | ||
readme = "README.md" | ||
|
||
[badges] | ||
|
||
|
@@ -44,22 +44,22 @@ maintenance = { status = "experimental" } | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
log="0.4" | ||
serde={ version="1.0.0", optional=true} | ||
serde_yaml={ version="0.8.11", optional=true} | ||
serde_json={ version="1.0.44", optional=true} | ||
clap={ version="2.33.0", optional=true} | ||
|
||
dotenv={ version="0.15.0", optional=true} | ||
toml= { version="0.5.5", optional=true} | ||
java-properties = { version="1.2.0", optional=true} | ||
lazy_static= { version="1.4.0", optional=true} | ||
notify = { version="4.0.0", optional=true} | ||
|
||
[dev-dependencies] | ||
env_logger = "0.7.1" | ||
tempfile = "3.1.0" | ||
log = "0.4" | ||
serde = { version = "1.0.0", optional = true } | ||
serde_yaml = { version = "0.8.11", optional = true } | ||
serde_json = { version = "1.0.44", optional = true } | ||
clap = { version = "2.34.0", optional = true } | ||
|
||
dotenv = { version = "0.15.0", optional = true } | ||
toml = { version = "0.5.5", optional = true } | ||
java-properties = { version = "1.4.0", optional = true } | ||
|
||
lazy_static = { version = "1.4.0", optional = true } | ||
notify = { version = "4.0.0", optional = true } | ||
|
||
[dev-dependencies] | ||
env_logger = "0.9" | ||
tempfile = "3.3.0" | ||
criterion = "0.3.0" | ||
|
||
[[bench]] | ||
|
@@ -75,15 +75,15 @@ default = ["cache", "global", "fmt-clap", "fmt-env", "fmt-javaproperties", "fmt- | |
global = ["lazy_static"] | ||
|
||
# cache queries | ||
cache =[] | ||
cache = [] | ||
|
||
# triggers parameter changes in config files | ||
watch=["global", "notify"] | ||
watch = ["global", "notify"] | ||
|
||
# supported format parsers | ||
fmt-clap=["clap"] | ||
fmt-env=["dotenv"] | ||
fmt-javaproperties=["java-properties"] | ||
fmt-json=["serde","serde_json"] | ||
fmt-toml=[ "toml"] | ||
fmt-yaml=["serde","serde_yaml"] | ||
fmt-clap = ["clap"] | ||
fmt-env = ["dotenv"] | ||
fmt-javaproperties = ["java-properties"] | ||
fmt-json = ["serde", "serde_json"] | ||
fmt-toml = ["toml"] | ||
fmt-yaml = ["serde", "serde_yaml"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
use super::*; | ||
use log::debug; | ||
|
||
/// JsonAdapter map a Json file in a linear multilevel key/value array | ||
/// | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.