Validate project names properly in all places
We were only validating names when passed as a flag to rad init --name.
10 files changed
+112
-43
ee1c8678
→
84e3ba14
modified radicle-cli/src/commands/init.rs
@@ -13,6 +13,7 @@ use serde_json as json;
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -57,7 +58,7 @@ Options
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -94,19 +95,8 @@ impl Args for Options {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -243,7 +233,7 @@ pub fn init(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -252,6 +242,7 @@ pub fn init(
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -287,7 +278,7 @@ pub fn init(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-node/src/test/environment.rs
@@ -548,7 +548,7 @@ impl<G: cyphernet::Ecdh<Pk = NodeId> + Signer + Clone> Node<G> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-node/src/test/peer.rs
@@ -132,7 +132,7 @@ impl<G: Signer> Peer<Storage, G> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-node/src/tests.rs
@@ -1648,7 +1648,7 @@ fn test_init_and_seed() {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-tools/src/rad-init.rs
@@ -10,7 +10,7 @@ fn main() -> anyhow::Result<()> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle/src/identity/doc.rs
@@ -462,7 +462,7 @@ mod test {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -509,7 +509,7 @@ mod test {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle/src/identity/project.rs
@@ -1,4 +1,4 @@
| - | |
| + | |
|
|
|
|
|
@@ -24,12 +24,72 @@ pub enum ProjectError {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -48,8 +108,7 @@ impl<'de> Deserialize<'de> for Project {
|
|
|
|
|
|
| - | |
| - | |
| + | |
|
|
|
|
|
@@ -123,18 +182,12 @@ impl Project {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
|
|
|
|
|
@@ -171,7 +224,7 @@ impl Project {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -183,7 +236,7 @@ impl Project {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -205,3 +258,26 @@ impl From<Project> for Payload {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
modified radicle/src/rad.rs
@@ -11,7 +11,7 @@ use crate::crypto::{Signer, Verified};
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -46,7 +46,7 @@ pub enum InitError {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -416,7 +416,7 @@ mod tests {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -471,7 +471,7 @@ mod tests {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -507,7 +507,7 @@ mod tests {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle/src/test/arbitrary.rs
@@ -13,6 +13,7 @@ use qcheck::Arbitrary;
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -108,9 +109,10 @@ impl Arbitrary for Project {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
| + | |
|
|
|
|
|
modified radicle/src/test/fixtures.rs
@@ -44,7 +44,7 @@ pub fn storage<P: AsRef<Path>, G: Signer>(path: P, signer: &G) -> Result<Storage
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -67,7 +67,7 @@ pub fn project<P: AsRef<Path>, G: Signer>(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|