Compare commits

...

5 Commits

Author SHA1 Message Date
M3DZIK b6ef4241ca
Release v0.11.3 2024-04-11 22:43:15 +02:00
M3DZIK 6d6cbbd4b0
Update docs in imgurs lib 2024-04-11 22:40:46 +02:00
M3DZIK 723bf26dbd
Delete total lines, code size and build status badges from readme 2024-04-11 22:39:39 +02:00
M3DZIK 56cbd96053
Fix clippy error 2024-04-11 22:37:59 +02:00
Andre Julius af0864d272 Update dependencies and replace validator crate with url crate 2024-04-11 22:32:30 +02:00
7 changed files with 1106 additions and 896 deletions

View File

@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased] ## [Unreleased]
## [0.11.3] - 2024-04-11
- Updated dependencies
- Replaced url validation with url crate in imgurs-cli
## [0.11.2] - 2023-06-22 ## [0.11.2] - 2023-06-22
- Updated dependencies - Updated dependencies
- Fix deprecation warning of base64 crate. - Fix deprecation warning of base64 crate.
@ -158,7 +162,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- upload image - upload image
<!-- next-url --> <!-- next-url -->
[Unreleased]: https://github.com/MedzikUser/imgurs/compare/v0.11.1...HEAD [Unreleased]: https://github.com/MedzikUser/imgurs/compare/v0.11.3...HEAD
[0.11.3]: https://github.com/MedzikUser/imgurs/commits/v0.11.3
[0.11.2]: https://github.com/MedzikUser/imgurs/commits/v0.11.2
[0.11.1]: https://github.com/MedzikUser/imgurs/commits/v0.11.1 [0.11.1]: https://github.com/MedzikUser/imgurs/commits/v0.11.1
[0.11.0]: https://github.com/MedzikUser/imgurs/commits/v0.11.0 [0.11.0]: https://github.com/MedzikUser/imgurs/commits/v0.11.0
[0.10.0]: https://github.com/MedzikUser/imgurs/commits/v0.10.0 [0.10.0]: https://github.com/MedzikUser/imgurs/commits/v0.10.0

1951
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@ resolver = "2"
[package] [package]
name = "imgurs" name = "imgurs"
version = "0.11.2" version = "0.11.3"
description = "API for Imgur" description = "API for Imgur"
license = "BSD-3-Clause" license = "BSD-3-Clause"
authors = ["M3DZIK <me@medzik.dev>"] authors = ["M3DZIK <me@medzik.dev>"]
@ -27,10 +27,10 @@ codegen-units = 1
[dependencies] [dependencies]
# HTTP # HTTP
reqwest = { version = "0.11", default-features = false, features = ["json", "multipart"] } reqwest = { version = "0.12", default-features = false, features = ["json", "multipart"] }
# Request # Request
base64 = "0.21" base64 = "0.22"
validator = "0.16" # validate url address url = "2.5.0" # validate url address
# Response # Response
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0" serde_json = "1.0"
@ -40,4 +40,4 @@ thiserror = "1.0"
[dev-dependencies] [dev-dependencies]
# Async tests # Async tests
tokio = { version = "1.25", features = ["macros", "rt-multi-thread"] } tokio = { version = "1.37", features = ["macros", "rt-multi-thread"] }

View File

