Skip to content

Commit

Permalink
Merge pull request #339 from http-rs/prep-release
Browse files Browse the repository at this point in the history
Prepare 0.3.0 release
  • Loading branch information
yoshuawuyts authored Oct 31, 2019
2 parents 528c2b1 + 0117539 commit 8ba713c
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 494 deletions.
497 changes: 58 additions & 439 deletions CHANGELOG.md

Large diffs are not rendered by default.

14 changes: 5 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
[package]
name = "tide"
version = "0.3.0"
description = "Serve the web – HTTP server framework"
authors = [
"Aaron Turon <aturon@mozilla.com>",
"Yoshua Wuyts <yoshuawuyts@gmail.com>",
]
description = "WIP modular web framework"
documentation = "https://docs.rs/tide"
keywords = ["tide", "http", "web", "framework", "async"]
categories = [
Expand All @@ -13,10 +15,8 @@ categories = [
]
edition = "2018"
license = "MIT OR Apache-2.0"
name = "tide"
readme = "README.md"
repository = "https://github.com/rustasync/tide"
version = "0.2.0"
repository = "https://github.com/http-rs/tide"

[dependencies]
cookie = { version = "0.12.0", features = ["percent-encode"] }
Expand Down Expand Up @@ -47,6 +47,7 @@ version = "0.16.1"
[features]
default = ["hyper"]
hyper = ["http-service-hyper"]
unstable = []

[dev-dependencies]
basic-cookies = "0.1.3"
Expand All @@ -60,8 +61,3 @@ mime_guess = "2.0.1"
percent-encoding = "2.1.0"
serde = { version = "1.0.102", features = ["derive"] }
structopt = "0.3.3"

[patch.crates-io]
http-service = { git = "https://github.com/rustasync/http-service", branch = "master" }
http-service-hyper = { git = "https://github.com/rustasync/http-service", branch = "master" }
http-service-mock = { git = "https://github.com/rustasync/http-service", branch = "master" }
31 changes: 4 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1 align="center">Tide</h1>
<div align="center">
<strong>
Empowering everyone to build HTTP Services.
Serve the web
</strong>
</div>

Expand All @@ -13,11 +13,6 @@
<img src="https://img.shields.io/crates/v/tide.svg?style=flat-square"
alt="Crates.io version" />
</a>
<!-- Build Status -->
<a href="https://travis-ci.org/rustasync/tide">
<img src="https://img.shields.io/travis/rustasync/tide.svg?style=flat-square"
alt="Build Status" />
</a>
<!-- Downloads -->
<a href="https://crates.io/crates/tide">
<img src="https://img.shields.io/crates/d/tide.svg?style=flat-square"
Expand Down Expand Up @@ -46,14 +41,8 @@
</h3>
</div>

<div align="center">
<sub>Built with 🌊 by <a href="https://github.com/rustasync">The Rust Async Ecosystem WG</a>
</div>

## About

A modular web framework built around async/await. It's actively being developed by the Rust Async
Ecosystem WG, and **not ready for production use yet**.
A modular web framework built around async/await. It's actively being developed
and **not ready for production use yet**.

## Examples

Expand All @@ -64,7 +53,7 @@ Ecosystem WG, and **not ready for production use yet**.

fn main() -> Result<(), std::io::Error> {
let mut app = tide::App::new();
app.at("/").get(async move |_| "Hello, world!");
app.at("/").get(|_| async move { "Hello, world!" });
Ok(app.serve("127.0.0.1:8000")?)
}
```
Expand All @@ -89,18 +78,6 @@ Read about the design here:
- [Middleware in Tide](https://rustasync.github.io/team/2018/11/07/tide-middleware.html)
- [Tide's evolving middleware approach](https://rustasync.github.io/team/2018/11/27/tide-middleware-evolution.html)

### Supported Rust Versions

Tide is built against the latest Rust nightly releases and as such, due to it's use of `std` futures,
it has the following specific breakpoints that align with std future API changes:

| Tide | Rust |
| ----------- | ----------------------- |
| &le; v0.1.0 | &le; nightly-2019-04-07 |
| &ge; v0.1.1 | &ge; nightly-2019-04-08 |

_**Note:** Since these are due to changes in `std`, projects with dependencies that use conflicting versions of `std::futures` will not build successfully._

## Contributing

Want to join us? Check out our [The "Contributing" section of the
Expand Down
2 changes: 1 addition & 1 deletion examples/default_headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fn main() {
.header("X-Server", "Tide"),
);

app.at("/").get(|_| async move {"Hello, world!"});
app.at("/").get(|_| async move { "Hello, world!" });

app.serve("127.0.0.1:8000").unwrap();
}
2 changes: 1 addition & 1 deletion examples/hello.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
fn main() {
let mut app = tide::App::new();
app.at("/").get(|_| async move {"Hello, world!" });
app.at("/").get(|_| async move { "Hello, world!" });
app.serve("127.0.0.1:8000").unwrap();
}
2 changes: 1 addition & 1 deletion examples/staticfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl StaticFile {
}
};

let mime = mime_guess::guess_mime_type(path);
let mime = mime_guess::from_path(path).first_or_octet_stream();
let mime_str = mime.as_ref();
let size = meta.len();

Expand Down
30 changes: 15 additions & 15 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,9 @@ mod tests {
#[test]
fn simple_static() {
let mut router = App::new();
router.at("/").get(|_| async move {"/"});
router.at("/foo").get(|_| async move {"/foo"});
router.at("/foo/bar").get(|_| async move {"/foo/bar"});
router.at("/").get(|_| async move { "/" });
router.at("/foo").get(|_| async move { "/foo" });
router.at("/foo/bar").get(|_| async move { "/foo/bar" });

for path in &["/", "/foo", "/foo/bar"] {
let res = block_on(simulate_request(&router, path, http::Method::GET));
Expand All @@ -336,23 +336,23 @@ mod tests {
#[test]
fn nested_static() {
let mut router = App::new();
router.at("/a").get(|_| async move {"/a"});
router.at("/a").get(|_| async move { "/a" });
router.at("/b").nest(|router| {
router.at("/").get(|_| async move {"/b"});
router.at("/a").get(|_| async move {"/b/a"});
router.at("/b").get(|_| async move {"/b/b"});
router.at("/").get(|_| async move { "/b" });
router.at("/a").get(|_| async move { "/b/a" });
router.at("/b").get(|_| async move { "/b/b" });
router.at("/c").nest(|router| {
router.at("/a").get(|_| async move {"/b/c/a"});
router.at("/b").get(|_| async move {"/b/c/b"});
router.at("/a").get(|_| async move { "/b/c/a" });
router.at("/b").get(|_| async move { "/b/c/b" });
});
router.at("/d").get(|_| async move {"/b/d"});
router.at("/d").get(|_| async move { "/b/d" });
});
router.at("/a/a").nest(|router| {
router.at("/a").get(|_| async move {"/a/a/a"});
router.at("/b").get(|_| async move {"/a/a/b"});
router.at("/a").get(|_| async move { "/a/a/a" });
router.at("/b").get(|_| async move { "/a/a/b" });
});
router.at("/a/b").nest(|router| {
router.at("/").get(|_| async move {"/a/b"});
router.at("/").get(|_| async move { "/a/b" });
});

for failing_path in &["/", "/a/a", "/a/b/a"] {
Expand All @@ -378,9 +378,9 @@ mod tests {
fn multiple_methods() {
let mut router = App::new();
router.at("/a").nest(|router| {
router.at("/b").get(|_| async move {"/a/b GET"});
router.at("/b").get(|_| async move { "/a/b GET" });
});
router.at("/a/b").post(|_| async move {"/a/b POST"});
router.at("/a/b").post(|_| async move { "/a/b POST" });

for (path, method) in &[("/a/b", http::Method::GET), ("/a/b", http::Method::POST)] {
let res = block_on(simulate_request(&router, path, method.clone()));
Expand Down
1 change: 0 additions & 1 deletion src/middleware/cookies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,5 +172,4 @@ mod tests {

assert!(iter.next().is_none());
}

}

0 comments on commit 8ba713c

Please sign in to comment.