From 4f7434ae0406a32a928911db3eedf0316818e040 Mon Sep 17 00:00:00 2001 From: Thomas Wickham Date: Sat, 5 Jan 2019 22:09:03 +0100 Subject: [PATCH] Bump version to v.1.7.0 --- CHANGELOG.md | 4 ++++ Cargo.toml | 4 ++-- README.md | 8 ++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1764d3..344fb0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ +# 1.7.0 (January, 2019) +- TECH: update lazy\_static +- FEAT: introduce respect for the `NO_COLOR` environment variable + # 1.6.1 (July 9, 2018) - TECH: update lazy\_static - CHORE: fix typos in README and documentation diff --git a/Cargo.toml b/Cargo.toml index 29e5ea4..004ae2f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "colored" description = "The most simple way to add colors in your terminal" -version = "1.6.1" +version = "1.7.0" authors = ["Thomas Wickham "] license = "MPL-2.0" homepage = "https://github.com/mackwic/colored" @@ -14,7 +14,7 @@ keywords = ["color", "string", "term", "ansi_term", "term-painter"] no-color = [] [dependencies] -lazy_static = "^1.0" +lazy_static = "1.2.0" [dev_dependencies] ansi_term = "^0.9" diff --git a/README.md b/README.md index 636b560..59ee690 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Add this in your `Cargo.toml`: ```toml [dependencies] -colored = "1.6" +colored = "1.7" ``` and add this to your `lib.rs` or `main.rs`: @@ -95,7 +95,7 @@ As `Color` implements `FromStr`, `From<&str>`, and `From`, you can easil "white string".color("zorglub"); // the safer way via a Result -let color_res = "zorglub".parse(); // <- this returns a Result +let color_res : Result = "zorglub".parse(); "red string".color(color_res.unwrap_or(Color::Red)); ``` @@ -110,8 +110,8 @@ For example, you can do this in your `Cargo.toml` to disable color in tests: ```toml [features] # this effectively enable the feature `no-color` of colored when testing with -# `cargo test --feature test` -test = ["colored/no-color"] +# `cargo test --feature dumb_terminal` +dumb_terminal = ["colored/no-color"] ``` You can use have even finer control by using the