diff --git a/Cargo.lock b/Cargo.lock index cd76f50..619faa5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -576,7 +576,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e898588f33fdd5b9420719948f9f2a32c922a246964576f71ba7f24f80610fbc" [[package]] -name = "rip" +name = "rip2" version = "0.1.0" dependencies = [ "chrono", diff --git a/Cargo.toml b/Cargo.toml index dbfe03b..d001b77 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] edition = '2021' -name = "rip" +name = "rip2" version = "0.1.0" authors = ["mail@nivekuil.com", "mahid@standingpad.org", "miles.cranmer@gmail.com"] description = "rip: a safe and ergonomic alternative to rm" diff --git a/src/main.rs b/src/main.rs index 727f2ab..b0cd8a8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,7 +2,7 @@ use clap::{CommandFactory, Parser, ValueEnum}; use clap_complete::{generate, Shell}; use clap_complete_nushell::Nushell; -use rip::{args, util}; +use rip2::{args, util}; use std::io::stdout; use std::process::ExitCode; @@ -23,7 +23,7 @@ fn main() -> ExitCode { return ExitCode::SUCCESS; } - if let Err(ref e) = rip::run(cli, util::ProductionMode) { + if let Err(ref e) = rip2::run(cli, util::ProductionMode) { println!("Exception: {}", e); return ExitCode::FAILURE; } diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 62fee34..15bb03b 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -1,7 +1,7 @@ use rand::distributions::Alphanumeric; use rand::Rng; -use rip::args::Args; -use rip::{self, util}; +use rip2::args::Args; +use rip2::{self, util}; use rstest::rstest; use std::env; use std::fs::{self, File}; @@ -89,7 +89,7 @@ fn test_bury_unbury(#[case] decompose: bool, #[case] inspect: bool) { let expected_graveyard_path = util::join_absolute(&test_env.graveyard, test_data.path.canonicalize().unwrap()); - rip::run( + rip2::run( Args { targets: [test_data.path.clone()].to_vec(), graveyard: Some(test_env.graveyard.clone()), @@ -111,7 +111,7 @@ fn test_bury_unbury(#[case] decompose: bool, #[case] inspect: bool) { let restored_data_from_grave = fs::read_to_string(&expected_graveyard_path).unwrap(); assert_eq!(restored_data_from_grave, test_data.data); - rip::run( + rip2::run( Args { graveyard: Some(test_env.graveyard.clone()), decompose, @@ -184,7 +184,7 @@ fn test_env(#[case] env_var: &str) { let graveyard = test_env.graveyard.clone(); env::set_var(env_var, graveyard); - rip::run( + rip2::run( Args { targets: [test_data.path.clone()].to_vec(), // We don't set the graveyard here! @@ -221,7 +221,7 @@ fn test_duplicate_file(#[case] in_folder: bool) { let expected_graveyard_path1 = util::join_absolute(&test_env.graveyard, test_data1.path.canonicalize().unwrap()); - rip::run( + rip2::run( Args { targets: [if in_folder { test_data1.path.parent().unwrap().to_path_buf() @@ -264,7 +264,7 @@ fn test_duplicate_file(#[case] in_folder: bool) { }), ); - rip::run( + rip2::run( Args { targets: [if in_folder { test_data2.path.parent().unwrap().to_path_buf()