From fedbd5708378cb35deeaf1fc6373fe4c25d12801 Mon Sep 17 00:00:00 2001 From: DastInDark <2350416+hitenkoku@users.noreply.github.com> Date: Sun, 31 Jul 2022 12:06:03 +0900 Subject: [PATCH] Changed profile file extension from txt to yaml to indicate yaml format #165 --- ...fault_profile.txt => default_profile.yaml} | 0 config/{profiles.txt => profiles.yaml} | 0 src/afterfact.rs | 4 ++-- src/options/profile.rs | 24 +++++++++---------- ...fault_profile.txt => default_profile.yaml} | 0 .../config/{profiles.txt => profiles.yaml} | 0 6 files changed, 14 insertions(+), 14 deletions(-) rename config/{default_profile.txt => default_profile.yaml} (100%) rename config/{profiles.txt => profiles.yaml} (100%) rename test_files/config/{default_profile.txt => default_profile.yaml} (100%) rename test_files/config/{profiles.txt => profiles.yaml} (100%) diff --git a/config/default_profile.txt b/config/default_profile.yaml similarity index 100% rename from config/default_profile.txt rename to config/default_profile.yaml diff --git a/config/profiles.txt b/config/profiles.yaml similarity index 100% rename from config/profiles.txt rename to config/profiles.yaml diff --git a/src/afterfact.rs b/src/afterfact.rs index 4c68e983..bc63675a 100644 --- a/src/afterfact.rs +++ b/src/afterfact.rs @@ -617,8 +617,8 @@ mod tests { .unwrap(); let expect_tz = expect_time.with_timezone(&Local); let output_profile: LinkedHashMap = load_profile( - "test_files/config/default_profile.txt", - "test_files/config/profiles.txt", + "test_files/config/default_profile.yaml", + "test_files/config/profiles.yaml", ) .unwrap(); { diff --git a/src/options/profile.rs b/src/options/profile.rs index 3d1cf227..684fbf91 100644 --- a/src/options/profile.rs +++ b/src/options/profile.rs @@ -15,11 +15,11 @@ lazy_static! { pub static ref PROFILES: Option> = load_profile( check_setting_path( &CURRENT_EXE_PATH.to_path_buf(), - "config/default_profile.txt" + "config/default_profile.yaml" ) .to_str() .unwrap(), - check_setting_path(&CURRENT_EXE_PATH.to_path_buf(), "config/profiles.txt") + check_setting_path(&CURRENT_EXE_PATH.to_path_buf(), "config/profiles.yaml") .to_str() .unwrap() ); @@ -225,8 +225,8 @@ mod tests { assert_eq!( Some(expect), load_profile( - "test_files/config/default_profile.txt", - "test_files/config/profiles.txt" + "test_files/config/default_profile.yaml", + "test_files/config/profiles.yaml" ) ); } @@ -246,8 +246,8 @@ mod tests { assert_eq!( Some(expect), load_profile( - "test_files/config/default_profile.txt", - "test_files/config/profiles.txt" + "test_files/config/default_profile.yaml", + "test_files/config/profiles.yaml" ) ); } @@ -260,8 +260,8 @@ mod tests { assert_eq!( None, load_profile( - "test_files/config/no_exist_default_profile.txt", - "test_files/config/no_exist_profiles.txt" + "test_files/config/no_exist_default_profile.yaml", + "test_files/config/no_exist_profiles.yaml" ) ); @@ -269,8 +269,8 @@ mod tests { assert_eq!( None, load_profile( - "test_files/config/profile/default_profile.txt", - "test_files/config/profile/no_exist_profiles.txt" + "test_files/config/profile/default_profile.yaml", + "test_files/config/profile/no_exist_profiles.yaml" ) ); @@ -278,8 +278,8 @@ mod tests { assert_eq!( None, load_profile( - "test_files/config/no_exist_default_profile.txt", - "test_files/config/profiles.txt" + "test_files/config/no_exist_default_profile.yaml", + "test_files/config/profiles.yaml" ) ); } diff --git a/test_files/config/default_profile.txt b/test_files/config/default_profile.yaml similarity index 100% rename from test_files/config/default_profile.txt rename to test_files/config/default_profile.yaml diff --git a/test_files/config/profiles.txt b/test_files/config/profiles.yaml similarity index 100% rename from test_files/config/profiles.txt rename to test_files/config/profiles.yaml