@ -1,16 +1,10 @@
[total-lines]: https://img.shields.io/tokei/lines/github/MedzikUser/HomeDisk?style=for-the-badge&logo=github&color=fede00
[code-size]: https://img.shields.io/github/languages/code-size/MedzikUser/HomeDisk?style=for-the-badge&color=c8df52&logo=github
[crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=555555&logo=rust [crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=555555&logo=rust
[docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs [docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs
[ci]: https://img.shields.io/github/workflow/status/MedzikUser/rust-crypto-utils/Rust/main?style=for-the-badge&logo=github
# Imgurs - CLI and Library for Imgur API # Imgurs - CLI and Library for Imgur API
[![total-lines]](https://github.com/MedzikUser/HomeDisk)
[![code-size]](https://github.com/MedzikUser/HomeDisk)
[![crates-io]](https://crates.io/crates/imgurs) [![crates-io]](https://crates.io/crates/imgurs)
[![docs-rs]](https://docs.rs/imgurs) [![docs-rs]](https://docs.rs/imgurs)
[![ci]](https://github.com/MedzikUser/imgurs/actions/workflows/rust.yml)
## Screenshots ## Screenshots

View File

@ -1,6 +1,6 @@
[package] [package]
name = "imgurs-cli" name = "imgurs-cli"
version = "0.11.2" version = "0.11.3"
description = "CLI for Imgur" description = "CLI for Imgur"
license = "BSD-3-Clause" license = "BSD-3-Clause"
authors = ["M3DZIK <me@medzik.dev>"] authors = ["M3DZIK <me@medzik.dev>"]
@ -16,11 +16,11 @@ path = "src/main.rs"
[dependencies] [dependencies]
# Async runtime # Async runtime
tokio = { version = "1.25", features = ["macros", "rt-multi-thread"] } tokio = { version = "1.37", features = ["macros", "rt-multi-thread"] }
# CLI # CLI
clap = { version = "4.1", features = ["derive"] } clap = { version = "4.5", features = ["derive"] }
clap_complete = "4.1" clap_complete = "4.5"
clap_mangen = "0.2" clap_mangen = "0.2"
# Errors # Errors
@ -28,19 +28,19 @@ anyhow = "1.0"
# Logger # Logger
log = { version = "0.4", features = ["release_max_level_info"] } log = { version = "0.4", features = ["release_max_level_info"] }
simple_logger = "4.0" simple_logger = "4.3"
colored = "2.0" colored = "2.1"
# Config # Config
toml = "0.7" toml = "0.8"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
# Other # Other
chrono = "0.4" # parse upload date chrono = "0.4" # parse upload date
notify-rust = "4.7" # send notification after upload notify-rust = "4.11" # send notification after upload
dirs = "4.0" # get system configuration directory dirs = "5.0" # get system configuration directory
imgurs = { path = "..", version = "0.11.0", features = ["full"] } imgurs = { path = "..", version = "0.11.0", features = ["full"] }
[target.'cfg(not(all(unix, not(any(target_os="macos", target_os="android", target_os="emscripten")))))'.dependencies] [target.'cfg(not(all(unix, not(any(target_os="macos", target_os="android", target_os="emscripten")))))'.dependencies]
arboard = "3.2" # copy url to clipboard arboard = "3.3" # copy url to clipboard

View File

@ -9,6 +9,7 @@ pub(crate) use client::api_url;
pub use client::ImgurClient; pub use client::ImgurClient;
pub use image_type::*; pub use image_type::*;
pub use send_api_request::*; pub use send_api_request::*;
use url::Url;
use crate::{Error, Result}; use crate::{Error, Result};
@ -69,7 +70,7 @@ impl ImgurClient {
image = BASE64_STANDARD.encode(bytes) image = BASE64_STANDARD.encode(bytes)
} }
// validate url adress // validate url adress
else if !validator::validate_url(path) { else if Url::parse(path).is_err() {
Err(Error::InvalidUrlOrFile(path.to_string()))?; Err(Error::InvalidUrlOrFile(path.to_string()))?;
} }

View File

@ -1,4 +1,4 @@
//! [![github]](https://github.com/MedzikUser/imgurs) //! [![github]](https://github.com/M3DZIK/imgurs)
//! [![crates-io]](https://crates.io/crates/imgurs) //! [![crates-io]](https://crates.io/crates/imgurs)
//! [![docs-rs]](https://docs.rs/imgurs) //! [![docs-rs]](https://docs.rs/imgurs)
//! //!
@ -19,7 +19,7 @@
//! your application, simply add it to your project's `Cargo.toml`. //! your application, simply add it to your project's `Cargo.toml`.
//! ```toml //! ```toml
//! [dependencies] //! [dependencies]
//! imgurs = "0.8.0" //! imgurs = "0.11.3"
//! ``` //! ```
//! //!
//! # Example Usage //! # Example Usage