Rename multiaddr and mulithash to parity-* (#737)

* Rename multiaddr and mulithash to parity-*

* Fix doctests
This commit is contained in:
Pierre Krieger 2018-12-07 15:40:02 +01:00 committed by GitHub
parent 8d8fc75a4e
commit d94a768bd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 36 additions and 42 deletions

View File

@ -16,8 +16,8 @@ secio-secp256k1 = ["libp2p-secio/secp256k1"]
[dependencies] [dependencies]
bytes = "0.4" bytes = "0.4"
futures = "0.1" futures = "0.1"
multiaddr = { path = "./misc/multiaddr" } multiaddr = { package = "parity-multiaddr", path = "./misc/multiaddr" }
multihash = { path = "./misc/multihash" } multihash = { package = "parity-multihash", path = "./misc/multihash" }
libp2p-mplex = { path = "./muxers/mplex" } libp2p-mplex = { path = "./muxers/mplex" }
libp2p-identify = { path = "./protocols/identify" } libp2p-identify = { path = "./protocols/identify" }
libp2p-kad = { path = "./protocols/kad" } libp2p-kad = { path = "./protocols/kad" }

View File

@ -13,8 +13,8 @@ bs58 = "0.2.0"
bytes = "0.4" bytes = "0.4"
fnv = "1.0" fnv = "1.0"
log = "0.4" log = "0.4"
multiaddr = { path = "../misc/multiaddr" } multiaddr = { package = "parity-multiaddr", path = "../misc/multiaddr" }
multihash = { path = "../misc/multihash" } multihash = { package = "parity-multihash", path = "../misc/multihash" }
multistream-select = { path = "../misc/multistream-select" } multistream-select = { path = "../misc/multistream-select" }
futures = { version = "0.1", features = ["use_std"] } futures = { version = "0.1", features = ["use_std"] }
parking_lot = "0.7" parking_lot = "0.7"

View File

@ -13,7 +13,7 @@ data-encoding = "2.0"
dns-parser = "0.8" dns-parser = "0.8"
futures = "0.1" futures = "0.1"
libp2p-core = { path = "../../core" } libp2p-core = { path = "../../core" }
multiaddr = { path = "../multiaddr" } multiaddr = { package = "parity-multiaddr", path = "../multiaddr" }
net2 = "0.2" net2 = "0.2"
rand = "0.6" rand = "0.6"
tokio-reactor = "0.1" tokio-reactor = "0.1"

View File

@ -1,19 +1,19 @@
[package] [package]
authors = ["dignifiedquire <dignifiedquire@gmail.com>"] name = "parity-multiaddr"
authors = ["dignifiedquire <dignifiedquire@gmail.com>", "Parity Technologies <admin@parity.io>"]
description = "Implementation of the multiaddr format" description = "Implementation of the multiaddr format"
homepage = "https://github.com/multiformats/rust-multiaddr" homepage = "https://github.com/libp2p/rust-libp2p"
keywords = ["multiaddr", "ipfs"] keywords = ["multiaddr", "ipfs"]
license = "MIT" license = "MIT"
name = "multiaddr"
readme = "README.md" readme = "README.md"
version = "0.3.0" version = "0.1.0"
[dependencies] [dependencies]
arrayref = "0.3" arrayref = "0.3"
bs58 = "0.2.0" bs58 = "0.2.0"
byteorder = "0.4" byteorder = "0.4"
data-encoding = "2.1" data-encoding = "2.1"
multihash = { path = "../multihash" } multihash = { package = "parity-multihash", path = "../multihash" }
serde = "1.0.70" serde = "1.0.70"
unsigned-varint = "0.2" unsigned-varint = "0.2"
@ -21,7 +21,7 @@ unsigned-varint = "0.2"
bincode = "1" bincode = "1"
bs58 = "0.2.0" bs58 = "0.2.0"
data-encoding = "2" data-encoding = "2"
multihash = { path = "../multihash" } multihash = { package = "parity-multihash", path = "../multihash" }
quickcheck = "0.7" quickcheck = "0.7"
rand = "0.6" rand = "0.6"
serde_json = "1.0" serde_json = "1.0"

View File

@ -104,7 +104,7 @@ impl fmt::Display for Multiaddr {
/// # Examples /// # Examples
/// ///
/// ``` /// ```
/// use multiaddr::Multiaddr; /// use parity_multiaddr::Multiaddr;
/// ///
/// let address: Multiaddr = "/ip4/127.0.0.1/udt".parse().unwrap(); /// let address: Multiaddr = "/ip4/127.0.0.1/udt".parse().unwrap();
/// assert_eq!(address.to_string(), "/ip4/127.0.0.1/udt"); /// assert_eq!(address.to_string(), "/ip4/127.0.0.1/udt");
@ -158,7 +158,7 @@ impl Multiaddr {
/// # Examples /// # Examples
/// ///
/// ``` /// ```
/// use multiaddr::Multiaddr; /// use parity_multiaddr::Multiaddr;
/// ///
/// let address: Multiaddr = "/ip4/127.0.0.1".parse().unwrap(); /// let address: Multiaddr = "/ip4/127.0.0.1".parse().unwrap();
/// let nested = address.encapsulate("/udt").unwrap(); /// let nested = address.encapsulate("/udt").unwrap();
@ -177,7 +177,7 @@ impl Multiaddr {
/// # Examples /// # Examples
/// ///
/// ``` /// ```
/// use multiaddr::{Multiaddr, Protocol}; /// use parity_multiaddr::{Multiaddr, Protocol};
/// ///
/// let mut address: Multiaddr = "/ip4/127.0.0.1".parse().unwrap(); /// let mut address: Multiaddr = "/ip4/127.0.0.1".parse().unwrap();
/// address.append(Protocol::Tcp(10000)); /// address.append(Protocol::Tcp(10000));
@ -197,7 +197,7 @@ impl Multiaddr {
/// # Examples /// # Examples
/// ///
/// ``` /// ```
/// use multiaddr::{Multiaddr, ToMultiaddr}; /// use parity_multiaddr::{Multiaddr, ToMultiaddr};
/// ///
/// let address: Multiaddr = "/ip4/127.0.0.1/udt/sctp/5678".parse().unwrap(); /// let address: Multiaddr = "/ip4/127.0.0.1/udt/sctp/5678".parse().unwrap();
/// let unwrapped = address.decapsulate("/udt").unwrap(); /// let unwrapped = address.decapsulate("/udt").unwrap();
@ -212,7 +212,7 @@ impl Multiaddr {
/// Returns the original if the passed in address is not found /// Returns the original if the passed in address is not found
/// ///
/// ``` /// ```
/// use multiaddr::ToMultiaddr; /// use parity_multiaddr::ToMultiaddr;
/// ///
/// let address = "/ip4/127.0.0.1/udt/sctp/5678".to_multiaddr().unwrap(); /// let address = "/ip4/127.0.0.1/udt/sctp/5678".to_multiaddr().unwrap();
/// let unwrapped = address.decapsulate("/ip4/127.0.1.1").unwrap(); /// let unwrapped = address.decapsulate("/ip4/127.0.1.1").unwrap();
@ -256,7 +256,7 @@ impl Multiaddr {
/// ///
/// ``` /// ```
/// use std::net::Ipv4Addr; /// use std::net::Ipv4Addr;
/// use multiaddr::{Multiaddr, Protocol}; /// use parity_multiaddr::{Multiaddr, Protocol};
/// ///
/// let address: Multiaddr = "/ip4/127.0.0.1/udt/sctp/5678".parse().unwrap(); /// let address: Multiaddr = "/ip4/127.0.0.1/udt/sctp/5678".parse().unwrap();
/// ///
@ -273,7 +273,7 @@ impl Multiaddr {
/// Pops the last `Protocol` of this multiaddr, or `None` if the multiaddr is empty. /// Pops the last `Protocol` of this multiaddr, or `None` if the multiaddr is empty.
/// ``` /// ```
/// use multiaddr::{Multiaddr, Protocol}; /// use parity_multiaddr::{Multiaddr, Protocol};
/// ///
/// let mut address: Multiaddr = "/ip4/127.0.0.1/udt/sctp/5678".parse().unwrap(); /// let mut address: Multiaddr = "/ip4/127.0.0.1/udt/sctp/5678".parse().unwrap();
/// ///

View File

@ -1,15 +1,15 @@
extern crate bs58; extern crate bs58;
extern crate bincode; extern crate bincode;
extern crate data_encoding; extern crate data_encoding;
extern crate multiaddr; extern crate parity_multiaddr;
extern crate multihash; extern crate multihash;
extern crate quickcheck; extern crate quickcheck;
extern crate rand; extern crate rand;
extern crate serde_json; extern crate serde_json;
use data_encoding::HEXUPPER; use data_encoding::HEXUPPER;
use multiaddr::*;
use multihash::Multihash; use multihash::Multihash;
use parity_multiaddr::*;
use quickcheck::{Arbitrary, Gen, QuickCheck}; use quickcheck::{Arbitrary, Gen, QuickCheck};
use rand::Rng; use rand::Rng;
use std::{ use std::{

View File

@ -1,19 +1,13 @@
[package] [package]
name = "multihash" name = "parity-multihash"
description = "Implementation of the multihash format" description = "Implementation of the multihash format"
repository = "https://github.com/multiformats/rust-multihash" repository = "https://github.com/libp2p/rust-libp2p"
keywords = ["multihash", "ipfs"] keywords = ["multihash", "ipfs"]
version = "0.1.0"
version = "0.8.1-pre" authors = ["dignifiedquire <dignifiedquire@gmail.com>", "Parity Technologies <admin@parity.io>"]
authors = ["dignifiedquire <dignifiedquire@gmail.com>"]
license = "MIT" license = "MIT"
readme = "README.md" readme = "README.md"
documentation = "https://docs.rs/parity-multihash/"
documentation = "https://docs.rs/multihash/"
[dependencies] [dependencies]
blake2 = { version = "0.8", default-features = false } blake2 = { version = "0.8", default-features = false }

View File

@ -73,7 +73,7 @@ macro_rules! match_encoder {
/// # Examples /// # Examples
/// ///
/// ``` /// ```
/// use multihash::{encode, Hash}; /// use parity_multihash::{encode, Hash};
/// ///
/// assert_eq!( /// assert_eq!(
/// encode(Hash::SHA2256, b"hello world").unwrap().into_bytes(), /// encode(Hash::SHA2256, b"hello world").unwrap().into_bytes(),

View File

@ -1,6 +1,6 @@
extern crate multihash; extern crate parity_multihash;
use multihash::*; use parity_multihash::*;
/// Helper function to convert a hex-encoded byte array back into a bytearray /// Helper function to convert a hex-encoded byte array back into a bytearray
fn hex_to_bytes(s: &str) -> Vec<u8> { fn hex_to_bytes(s: &str) -> Vec<u8> {

View File

@ -14,7 +14,7 @@ fnv = "1"
futures = "0.1" futures = "0.1"
libp2p-core = { path = "../../core" } libp2p-core = { path = "../../core" }
log = "0.4.1" log = "0.4.1"
multiaddr = { path = "../../misc/multiaddr" } multiaddr = { package = "parity-multiaddr", path = "../../misc/multiaddr" }
parking_lot = "0.7" parking_lot = "0.7"
protobuf = "2.0.2" protobuf = "2.0.2"
smallvec = "0.6" smallvec = "0.6"

View File

@ -19,8 +19,8 @@ libp2p-identify = { path = "../../protocols/identify" }
libp2p-ping = { path = "../../protocols/ping" } libp2p-ping = { path = "../../protocols/ping" }
libp2p-core = { path = "../../core" } libp2p-core = { path = "../../core" }
log = "0.4" log = "0.4"
multiaddr = { path = "../../misc/multiaddr" } multiaddr = { package = "parity-multiaddr", path = "../../misc/multiaddr" }
multihash = { path = "../../misc/multihash" } multihash = { package = "parity-multihash", path = "../../misc/multihash" }
parking_lot = "0.7" parking_lot = "0.7"
protobuf = "2.0.2" protobuf = "2.0.2"
rand = "0.6.0" rand = "0.6.0"

View File

@ -13,7 +13,7 @@ arrayvec = "0.4"
bytes = "0.4" bytes = "0.4"
libp2p-core = { path = "../../core" } libp2p-core = { path = "../../core" }
log = "0.4.1" log = "0.4.1"
multiaddr = { path = "../../misc/multiaddr" } multiaddr = { package = "parity-multiaddr", path = "../../misc/multiaddr" }
multistream-select = { path = "../../misc/multistream-select" } multistream-select = { path = "../../misc/multistream-select" }
futures = "0.1" futures = "0.1"
parking_lot = "0.7" parking_lot = "0.7"

View File

@ -12,7 +12,7 @@ categories = ["network-programming", "asynchronous"]
libp2p-core = { path = "../../core" } libp2p-core = { path = "../../core" }
log = "0.4.1" log = "0.4.1"
futures = "0.1" futures = "0.1"
multiaddr = { path = "../../misc/multiaddr" } multiaddr = { package = "parity-multiaddr", path = "../../misc/multiaddr" }
tokio-dns-unofficial = "0.4" tokio-dns-unofficial = "0.4"
tokio-io = "0.1" tokio-io = "0.1"

View File

@ -12,7 +12,7 @@ categories = ["network-programming", "asynchronous"]
libp2p-core = { path = "../../core" } libp2p-core = { path = "../../core" }
log = "0.4.1" log = "0.4.1"
futures = "0.1" futures = "0.1"
multiaddr = { path = "../../misc/multiaddr" } multiaddr = { package = "parity-multiaddr", path = "../../misc/multiaddr" }
tk-listen = "0.2.0" tk-listen = "0.2.0"
tokio-io = "0.1" tokio-io = "0.1"
tokio-tcp = "0.1" tokio-tcp = "0.1"

View File

@ -12,7 +12,7 @@ categories = ["network-programming", "asynchronous"]
libp2p-core = { path = "../../core" } libp2p-core = { path = "../../core" }
log = "0.4.1" log = "0.4.1"
futures = "0.1" futures = "0.1"
multiaddr = { path = "../../misc/multiaddr" } multiaddr = { package = "parity-multiaddr", path = "../../misc/multiaddr" }
tokio-uds = "0.2" tokio-uds = "0.2"
[target.'cfg(all(unix, not(target_os = "emscripten")))'.dev-dependencies] [target.'cfg(all(unix, not(target_os = "emscripten")))'.dev-dependencies]

View File

@ -11,7 +11,7 @@ categories = ["network-programming", "asynchronous"]
[dependencies] [dependencies]
libp2p-core = { path = "../../core" } libp2p-core = { path = "../../core" }
futures = "0.1" futures = "0.1"
multiaddr = { path = "../../misc/multiaddr" } multiaddr = { package = "parity-multiaddr", path = "../../misc/multiaddr" }
log = "0.4.1" log = "0.4.1"
rw-stream-sink = { path = "../../misc/rw-stream-sink" } rw-stream-sink = { path = "../../misc/rw-stream-sink" }
tokio-io = "0.1" tokio-io = "0.1"