aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Walters <rwalters@digitalstirling.com>2020-10-14 22:38:44 -0700
committerRichard Walters <rwalters@digitalstirling.com>2020-10-14 22:38:44 -0700
commit472c84a39a29bb9a2778cac67f5a9be78eca93bc (patch)
tree07526bd1be9922d39d36829dfaeacd9d645d2563
parentb4fb0021700594eafe1adc8055baf40a8ab5174e (diff)
Preparation for publishing on crates.io
* Rename crate to "rhymuri" since "uri" is taken; FeelsBadMan * Bump crate version to 1.0.0. * Add categories, keywords, and repository metadata. * Update README with links to crates.io and documentation. * Add license reference in README.
-rw-r--r--Cargo.toml9
-rw-r--r--README.md18
-rw-r--r--src/authority.rs12
-rw-r--r--src/lib.rs8
-rw-r--r--src/uri.rs22
5 files changed, 41 insertions, 28 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 6bd6d6e..53716cf 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,13 +1,14 @@
[package]
-name = "uri"
-version = "0.1.0"
+name = "rhymuri"
+version = "1.0.0"
description = "Implementation of IETF RFC 3986, Uniform Resource Identifier (URI)"
authors = ["Richard Walters <rwalters@digitalstirling.com>"]
edition = "2018"
license-file = "LICENSE.txt"
readme = "README.md"
-
-# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+categories = ["parser-implementations", "web-programming"]
+keywords = ["uri", "parser"]
+repository = "https://github.com/rhymu8354/Uri.git"
[dependencies]
named_tuple = "0.1"
diff --git a/README.md b/README.md
index 2b28879..1408a9e 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,17 @@
-# Uri
+# Uri (rhymuri)
-This is a library which implements [RFC
+This is a library which implements [IETF RFC
3986](https://tools.ietf.org/html/rfc3986), "Uniform Resource Identifier (URI):
Generic Syntax".
+[![Crates.io](https://img.shields.io/crates/v/rhymuri.svg)](https://crates.io/crates/rhymuri)
+[![Documentation](https://docs.rs/rhymuri/badge.svg)][dox]
+
+More information about the Rust implementation of this library can be found in
+the [crate documentation][dox].
+
+[dox]: https://docs.rs/rhymuri
+
A URI is a compact sequence of characters that identifies an abstract or
physical resource. One common form of URI is the Uniform Resource Locator
(URL), used to reference web resources:
@@ -18,7 +26,7 @@ The purpose of this library is to provide a `Uri` type to represent a URI,
with functions to parse URIs from their string representations, as well as
assemble URIs from their various components.
-This is a multi-language library. There are independent implementations here
+This is a multi-language library containing independent implementations
for the following programming languages:
* C++
@@ -70,3 +78,7 @@ For [CMake](https://cmake.org/):
cd build
cmake --build . --config Release
```
+
+## License
+
+Licensed under the [MIT license](LICENSE.txt).
diff --git a/src/authority.rs b/src/authority.rs
index d475f85..955816c 100644
--- a/src/authority.rs
+++ b/src/authority.rs
@@ -17,10 +17,10 @@ use super::validate_ipv6_address::validate_ipv6_address;
/// ## Parsing an Authority into its components
///
/// ```rust
-/// # extern crate uri;
-/// use uri::Authority;
+/// # extern crate rhymuri;
+/// use rhymuri::Authority;
///
-/// # fn test() -> Result<(), uri::Error> {
+/// # fn test() -> Result<(), rhymuri::Error> {
/// let authority = Authority::parse("nobody@www.example.com:8080")?;
/// assert_eq!(Some("nobody".as_bytes()), authority.userinfo());
/// assert_eq!("www.example.com".as_bytes(), authority.host());
@@ -32,10 +32,10 @@ use super::validate_ipv6_address::validate_ipv6_address;
/// ## Generating a URI from its components
///
/// ```rust
-/// # extern crate uri;
-/// use uri::Authority;
+/// # extern crate rhymuri;
+/// use rhymuri::Authority;
///
-/// # fn test() -> Result<(), uri::Error> {
+/// # fn test() -> Result<(), rhymuri::Error> {
/// let mut authority = Authority::default();
/// authority.set_userinfo(Some("nobody").map(Into::into));
/// authority.set_host("www.example.com");
diff --git a/src/lib.rs b/src/lib.rs
index 9681872..a0fa3f2 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -22,8 +22,8 @@
//! ## Parsing a URI into its components
//!
//! ```rust
-//! # extern crate uri;
-//! use uri::Uri;
+//! # extern crate rhymuri;
+//! use rhymuri::Uri;
//!
//! let uri = Uri::parse("http://www.example.com/foo?bar#baz").unwrap();
//! let authority = uri.authority().unwrap();
@@ -37,8 +37,8 @@
//! ## Generating a URI from its components
//!
//! ```rust
-//! # extern crate uri;
-//! use uri::{Authority, Uri};
+//! # extern crate rhymuri;
+//! use rhymuri::{Authority, Uri};
//!
//! let mut uri = Uri::default();
//! assert!(uri.set_scheme(String::from("http")).is_ok());
diff --git a/src/uri.rs b/src/uri.rs
index a4d1b25..cbc4749 100644
--- a/src/uri.rs
+++ b/src/uri.rs
@@ -36,10 +36,10 @@ use super::character_classes::{
/// ## Parsing a URI into its components
///
/// ```rust
-/// # extern crate uri;
-/// use uri::Uri;
+/// # extern crate rhymuri;
+/// use rhymuri::Uri;
///
-/// # fn test() -> Result<(), uri::Error> {
+/// # fn test() -> Result<(), rhymuri::Error> {
/// let uri = Uri::parse("http://www.example.com/foo?bar#baz")?;
/// let authority = uri.authority().unwrap();
/// assert_eq!("www.example.com".as_bytes(), authority.host());
@@ -54,8 +54,8 @@ use super::character_classes::{
/// ## Generating a URI from its components
///
/// ```rust
-/// # extern crate uri;
-/// use uri::{Authority, Uri};
+/// # extern crate rhymuri;
+/// use rhymuri::{Authority, Uri};
///
/// let mut uri = Uri::default();
/// assert!(uri.set_scheme(String::from("http")).is_ok());
@@ -229,10 +229,10 @@ impl Uri {
/// # Examples
///
/// ```rust
- /// # extern crate uri;
- /// use uri::Uri;
+ /// # extern crate rhymuri;
+ /// use rhymuri::Uri;
///
- /// # fn test() -> Result<(), uri::Error> {
+ /// # fn test() -> Result<(), rhymuri::Error> {
/// let mut uri = Uri::parse("/a/b/c/./../../g")?;
/// uri.normalize();
/// assert_eq!("/a/g", uri.path_to_string()?);
@@ -493,10 +493,10 @@ impl Uri {
/// # Examples
///
/// ```rust
- /// # extern crate uri;
- /// use uri::Uri;
+ /// # extern crate rhymuri;
+ /// use rhymuri::Uri;
///
- /// # fn test() -> Result<(), uri::Error> {
+ /// # fn test() -> Result<(), rhymuri::Error> {
/// let base = Uri::parse("http://a/b/c/d;p?q")?;
/// let relative_reference = Uri::parse("g;x?y#s")?;
/// let resolved = base.resolve(&relative_reference);