Skip to content

Commit

Permalink
Merge pull request #78 from kbknapp/issue-77
Browse files Browse the repository at this point in the history
 fix: debug build missing `termcolor` dependency
  • Loading branch information
Frederick888 authored Oct 6, 2017
2 parents d5b0395 + 05ada44 commit 2ab6ccf
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 9 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
language: rust
rust:
- nightly
# - nightly-2016-03-22
- beta
- stable
matrix:
allow_failures:
- rust: nightly
script:
- |
cargo build &&
cargo test
cargo build
cargo build --features debug
env:
global:
secure: JLBlgHY6OEmhJ8woewNJHmuBokTNUv7/WvLkJGV8xk0t6bXBwSU0jNloXwlH7FiQTc4TccX0PumPDD4MrMgxIAVFPmmmlQOCmdpYP4tqZJ8xo189E5zk8lKF5OyaVYCs5SMmFC3cxCsKjfwGIexNu3ck5Uhwe9jI0tqgkgM3URA=
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 17 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
[package]
authors = ["Kevin K. <[email protected]>", "Frederick Z. <[email protected]>"]
authors = [
"Kevin K. <[email protected]>",
"Frederick Z. <[email protected]>",
]
description = "Cargo subcommand for displaying when dependencies are out of date"
exclude = ["*.png"]
keywords = ["cargo", "subcommand", "dependencies", "cargo-subcommand", "deps"]
keywords = [
"cargo",
"subcommand",
"dependencies",
"cargo-subcommand",
"deps",
]
license = "MIT"
name = "cargo-outdated"
readme = "README.md"
repository = "https://github.com/kbknapp/cargo-outdated.git"
version = "0.5.1"

[[bin]]
name = "cargo-outdated"

Expand All @@ -22,8 +32,12 @@ tabwriter = "~1.0.3"
tempdir = "~0.3.5"
toml = "~0.4.3"

[dependencies.termcolor]
optional = true
version = "0.3.3"

[features]
debug = []
debug = ["termcolor"]
default = []
[profile.release]
lto = true
4 changes: 2 additions & 2 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ macro_rules! verbose {
#[cfg(feature = "debug")]
macro_rules! debug {
($config: expr, $message: expr) => (
$config.shell().say($message, ::term::color::WHITE)?
$config.shell().status_with_color("DEBUG", $message, ::termcolor::Color::White)?
);
($config: expr, $($arg: tt)*) => (
$config.shell().say(format!($($arg)*), ::term::color::WHITE)?
$config.shell().status_with_color("DEBUG", format!($($arg)*), ::termcolor::Color::White)?
);
}

Expand Down
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ extern crate serde;
extern crate serde_derive;
extern crate tabwriter;
extern crate tempdir;
#[cfg(feature = "debug")]
extern crate termcolor;
extern crate toml;

#[macro_use]
Expand Down

0 comments on commit 2ab6ccf

Please sign in to comment.