From e2c22d27504862e36e5b133690da0a85da61df75 Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Tue, 17 Oct 2023 00:18:20 +0530 Subject: [PATCH] feat: change name to libcachebust --- CHANGELOG.md | 4 ++++ Cargo.lock | 2 +- Cargo.toml | 4 ++-- README.md | 2 +- examples/actix-web/.gitignore | 2 +- examples/actix-web/build.rs | 2 +- examples/actix-web/src/main.rs | 4 ++-- src/filemap.rs | 4 ++-- src/lib.rs | 8 ++++---- src/processor.rs | 6 +++--- 10 files changed, 21 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c955b2..b3341e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.3.0 + +Change name to libcachebust + ## 0.2.1 Updated dependencies diff --git a/Cargo.lock b/Cargo.lock index 0007355..16bdacf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -739,7 +739,7 @@ checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libcachebust" -version = "0.2.1" +version = "0.3.0" dependencies = [ "data-encoding", "derive_builder", diff --git a/Cargo.toml b/Cargo.toml index 895da76..4eb2581 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libcachebust" -version = "0.2.1" +version = "0.3.0" authors = ["realaravinth "] license = "MIT OR Apache-2.0" description = "Compiletime cache-busting web applications written in rust" @@ -17,7 +17,7 @@ members = [ ] [lib] -name = "cache_buster" +name = "libcachebust" path = "src/lib.rs" [dependencies] diff --git a/README.md b/README.md index ec689e9..95a91ad 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ width="250px" class="greetings" src="./examples/actix-web/static/cachable/img/Spock_vulcan-salute.png" - alt="logo image" + alt="A photo of Spock showing the Vulkan greeting" />

libcachebust diff --git a/examples/actix-web/.gitignore b/examples/actix-web/.gitignore index 172edc3..f8c85d7 100644 --- a/examples/actix-web/.gitignore +++ b/examples/actix-web/.gitignore @@ -6,5 +6,5 @@ /target prod dist -src/cache_buster_data.json +src/libcachebust_data.json tarpaulin-report.html diff --git a/examples/actix-web/build.rs b/examples/actix-web/build.rs index 7e36354..938402d 100644 --- a/examples/actix-web/build.rs +++ b/examples/actix-web/build.rs @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use cache_buster::BusterBuilder; +use libcachebust::BusterBuilder; fn main() { let types = vec![ diff --git a/examples/actix-web/src/main.rs b/examples/actix-web/src/main.rs index e397f73..704cc43 100644 --- a/examples/actix-web/src/main.rs +++ b/examples/actix-web/src/main.rs @@ -13,7 +13,7 @@ use log::info; use mime_guess::from_path; use rust_embed::RustEmbed; -use cache_buster::Files; +use libcachebust::Files; mod index; @@ -23,7 +23,7 @@ pub const CACHE_AGE: u32 = 60 * 60 * 24 * 365; lazy_static! { /// 2. create filemap pub static ref FILES: Files = { - let map = include_str!("./cache_buster_data.json"); + let map = include_str!("./libcachebust_data.json"); Files::new(map) }; pub static ref INDEX: String = index::get_index(); diff --git a/src/filemap.rs b/src/filemap.rs index 93cb971..0023792 100644 --- a/src/filemap.rs +++ b/src/filemap.rs @@ -9,8 +9,8 @@ //! Add the following tou your program to load the filemap during compiletime: //! //! ```no_run -//! use cache_buster::Files; -//! use cache_buster::CACHE_BUSTER_DATA_FILE; +//! use libcachebust::Files; +//! use libcachebust::CACHE_BUSTER_DATA_FILE; //! //! let files = Files::new(CACHE_BUSTER_DATA_FILE); //! ``` diff --git a/src/lib.rs b/src/lib.rs index a6d3bea..692eb0d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -25,7 +25,7 @@ //! //! - `build.rs` //! ```no_run -//! use cache_buster::BusterBuilder; +//! use libcachebust::BusterBuilder; //! //! // note: add error checking yourself. //! // println!("cargo:rustc-env=GIT_process={}", git_process); @@ -53,8 +53,8 @@ //! Add the following tou your program to load the filemap during compiletime: //! //! ```no_run -//! use cache_buster::Files; -//! use cache_buster::CACHE_BUSTER_DATA_FILE; +//! use libcachebust::Files; +//! use libcachebust::CACHE_BUSTER_DATA_FILE; //! //! let files = Files::new(CACHE_BUSTER_DATA_FILE); //! // the path to the file before setting up for cache busting @@ -69,4 +69,4 @@ pub use filemap::Files; /// file to which filemap is written during compilation /// include this to `.gitignore` -pub const CACHE_BUSTER_DATA_FILE: &str = "./src/cache_buster_data.json"; +pub const CACHE_BUSTER_DATA_FILE: &str = "./src/libcachebust_data.json"; diff --git a/src/processor.rs b/src/processor.rs index 09cb3a5..2c2b8cb 100644 --- a/src/processor.rs +++ b/src/processor.rs @@ -9,7 +9,7 @@ //! Run the following during build using `build.rs`: //! //! ```rust -//! use cache_buster::BusterBuilder; +//! use libcachebust::BusterBuilder; //! //! // note: add error checking yourself. //! // println!("cargo:rustc-env=GIT_process={}", git_process); @@ -50,10 +50,10 @@ use crate::*; /// /// This is useful when serving vendor static files which are interlinked, where chaing /// file names should mean changing how the vendor files pulls its dependencies --- which are -/// beyond the abilities of `cache_buster`. +/// beyond the abilities of `libcachebust`. /// /// ```rust -/// use cache_buster::NoHashCategory; +/// use libcachebust::NoHashCategory; /// /// let extensions = NoHashCategory::FileExtentions(vec!["wasm"]); /// let files = NoHashCategory::FileExtentions(vec!["swagger-ui-bundle.js", "favicon-16x16.png"]);