-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(settings): add raw clamd.conf file editor (#104)
- Loading branch information
1 parent
04e8fa7
commit 32c72f5
Showing
52 changed files
with
1,712 additions
and
365 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
github: [ivangabriele] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,29 @@ | ||
use std::{env, path::Path}; | ||
|
||
#[cfg(not(tarpaulin_include))] | ||
pub fn get_sample_directory_absolute_path_option() -> Option<String> { | ||
let project_root_path_as_string = env::var("PROJECT_ROOT_PATH").unwrap(); | ||
let project_root_path_as_str = &*project_root_path_as_string; | ||
fn construct_path_from_root(root_path: &str, relative_path: &[&str]) -> String { | ||
let mut path_as_path_buf: std::path::PathBuf = Path::new(&root_path).to_path_buf(); | ||
|
||
Some( | ||
Path::new(project_root_path_as_str) | ||
.join("e2e/samples/directory") | ||
.as_os_str() | ||
.to_str() | ||
.unwrap() | ||
.to_string(), | ||
for component in relative_path { | ||
path_as_path_buf = path_as_path_buf.join(component); | ||
} | ||
|
||
path_as_path_buf | ||
.to_str() | ||
.expect("Failed to convert `Path` to `&str`.") | ||
.to_string() | ||
} | ||
|
||
#[cfg(not(tarpaulin_include))] | ||
pub fn get_debug_clamd_conf_file_path() -> String { | ||
construct_path_from_root("", &["..", ".debug", "clamd.conf"]) | ||
} | ||
#[cfg(not(tarpaulin_include))] | ||
pub fn get_sample_directory_path() -> String { | ||
construct_path_from_root( | ||
env::var("PROJECT_ROOT_PATH") | ||
.expect("Failed to get `PROJECT_ROOT_PATH` environment variable.") | ||
.as_str(), | ||
&["e2e", "samples", "directory"], | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.