Skip to content

Commit 3d900fb

Browse files
montfortclaude
andauthored
fix: set binary name to arborist instead of arborist-cli (#11)
Add [[bin]] section to Cargo.toml so `cargo install arborist-cli` installs the binary as `arborist`. Update self_update bin_name and test references to match. Bump version to 0.1.1. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f89e5ca commit 3d900fb

10 files changed

Lines changed: 15 additions & 11 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "arborist-cli"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
edition = "2024"
55
description = "CLI for arborist-metrics: cognitive/cyclomatic complexity and SLOC metrics"
66
license = "MIT OR Apache-2.0"
@@ -11,6 +11,10 @@ keywords = ["complexity", "metrics", "cognitive", "cyclomatic", "cli"]
1111
categories = ["command-line-utilities", "development-tools"]
1212
exclude = [".devtrail/", ".github/", ".claude/", ".specify/", "specs/", "tests/fixtures/"]
1313

14+
[[bin]]
15+
name = "arborist"
16+
path = "src/main.rs"
17+
1418
[dependencies]
1519
arborist-metrics = { version = "0.1", features = ["all"] }
1620
clap = { version = "4", features = ["derive"] }

src/update.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fn check_latest_version() -> ExitCode {
3131
match self_update::backends::github::Update::configure()
3232
.repo_owner(REPO_OWNER)
3333
.repo_name(REPO_NAME)
34-
.bin_name("arborist-cli")
34+
.bin_name("arborist")
3535
.current_version(CURRENT_VERSION)
3636
.build()
3737
{
@@ -65,7 +65,7 @@ fn perform_update() -> ExitCode {
6565
let result = self_update::backends::github::Update::configure()
6666
.repo_owner(REPO_OWNER)
6767
.repo_name(REPO_NAME)
68-
.bin_name("arborist-cli")
68+
.bin_name("arborist")
6969
.current_version(CURRENT_VERSION)
7070
.show_download_progress(true)
7171
.show_output(false)

tests/cli/directory.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use assert_cmd::Command;
22
use predicates::prelude::*;
33

44
fn cmd() -> Command {
5-
Command::cargo_bin("arborist-cli").unwrap()
5+
Command::cargo_bin("arborist").unwrap()
66
}
77

88
/// T027: verify directory analysis finds all .rs files recursively

tests/cli/exit_codes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use assert_cmd::Command;
22

33
fn cmd() -> Command {
4-
Command::cargo_bin("arborist-cli").unwrap()
4+
Command::cargo_bin("arborist").unwrap()
55
}
66

77
/// T037: verify `--threshold 5` exits with code 1 when functions exceed threshold

tests/cli/filtering.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use assert_cmd::Command;
22
use predicates::prelude::*;
33

44
fn cmd() -> Command {
5-
Command::cargo_bin("arborist-cli").unwrap()
5+
Command::cargo_bin("arborist").unwrap()
66
}
77

88
/// T036: verify `--threshold 5` shows all functions with `!` on exceeding ones

tests/cli/multi_input.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use assert_cmd::Command;
22
use predicates::prelude::*;
33

44
fn cmd() -> Command {
5-
Command::cargo_bin("arborist-cli").unwrap()
5+
Command::cargo_bin("arborist").unwrap()
66
}
77

88
/// T031: verify multiple positional arguments analyzes both files

tests/cli/output_formats.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use assert_cmd::Command;
22
use predicates::prelude::*;
33

44
fn cmd() -> Command {
5-
Command::cargo_bin("arborist-cli").unwrap()
5+
Command::cargo_bin("arborist").unwrap()
66
}
77

88
/// T020: verify `--format json` produces valid JSON with FileReport schema fields

tests/cli/single_file.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use assert_cmd::Command;
22
use predicates::prelude::*;
33

44
fn cmd() -> Command {
5-
Command::cargo_bin("arborist-cli").unwrap()
5+
Command::cargo_bin("arborist").unwrap()
66
}
77

88
/// T011: verify `arborist tests/fixtures/simple.rs` produces table output

tests/cli/stdin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use assert_cmd::Command;
22
use predicates::prelude::*;
33

44
fn cmd() -> Command {
5-
Command::cargo_bin("arborist-cli").unwrap()
5+
Command::cargo_bin("arborist").unwrap()
66
}
77

88
/// T021: verify stdin with `--language rust --format json` produces valid JSON

0 commit comments

Comments
 (0)