From 771f944af447c202eba045936a36dee71ab797ac Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 4 Sep 2024 11:32:05 +0100 Subject: refactor: fix imports, etc based on restructure move some functions out of ngit and into lib/mod and lib/git_events remove MockConnect from binaries so it is only used in the library. this was done: * mainly because automocks were not being imported from lib into each binary * but also because the these functions were being tested with MockConnect --- src/lib/mod.rs | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/lib/mod.rs') diff --git a/src/lib/mod.rs b/src/lib/mod.rs index 61dfc49..6e6f6fe 100644 --- a/src/lib/mod.rs +++ b/src/lib/mod.rs @@ -1,16 +1,16 @@ -mod cli_interactor; -mod client; -mod config; -mod git; -mod key_handling; -mod login; -mod repo_ref; -mod repo_state; +pub mod cli_interactor; +pub mod client; +pub mod git; +pub mod git_events; +pub mod login; +pub mod repo_ref; +pub mod repo_state; -pub use client; -pub use config; -pub use git; -pub use key_handling; -pub use login; -pub use repo_ref; -pub use repo_state; +use anyhow::{anyhow, Result}; +use directories::ProjectDirs; + +pub fn get_dirs() -> Result { + ProjectDirs::from("", "", "ngit").ok_or(anyhow!( + "should find operating system home directories with rust-directories crate" + )) +} -- cgit v1.2.3