From 9203dd3ef7b62489116e7b7fe0b9d288c3389c78 Mon Sep 17 00:00:00 2001 From: Vika Date: Sun, 26 Sep 2021 02:04:27 +0300 Subject: Moved integration tests and allowed the binary to use file backend Now the Redis dependencies are optional and only required if you want to test the backend or actually use it in production. The app displays a hint if you try to launch with an unsupported backend. --- Cargo.toml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index 3974d9c..3f93407 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,7 @@ edition = "2018" [features] default = ["util"] util = ["anyhow"] +redis = ["mobc", "mobc-redis"] [[bin]] name = "kittybox-bulk-import" @@ -16,7 +17,7 @@ required-features = ["util"] [[bin]] name = "pyindieblog-export" path = "src/bin/pyindieblog_to_kittybox.rs" -required-features = ["util"] +required-features = ["util", "redis"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dev-dependencies] @@ -39,7 +40,6 @@ lazy_static = "^1.4.0" # A macro for declaring lazily evaluated statics in log = "^0.4.14" # A lightweight logging facade for Rust markdown = "^0.3.0" # Native Rust library for parsing Markdown and (outputting HTML) markup = "^0.12.0" # HTML templating engine... ok also very funny about markdown and markup... i just realized the pun... -mobc = "^0.7.2" # A generic connection pool with async/await support newbase60 = "^0.1.3" # A library that implements Tantek Çelik's New Base 60 retainer = "^0.2.2" # Minimal async cache in Rust with support for key expirations serde_json = "^1.0.64" # A JSON serialization file format @@ -54,8 +54,12 @@ features = ["attributes", "unstable"] [dependencies.chrono] # Date and time library for Rust version = "^0.4.19" features = ["serde"] +[dependencies.mobc] # A generic connection pool with async/await support +version = "^0.7.2" +optional = true [dependencies.mobc-redis] # Redis support for the mobc connection pool version = "^0.7.0" +optional = true features = ["async-std-comp"] default-features = false [dependencies.prometheus] # Prometheus instrumentation library for Rust applications -- cgit 1.4.1