mirror of https://github.com/rwf2/Rocket.git
New version: 0.2.8.
This commit is contained in:
parent
614297eb9b
commit
73fed03ef4
|
@ -1,3 +1,10 @@
|
|||
# Version 0.2.8 (Jun 01, 2017)
|
||||
|
||||
## Codegen
|
||||
|
||||
* Lints were updated for `2017-06-01` nightly.
|
||||
* Minimum required `rustc` is `1.19.0-nightly (2017-06-01)`.
|
||||
|
||||
# Version 0.2.7 (May 26, 2017)
|
||||
|
||||
## Codegen
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "rocket_codegen"
|
||||
version = "0.2.7"
|
||||
version = "0.2.8"
|
||||
authors = ["Sergio Benitez <sb@sergio.bz>"]
|
||||
description = "Code generation for the Rocket web framework."
|
||||
documentation = "https://api.rocket.rs/rocket_codegen/"
|
||||
|
@ -15,7 +15,7 @@ build = "build.rs"
|
|||
plugin = true
|
||||
|
||||
[dependencies]
|
||||
rocket = { version = "0.2.7", path = "../lib/" }
|
||||
rocket = { version = "0.2.8", path = "../lib/" }
|
||||
log = "^0.3"
|
||||
|
||||
[dev-dependencies]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "rocket_contrib"
|
||||
version = "0.2.7"
|
||||
version = "0.2.8"
|
||||
authors = ["Sergio Benitez <sb@sergio.bz>"]
|
||||
description = "Community contributed libraries for the Rocket web framework."
|
||||
documentation = "https://api.rocket.rs/rocket_contrib/"
|
||||
|
@ -21,7 +21,7 @@ handlebars_templates = ["handlebars", "templates"]
|
|||
templates = ["serde", "serde_json", "glob"]
|
||||
|
||||
[dependencies]
|
||||
rocket = { version = "0.2.7", path = "../lib/" }
|
||||
rocket = { version = "0.2.8", path = "../lib/" }
|
||||
log = "^0.3"
|
||||
|
||||
# UUID dependencies.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "rocket"
|
||||
version = "0.2.7"
|
||||
version = "0.2.8"
|
||||
authors = ["Sergio Benitez <sb@sergio.bz>"]
|
||||
description = """
|
||||
Web framework for nightly with a focus on ease-of-use, expressibility, and speed.
|
||||
|
@ -44,7 +44,7 @@ optional = true
|
|||
|
||||
[dev-dependencies]
|
||||
lazy_static = "0.2"
|
||||
rocket_codegen = { version = "0.2.7", path = "../codegen" }
|
||||
rocket_codegen = { version = "0.2.8", path = "../codegen" }
|
||||
|
||||
[build-dependencies]
|
||||
ansi_term = "0.9"
|
||||
|
|
|
@ -22,7 +22,7 @@ guide.
|
|||
|
||||
The best way to learn Rocket is to _build something_. It should be fun and easy,
|
||||
and there's always someone to help. Alternatively, you can read through the
|
||||
[Rocket examples](https://github.com/SergioBenitez/Rocket/tree/v0.2.7/examples)
|
||||
[Rocket examples](https://github.com/SergioBenitez/Rocket/tree/v0.2.8/examples)
|
||||
or the [Rocket source
|
||||
code](https://github.com/SergioBenitez/Rocket/tree/v0.2.7/lib/src). Whatever you
|
||||
code](https://github.com/SergioBenitez/Rocket/tree/v0.2.8/lib/src). Whatever you
|
||||
decide to do next, we hope you have a blast!
|
||||
|
|
|
@ -53,8 +53,8 @@ project by ensuring your `Cargo.toml` contains the following:
|
|||
|
||||
```
|
||||
[dependencies]
|
||||
rocket = "0.2.7"
|
||||
rocket_codegen = "0.2.7"
|
||||
rocket = "0.2.8"
|
||||
rocket_codegen = "0.2.8"
|
||||
```
|
||||
|
||||
Modify `src/main.rs` so that it contains the code for the Rocket `Hello, world!`
|
||||
|
|
|
@ -172,10 +172,10 @@ we expected.
|
|||
|
||||
A version of this example's complete crate, ready to `cargo run`, can be found
|
||||
on
|
||||
[GitHub](https://github.com/SergioBenitez/Rocket/tree/v0.2.7/examples/hello_world).
|
||||
[GitHub](https://github.com/SergioBenitez/Rocket/tree/v0.2.8/examples/hello_world).
|
||||
You can find dozens of other complete examples, spanning all of Rocket's
|
||||
features, in the [GitHub examples
|
||||
directory](https://github.com/SergioBenitez/Rocket/tree/v0.2.7/examples/).
|
||||
directory](https://github.com/SergioBenitez/Rocket/tree/v0.2.8/examples/).
|
||||
|
||||
## Configuration
|
||||
|
||||
|
|
|
@ -43,8 +43,8 @@ Then add the usual Rocket dependencies to the `Cargo.toml` file:
|
|||
|
||||
```toml
|
||||
[dependencies]
|
||||
rocket = "0.2.7"
|
||||
rocket_codegen = "0.2.7"
|
||||
rocket = "0.2.8"
|
||||
rocket_codegen = "0.2.8"
|
||||
```
|
||||
|
||||
And finally, create a skeleton Rocket application to work off of in
|
||||
|
@ -402,4 +402,4 @@ through some of them to get a better feel for Rocket. Here are some ideas:
|
|||
|
||||
You can find the full source code for the completed pastebin tutorial in the
|
||||
[Rocket Github
|
||||
Repo](https://github.com/SergioBenitez/Rocket/tree/v0.2.7/examples/pastebin).
|
||||
Repo](https://github.com/SergioBenitez/Rocket/tree/v0.2.8/examples/pastebin).
|
||||
|
|
|
@ -31,7 +31,7 @@ requests under certain conditions. If a `POST` request contains a body of
|
|||
field has the name `_method` and a valid HTTP method as its value, that field's
|
||||
value is used as the method for the incoming request. This allows Rocket
|
||||
applications to submit non-`POST` forms. The [todo
|
||||
example](https://github.com/SergioBenitez/Rocket/tree/v0.2.7/examples/todo/static/index.html.tera#L47)
|
||||
example](https://github.com/SergioBenitez/Rocket/tree/v0.2.8/examples/todo/static/index.html.tera#L47)
|
||||
makes use of this feature to submit `PUT` and `DELETE` requests from a web form.
|
||||
|
||||
## Format
|
||||
|
@ -185,7 +185,7 @@ fn index(cookies: &Cookies, content: ContentType) -> String { ... }
|
|||
```
|
||||
|
||||
The [cookies example on
|
||||
GitHub](https://github.com/SergioBenitez/Rocket/tree/v0.2.7/examples/cookies)
|
||||
GitHub](https://github.com/SergioBenitez/Rocket/tree/v0.2.8/examples/cookies)
|
||||
illustrates how to use the `Cookies` type to get and set cookies.
|
||||
|
||||
You can implement `FromRequest` for your own types. For instance, to protect a
|
||||
|
@ -259,9 +259,9 @@ validates integers over that age. If a form is submitted with a bad age,
|
|||
Rocket won't call a handler requiring a valid form for that structure. You can
|
||||
use `Option` or `Result` types for fields to catch parse failures.
|
||||
|
||||
The [forms](https://github.com/SergioBenitez/Rocket/tree/v0.2.7/examples/forms)
|
||||
The [forms](https://github.com/SergioBenitez/Rocket/tree/v0.2.8/examples/forms)
|
||||
and [forms kitchen
|
||||
sink](https://github.com/SergioBenitez/Rocket/tree/v0.2.7/examples/form_kitchen_sink)
|
||||
sink](https://github.com/SergioBenitez/Rocket/tree/v0.2.8/examples/form_kitchen_sink)
|
||||
examples on GitHub provide further illustrations.
|
||||
|
||||
### JSON
|
||||
|
@ -282,7 +282,7 @@ fn new(task: JSON<Task>) -> String { ... }
|
|||
|
||||
The only condition is that the generic type to `JSON` implements the
|
||||
`Deserialize` trait. See the [JSON example on
|
||||
GitHub](https://github.com/SergioBenitez/Rocket/tree/v0.2.7/examples/json) for a
|
||||
GitHub](https://github.com/SergioBenitez/Rocket/tree/v0.2.8/examples/json) for a
|
||||
complete example.
|
||||
|
||||
### Streaming
|
||||
|
@ -305,7 +305,7 @@ The route above accepts any `POST` request to the `/upload` path with
|
|||
text response if the upload succeeds. If the upload fails, an error response is
|
||||
returned. The handler above is complete. It really is that simple! See the
|
||||
[GitHub example
|
||||
code](https://github.com/SergioBenitez/Rocket/tree/v0.2.7/examples/raw_upload)
|
||||
code](https://github.com/SergioBenitez/Rocket/tree/v0.2.8/examples/raw_upload)
|
||||
for the full crate.
|
||||
|
||||
## Query Strings
|
||||
|
@ -341,7 +341,7 @@ the request is forwarded to the next matching route. To catch parse failures,
|
|||
you can use `Option` or `Result` as the type of the field to catch errors for.
|
||||
|
||||
See [the GitHub
|
||||
example](https://github.com/SergioBenitez/Rocket/tree/v0.2.7/examples/query_params)
|
||||
example](https://github.com/SergioBenitez/Rocket/tree/v0.2.8/examples/query_params)
|
||||
for a complete illustration.
|
||||
|
||||
## Error Catchers
|
||||
|
@ -378,7 +378,7 @@ types [Request](https://api.rocket.rs/rocket/struct.Request.html) and/or
|
|||
[Error](https://api.rocket.rs/rocket/enum.Error.html). At present, the `Error`
|
||||
type is not particularly useful, and so it is often omitted. The
|
||||
[error catcher
|
||||
example](https://github.com/SergioBenitez/Rocket/tree/v0.2.7/examples/errors) on
|
||||
example](https://github.com/SergioBenitez/Rocket/tree/v0.2.8/examples/errors) on
|
||||
GitHub illustrates their use in full.
|
||||
|
||||
Rocket has a default catcher for all of the standard HTTP error codes including
|
||||
|
|
|
@ -127,7 +127,7 @@ serialization in a fixed-sized body. If serialization fails, the request is
|
|||
forwarded to the **500** error catcher.
|
||||
|
||||
For a complete example, see the [JSON example on
|
||||
GitHub](https://github.com/SergioBenitez/Rocket/tree/v0.2.7/examples/json).
|
||||
GitHub](https://github.com/SergioBenitez/Rocket/tree/v0.2.8/examples/json).
|
||||
|
||||
## Templates
|
||||
|
||||
|
@ -156,7 +156,7 @@ The context can be any type that implements `Serialize` and serializes to an
|
|||
[Template](https://api.rocket.rs/rocket_contrib/struct.Template.html) API
|
||||
documentation contains more information about templates, while the [Handlebars
|
||||
Templates example on
|
||||
GitHub](https://github.com/SergioBenitez/Rocket/tree/v0.2.7/examples/handlebars_templates)
|
||||
GitHub](https://github.com/SergioBenitez/Rocket/tree/v0.2.8/examples/handlebars_templates)
|
||||
is a fully composed application that makes use of Handlebars templates.
|
||||
|
||||
## Streaming
|
||||
|
|
|
@ -138,7 +138,7 @@ attributes.
|
|||
|
||||
You can find a complete example using the `HitCounter` structure in the [state
|
||||
example on
|
||||
GitHub](https://github.com/SergioBenitez/Rocket/tree/v0.2.7/examples/state) and
|
||||
GitHub](https://github.com/SergioBenitez/Rocket/tree/v0.2.8/examples/state) and
|
||||
learn more about the [manage
|
||||
method](https://api.rocket.rs/rocket/struct.Rocket.html#method.manage) and
|
||||
[State type](https://api.rocket.rs/rocket/struct.State.html) in the API docs.
|
||||
|
|
|
@ -40,7 +40,7 @@ follows:
|
|||
|
||||
```toml
|
||||
[dev-dependencies]
|
||||
rocket = { version = "0.2.7", features = ["testing"] }
|
||||
rocket = { version = "0.2.8", features = ["testing"] }
|
||||
```
|
||||
|
||||
With this in place, running `cargo test` will result in Cargo compiling Rocket
|
||||
|
@ -107,7 +107,7 @@ assert_eq!(body_str, Some("Hello, world!".to_string()));
|
|||
|
||||
That's it! Run the tests with `cargo test`. The complete application, with
|
||||
testing, can be found in the [GitHub testing
|
||||
example](https://github.com/SergioBenitez/Rocket/tree/v0.2.7/examples/testing).
|
||||
example](https://github.com/SergioBenitez/Rocket/tree/v0.2.8/examples/testing).
|
||||
|
||||
## Codegen Debug
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
[release]
|
||||
url = "https://crates.io/crates/rocket"
|
||||
version = "0.2.7"
|
||||
date = "May 26, 2017"
|
||||
version = "0.2.8"
|
||||
date = "Jun 01, 2017"
|
||||
|
||||
[[top_features]]
|
||||
title = "Type Safe"
|
||||
|
|
Loading…
Reference in New Issue