Skip to content

Commit 31f57f0

Browse files
author
Joe Grund
committed
Consolidate crates
Signed-off-by: Joe Grund <[email protected]>
1 parent 76056ce commit 31f57f0

File tree

7 files changed

+23
-53
lines changed

7 files changed

+23
-53
lines changed

Cargo.lock

Lines changed: 3 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
[workspace]
2-
members = ["commandeer-test", "commandeer-cli", "commandeer-macros"]
2+
members = ["commandeer-test", "commandeer-macros"]
33
resolver = "3"
44

55
[workspace.package]
6-
version = "0.1.0"
6+
version = "0.1.1"
77
edition = "2024"
88
license = "MIT"
99
keywords = ["cli", "command", "testing", "record", "replay"]
10+
default-run = "commandeer"
1011

1112
[workspace.dependencies]
1213
anyhow = "1"

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ Commandeer allows you to record command-line invocations and their outputs durin
1313

1414
## Workspace Structure
1515

16-
This project is organized as a Cargo workspace with three main crates:
16+
This project is organized as a Cargo workspace with two crates:
1717

1818
- **`commandeer-test`** - Core library providing record/replay functionality
19-
- **`commandeer-cli`** - Command-line binary for standalone record/replay operations
2019
- **`commandeer-macros`** - Procedural macros for test setup automation
2120

2221
## Installation
@@ -31,7 +30,7 @@ cargo add commandeer --dev
3130

3231
### CLI Binary
3332

34-
The `commandeer-cli` binary provides standalone record and replay functionality:
33+
The `commandeer` binary provides standalone record and replay functionality:
3534

3635
#### Recording Commands
3736

@@ -183,7 +182,7 @@ Recordings are stored in JSON format:
183182
cargo build --workspace
184183

185184
# Build specific crate
186-
cargo build -p commandeer-cli
185+
cargo build -p commandeer-test
187186
```
188187

189188
### Running Tests
@@ -200,10 +199,10 @@ cargo test -p commandeer
200199

201200
```bash
202201
# Test record functionality
203-
cargo run -p commandeer-cli -- record --command echo "Hello, Commandeer"
202+
cargo run record --command echo "Hello, Commandeer"
204203

205204
# Test replay functionality
206-
cargo run -p commandeer-cli -- replay --command echo "Hello, Commandeer"
205+
cargo run replay --command echo "Hello, Commandeer"
207206
```
208207

209208
## Use Cases

commandeer-cli/Cargo.toml

Lines changed: 0 additions & 26 deletions
This file was deleted.

commandeer-test/Cargo.toml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,28 @@ keywords.workspace = true
66
license.workspace = true
77
description = "Takes over your commands for testing with record and replay support."
88

9+
[[bin]]
10+
name = "commandeer"
11+
path = "src/main.rs"
12+
913
[lints]
1014
workspace = true
1115

1216
[dependencies]
17+
anyhow = { workspace = true }
18+
clap = { workspace = true }
19+
commandeer-macros = { path = "../commandeer-macros", version = "0.1.0" }
20+
escargot = { workspace = true }
21+
serde = { workspace = true }
22+
serde_json = { workspace = true }
23+
tempfile = { workspace = true }
1324
tokio = { workspace = true, features = [
1425
"fs",
1526
"io-util",
1627
"macros",
1728
"process",
1829
"rt-multi-thread",
1930
] }
20-
serde = { workspace = true }
21-
serde_json = { workspace = true }
22-
anyhow = { workspace = true }
23-
escargot = { workspace = true }
24-
tempfile = { workspace = true }
25-
commandeer-macros = { path = "../commandeer-macros", version = "0.1.0" }
2631

2732
[dev-dependencies]
2833
serial_test.workspace = true

commandeer-test/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ impl Commandeer {
182182

183183
let mock_runner = CargoBuild::new()
184184
.manifest_path(PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("Cargo.toml"))
185-
.package("commandeer-cli")
185+
.package("commandeer-test")
186186
.bin("commandeer")
187187
.run()
188188
.expect("Failed to build mock binary");

0 commit comments

Comments
 (0)