Skip to content

Commit

Permalink
Rename noseyparker-bin to noseyparker-cli; bump version number; a…
Browse files Browse the repository at this point in the history
…dd version tests
  • Loading branch information
bradlarsen committed Apr 24, 2023
1 parent 270cb57 commit 254fec3
Show file tree
Hide file tree
Showing 99 changed files with 84 additions and 8 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## Unreleased

## [v0.13.0](https://github.com/praetorian-inc/noseyparker/releases/v0.13.0) (2023-04-24)

A prebuilt multiplatform Docker image for this release is available for x86_64 and ARM64 architectures:
```
docker pull ghcr.io/praetorian-inc/noseyparker:v0.13.0
```

### Changes
- Nosey Parker now statically links against a bundled version of [Vectorscan](https://github.com/Vectorcamp/vectorscan) for regular expression matching instead of [Hyperscan](https://github.com/intel/hyperscan) ([#5](https://github.com/praetorian-inc/noseyparker/issues/5)).
This makes building from source simpler, particularly for ARM-based platforms.
Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license = "Apache-2.0"
authors = ["Brad Larsen <[email protected]>"]
homepage = "https://github.com/praetorian-inc/noseyparker"
repository = "https://github.com/praetorian-inc/noseyparker"
version = "0.12.0-dev"
version = "0.13.0"

publish = false

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ WORKDIR "/noseyparker"
COPY . .

RUN CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse \
cargo install --root /usr/local --profile release --locked --path crates/noseyparker-bin
cargo install --root /usr/local --profile release --locked --path crates/noseyparker-cli

################################################################################
# Build a smaller image just for running the `noseyparker` binary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ homepage.workspace = true
repository.workspace = true
publish.workspace = true

name = "noseyparker-bin"
name = "noseyparker-cli"
version.workspace = true
description = "Nosey Parker is a command-line program that finds secrets and sensitive information in textual data and Git history."

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ use noseyparker::git_url::GitUrl;
// -----------------------------------------------------------------------------
#[derive(Parser, Debug)]
#[command(
name("noseyparker"),
author, // retrieved from Cargo.toml `authors`
version, // retrieved from Cargo.toml `version`
about, // retrieved from Cargo.toml `description`
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
source: crates/noseyparker-cli/tests/test_noseyparker_help.rs
expression: stdout
---

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
source: crates/noseyparker-cli/tests/test_noseyparker_help.rs
expression: stderr
---
error: unrecognized subcommand 'version'

Usage: noseyparker [OPTIONS] <COMMAND>

For more information, try '--help'.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
source: crates/noseyparker-cli/tests/test_noseyparker_help.rs
expression: status
---
exit status: 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: crates/noseyparker-cli/tests/test_noseyparker_help.rs
expression: stdout
---
noseyparker 0.13.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
source: crates/noseyparker-cli/tests/test_noseyparker_help.rs
expression: stderr
---

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
source: crates/noseyparker-cli/tests/test_noseyparker_help.rs
expression: status
---
exit status: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: crates/noseyparker-cli/tests/test_noseyparker_help.rs
expression: stdout
---
noseyparker 0.13.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
source: crates/noseyparker-cli/tests/test_noseyparker_help.rs
expression: stderr
---

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
source: crates/noseyparker-cli/tests/test_noseyparker_help.rs
expression: status
---
exit status: 0
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,18 @@ fn help_github_repos() {
fn help_github_repos_short() {
assert_cmd_snapshot!(noseyparker_success!("github", "repos", "-h"));
}

#[test]
fn version_short() {
assert_cmd_snapshot!(noseyparker_success!("-V"));
}

#[test]
fn version_long() {
assert_cmd_snapshot!(noseyparker_success!("--version"));
}

#[test]
fn version_command() {
assert_cmd_snapshot!(noseyparker_failure!("version"));
}

0 comments on commit 254fec3

Please sign in to comment.