diff --git a/Cargo.lock b/Cargo.lock index 9d8e6f6..f1e0962 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -616,6 +616,22 @@ version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56d855069fafbb9b344c0f962150cd2c1187975cb1c22c1522c240d8c4986714" +[[package]] +name = "libmcaptcha" +version = "0.1.3" +dependencies = [ + "actix", + "actix-rt", + "derive_builder 0.9.0", + "derive_more", + "log", + "pow_sha256", + "pretty_env_logger", + "rand 0.8.3", + "serde", + "serde_json", +] + [[package]] name = "linked-hash-map" version = "0.5.4" @@ -649,22 +665,6 @@ dependencies = [ "linked-hash-map", ] -[[package]] -name = "m_captcha" -version = "0.1.3" -dependencies = [ - "actix", - "actix-rt", - "derive_builder 0.9.0", - "derive_more", - "log", - "pow_sha256", - "pretty_env_logger", - "rand 0.8.3", - "serde", - "serde_json", -] - [[package]] name = "match_cfg" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 6422bfd..edc9d96 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "m_captcha" +name = "libmcaptcha" version = "0.1.3" authors = ["realaravinth "] description = "Convenient abstractions for all things credentials" diff --git a/README.md b/README.md index fdce04d..99b37fd 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@
-

mCaptcha

+

libmcaptcha

mCaptcha - PoW based DoS protection

-[![Documentation](https://img.shields.io/badge/docs-master-yellow)](https://mcaptcha.github.io/mCaptcha/m_captcha/index.html) +[![Documentation](https://img.shields.io/badge/docs-master-yellow)](https://mcaptcha.github.io/mCaptcha/libmcaptcha/index.html) [![Documentation](https://img.shields.io/badge/docs-0.1.3-blue)](https://mcaptcha.org/docs/api/mcaptcha-system) -[![dependency status](https://deps.rs/repo/github/mCaptcha/mCaptcha/status.svg)](https://deps.rs/repo/github/mCaptcha/mCaptcha) +[![dependency status](https://deps.rs/repo/github/mCaptcha/libmcaptcha/status.svg)](https://deps.rs/repo/github/mCaptcha/libmcaptcha) [![AGPL License](https://img.shields.io/badge/license-AGPL-blue.svg)](http://www.gnu.org/licenses/agpl-3.0) -![CI (Linux)]() +![CI (Linux)]()
-[![codecov](https://codecov.io/gh/mCaptcha/mCaptcha/branch/master/graph/badge.svg)](https://codecov.io/gh/mCaptcha/mCaptcha) +[![codecov](https://codecov.io/gh/mCaptcha/libmcaptcha/branch/master/graph/badge.svg)](https://codecov.io/gh/mCaptcha/libmcaptcha) [![Documentation](https://img.shields.io/badge/matrix-community-purple)](https://matrix.to/#/+mcaptcha:matrix.batsense.net)
@@ -48,12 +48,12 @@ development, database frequently wiped). ### Self-hosted: -Please refer to [mCaptcha/guard](https://github.com/mCaptcha/guard) for +Please refer to [mCaptcha/mCaptcha](https://github.com/mCaptcha/mCaptcha) for instructions. ## Documentation -- [master-branch](https://mcaptcha.github.io/mCaptcha/m_captcha/index.html) +- [master-branch](https://mcaptcha.github.io/mCaptcha/libmcaptcha/index.html) - [All published versions](https://mcaptcha.org/docs/api/mcaptcha-system) ## Usage diff --git a/examples/simple.rs b/examples/simple.rs index 0fdfb31..9dbdf1f 100644 --- a/examples/simple.rs +++ b/examples/simple.rs @@ -1,4 +1,4 @@ -use m_captcha::{ +use libmcaptcha::{ cache::{messages::VerifyCaptchaResult, HashCache}, master::{AddSiteBuilder, Master}, pow::{ConfigBuilder, Work}, diff --git a/src/defense.rs b/src/defense.rs index a49f12b..f127c85 100644 --- a/src/defense.rs +++ b/src/defense.rs @@ -18,7 +18,7 @@ //! Defense datatypes //! ```rust -//! use m_captcha::{LevelBuilder, DefenseBuilder}; +//! use libmcaptcha::{LevelBuilder, DefenseBuilder}; //! DefenseBuilder::default() //! .add_level( //! LevelBuilder::default() diff --git a/src/errors.rs b/src/errors.rs index 3fac5de..130a87b 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -23,13 +23,13 @@ use derive_more::{Display, Error}; #[derive(Debug, PartialEq, Display, Clone, Error)] #[cfg(not(tarpaulin_include))] pub enum CaptchaError { - /// When configuring m_captcha, [DefenseBuilder][crate::defense::DefenseBuilder] + /// When configuring libmcaptcha, [DefenseBuilder][crate::defense::DefenseBuilder] /// must be passed atleast one `LevelConfig` if not this error will arise #[display(fmt = "LevelBuilder should have atleaset one level configured")] LevelEmpty, /// Visitor count must be a whole number(zero and above). - /// When configuring m_captcha, [LevelBuilder][crate::defense::LevelBuilder]. + /// When configuring libmcaptcha, [LevelBuilder][crate::defense::LevelBuilder]. /// difficulty_factor must be set to greater than zero. #[display(fmt = "difficulty factor must be greater than zero")] DifficultyFactorZero, @@ -82,5 +82,5 @@ pub enum CaptchaError { PleaseSetValue(#[error(not(source))] String), } -/// [Result] datatype for m_captcha +/// [Result] datatype for libmcaptcha pub type CaptchaResult = std::result::Result; diff --git a/src/lib.rs b/src/lib.rs index ba99090..e9e16fe 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -46,7 +46,7 @@ //! ## Example: //! //! ```rust -//! use m_captcha::{ +//! use libmcaptcha::{ //! cache::{messages::VerifyCaptchaResult, HashCache}, //! master::{AddSiteBuilder, Master}, //! pow::{ConfigBuilder, Work}, diff --git a/src/mcaptcha.rs b/src/mcaptcha.rs index 92b8f2f..c272215 100644 --- a/src/mcaptcha.rs +++ b/src/mcaptcha.rs @@ -19,7 +19,7 @@ //! //! ## Usage: //! ```rust -//! use m_captcha::{mcaptcha::AddVisitor, MCaptchaBuilder, cache::HashCache, LevelBuilder, DefenseBuilder}; +//! use libmcaptcha::{mcaptcha::AddVisitor, MCaptchaBuilder, cache::HashCache, LevelBuilder, DefenseBuilder}; //! // traits from actix needs to be in scope for starting actor //! use actix::prelude::*; //!