From b0cd50d71bc9f838584b008ea2ced02901d4f67c Mon Sep 17 00:00:00 2001 From: Sayan751 Date: Sun, 6 Sep 2020 19:25:16 +0200 Subject: [PATCH] chore: fixed build issues --- {resources => rfcs}/rfc5322.pdf | Bin {resources => rfcs}/rfc6532.pdf | Bin .../.test_data/invalid_domains.txt | 0 .../.test_data/invalid_local_parts.txt | 0 .../.test_data/isemail_tests.xml | 0 .../.test_data/valid_domains.txt | 0 .../.test_data/valid_local_parts.txt | 0 rust-lib/Cargo.toml | 2 ++ rust-lib/build.rs | 5 +---- 9 files changed, 3 insertions(+), 4 deletions(-) rename {resources => rfcs}/rfc5322.pdf (100%) rename {resources => rfcs}/rfc6532.pdf (100%) rename {resources => rust-lib}/.test_data/invalid_domains.txt (100%) rename {resources => rust-lib}/.test_data/invalid_local_parts.txt (100%) rename {resources => rust-lib}/.test_data/isemail_tests.xml (100%) rename {resources => rust-lib}/.test_data/valid_domains.txt (100%) rename {resources => rust-lib}/.test_data/valid_local_parts.txt (100%) diff --git a/resources/rfc5322.pdf b/rfcs/rfc5322.pdf similarity index 100% rename from resources/rfc5322.pdf rename to rfcs/rfc5322.pdf diff --git a/resources/rfc6532.pdf b/rfcs/rfc6532.pdf similarity index 100% rename from resources/rfc6532.pdf rename to rfcs/rfc6532.pdf diff --git a/resources/.test_data/invalid_domains.txt b/rust-lib/.test_data/invalid_domains.txt similarity index 100% rename from resources/.test_data/invalid_domains.txt rename to rust-lib/.test_data/invalid_domains.txt diff --git a/resources/.test_data/invalid_local_parts.txt b/rust-lib/.test_data/invalid_local_parts.txt similarity index 100% rename from resources/.test_data/invalid_local_parts.txt rename to rust-lib/.test_data/invalid_local_parts.txt diff --git a/resources/.test_data/isemail_tests.xml b/rust-lib/.test_data/isemail_tests.xml similarity index 100% rename from resources/.test_data/isemail_tests.xml rename to rust-lib/.test_data/isemail_tests.xml diff --git a/resources/.test_data/valid_domains.txt b/rust-lib/.test_data/valid_domains.txt similarity index 100% rename from resources/.test_data/valid_domains.txt rename to rust-lib/.test_data/valid_domains.txt diff --git a/resources/.test_data/valid_local_parts.txt b/rust-lib/.test_data/valid_local_parts.txt similarity index 100% rename from resources/.test_data/valid_local_parts.txt rename to rust-lib/.test_data/valid_local_parts.txt diff --git a/rust-lib/Cargo.toml b/rust-lib/Cargo.toml index 0d9a1a1..dc76346 100644 --- a/rust-lib/Cargo.toml +++ b/rust-lib/Cargo.toml @@ -9,6 +9,7 @@ repository = "https://github.com/Sayan751/email-address-parser" homepage = "https://github.com/Sayan751/email-address-parser" readme = "README.md" keywords = ["email-address", "parser", "rfc-5322", "rfc-6532"] +exclude = ["build.rs", ".test_data", "benches", "tests", "Development.md"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -36,5 +37,6 @@ wasm-opt = ["-Oz", "--enable-mutable-globals"] lto = true [[bench]] +path = "benches" name = "benchmarks" harness = false \ No newline at end of file diff --git a/rust-lib/build.rs b/rust-lib/build.rs index 0257458..6599e7c 100644 --- a/rust-lib/build.rs +++ b/rust-lib/build.rs @@ -11,10 +11,7 @@ fn main() { let out_dir = env::var_os("OUT_DIR").unwrap(); let test_file_path = path::Path::new(&out_dir).join("generated_tests.rs"); let mut test_file = fs::File::create(&test_file_path).unwrap(); - let test_data_root = path::Path::new(&root) - .join("..") - .join("resources") - .join(".test_data"); + let test_data_root = path::Path::new(&root).join(".test_data"); let read_test_data = |file_name: &str| { fs::read_to_string(test_data_root.join(file_name))