From 4f28ced1b1e44bbbccda4e01ba882c756f683ed2 Mon Sep 17 00:00:00 2001 From: Bauke Date: Mon, 31 Oct 2022 15:35:10 +0100 Subject: [PATCH] Rename hooked-library to hooked-config. --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- hooked-cli/Cargo.toml | 4 ++-- hooked-cli/source/cli/run.rs | 2 +- hooked-cli/source/main.rs | 2 +- {hooked-library => hooked-config}/Cargo.toml | 4 ++-- .../source/config/exit_action.rs | 0 {hooked-library => hooked-config}/source/config/general.rs | 0 {hooked-library => hooked-config}/source/config/mod.rs | 0 {hooked-library => hooked-config}/source/config/pre_commit.rs | 0 {hooked-library => hooked-config}/source/config/task.rs | 0 {hooked-library => hooked-config}/source/lib.rs | 0 {hooked-library => hooked-config}/tests/parsing.rs | 2 +- {hooked-library => hooked-config}/tests/parsing/defaults.toml | 0 .../tests/parsing/with-hooks.toml | 0 {hooked-library => hooked-config}/tests/serialize.rs | 2 +- .../tests/snapshots/parsing__defaults.snap | 0 .../tests/snapshots/parsing__with-hooks.snap | 0 .../tests/snapshots/serialize__serialize.snap | 0 19 files changed, 11 insertions(+), 11 deletions(-) rename {hooked-library => hooked-config}/Cargo.toml (85%) rename {hooked-library => hooked-config}/source/config/exit_action.rs (100%) rename {hooked-library => hooked-config}/source/config/general.rs (100%) rename {hooked-library => hooked-config}/source/config/mod.rs (100%) rename {hooked-library => hooked-config}/source/config/pre_commit.rs (100%) rename {hooked-library => hooked-config}/source/config/task.rs (100%) rename {hooked-library => hooked-config}/source/lib.rs (100%) rename {hooked-library => hooked-config}/tests/parsing.rs (89%) rename {hooked-library => hooked-config}/tests/parsing/defaults.toml (100%) rename {hooked-library => hooked-config}/tests/parsing/with-hooks.toml (100%) rename {hooked-library => hooked-config}/tests/serialize.rs (92%) rename {hooked-library => hooked-config}/tests/snapshots/parsing__defaults.snap (100%) rename {hooked-library => hooked-config}/tests/snapshots/parsing__with-hooks.snap (100%) rename {hooked-library => hooked-config}/tests/snapshots/serialize__serialize.snap (100%) diff --git a/Cargo.lock b/Cargo.lock index 4e43ad3..6014f61 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -453,7 +453,7 @@ dependencies = [ "assert_cmd", "clap", "color-eyre", - "hooked-library", + "hooked-config", "insta", "owo-colors", "subprocess", @@ -463,7 +463,7 @@ dependencies = [ ] [[package]] -name = "hooked-library" +name = "hooked-config" version = "0.1.0" dependencies = [ "color-eyre", diff --git a/Cargo.toml b/Cargo.toml index a7c8c49..6a79c85 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] members = [ "hooked-cli", - "hooked-library" + "hooked-config" ] diff --git a/hooked-cli/Cargo.toml b/hooked-cli/Cargo.toml index 393fa10..fa7e2c2 100644 --- a/hooked-cli/Cargo.toml +++ b/hooked-cli/Cargo.toml @@ -22,8 +22,8 @@ tera = "1.17.1" features = ["derive"] version = "4.0.18" -[dependencies.hooked-library] -path = "../hooked-library" +[dependencies.hooked-config] +path = "../hooked-config" version = "0.1.0" [dev-dependencies] diff --git a/hooked-cli/source/cli/run.rs b/hooked-cli/source/cli/run.rs index 7b7c28c..6c338ae 100644 --- a/hooked-cli/source/cli/run.rs +++ b/hooked-cli/source/cli/run.rs @@ -4,7 +4,7 @@ use std::{io::Read, process::exit}; use { color_eyre::{eyre::eyre, Result}, - hooked_library::{Config, ExitAction}, + hooked_config::{Config, ExitAction}, owo_colors::{OwoColorize, Style}, subprocess::{Exec, Redirection}, supports_color::Stream, diff --git a/hooked-cli/source/main.rs b/hooked-cli/source/main.rs index 7596da4..af1a25a 100644 --- a/hooked-cli/source/main.rs +++ b/hooked-cli/source/main.rs @@ -14,7 +14,7 @@ use std::{ use { clap::Parser, color_eyre::{eyre::eyre, install, Result}, - hooked_library::Config, + hooked_config::Config, tera::{Context, Tera}, }; diff --git a/hooked-library/Cargo.toml b/hooked-config/Cargo.toml similarity index 85% rename from hooked-library/Cargo.toml rename to hooked-config/Cargo.toml index f90b988..094d1b2 100644 --- a/hooked-library/Cargo.toml +++ b/hooked-config/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "hooked-library" -description = "Git hooks manager." +name = "hooked-config" +description = "Configuration for Hooked." repository = "https://git.bauke.xyz/Holllo/hooked" license = "AGPL-3.0-or-later" version = "0.1.0" diff --git a/hooked-library/source/config/exit_action.rs b/hooked-config/source/config/exit_action.rs similarity index 100% rename from hooked-library/source/config/exit_action.rs rename to hooked-config/source/config/exit_action.rs diff --git a/hooked-library/source/config/general.rs b/hooked-config/source/config/general.rs similarity index 100% rename from hooked-library/source/config/general.rs rename to hooked-config/source/config/general.rs diff --git a/hooked-library/source/config/mod.rs b/hooked-config/source/config/mod.rs similarity index 100% rename from hooked-library/source/config/mod.rs rename to hooked-config/source/config/mod.rs diff --git a/hooked-library/source/config/pre_commit.rs b/hooked-config/source/config/pre_commit.rs similarity index 100% rename from hooked-library/source/config/pre_commit.rs rename to hooked-config/source/config/pre_commit.rs diff --git a/hooked-library/source/config/task.rs b/hooked-config/source/config/task.rs similarity index 100% rename from hooked-library/source/config/task.rs rename to hooked-config/source/config/task.rs diff --git a/hooked-library/source/lib.rs b/hooked-config/source/lib.rs similarity index 100% rename from hooked-library/source/lib.rs rename to hooked-config/source/lib.rs diff --git a/hooked-library/tests/parsing.rs b/hooked-config/tests/parsing.rs similarity index 89% rename from hooked-library/tests/parsing.rs rename to hooked-config/tests/parsing.rs index 175e244..c14bde2 100644 --- a/hooked-library/tests/parsing.rs +++ b/hooked-config/tests/parsing.rs @@ -1,6 +1,6 @@ use std::path::PathBuf; -use {color_eyre::Result, hooked_library::Config}; +use {color_eyre::Result, hooked_config::Config}; use {insta::assert_debug_snapshot, test_case::test_case}; diff --git a/hooked-library/tests/parsing/defaults.toml b/hooked-config/tests/parsing/defaults.toml similarity index 100% rename from hooked-library/tests/parsing/defaults.toml rename to hooked-config/tests/parsing/defaults.toml diff --git a/hooked-library/tests/parsing/with-hooks.toml b/hooked-config/tests/parsing/with-hooks.toml similarity index 100% rename from hooked-library/tests/parsing/with-hooks.toml rename to hooked-config/tests/parsing/with-hooks.toml diff --git a/hooked-library/tests/serialize.rs b/hooked-config/tests/serialize.rs similarity index 92% rename from hooked-library/tests/serialize.rs rename to hooked-config/tests/serialize.rs index 304ddfa..51a4a38 100644 --- a/hooked-library/tests/serialize.rs +++ b/hooked-config/tests/serialize.rs @@ -1,5 +1,5 @@ use { - hooked_library::{Config, ExitAction, PreCommit, Task}, + hooked_config::{Config, ExitAction, PreCommit, Task}, toml::to_string_pretty, }; diff --git a/hooked-library/tests/snapshots/parsing__defaults.snap b/hooked-config/tests/snapshots/parsing__defaults.snap similarity index 100% rename from hooked-library/tests/snapshots/parsing__defaults.snap rename to hooked-config/tests/snapshots/parsing__defaults.snap diff --git a/hooked-library/tests/snapshots/parsing__with-hooks.snap b/hooked-config/tests/snapshots/parsing__with-hooks.snap similarity index 100% rename from hooked-library/tests/snapshots/parsing__with-hooks.snap rename to hooked-config/tests/snapshots/parsing__with-hooks.snap diff --git a/hooked-library/tests/snapshots/serialize__serialize.snap b/hooked-config/tests/snapshots/serialize__serialize.snap similarity index 100% rename from hooked-library/tests/snapshots/serialize__serialize.snap rename to hooked-config/tests/snapshots/serialize__serialize.snap