diff --git a/Cargo.lock b/Cargo.lock index fe73106..4150c97 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -94,7 +94,7 @@ checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "client" -version = "0.2.0" +version = "0.3.0" dependencies = [ "clap", "common", @@ -108,7 +108,7 @@ checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "common" -version = "0.2.0" +version = "0.3.0" [[package]] name = "heck" @@ -146,17 +146,9 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "saslauthd" -version = "0.2.0" -dependencies = [ - "clap", - "common", -] - [[package]] name = "server" -version = "0.2.0" +version = "0.3.0" dependencies = [ "clap", "common", diff --git a/Cargo.toml b/Cargo.toml index f27c0dc..9efb150 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,29 +1,14 @@ -[package] -name = "saslauthd" -version = "0.2.0" -edition = "2024" - [workspace] +resolver = "3" members = [ - "common", "server", "client", ] +[workspace.package] +version = "0.3.0" +edition = "2024" + [workspace.dependencies] clap = { version = "4.5.20", features = ["derive"] } common = { path = "common" } - -# Why do I need a [dependencies] that duplicates the [workspace.dependencies]? -# without this it doesn't work. -[dependencies] -clap = { version = "4.5.20", features = ["derive"] } -common = { path = "common" } - -[[bin]] -name = "saslauthd" -path = "server/src/main.rs" - -[[bin]] -name = "saslauthd_test_client" -path = "client/src/main.rs" \ No newline at end of file diff --git a/client/Cargo.toml b/client/Cargo.toml index 4060243..de57014 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -1,8 +1,12 @@ [package] name = "client" -version = "0.2.0" -edition = "2024" +version.workspace = true +edition.workspace = true [dependencies] clap = { workspace = true } -common = { workspace = true } \ No newline at end of file +common = { workspace = true } + +[[bin]] +name = "saslauthd_test_client" +path = "src/main.rs" \ No newline at end of file diff --git a/common/Cargo.toml b/common/Cargo.toml index dd5f554..aa37292 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -1,6 +1,4 @@ [package] name = "common" -version = "0.2.0" -edition = "2024" - -[dependencies] +version.workspace = true +edition.workspace = true diff --git a/server/Cargo.toml b/server/Cargo.toml index 6526108..7db84ed 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -1,8 +1,12 @@ [package] name = "server" -version = "0.2.0" -edition = "2024" +version.workspace = true +edition.workspace = true [dependencies] clap = { workspace = true } -common = { workspace = true } \ No newline at end of file +common = { workspace = true } + +[[bin]] +name = "saslauthd" +path = "src/main.rs" \ No newline at end of file diff --git a/server/src/handler.rs b/server/src/handler.rs index 0d8df0e..9181e77 100644 --- a/server/src/handler.rs +++ b/server/src/handler.rs @@ -42,7 +42,7 @@ mod tests { use common::request::Request; use std::io::Cursor; - const TEST_PATH: &str = "./test_passwords"; + const TEST_PATH: &str = "../test_passwords"; #[test] fn it_handles_a_request() { diff --git a/server/src/repository.rs b/server/src/repository.rs index f2b9389..2446a61 100644 --- a/server/src/repository.rs +++ b/server/src/repository.rs @@ -43,7 +43,7 @@ mod tests { use crate::repository::PasswordDirectory; use common::request::Request; - const TEST_PATH: &str = "./test_passwords"; + const TEST_PATH: &str = "../test_passwords"; #[test] fn it_checks_good_password() {