-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a8c8195
commit a15f1a7
Showing
11 changed files
with
39 additions
and
31 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
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 |
---|---|---|
|
@@ -4,3 +4,5 @@ mod error; | |
pub mod utils; | ||
|
||
pub use error::{anyhow, Context, Result}; | ||
|
||
pub use utils::pkg::*; |
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 |
---|---|---|
|
@@ -3,5 +3,6 @@ pub mod env; | |
pub mod git; | ||
pub mod loaders; | ||
pub mod parsers; | ||
pub mod pkg; | ||
pub mod stringify; | ||
pub mod telemetry; |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pub const PKG_VERSION: &str = env!("CARGO_PKG_VERSION"); | ||
pub const PKG_NAME: &str = env!("CARGO_PKG_NAME"); | ||
pub const PKG_REPOSITORY: &str = env!("CARGO_PKG_REPOSITORY"); | ||
pub const PKG_HOMEPAGE: &str = env!("CARGO_PKG_HOMEPAGE"); | ||
pub const PKG_AUTHORS: &str = env!("CARGO_PKG_AUTHORS"); |
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,12 +1,12 @@ | ||
use assert_cmd::Command; | ||
use predicates::prelude::*; | ||
use rover::PKG_VERSION; | ||
|
||
#[test] | ||
fn it_prints_info() { | ||
let mut cmd = Command::cargo_bin("rover").unwrap(); | ||
let result = cmd.arg("info").assert().success(); | ||
|
||
// the version should always be available in the `info` output | ||
let version = env!("CARGO_PKG_VERSION"); | ||
result.stderr(predicate::str::contains(version)); | ||
result.stderr(predicate::str::contains(PKG_VERSION)); | ||
} |